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.
- Added production-safe Model index controls:
- runtime-level and model-level
autoIndexoptions. - explicit
ModelInstance.ensureIndexes()andMonSQLize.ensureModelIndexes()APIs. - dry-run index preflight with
existing,missing,conflicts, andfailedclassification. - missing-index creation without dropping, renaming, or rebuilding conflicting indexes.
model-index-errorevents for observable automatic-index creation failures.
- runtime-level and model-level
- Kept automatic Model indexing enabled by default for backward compatibility.
- Moved runtime Model index aggregation into the Model runtime helper layer so the strict source-size gate remains clean.
- Updated
schema-dslfrom2.0.8to npmlatest2.0.9. - Confirmed
schema-dsl@2.0.9keeps the requireddsl()andvalidate()runtime paths compatible with monSQLize. - Confirmed the
schema-dsltransitivecache-hubdependency now resolves to2.2.4, matching the root direct dependency.
- Documented the recommended production index rollout flow:
- set
autoIndex: falsein production services. - run
ensureIndexes({ dryRun: true })/ensureModelIndexes({ dryRun: true }). - create only missing indexes during a low-traffic maintenance window.
- monitor TTL and index-build behavior.
- set
- Corrected create-index documentation to distinguish local
INVALID_ARGUMENTvalidation from raw MongoDB driver/server index conflicts. - Reworded capability-index and verification-entry documentation to use user-facing availability and verification language instead of internal migration status terms.
- Refined the documentation home experience with the VextJS-style footer, aligned hero/feature layout, and updated hero data-flow visual.
- SemVer: patch release.
- Breaking changes: none.
- Existing v2 imports remain under
dist/cjs,dist/esm, anddist/types. - Existing default automatic Model indexing behavior remains enabled unless users opt into the new production-safe controls.
npm run lintnpm run check:docs-examplesnpm run type-check- targeted Model/index unit and integration tests
npm run test:examplesnpm --prefix website run buildnpm run verify:fastnpm run test:server-matrixnpm run test:auditgit diff --check
Full release validation is handled by npm run release:preflight, npm pack --dry-run, npm publish --dry-run, and pack install smoke before publishing.