@proteinjs/db 1.41.0 → 1.43.0
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 +29 -0
- package/dist/generated/index.js +1 -1
- package/dist/generated/index.js.map +1 -1
- package/dist/generated/test/index.js +1 -1
- package/dist/generated/test/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/src/DetachedDbOps.d.ts +27 -0
- package/dist/src/DetachedDbOps.d.ts.map +1 -0
- package/dist/src/DetachedDbOps.js +60 -0
- package/dist/src/DetachedDbOps.js.map +1 -0
- package/dist/src/Table.d.ts +13 -0
- package/dist/src/Table.d.ts.map +1 -1
- package/dist/src/source/SourceRecordLoader.d.ts +29 -0
- package/dist/src/source/SourceRecordLoader.d.ts.map +1 -1
- package/dist/src/source/SourceRecordLoader.js +102 -28
- package/dist/src/source/SourceRecordLoader.js.map +1 -1
- package/dist/test/DetachedDbOps.test.d.ts +2 -0
- package/dist/test/DetachedDbOps.test.d.ts.map +1 -0
- package/dist/test/DetachedDbOps.test.js +158 -0
- package/dist/test/DetachedDbOps.test.js.map +1 -0
- package/dist/test/reusable/SourceRecordSyncTests.d.ts.map +1 -1
- package/dist/test/reusable/SourceRecordSyncTests.js +110 -0
- package/dist/test/reusable/SourceRecordSyncTests.js.map +1 -1
- package/generated/index.ts +1 -1
- package/generated/test/index.ts +1 -1
- package/index.ts +1 -0
- package/jest.config.js +8 -0
- package/package.json +2 -2
- package/src/DetachedDbOps.ts +47 -0
- package/src/Table.ts +13 -0
- package/src/source/SourceRecordLoader.ts +80 -1
- package/test/DetachedDbOps.test.ts +90 -0
- package/test/reusable/SourceRecordSyncTests.ts +69 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,35 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.43.0](https://github.com/proteinjs/db/compare/@proteinjs/db@1.42.0...@proteinjs/db@1.43.0) (2026-09-02)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* r5asm2 composition repairs — the env-token auth wiring rides the composed SpannerDriver (my re-merge resolution had taken main's side of the conflicted construction sites; EnvTokenAuth suite caught it red — envTokenAuthOverride at both constructions, withDeadline + DDL translateAuthFailure, recycleClient clears the selection; suite red->green 212/212); db jest singleton pins (reflection + user-auth — the §6.15 second-copy class, ServiceAuth's UserAuth must be the suites', CI-inert) ([76fea0d](https://github.com/proteinjs/db/commit/76fea0ddaca69856aa55fea61b3a4deae020053f))
|
|
12
|
+
* soft-removal re-adoption — a re-declaration whose natural key misses re-claims the kept row by its declared id (same-owner, non-declared-key only) and reactivates it from the declaration, instead of INSERTing into a PK collision; hook-shaped private unit on the sync class (softRemovedRecordHoldingDeclaredId — the future generic softRemoval hook lifts it, not rewrites); THE SOFT-REMOVAL CONTRACT documented on SourceRecordOptions.onSourceRemoved (machine accounts = first implementer); reusable-suite pins: the renamed-natural-key re-adopt (red pre-fix at the exact machine-account collision) + the free default-lifecycle rollback-idempotence pin (declare -> prune -> re-declare = clean re-insert, green pre-fix) ([ba9f4ba](https://github.com/proteinjs/db/commit/ba9f4ba761c253c45c1b6b1aa131a18db2274635))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* grouped-aggregation reads — Db.queryAggregates + QueryBuilder.timeBucket ([1d553a4](https://github.com/proteinjs/db/commit/1d553a45d93040b560c9f08b4376b875250877c9))
|
|
18
|
+
* timeBucket hour grain — widen the unit union to day|hour across query + drivers ([3ccd736](https://github.com/proteinjs/db/commit/3ccd736138c646454015d46274a2491edcfd90dd))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# [1.42.0](https://github.com/proteinjs/db/compare/@proteinjs/db@1.41.0...@proteinjs/db@1.42.0) (2026-09-02)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
* **db:** DetachedDbOps — THE named detachment idiom for deliberately fire-and-forget db work (one owner). Under node's default unhandled-rejection policy (node 24 in production) a detached db operation that rejects — e.g. a write tripping the driver's 60s op deadline — killed the whole process (observed live: a detached write past the deadline aborted the server). DetachedDbOps.run(description, work, context?) invokes the work, terminally catches (synchronous throws included), and logs the failure WITH the caller's context — never process death, never a silent swallow; returns void by design so a detached outcome cannot be accidentally consumed. Exported from the package root for every consumer's deliberate detached DML. The repo's own deliberate detached call sites route through it: SpannerLivenessMonitor's two detached verifyLiveness dispatches (pool-error listener + driver-reported error); the client-recycle oldDb.close stays on its existing terminal catch (its silent swallow is a named decision — the channel is believed dead). No half-existing db-layer idiom found to extend: the service layer's doNotAwait observer (ServiceExecutor) covers only service-dispatched work. RED RUN stated: DetachedDbOps.test red at the absent module (the simulated 60s-deadline driver rejection is the suite's first pin); green wired 4/4. Bites verified: terminal catch dropped -> the 2 rejection pins red; sync containment dropped -> the sync-throw pin red alone; restored green. Suites: packages/db 16 suites / 134 tests green (130 pre-existing + 4 new); drivers/spanner Liveness 1/1 green on a dedicated emulator (:9040) — the routed pool-error path exercised live; driver tsc clean (the one build red was the cloned stale db-query dist, cleared by rebuilding query from main source). ([3b92847](https://github.com/proteinjs/db/commit/3b92847355b23db7013fb9bf11fd1b6e7e879b72))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
6
35
|
# [1.41.0](https://github.com/proteinjs/db/compare/@proteinjs/db@1.40.0...@proteinjs/db@1.41.0) (2026-09-01)
|
|
7
36
|
|
|
8
37
|
|