You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,15 @@
1
1
# CHANGELOG
2
2
3
-
> Summary index — current release details are packaged in [changelogs/v2.0.3.md](./changelogs/v2.0.3.md); historical details live in the repository changelog archive.
4
-
> **Last updated**: 2026-06-11
3
+
> Summary index — current release details are packaged in [changelogs/v2.0.4.md](./changelogs/v2.0.4.md); historical details live in the repository changelog archive.
4
+
> **Last updated**: 2026-06-12
5
5
6
6
---
7
7
8
8
## Version Overview
9
9
10
10
| Version | Date | Summary | Details |
11
11
|---------|------|---------|---------|
12
+
|[v2.0.4](./changelogs/v2.0.4.md)| 2026-06-12 | Patch: production-safe Model index rollout controls, `schema-dsl@2.0.9`, capability-index wording cleanup, and documentation home refinements |[View](./changelogs/v2.0.4.md)|
12
13
|[v2.0.3](./changelogs/v2.0.3.md)| 2026-06-11 | Patch: v1 compatibility fixes, public stats APIs, standalone docs-site link safety, bilingual docs consistency, and release preflight alignment |[View](./changelogs/v2.0.3.md)|
13
14
|[v2.0.2](./changelogs/v2.0.2.md)| 2026-06-09 | Patch: direct runtime, optional and development dependencies pinned to exact versions for deterministic consumer installs |[View](./changelogs/v2.0.2.md)|
14
15
|[v2.0.1](./changelogs/v2.0.1.md)| 2026-06-03 | Patch: model collection/pool compatibility, automatic-index task dedupe, runtime cache/pool v1 smooth-upgrade fixes, and current docs/types alignment |[View](./changelogs/v2.0.1.md)|
@@ -446,7 +447,8 @@ const result = await msq.collection('orders').insertOne(dataFromMongoose);
Copy file name to clipboardExpand all lines: README.md
+30-3Lines changed: 30 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ monSQLize keeps the MongoDB driver mental model while adding the production feat
39
39
40
40
- Drop-in collection helpers that preserve MongoDB-style CRUD, aggregation, indexes, transactions, and Change Streams.
41
41
- Smart caching through `cache-hub`, including local memory caching, optional Redis-backed L2 caching, automatic invalidation, and function-level caching.
42
-
- A lightweight Model layer with `schema-dsl` validation, hooks, relations, populate, custom methods, timestamps, soft delete, and optimistic locking.
42
+
- A lightweight Model layer with `schema-dsl` validation, hooks, relations, populate, custom methods, timestamps, soft delete, optimistic locking, and production-safe index preflight.
43
43
- Multi-connection-pool support, pool health checks, pool-scoped collections/models, and fallback strategies.
44
44
- Business locks and distributed locks for multi-instance deployments.
45
45
- Saga orchestration for multi-step business workflows.
@@ -253,6 +253,27 @@ module.exports = {
253
253
254
254
Relative model paths are resolved from `process.cwd()`. In production services, prefer absolute paths such as `path.join(__dirname, 'models')`.
255
255
256
+
### Production Model Index Rollout
257
+
258
+
Model-declared indexes are still created automatically by default for backward compatibility. Production services can turn off automatic indexing and run an explicit preflight before creating missing indexes:
`ensureModelIndexes()` creates only missing indexes. It does not drop, rename, or rebuild conflicting indexes.
276
+
256
277
### Populate
257
278
258
279
```js
@@ -497,19 +518,25 @@ npm run test:real-env:private
497
518
498
519
## Release Status
499
520
500
-
The current published release is `v2.0.3`.
521
+
The current published release is `v2.0.4`.
501
522
502
523
Key release-readiness points:
503
524
504
525
- TypeScript rewrite completed for the current runtime and test entry points.
505
526
- Package exports are consolidated under `dist/cjs`, `dist/esm`, and `dist/types`.
506
527
- npm packages include the runtime bundles and declaration files only; source maps are disabled by default and can be generated locally with `MONSQLIZE_BUILD_SOURCEMAPS=1 npm run build`.
507
528
- v1 smooth-upgrade compatibility has been validated against the target workspace consumers.
508
-
-`schema-dsl` follows the npm `latest` TypeScript line `schema-dsl@2.0.8`; deprecated `2.3.x` mistake releases are intentionally excluded.
529
+
-`schema-dsl` follows the npm `latest` TypeScript line `schema-dsl@2.0.9`; deprecated `2.3.x` mistake releases are intentionally excluded.
509
530
- GitHub Actions publishes to npm from `v*` tags after running `npm run release:preflight`; the publish step skips duplicate lifecycle scripts because the gate already ran in the same job.
510
531
511
532
## Roadmap
512
533
534
+
### v2.0.4
535
+
536
+
- Production-safe Model index rollout controls with `autoIndex`, dry-run preflight, conflict reporting, and explicit `ensureIndexes()` / `ensureModelIndexes()` APIs.
537
+
-`schema-dsl` updated to `2.0.9`, with transitive `cache-hub` aligned to `2.2.4`.
538
+
- User-facing capability and verification documentation wording cleaned up, plus documentation home experience refinements.
539
+
513
540
### v2.0.3
514
541
515
542
- v1 compatibility patch for documented `findPage({ cache })` behavior.
v2.0.4 is a production-safety and documentation-quality patch. It keeps the public API backward compatible while adding explicit Model index rollout controls, updating the schema validation dependency, and refining user-facing documentation language.
6
+
7
+
---
8
+
9
+
## Runtime Fixes
10
+
11
+
- Added production-safe Model index controls:
12
+
- runtime-level and model-level `autoIndex` options.
13
+
- explicit `ModelInstance.ensureIndexes()` and `MonSQLize.ensureModelIndexes()` APIs.
14
+
- dry-run index preflight with `existing`, `missing`, `conflicts`, and `failed` classification.
15
+
- missing-index creation without dropping, renaming, or rebuilding conflicting indexes.
16
+
-`model-index-error` events for observable automatic-index creation failures.
17
+
- Kept automatic Model indexing enabled by default for backward compatibility.
18
+
- Moved runtime Model index aggregation into the Model runtime helper layer so the strict source-size gate remains clean.
19
+
20
+
## Dependencies
21
+
22
+
- Updated `schema-dsl` from `2.0.8` to npm `latest``2.0.9`.
23
+
- Confirmed `schema-dsl@2.0.9` keeps the required `dsl()` and `validate()` runtime paths compatible with monSQLize.
24
+
- Confirmed the `schema-dsl` transitive `cache-hub` dependency now resolves to `2.2.4`, matching the root direct dependency.
25
+
26
+
## Documentation
27
+
28
+
- Documented the recommended production index rollout flow:
- create only missing indexes during a low-traffic maintenance window.
32
+
- monitor TTL and index-build behavior.
33
+
- Corrected create-index documentation to distinguish local `INVALID_ARGUMENT` validation from raw MongoDB driver/server index conflicts.
34
+
- Reworded capability-index and verification-entry documentation to use user-facing availability and verification language instead of internal migration status terms.
35
+
- Refined the documentation home experience with the VextJS-style footer, aligned hero/feature layout, and updated hero data-flow visual.
36
+
37
+
---
38
+
39
+
## Compatibility
40
+
41
+
- SemVer: patch release.
42
+
- Breaking changes: none.
43
+
- Existing v2 imports remain under `dist/cjs`, `dist/esm`, and `dist/types`.
44
+
- Existing default automatic Model indexing behavior remains enabled unless users opt into the new production-safe controls.
45
+
46
+
---
47
+
48
+
## Validation
49
+
50
+
-`npm run lint`
51
+
-`npm run check:docs-examples`
52
+
-`npm run type-check`
53
+
- targeted Model/index unit and integration tests
54
+
-`npm run test:examples`
55
+
-`npm --prefix website run build`
56
+
-`npm run verify:fast`
57
+
-`npm run test:server-matrix`
58
+
-`npm run test:audit`
59
+
-`git diff --check`
60
+
61
+
Full release validation is handled by `npm run release:preflight`, `npm pack --dry-run`, `npm publish --dry-run`, and pack install smoke before publishing.
0 commit comments