monsqlize 3.3.0 → 3.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -3
- package/MIGRATION.md +66 -5
- package/README.md +37 -9
- package/changelogs/v3.3.1.md +28 -0
- package/changelogs/v3.3.2.md +37 -0
- package/dist/cjs/cli/data-task.cjs +7 -5
- package/dist/cjs/index.cjs +5032 -3325
- package/dist/cjs/transaction/Transaction.cjs +140 -14
- package/dist/cjs/transaction/TransactionManager.cjs +145 -25
- package/dist/esm/index.mjs +4836 -3130
- package/dist/types/base.d.mts +1 -1
- package/dist/types/base.d.ts +1 -1
- package/dist/types/collection.d.mts +10 -10
- package/dist/types/collection.d.ts +10 -10
- package/dist/types/data-tasks.d.mts +1 -0
- package/dist/types/data-tasks.d.ts +1 -0
- package/dist/types/index.d.mts +3 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/types/model.d.mts +16 -12
- package/dist/types/model.d.ts +16 -12
- package/dist/types/monsqlize.d.mts +8 -2
- package/dist/types/monsqlize.d.ts +8 -2
- package/dist/types/pool.d.mts +3 -0
- package/dist/types/pool.d.ts +3 -0
- package/dist/types/runtime.d.mts +11 -23
- package/dist/types/runtime.d.ts +11 -23
- package/dist/types/slow-query-log.d.mts +9 -1
- package/dist/types/slow-query-log.d.ts +9 -1
- package/dist/types/sync.d.mts +4 -2
- package/dist/types/sync.d.ts +4 -2
- package/dist/types/transaction.d.mts +6 -4
- package/dist/types/transaction.d.ts +6 -4
- package/package.json +7 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
-
> Summary index — the
|
|
4
|
-
> **Last updated**: 2026-
|
|
3
|
+
> Summary index — the 3.3.2 versioned details are in [changelogs/v3.3.2.md](./changelogs/v3.3.2.md). A versioned note does not establish npm publication; check the registry and immutable tag before deployment.
|
|
4
|
+
> **Last updated**: 2026-10-22
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
## Unreleased
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
The audited cache, query, Model, transaction, sync and lifecycle repairs are assigned to **3.3.2**. See its [versioned notes](./changelogs/v3.3.2.md) and the [next-change staging log](https://github.com/devcodex-labs/monSQLize/blob/main/changelogs/unreleased.md). Untagged checkouts remain release candidates.
|
|
11
11
|
|
|
12
12
|
## Version Overview
|
|
13
13
|
|
|
14
14
|
| Version | Date | Summary | Details |
|
|
15
15
|
|---------|------|---------|---------|
|
|
16
|
+
| [v3.3.2](./changelogs/v3.3.2.md) | 2026-10-22 | Patch: BSON/cache identity, Model invalidation, pagination, transaction/sync lifecycle and upgrade safeguards; availability requires registry/tag verification | [View](./changelogs/v3.3.2.md) |
|
|
17
|
+
| [v3.3.1](./changelogs/v3.3.1.md) | 2026-09-23 | Patch: audited Model, count, transaction, cache, sync, pool, Data Task and SSH corrections | [View](./changelogs/v3.3.1.md) |
|
|
16
18
|
| [v3.3.0](./changelogs/v3.3.0.md) | 2026-08-11 | Minor: static Model schema type inference, schema-dsl 3.0.4, and silent-by-default Pool logging | [View](./changelogs/v3.3.0.md) |
|
|
17
19
|
| [v3.2.0](./changelogs/v3.2.0.md) | 2026-08-07 | Minor: Vector Search APIs, relation-safe Model deletion, and relation projection improvements | [View](./changelogs/v3.2.0.md) |
|
|
18
20
|
| [v3.1.0](./changelogs/v3.1.0.md) | 2026-07-15 | Minor: schema-dsl v3 GA consumption, canonical validation errors, and normalized full-document persistence | [View](./changelogs/v3.1.0.md) |
|
package/MIGRATION.md
CHANGED
|
@@ -1,8 +1,69 @@
|
|
|
1
|
-
# Migration Guide: monSQLize
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
v1
|
|
5
|
-
|
|
1
|
+
# Migration Guide: monSQLize
|
|
2
|
+
|
|
3
|
+
Start with the 3.3.1 to 3.3.2 upgrade notes for this candidate, then consult the
|
|
4
|
+
older v3 and v1/v2 paths if needed. Review the operational boundaries that
|
|
5
|
+
intersect your application before changing its installed version.
|
|
6
|
+
|
|
7
|
+
## Upgrade from v3.3.1 to v3.3.2
|
|
8
|
+
|
|
9
|
+
An untagged checkout is a release candidate; verify the immutable tag and npm
|
|
10
|
+
registry before deployment. The upgrade guide is also available in [English](https://github.com/devcodex-labs/monSQLize/blob/main/docs/en/upgrade-3.3.2.md) and
|
|
11
|
+
[简体中文](https://github.com/devcodex-labs/monSQLize/blob/main/docs/zh/upgrade-3.3.2.md).
|
|
12
|
+
|
|
13
|
+
- Query, page, totals and bookmark caches now include source/authentication and
|
|
14
|
+
pool identities. Upgrade all application instances sharing a backend together;
|
|
15
|
+
old entries are not read, so expect a cold start and plan for refill traffic.
|
|
16
|
+
No global Redis flush is needed. TTL/cleanup can reclaim old keys. Applications
|
|
17
|
+
with custom cache-key patterns should use collection invalidation APIs or
|
|
18
|
+
result-matching descriptors rather than rebuilding internal prefixes from
|
|
19
|
+
`getNamespace()`.
|
|
20
|
+
- Custom `cursorValueNormalizer` functions need a non-empty stable
|
|
21
|
+
`cursorValueNormalizerVersion` such as `token-string:v1` to use page caching or
|
|
22
|
+
bookmark prewarming. Change the identifier when behavior or captured config
|
|
23
|
+
changes. A per-query function override needs its own version. Without one,
|
|
24
|
+
queries still run, page caches and automatic bookmark reads are bypassed,
|
|
25
|
+
prewarming throws `INVALID_ARGUMENT`, and deep jumps can reach `jump.maxHops`.
|
|
26
|
+
Prefer `cursorTypes` for simple hints. Custom functions restore every cursor
|
|
27
|
+
field, including `_id`, instead of default Date/ObjectId restoration.
|
|
28
|
+
- Transaction `timeout` / `maxDuration` now bound work before commit starts;
|
|
29
|
+
commit timing belongs to driver/server limits. For direct `Transaction`
|
|
30
|
+
construction, use `transactionOptions.maxCommitTimeMS`; high-level helper
|
|
31
|
+
options do not currently forward this field. Unknown commit results invalidate
|
|
32
|
+
affected caches conservatively and preserve the original error; they do not
|
|
33
|
+
imply rollback or permit automatic business-callback replay.
|
|
34
|
+
- Cache refill coordination applies to the same CacheLike object in one process.
|
|
35
|
+
Cross-process Redis notifications remain eventually consistent. Same-source
|
|
36
|
+
routes invalidate together when registered on that cache object; host aliases
|
|
37
|
+
need consistent endpoints or explicit related-route invalidation.
|
|
38
|
+
|
|
39
|
+
- Shared BSON query-key encoding uses generation `v4`, including effective BSON
|
|
40
|
+
input/decoding options and native per-occurrence function serialization.
|
|
41
|
+
Query, aggregate, totals and bookmark entries start cold. The public `bm:v4`
|
|
42
|
+
prefix is retained, but its hash changes. Use broad invalidation or isolate
|
|
43
|
+
cache backends during mixed-version operation; exact descriptors use the
|
|
44
|
+
current generation. JSON-incompatible result modes bypass result caching.
|
|
45
|
+
- Pipeline-based `findPage()` rejects find-only projections such as `$slice`,
|
|
46
|
+
`$elemMatch` and positional projection with `INVALID_OPERATION`. Ordered
|
|
47
|
+
`findByIds()` retains one-query native identity for supported projections and
|
|
48
|
+
rejects combinations that cannot preserve it; `preserveOrder: false` retains
|
|
49
|
+
native execution. Check the query guides before relying on special `_id`
|
|
50
|
+
transformations or dynamic BSON decoding maps.
|
|
51
|
+
- Before enabling Change Stream sync on an empty checkpoint store, confirm that
|
|
52
|
+
a custom store can round-trip the opaque initial operation-time envelope and
|
|
53
|
+
its canonical EJSON Timestamp. Existing raw resume tokens remain supported.
|
|
54
|
+
Before downgrade, pause sync and preserve the checkpoint; an older reader
|
|
55
|
+
cannot treat the initial envelope as a raw token. A persisted event token
|
|
56
|
+
restores format compatibility only subject to history retention and the
|
|
57
|
+
older reader's behavior. Never clear the envelope to restart from now.
|
|
58
|
+
- Sync idempotency markers use v2 JSON tuple keys. Stop writers and drain work
|
|
59
|
+
before upgrade or rollback; preserve the checkpoint, both marker generations
|
|
60
|
+
and a recovery snapshot. Do not run mixed key-format writers or blindly trust
|
|
61
|
+
ambiguous legacy concatenated keys. Use target-owned business idempotence for
|
|
62
|
+
replay unless a finite mapping is provable. Rollback also needs a compatible
|
|
63
|
+
raw token and a verified target recovery point; do not clear either store.
|
|
64
|
+
|
|
65
|
+
See the [3.3.2 notes](./changelogs/v3.3.2.md), [cache guide](https://github.com/devcodex-labs/monSQLize/blob/main/docs/en/cache.md)
|
|
66
|
+
and [sync upgrade/rollback guide](https://github.com/devcodex-labs/monSQLize/blob/main/docs/en/sync-backup.md) for details.
|
|
6
67
|
|
|
7
68
|
## Upgrade from v3.0.0 to v3.1.0
|
|
8
69
|
|
package/README.md
CHANGED
|
@@ -12,7 +12,9 @@ Quick path: [Installation](https://devcodex-labs.github.io/monSQLize/getting-sta
|
|
|
12
12
|
Configuration reference: [English](https://devcodex-labs.github.io/monSQLize/configuration) · [简体中文](https://devcodex-labs.github.io/monSQLize/zh/configuration)
|
|
13
13
|
Upgrade and security: [Migration Guide](./MIGRATION.md) · [Private Vulnerability Reporting](./SECURITY.md)
|
|
14
14
|
|
|
15
|
-
The npm `latest` dist-tag and GitHub Pages are the stable channel; `main` may contain the next release. Pages deployment accepts only a versioned Git tag whose package version is already present on npm, so unpublished APIs are not promoted as stable documentation.
|
|
15
|
+
The npm `latest` dist-tag and GitHub Pages are the stable channel; `main` may contain the next release. Pages deployment accepts only a versioned Git tag whose package version is already present on npm, so unpublished APIs are not promoted as stable documentation. The Google site ownership verification file is copied separately from the workflow commit, with its source commit and content hash recorded in the deployment summary.
|
|
16
|
+
|
|
17
|
+
This source tree targets **3.3.2**. Its cache, Model, pagination and sync fixes, including cold-cache upgrades and checkpoint rollback limits, are described in the [3.3.2 notes](./changelogs/v3.3.2.md) and [migration guide](./MIGRATION.md). Read the upgrade guide in [English](https://github.com/devcodex-labs/monSQLize/blob/main/docs/en/upgrade-3.3.2.md) or [简体中文](https://github.com/devcodex-labs/monSQLize/blob/main/docs/zh/upgrade-3.3.2.md). Untagged checkouts remain release candidates; verify the immutable tag and requested registry version before deployment. Candidate preparation does not publish npm or update stable Pages.
|
|
16
18
|
|
|
17
19
|
This development source is pinned to verified registry `schema-dsl@3.0.4`. The v3 package remains subject to the full release gate before an immutable tag and npm publication.
|
|
18
20
|
|
|
@@ -332,6 +334,14 @@ Relative model paths are resolved from `process.cwd()`. In production services,
|
|
|
332
334
|
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:
|
|
333
335
|
|
|
334
336
|
```js
|
|
337
|
+
const MonSQLize = require('monsqlize');
|
|
338
|
+
|
|
339
|
+
async function main() {
|
|
340
|
+
MonSQLize.Model.define('users', {
|
|
341
|
+
schema: { email: 'email!' },
|
|
342
|
+
indexes: [{ key: { email: 1 }, unique: true }]
|
|
343
|
+
});
|
|
344
|
+
|
|
335
345
|
const msq = new MonSQLize({
|
|
336
346
|
type: 'mongodb',
|
|
337
347
|
databaseName: 'mydb',
|
|
@@ -339,11 +349,18 @@ const msq = new MonSQLize({
|
|
|
339
349
|
autoIndex: false
|
|
340
350
|
});
|
|
341
351
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
352
|
+
try {
|
|
353
|
+
await msq.connect();
|
|
354
|
+
const plan = await msq.ensureModelIndexes({ models: ['users'], dryRun: true });
|
|
355
|
+
if (plan.totals.conflicts === 0) {
|
|
356
|
+
await msq.ensureModelIndexes({ models: ['users'], throwOnError: true });
|
|
357
|
+
}
|
|
358
|
+
} finally {
|
|
359
|
+
await msq.close();
|
|
346
360
|
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
main().catch((error) => { console.error(error); process.exitCode = 1; });
|
|
347
364
|
```
|
|
348
365
|
|
|
349
366
|
`ensureModelIndexes()` creates only missing indexes. It does not drop, rename, or rebuild conflicting indexes.
|
|
@@ -424,7 +441,7 @@ Cache capabilities include:
|
|
|
424
441
|
|
|
425
442
|
- In-memory L1 cache.
|
|
426
443
|
- Optional Redis-backed L2 cache.
|
|
427
|
-
-
|
|
444
|
+
- Opt-in invalidation after writes, including partial bulk-insert failures.
|
|
428
445
|
- Cache namespace, TTL, and distributed invalidation controls.
|
|
429
446
|
|
|
430
447
|
## Advanced Capabilities
|
|
@@ -444,11 +461,13 @@ await msq.withTransaction(async (tx) => {
|
|
|
444
461
|
|
|
445
462
|
Read options such as `session`, `readConcern`, `readPreference`, `collation`, `hint`, `maxTimeMS`, and `allowDiskUse` are forwarded to the MongoDB driver. Query caches are bypassed while a `session` is present, so transaction reads use the driver snapshot instead of a shared cache entry.
|
|
446
463
|
|
|
447
|
-
Transaction cache invalidations are recorded during the transaction and flushed
|
|
464
|
+
Transaction cache invalidations are recorded during the transaction and flushed after a successful commit. An unknown commit result also triggers conservative invalidation without reporting rollback or replaying the business callback. If the transaction aborts with a known outcome, pending invalidations are discarded. `timeout` limits work before commit begins; `end()` closes the session and does not commit.
|
|
448
465
|
|
|
449
466
|
### Connection Pools
|
|
450
467
|
|
|
451
468
|
```js
|
|
469
|
+
const MonSQLize = require('monsqlize');
|
|
470
|
+
async function main() {
|
|
452
471
|
const msq = new MonSQLize({
|
|
453
472
|
type: 'mongodb',
|
|
454
473
|
databaseName: 'main',
|
|
@@ -458,7 +477,16 @@ const msq = new MonSQLize({
|
|
|
458
477
|
]
|
|
459
478
|
});
|
|
460
479
|
|
|
461
|
-
|
|
480
|
+
try {
|
|
481
|
+
await msq.connect();
|
|
482
|
+
const reports = msq.pool('analytics').collection('reports');
|
|
483
|
+
console.log(await reports.countDocuments({}));
|
|
484
|
+
} finally {
|
|
485
|
+
await msq.close();
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
main().catch((error) => { console.error(error); process.exitCode = 1; });
|
|
462
490
|
```
|
|
463
491
|
|
|
464
492
|
### Change Streams
|
|
@@ -512,7 +540,7 @@ The v3 line has been validated against the workspace consumers `chat`, `payment`
|
|
|
512
540
|
| Surface | Current Support |
|
|
513
541
|
|---|---|
|
|
514
542
|
| Node.js | `>=18.0.0`; CI covers Node 18 / 20 / 22. |
|
|
515
|
-
| MongoDB driver | `mongodb@6.21.0` runtime baseline; driver 7.
|
|
543
|
+
| MongoDB driver | `mongodb@6.21.0` runtime baseline; driver 7.7.0 has additional compatibility coverage. |
|
|
516
544
|
| MongoDB server | Memory-server based 7.x / 8.x validation is covered by the strict project test matrix. |
|
|
517
545
|
| Module systems | CommonJS and ESM are both validated. |
|
|
518
546
|
| TypeScript | Public declarations are published from `dist/types/index.d.ts`. |
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# monSQLize v3.3.1
|
|
2
|
+
|
|
3
|
+
> Release date: 2026-09-23
|
|
4
|
+
|
|
5
|
+
## Highlights
|
|
6
|
+
|
|
7
|
+
This backward-compatible patch closes the post-3.3.0 runtime audit findings. It corrects Model validation, soft-delete, relation and strict-version behavior; count cancellation; transaction, cache, pool and sync lifecycle edges; and backup/restore data fidelity.
|
|
8
|
+
|
|
9
|
+
## Fixed
|
|
10
|
+
|
|
11
|
+
- Model writes now surface a schema factory error only when full-document validation is required. Disabling validation or using `skipValidation` no longer blocks unrelated writes and management methods.
|
|
12
|
+
- Boolean soft delete consistently treats only `true` as deleted across reads, batch deletion and relation-usage checks. Hydrated `remove()` follows Model hooks and soft-delete rules.
|
|
13
|
+
- Strict `updateMany` and `updateBatch` preserve the original business filter during each atomic write. A candidate that no longer matches that filter is reported as skipped; a still-matching candidate with a changed version is a conflict. Candidate enumeration is no longer limited by the public find default.
|
|
14
|
+
- Populate pagination applies `skip` and `limit` per parent. Model batch writes, query cache keys, expression evaluation and write-path checks retain their original filters and BSON semantics.
|
|
15
|
+
- Public count operations forward the caller's abort signal to CountQueue, including queued and running work. Running slots remain occupied until the underlying operation settles.
|
|
16
|
+
- Managed transaction aborts reject later wrapped writes. Redis invalidation does not rebroadcast received events, pool close/capacity races are handled, and Change Stream sync preserves resume tokens and failure barriers.
|
|
17
|
+
- Data Task backup/restore preserves canonical BSON values. Optional SSH host verification and local failure cleanup are available without changing the default connection path.
|
|
18
|
+
|
|
19
|
+
## Compatibility and verification
|
|
20
|
+
|
|
21
|
+
- No breaking public method signature, package entry point, runtime Node requirement or direct production dependency change. MongoDB remains the only complete adapter; Node.js `>=18` remains the runtime contract.
|
|
22
|
+
- The transitive `fast-uri` override now permits patched v3 releases and resolves to 3.1.8; the development-only `js-yaml` lockfile entry is refreshed to 4.3.2. Both clear high-severity advisories found during release review without changing the supported major versions.
|
|
23
|
+
- Release automation uses npm trusted publishing through GitHub Actions OIDC. The pre-tag check verifies runner readiness; npm verifies the configured publisher during the actual publish.
|
|
24
|
+
- Validation-disabled writes and strict batch-result classification may behave differently from the faulty post-3.3.0 main branch; applications relying on the documented contracts receive the corrected behavior.
|
|
25
|
+
- The root CJS/ESM byte budget moves from 720,000 to 740,000 to cover the audited runtime fixes while retaining a tight size guard. The CLI budget remains 50,000 bytes.
|
|
26
|
+
- The release gate covers full tests and coverage, Node 18/20/22 CI, Node 20/22 × MongoDB Driver 6/7 × MongoDB Server 7.0.37/8.0.26, package installation, and bilingual website verification.
|
|
27
|
+
|
|
28
|
+
Private SSH and Atlas deployments remain operator-managed integration checks; local and public CI coverage does not claim to replace them.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# monSQLize v3.3.2
|
|
2
|
+
|
|
3
|
+
> Release date: 2026-10-22
|
|
4
|
+
> Publication authority: the immutable tag and npm registry. An untagged checkout is a release candidate; the date above does not establish registry availability.
|
|
5
|
+
|
|
6
|
+
## Highlights
|
|
7
|
+
|
|
8
|
+
This patch consolidates the audited fixes after 3.3.1 for BSON query identity, cache invalidation, Model visibility and writes, pagination, transactions, Change Stream sync and resource cleanup. Public entry points, Node.js `>=18`, direct production dependencies and build formats remain unchanged. Release and docs tooling require Node.js 22.
|
|
9
|
+
|
|
10
|
+
## Fixed
|
|
11
|
+
|
|
12
|
+
- Isolate query, page, totals and bookmark caches by data source, authentication identity and pool. Link same-source route invalidation and fence stale in-flight reads and backfills across writes, commits and received invalidation.
|
|
13
|
+
- Preserve effective BSON input and decoding options, ordered document/Map values, undefined, negative zero, binary views and subtypes, inherited BSON settings and cross-realm leaves in shared query identities. Capture functions per native occurrence and preserve Code scope access. Avoid JSON result caching for incompatible result modes or lazy dynamic decoding maps.
|
|
14
|
+
- Align explicit Model aggregate/page invalidation with soft-delete visibility, converted filters and captured execution pipelines. Isolate malformed invalidation descriptors so valid siblings still run; successful writes keep their native results. Automatic invalidation stays off by default, and post-write/post-commit invalidation remains best-effort.
|
|
15
|
+
- Apply supported page projections after custom pipeline stages; reject write stages and unsupported find-only projections. Preserve requested ID order in one native query for supported excluded/computed `_id` projections; reject combinations that cannot retain the original identity. Honor native MongoDB equality, collation and sorting during populate, with documented query-cost boundaries.
|
|
16
|
+
- Preserve schema factory captures, lexical bindings, comments and every ECMAScript line terminator. Correct nested DSL scopes and literals without reinterpreting prepared data. Retain Model business filters through final hooks and atomic writes, strict conflict classification, ID-only projections and soft-delete timestamps.
|
|
17
|
+
- Serialize transaction commit/abort/end, apply work deadlines before commit, and conservatively invalidate uncertain commit results without automatically replaying application callbacks. Invalidate after partial batch writes and report only confirmed inserts.
|
|
18
|
+
- Persist an initial Change Stream operation-time checkpoint before opening an empty-store stream; retain raw-token compatibility, strict failure barriers and target-name uniqueness. Use unambiguous per-target idempotency keys and retry failed owned-resource cleanup without losing ownership.
|
|
19
|
+
- Keep slow-log initialization, queues and diagnostic failures isolated, drain admitted work on close and retain event-time bounds. Preserve remote TTL/tag capabilities and shared L1 invalidation fences. Correct CountQueue handoff, pool startup/close/health/statistics, retryable cleanup, Logger tracing and Data Task compare-and-swap boundaries.
|
|
20
|
+
- Repair bilingual post-publish instructions to initialize and validate packages inside an independent consumer directory. Keep versioned package notes, migration guidance and the bilingual static docs site aligned.
|
|
21
|
+
|
|
22
|
+
## Upgrade and rollback
|
|
23
|
+
|
|
24
|
+
1. **Plan a cold cache.** Shared BSON query encoding ends at generation `v4`; query/aggregate results, totals and bookmark hashes change. The public bookmark prefix stays `bm:v4`. Refill results and run `prewarmBookmarks()` where needed; old keys may expire normally. No global Redis flush or business-data migration is required. Use broad invalidation or isolated caches while versions coexist; exact descriptors rebuild the current generation.
|
|
25
|
+
2. **Version custom cursor restoration.** A custom `cursorValueNormalizer` needs a stable non-empty `cursorValueNormalizerVersion` for page/bookmark reuse. Without it, queries execute but those caches are bypassed, prewarming rejects with `INVALID_ARGUMENT`, and deep jumps may hit `jump.maxHops`.
|
|
26
|
+
3. **Check special projection combinations.** Pipeline pagination rejects `$slice`, `$elemMatch` and positional find-only projections with `INVALID_OPERATION`. Ordered ID lookup preserves one native query for supported projections; combinations that cannot retain native identity are rejected. Native `preserveOrder: false` remains available. These are explicit compatibility boundaries, not a promise to support every projection/result-mode combination.
|
|
27
|
+
4. **Preserve sync checkpoints before downgrade.** New empty-store sync startup persists an opaque initial envelope with a canonical EJSON Timestamp. Custom stores must round-trip it. Existing raw event tokens stay supported. Stop sync and preserve its store before downgrade: older readers cannot consume the initial envelope as a raw resume token. A saved event token only restores format compatibility subject to history retention and the older version's behavior. Do not erase the envelope or restart from now.
|
|
28
|
+
5. **Coordinate sync marker upgrades.** Idempotency keys are v2 JSON tuples. Stop writers, drain work and preserve checkpoints, both marker generations and a recovery snapshot. Avoid mixed-format writers. Ambiguous legacy concatenated markers cannot be trusted unconditionally; use target-owned business idempotence and replay unless a finite mapping is provable. Rollback requires the same stop/drain safeguards, a compatible raw token and a verified target recovery point; never clear either store as a shortcut.
|
|
29
|
+
|
|
30
|
+
Read [MIGRATION.md](../MIGRATION.md) and the upgrade guide in [English](https://github.com/devcodex-labs/monSQLize/blob/main/docs/en/upgrade-3.3.2.md) or [简体中文](https://github.com/devcodex-labs/monSQLize/blob/main/docs/zh/upgrade-3.3.2.md). After publication, the documentation site must deploy from the same immutable `v3.3.2` tag as npm; preparing this candidate does not update the stable site.
|
|
31
|
+
|
|
32
|
+
## Compatibility and verification
|
|
33
|
+
|
|
34
|
+
- MongoDB remains the only complete database adapter. No public method is removed or renamed; default invalidation behavior and the documented checkpoint compatibility boundaries are retained.
|
|
35
|
+
- The approved root CJS/ESM budget is 820,000 bytes per artifact; the independent CLI stays at 50,000 bytes. These are build-size gates, not application resource or request limits.
|
|
36
|
+
- Qualification uses the existing full tests, coverage and risk floors, runnable examples, Node 20/22 × Driver 6/7 × MongoDB 7/8 matrix, dataTasks/CLI integration, production dependency audit, independent packed CJS/ESM/types/bin consumers and bilingual site/browser/accessibility checks. The release candidate is subject to fresh CI and `release:preflight`; this note alone does not claim they passed.
|
|
37
|
+
- Private SSH/Atlas environments remain operator-managed supplemental checks. OIDC readiness does not prove npm-side trusted-publisher configuration; npm validates it during the actual publish.
|
|
@@ -31,7 +31,7 @@ var import_node_url = require("node:url");
|
|
|
31
31
|
// package.json
|
|
32
32
|
var package_default = {
|
|
33
33
|
name: "monsqlize",
|
|
34
|
-
version: "3.3.
|
|
34
|
+
version: "3.3.2",
|
|
35
35
|
description: "TypeScript production data runtime layer for MongoDB today, with cache, transactions, pools, models, sync, and observability",
|
|
36
36
|
type: "commonjs",
|
|
37
37
|
main: "./dist/cjs/index.cjs",
|
|
@@ -52,6 +52,8 @@ var package_default = {
|
|
|
52
52
|
"./package.json": "./package.json"
|
|
53
53
|
},
|
|
54
54
|
files: [
|
|
55
|
+
"changelogs/v3.3.2.md",
|
|
56
|
+
"changelogs/v3.3.1.md",
|
|
55
57
|
"changelogs/v3.3.0.md",
|
|
56
58
|
"changelogs/v3.2.0.md",
|
|
57
59
|
"changelogs/v3.1.14.md",
|
|
@@ -142,8 +144,8 @@ var package_default = {
|
|
|
142
144
|
"check:sizes:strict": "node scripts/check-file-sizes.cjs --strict",
|
|
143
145
|
build: "node scripts/build-p1.cjs",
|
|
144
146
|
"build:tests": "node scripts/compile-tests.cjs",
|
|
145
|
-
lint: "eslint .
|
|
146
|
-
"lint:fix": "eslint . --fix
|
|
147
|
+
lint: "eslint .",
|
|
148
|
+
"lint:fix": "eslint . --fix",
|
|
147
149
|
"test:runtime": "npm run build && npm run build:tests && node --test .generated/test-dist/test/smoke/root-cjs.test.js .generated/test-dist/test/smoke/root-esm.test.js .generated/test-dist/test/smoke/pack-artifacts.test.js",
|
|
148
150
|
"test:compatibility": "npm run build && npm run build:tests && node --test .generated/test-dist/test/compatibility/exports/exports.test.js .generated/test-dist/test/compatibility/matrix.test.js",
|
|
149
151
|
"probe:server-matrix": "node scripts/validation/probe-memory-server-matrix.cjs",
|
|
@@ -152,7 +154,7 @@ var package_default = {
|
|
|
152
154
|
"test:examples": "npm run build && tsc -p tsconfig.examples.json && node scripts/run-examples.cjs",
|
|
153
155
|
"test:performance": "npm run build && npm run build:tests && node .generated/test-dist/test/performance/baselines/function-cache.benchmark.js",
|
|
154
156
|
"test:unit": "npm run build && npm run build:tests && node test/run-tests.cjs unit",
|
|
155
|
-
"test:integration": "npm run build && npm run build:tests && node --test --test-concurrency=1 .generated/test-dist/test/integration/cache/cache.test.js .generated/test-dist/test/integration/cache/cache-behavior.test.js .generated/test-dist/test/integration/mongodb/connect.test.js .generated/test-dist/test/integration/mongodb/queries.test.js .generated/test-dist/test/integration/mongodb/management.test.js .generated/test-dist/test/integration/mongodb/writes-batch.test.js .generated/test-dist/test/integration/mongodb/find.test.js .generated/test-dist/test/integration/mongodb/find-one.test.js .generated/test-dist/test/integration/mongodb/find-page.test.js .generated/test-dist/test/integration/mongodb/aggregate.test.js .generated/test-dist/test/integration/mongodb/chaining.test.js .generated/test-dist/test/integration/mongodb/insert.test.js .generated/test-dist/test/integration/mongodb/update.test.js .generated/test-dist/test/integration/mongodb/delete.test.js .generated/test-dist/test/integration/mongodb/update-pipeline.test.js .generated/test-dist/test/integration/model/model-features.test.js .generated/test-dist/test/integration/transaction/transaction.test.js .generated/test-dist/test/integration/pool/pool.test.js .generated/test-dist/test/integration/pool/pool-behavior.test.js .generated/test-dist/test/integration/watch/watch-native.test.js .generated/test-dist/test/integration/runtime/runtime-core-regression.test.js .generated/test-dist/test/integration/sync/sync.test.js .generated/test-dist/test/integration/slow-query-log/slow-query-log.test.js .generated/test-dist/test/integration/model/model-crud-extended.test.js .generated/test-dist/test/integration/mongodb/management-complete.test.js .generated/test-dist/test/integration/runtime/runtime-methods-extended.test.js .generated/test-dist/test/integration/mongodb/find-page-advanced.test.js",
|
|
157
|
+
"test:integration": "npm run build && npm run build:tests && node --test --test-concurrency=1 .generated/test-dist/test/integration/cache/cache.test.js .generated/test-dist/test/integration/cache/cache-behavior.test.js .generated/test-dist/test/integration/mongodb/connect.test.js .generated/test-dist/test/integration/mongodb/queries.test.js .generated/test-dist/test/integration/mongodb/management.test.js .generated/test-dist/test/integration/mongodb/writes-batch.test.js .generated/test-dist/test/integration/mongodb/find.test.js .generated/test-dist/test/integration/mongodb/find-one.test.js .generated/test-dist/test/integration/mongodb/find-page.test.js .generated/test-dist/test/integration/mongodb/aggregate.test.js .generated/test-dist/test/integration/mongodb/chaining.test.js .generated/test-dist/test/integration/mongodb/insert.test.js .generated/test-dist/test/integration/mongodb/update.test.js .generated/test-dist/test/integration/mongodb/delete.test.js .generated/test-dist/test/integration/mongodb/update-pipeline.test.js .generated/test-dist/test/integration/model/model-features.test.js .generated/test-dist/test/integration/transaction/transaction.test.js .generated/test-dist/test/integration/pool/pool.test.js .generated/test-dist/test/integration/pool/pool-behavior.test.js .generated/test-dist/test/integration/watch/watch-native.test.js .generated/test-dist/test/integration/runtime/runtime-core-regression.test.js .generated/test-dist/test/integration/runtime/review-regressions.test.js .generated/test-dist/test/integration/sync/sync.test.js .generated/test-dist/test/integration/slow-query-log/slow-query-log.test.js .generated/test-dist/test/integration/model/model-crud-extended.test.js .generated/test-dist/test/integration/mongodb/management-complete.test.js .generated/test-dist/test/integration/runtime/runtime-methods-extended.test.js .generated/test-dist/test/integration/mongodb/find-page-advanced.test.js .generated/test-dist/test/integration/mongodb/review-repair-regressions.test.js .generated/test-dist/test/integration/model/review-model-regressions.test.js .generated/test-dist/test/integration/slow-query-log/review-storage-regressions.test.js",
|
|
156
158
|
"test:data-tasks:integration": "npm run build && npm run build:tests && node test/run-tests.cjs data-tasks-integration",
|
|
157
159
|
"test:data-task-cli": "npm run build && npm run build:tests && node test/run-tests.cjs data-task-cli",
|
|
158
160
|
"test:pack-install": "npm run build && node scripts/pack-install-smoke.cjs",
|
|
@@ -196,7 +198,7 @@ var package_default = {
|
|
|
196
198
|
ssh2: "1.17.0"
|
|
197
199
|
},
|
|
198
200
|
overrides: {
|
|
199
|
-
"fast-uri": "3.1.
|
|
201
|
+
"fast-uri": "^3.1.8",
|
|
200
202
|
"minimatch@3.1.5": {
|
|
201
203
|
"brace-expansion": "1.1.18"
|
|
202
204
|
},
|