stroid 0.1.4 → 0.1.5
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 +148 -34
- package/README.md +124 -17
- package/dist/async-internal.d.ts +30 -0
- package/dist/async.d.ts +7 -12
- package/dist/async.js +1 -1
- package/dist/chunk-4C666HHU.js +2 -0
- package/dist/chunk-4D6OA3DD.js +2 -0
- package/dist/chunk-6IBJ7CIK.js +14 -0
- package/dist/chunk-BWNLQKTY.js +2 -0
- package/dist/chunk-E33L4MII.js +2 -0
- package/dist/chunk-FSNVSMAV.js +2 -0
- package/dist/chunk-GZQGU64H.js +2 -0
- package/dist/chunk-LWUT37FW.js +13 -0
- package/dist/chunk-NFT6AZXY.js +2 -0
- package/dist/chunk-PHE2BCFG.js +2 -0
- package/dist/chunk-SF6EP56S.js +2 -0
- package/dist/chunk-WE3ZR6OG.js +2 -0
- package/dist/chunk-WXJ3IREA.js +2 -0
- package/dist/chunk-X2MKRN7O.js +14 -0
- package/dist/chunk-Y54SMROI.js +2 -0
- package/dist/computed.d.ts +6 -5
- package/dist/computed.js +1 -1
- package/dist/core-internal.d.ts +23 -0
- package/dist/core.d.ts +3 -2
- package/dist/core.js +1 -1
- package/dist/devtools-internal.d.ts +26 -0
- package/dist/devtools.d.ts +4 -25
- package/dist/devtools.js +1 -1
- package/dist/feature.d.ts +9 -2
- package/dist/feature.js +1 -1
- package/dist/fetch-4RH6MPY3.js +2 -0
- package/dist/graph-D28.d.ts +20 -0
- package/dist/helpers.d.ts +2 -1
- package/dist/helpers.js +1 -1
- package/dist/index-internal.d.ts +19 -19
- package/dist/index.d.cts +40 -22
- package/dist/index.d.ts +40 -22
- package/dist/index.js +1 -1
- package/dist/install.d.ts +16 -4
- package/dist/install.js +1 -1
- package/dist/metrics.d.ts +13 -0
- package/dist/persist.d.ts +3 -1
- package/dist/persist.js +1 -1
- package/dist/psr.d.ts +7 -8
- package/dist/psr.js +1 -1
- package/dist/query.d.ts +17 -0
- package/dist/query.js +2 -0
- package/dist/react/index.d.ts +10 -3
- package/dist/react/index.js +5 -5
- package/dist/registry.d.ts +22 -14
- package/dist/runtime-admin.js +1 -1
- package/dist/runtime-tools.d.ts +38 -65
- package/dist/runtime-tools.js +1 -1
- package/dist/selectors.d.ts +1 -1
- package/dist/selectors.js +1 -1
- package/dist/server/portable.d.ts +27 -0
- package/dist/server/portable.js +2 -0
- package/dist/server.d.ts +9 -20
- package/dist/server.js +1 -1
- package/dist/shared.d.ts +36 -0
- package/dist/store-registry.d.ts +3 -1
- package/dist/sync.d.ts +10 -1
- package/dist/sync.js +1 -1
- package/dist/testing.d.ts +1 -0
- package/dist/testing.js +1 -1
- package/dist/tsdoc-metadata.json +11 -0
- package/dist/types-internal-2.d.ts +168 -0
- package/dist/{computed-types.d.ts → types-internal-3.d.ts} +1 -1
- package/dist/{options.d.ts → types-internal.d.ts} +25 -9
- package/dist/types.d.ts +12 -2
- package/package.json +80 -26
- package/dist/chunk-645IESIU.js +0 -2
- package/dist/chunk-6ELWGQ4Q.js +0 -2
- package/dist/chunk-BW32TJGE.js +0 -13
- package/dist/chunk-FOQKGHPS.js +0 -26
- package/dist/chunk-KQCSFGHJ.js +0 -2
- package/dist/chunk-M2NJVI36.js +0 -2
- package/dist/chunk-PVATWAY4.js +0 -2
- package/dist/chunk-X3JR32JD.js +0 -2
- package/dist/computed-types.js +0 -2
- package/dist/types/adapters/options.d.ts +0 -335
- package/dist/types/async/cache.d.ts +0 -40
- package/dist/types/async/clone.d.ts +0 -10
- package/dist/types/async/errors.d.ts +0 -3
- package/dist/types/async/fetch.d.ts +0 -37
- package/dist/types/async/inflight.d.ts +0 -30
- package/dist/types/async/rate.d.ts +0 -5
- package/dist/types/async/registry.d.ts +0 -117
- package/dist/types/async/request.d.ts +0 -11
- package/dist/types/async/retry.d.ts +0 -10
- package/dist/types/async.d.ts +0 -10
- package/dist/types/computed/computed-graph.d.ts +0 -33
- package/dist/types/computed/index.d.ts +0 -21
- package/dist/types/computed/types.d.ts +0 -40
- package/dist/types/config.d.ts +0 -10
- package/dist/types/core/index.d.ts +0 -11
- package/dist/types/core/lifecycle-hooks.d.ts +0 -16
- package/dist/types/core/runtime-patch.d.ts +0 -67
- package/dist/types/core/store-admin-impl.d.ts +0 -9
- package/dist/types/core/store-admin.d.ts +0 -9
- package/dist/types/core/store-core.d.ts +0 -13
- package/dist/types/core/store-create.d.ts +0 -16
- package/dist/types/core/store-hydrate-impl.d.ts +0 -35
- package/dist/types/core/store-hydrate.d.ts +0 -9
- package/dist/types/core/store-lifecycle/hooks.d.ts +0 -20
- package/dist/types/core/store-lifecycle/identity.d.ts +0 -23
- package/dist/types/core/store-lifecycle/registry.d.ts +0 -54
- package/dist/types/core/store-lifecycle/types.d.ts +0 -67
- package/dist/types/core/store-lifecycle/validation.d.ts +0 -53
- package/dist/types/core/store-name.d.ts +0 -28
- package/dist/types/core/store-notify.d.ts +0 -13
- package/dist/types/core/store-read.d.ts +0 -18
- package/dist/types/core/store-registry.d.ts +0 -115
- package/dist/types/core/store-replace-impl.d.ts +0 -11
- package/dist/types/core/store-replace.d.ts +0 -9
- package/dist/types/core/store-set-impl.d.ts +0 -13
- package/dist/types/core/store-set.d.ts +0 -9
- package/dist/types/core/store-shared/core.d.ts +0 -13
- package/dist/types/core/store-shared/notify.d.ts +0 -12
- package/dist/types/core/store-transaction.d.ts +0 -28
- package/dist/types/core/store-write-shared.d.ts +0 -25
- package/dist/types/core/store-write.d.ts +0 -13
- package/dist/types/features/feature-registry.d.ts +0 -91
- package/dist/types/features/lifecycle.d.ts +0 -40
- package/dist/types/index.d.ts +0 -17
- package/dist/types/integrations/query.d.ts +0 -8
- package/dist/types/internals/computed-order.d.ts +0 -3
- package/dist/types/internals/config.d.ts +0 -116
- package/dist/types/internals/diagnostics.d.ts +0 -21
- package/dist/types/internals/reporting.d.ts +0 -9
- package/dist/types/internals/store-admin.d.ts +0 -7
- package/dist/types/internals/store-ops.d.ts +0 -13
- package/dist/types/internals/test-reset.d.ts +0 -2
- package/dist/types/internals/write-context.d.ts +0 -20
- package/dist/types/notification/delivery.d.ts +0 -3
- package/dist/types/notification/index.d.ts +0 -10
- package/dist/types/notification/metrics.d.ts +0 -12
- package/dist/types/notification/priority.d.ts +0 -9
- package/dist/types/notification/scheduler.d.ts +0 -11
- package/dist/types/notification/snapshot.d.ts +0 -8
- package/dist/types/runtime-admin/index.d.ts +0 -2
- package/dist/types/runtime-tools/index.d.ts +0 -63
- package/dist/types/store.d.ts +0 -16
- package/dist/types/types/utility.d.ts +0 -17
- package/dist/types/utils/clone.d.ts +0 -4
- package/dist/types/utils/devfreeze.d.ts +0 -2
- package/dist/types/utils/hash.d.ts +0 -8
- package/dist/types/utils/path.d.ts +0 -5
- package/dist/types/utils/validation.d.ts +0 -14
- package/dist/types/utils.d.ts +0 -13
package/CHANGELOG.md
CHANGED
|
@@ -7,23 +7,112 @@
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
>[!
|
|
10
|
+
>[!WARNING]
|
|
11
11
|
><details open>
|
|
12
|
-
><summary><strong>
|
|
13
|
-
|
|
12
|
+
><summary><strong>0.1.5 --> 2026-04-09</strong></summary>
|
|
13
|
+
>
|
|
14
|
+
>### Add
|
|
15
|
+
>
|
|
16
|
+
>- Added an optional fourth `hydrateStores(..., options, trust, consistency?)` argument for post-hydration consistency contracts, including snapshot metadata, per-store authorities, per-store reconciliation policies, and `onDrift` diagnostics.
|
|
17
|
+
>- Added large-payload hydration parity coverage plus a dedicated `benchmark:hydration-large-payload` script to measure clone cost, queued replay cost, and retained heap across multi-hundred-KB to multi-MB state sizes.
|
|
18
|
+
>- Added hydration boot-window write deferral with deterministic replay for early `effect`, `storage`, `network`, and `sync` writes, plus policy execution for `server_wins`, `client_wins`, `merge`, and `invalidate_and_refetch`.
|
|
19
|
+
>- Added manual hydration boot-window control through `HydrationResult.bootWindow`, including `bootWindow: { mode: "manual" }`, optional `fallbackMs`, and runtime metrics that expose whether manual close is available.
|
|
20
|
+
>- Added `stroid/runtime-tools` hydration observability helpers: `getHydrationConsistency()`, `getHydrationDriftEvents()`, and `getHydrationDriftMetrics()`.
|
|
21
|
+
>- Added `stroid/server/portable` for explicit request-scope hand-off across serverless and framework boundaries, including `createRequestScope(...)`, capture/resume coverage, and a local provider-model certification for AWS Lambda, Vercel render-to-action hand-off, and Cloudflare Workers-style isolates.
|
|
22
|
+
>- Added request-bound callback helpers for server runtimes: `createStoreForRequest(...).bind(...)` and `createRequestScope(...).bind(...)`, so pre-bound async callbacks can re-enter captured request registry/carrier context deterministically.
|
|
23
|
+
>- Added React 18 concurrency certification for `useStore(...)`, including no-tearing regression coverage under `useTransition` and `useDeferredValue`, plus a dedicated `benchmark:react-concurrency` script that validates the existing `useSyncExternalStore` hook path.
|
|
24
|
+
>- Added a concrete Next.js App Router render-to-server-action hand-off example, regression coverage, and `benchmark:next-server-actions`, so request-scoped state capture and resume is now documented and locally certified instead of only described as a manual boundary.
|
|
25
|
+
>- Added a dedicated `stroid/query` entrypoint for `reactQueryKey` and `swrKey`, so cache-key helpers can be imported without pulling the heavier async query fetcher surface.
|
|
26
|
+
>- Added SSR async-context benchmark commands `benchmark:ssr-als-audit` and `benchmark:ssr-gaps`, plus seeded report outputs under `scripts/benchmark-results/ssr/` for replayable audit runs.
|
|
27
|
+
>
|
|
28
|
+
>### Change
|
|
29
|
+
>
|
|
30
|
+
>- Reduced cold and write-path overhead by lazily short-circuiting feature lifecycle dispatch when no registered runtime hooks apply to a store, avoiding unnecessary per-store context allocation on `createStore(...)` and `setStore(...)`.
|
|
31
|
+
>- Added an internal large-snapshot hydration gate: when consistency mode is enabled and no explicit boot window is provided, payloads above ~256KB now use a short timer boot-window path so early writes can route through the existing hydration queue.
|
|
32
|
+
>- Added request-scope carrier memoization during SSR hydration runs to reduce repeated AsyncLocalStorage lookups for carrier access inside the same request boundary.
|
|
33
|
+
>- Hardened `createStoreForRequest().hydrate(...)` to scrub finished carrier state after snapshot sync, then added detached-continuation regression coverage and a warm-container SSR certification benchmark for sequential request reuse.
|
|
34
|
+
>- Hardened hydration reconciliation so throwing custom `merge(...)` or normalization callbacks now fall back safely to the hydrated baseline, then added randomized replay certification coverage and a dedicated `benchmark:hydration-randomized` script.
|
|
35
|
+
>- Hardened hydration replay ordering by draining deferred writes through their monotonic enqueue sequence, then added long-lived websocket/sync stream regression coverage plus `benchmark:websocket-stream` to certify pre-close queueing and post-close continuation order.
|
|
36
|
+
>- Hardened integration, regression, and public type coverage for post-hydration drift governance, including early effect input, stale storage restore ordering, websocket/sync burst replay, and invalidation-driven async refetch recovery.
|
|
37
|
+
>- Upgraded `benchmark:hydration-divergence` into a first-class hydration guarantee suite with `try`, `hit`, `stress`, and `hammer` campaigns under the manual-close boundary, and folded that certification into `benchmark:guarantees`.
|
|
38
|
+
>- Reduced `stroid/persist` import retention by routing the leaf entrypoint to the direct feature installer, and regrouped `runtime-tools` internals plus query-key helpers for narrower future tree-shaking work.
|
|
39
|
+
>- Removed the dead `computed-types` JavaScript build entry and added `module` plus explicit `./query` export metadata for bundler compatibility.
|
|
40
|
+
>- Removed incorrect `sideEffects` metadata that pointed at unpublished source paths; the package now stays conservative until the remaining import-time effects are isolated explicitly.
|
|
41
|
+
>- Added computed topo-order memoization with graph-version invalidation so unchanged computed graphs no longer re-run dependency ordering on every flush.
|
|
42
|
+
>- Added async slot indexing and incremental prune cadence, reducing repeated full-map scans in `pruneAsyncCache`, `clearAsyncMeta`, and inflight slot counting paths.
|
|
43
|
+
>- Added `getAsyncMetrics(name?)` per-store reporting while preserving the existing global aggregate metrics shape.
|
|
44
|
+
>- Added configurable `resetStore` clone strategy (`deep` / `shallow` / `none`) via per-store `resetClone` and global `configureStroid({ resetCloneMode })`.
|
|
45
|
+
>- Reorganized stress benchmark runner scripts under `scripts/core/` and updated benchmark npm commands accordingly.
|
|
46
|
+
>- Reorganized benchmark scripts by domain under `scripts/core`, `scripts/ssr`, `scripts/hydration`, `scripts/react`, `scripts/guarantees`, and `scripts/comparison`, then updated benchmark command wiring.
|
|
47
|
+
>- Added manual `workflow_dispatch` support to the Scorecard workflow so code-scanning and supply-chain checks can be re-run on demand after hardening changes.
|
|
48
|
+
>
|
|
49
|
+
>### Fix
|
|
50
|
+
>
|
|
51
|
+
>- Fixed `runtime-admin.clearAllStores()` so it now honors the same `setStoreBatch` transaction guard as the core admin path, preventing destructive clears and cache resets from executing inside active batches.
|
|
52
|
+
>- Fixed store delete/clear teardown so hydration consistency metadata and deferred hydration writes are purged per deleted store, preventing stale post-clear replay against recreated stores.
|
|
53
|
+
>- Hardened `hydrateStores(..., trust.validate)` so Promise-returning async validators are rejected explicitly instead of being coerced to truthy values, preventing silent untrusted hydration.
|
|
54
|
+
>- Replaced flaky/false-positive regressions with deterministic assertions (`computed-cycle`, `selector-cache-growth`, `async-flush-ordering`, and concurrent batch ordering), and added targeted coverage for URL-string `fetchStore(...)` resolution after `deleteStore(...)` plus concurrent same-key `hydrateStores(...)` races.
|
|
55
|
+
>- Hardened structural-sharing coverage to certify large non-Immer path writes keep untouched branch references stable while updating only the targeted branch.
|
|
56
|
+
>- Added stricter performance guardrails for notification flush timing (warmup + median threshold), warning-set cleanup growth across delete/recreate churn, and GC-backed create/delete heap baseline checks.
|
|
57
|
+
>- Added an explicit `storeDeleteCleanup` lifecycle phase in the delete path so async cleanup handlers run in a dedicated teardown stage before `afterStoreDelete`, then added regression coverage for cleanup ordering and immediate async metadata removal.
|
|
58
|
+
>- Fixed async deletion hardening for caller-provided `AbortSignal`: `deleteStore()` now aborts in-flight `fetchStore(...)` requests even when callers supply their own signal, preventing hung network work after store teardown and clearing async metadata deterministically.
|
|
59
|
+
>- Hardened `subscribeStore(...)` unsubscription semantics with an idempotent guard so duplicate unsubscribe calls detach exactly once, including when other subscribers keep the store listener set alive.
|
|
60
|
+
>- Added concurrent async store churn regression coverage that races create/fetch/delete across many stores and asserts no post-delete resurrection or hanging in-flight requests.
|
|
61
|
+
>- Hardened production snapshot delivery safety for `snapshot: "ref"` / `"shallow"` by enforcing a shallow-frozen snapshot envelope across environments and applying `snapshotSafety` mutation handling beyond dev-only checks.
|
|
62
|
+
>- Added production-only regression coverage proving ref-snapshot mutation attempts now warn and preserve committed store state during subscriber delivery.
|
|
63
|
+
>- Added adversarial notification reentrancy stress regressions that force unbounded inline feedback loops through the safety-pass guard and certify runtime recovery plus queue cleanup after teardown.
|
|
64
|
+
>- Added a `bench:stress` notification reentrancy benchmark track (`notify_reentrant_cycle_250`) to track bounded cyclic fanout performance under hostile subscriber write patterns.
|
|
65
|
+
>- Fixed chunked notification delivery context in request-scoped runtimes so continuation slices now execute under the same registry as the originating flush, preventing subscriber writes from escaping to the global registry.
|
|
66
|
+
>- Fixed `createStoreForRequest().hydrate(...)` finalization so queued notification side effects are drained before request snapshot sync, ensuring `snapshot()` includes subscriber-driven writes from the same hydrate pass.
|
|
67
|
+
>- Added regression coverage for portable chunk-continuation registry continuity and request-snapshot coherence after chunked subscriber side effects (sync and delayed async chunk paths).
|
|
68
|
+
>- Fixed root API report surface by exporting previously leaked public dependency types (computed/store/hydration/config/runtime option helpers), removing `ae-forgotten-export` warnings from `docs/api/stroid.api.md`.
|
|
69
|
+
>- Fixed root TypeScript config scope so `tsc -p tsconfig.json --noEmit` now validates the source runtime surface directly instead of traversing docs/test/example-only graphs that require separate tooling configs.
|
|
70
|
+
>- Fixed store-destroy teardown so deleted stores now clear pending notify queue references and drop cached feature-hook contexts immediately, preventing long-run subscriber/context retention across create/delete churn.
|
|
71
|
+
>- Fixed `resetStore()` so it now returns `reason: "no-initial-state"` when a store exists but its reset snapshot is missing, instead of collapsing that branch into `not-found`.
|
|
72
|
+
>- Fixed workflow hardening gaps flagged by code scanning: added explicit top-level token permissions where missing and pinned GitHub Actions to immutable commit SHAs.
|
|
73
|
+
>- Fixed STATUS commit validation for Dependabot updates by accepting the bot-generated optional `(deps)` / `(deps-dev)` scope suffix while preserving STATUS-code enforcement.
|
|
74
|
+
>- Fixed `getAsyncMetrics(...)` public typings so `getAsyncMetrics()` remains non-null while `getAsyncMetrics(name)` is correctly typed as nullable per-store lookup.
|
|
75
|
+
>- Fixed SSR isolation benchmark request stability by retrying transient loopback `fetch` failures in the React streaming HTTP certification phase.
|
|
76
|
+
>- Fixed integration/regression harness imports to follow the new benchmark shared-helper locations after script folder reorganization.
|
|
77
|
+
>- Fixed request-scope carrier fallback behavior so active registry reads do not incorrectly fall back to unrelated AsyncLocalStorage state, preventing render/action cross-context drift under concurrent SSR workloads.
|
|
78
|
+
>- Fixed portable request-scope async lifecycle tracking so `createRequestScope(...).run(async ...)` keeps `scope.bind(...)` callbacks registry-bound until the run promise settles.
|
|
79
|
+
>- Fixed request-bound callback safety so `createStoreForRequest(...).bind(...)` and `createRequestScope(...).bind(...)` no longer silently execute against the global registry outside active request lifecycles; they now fail fast with explicit lifecycle-bound errors and include regression coverage.
|
|
80
|
+
>- Fixed `createStoreForRequest(...).bind(...)` carrier routing so bound callbacks now use the registry-owned active carrier instead of ambient AsyncLocalStorage fallback, preventing cross-request callback corruption and detached stale-carrier writes under concurrent SSR overlap.
|
|
81
|
+
>- Fixed `createStoreForRequest(...).capture()` carrier selection so request capture now reads only the registry-owned active carrier, preventing cross-request snapshot contamination during concurrent hydrate overlap and non-ALS callback capture paths.
|
|
82
|
+
>- Fixed SSR gap probe flakiness by introducing per-request probe barriers before hydrate completion, removing lost-probe races at high concurrency sizes.
|
|
83
|
+
>
|
|
84
|
+
>### Docs
|
|
14
85
|
>
|
|
86
|
+
>- Added a dedicated Post-Hydration Consistency guide with adoption defaults and updated the README, server guide, runtime-tools guide, benchmark report, version migration guide, and `NEXT_PHASE.md` status note to reflect the shipped consistency layer.
|
|
87
|
+
>- Added bundle-sensitive import guidance and bundle-closure benchmark notes to the README and docs, including the new `stroid/query` path, the measurable `stroid/persist` win, and the current root-entry limitations.
|
|
88
|
+
>- Documented runtime caveats for validated store names, direct-Promise async fetches, BroadcastChannel startup/BFCache limits, and Safari/WebKit storage eviction in the README and guides.
|
|
89
|
+
>- Added `STATUS.md` so the commit and issue-close workflow referenced by `CONTRIBUTING.md` is now present in the repository.
|
|
90
|
+
>- Documented async metrics per-store reads and reset clone-mode controls in README and guide docs.
|
|
91
|
+
>- Added seeded SSR ladder/gap benchmark report notes to `docs/STROID/BENCHMARK.md` and documented SSR benchmark regression-gate coverage in `docs/STROID/GITHUB_ACTION.md`.
|
|
92
|
+
></details>
|
|
93
|
+
|
|
15
94
|
|
|
16
95
|
---
|
|
17
96
|
>[!WARNING]
|
|
18
97
|
><details >
|
|
19
98
|
><summary><strong>0.1.4 --> 2026-3-30 </strong></summary>
|
|
20
|
-
|
|
99
|
+
>
|
|
100
|
+
>### Breaking
|
|
101
|
+
>
|
|
102
|
+
>- None.
|
|
103
|
+
>
|
|
104
|
+
>### Add
|
|
105
|
+
>
|
|
106
|
+
>- None.
|
|
107
|
+
>
|
|
108
|
+
>### Fix
|
|
109
|
+
>
|
|
21
110
|
>- Fixed async persist hydration so Promise-returning `persist.driver.getItem()` now loads stored state even when crypto hooks and checksums stay synchronous.
|
|
22
111
|
>- Fixed persist hydration payload guards so falsy serialized values (`""`, `"0"`, `"false"`) now hydrate correctly instead of being treated as missing data.
|
|
23
112
|
>- Fixed async persist clear detection so `onStorageCleared` now resolves Promise-based drivers instead of treating every pending read as "present".
|
|
24
113
|
>- Fixed focus revalidation cleanup so queued staggered and batched refetch timers are cancelled when the returned cleanup runs.
|
|
25
114
|
>- Fixed async inflight dedupe contracts so raw callers no longer inherit another caller's transformed result for the same cache slot.
|
|
26
|
-
>- Fixed computed identity checks so stable object outputs no longer trigger redundant `replaceStore()` writes during dependency
|
|
115
|
+
>- Fixed computed identity checks so stable object outputs no longer trigger redundant `replaceStore()` writes during dependency recompute or `hydrateStores()` recompute.
|
|
27
116
|
>- Fixed request-scoped selectors so `createSelector(...)` now reads carrier-backed state during `createStoreForRequest().hydrate(...)`.
|
|
28
117
|
>- Fixed `resetStore()` in request scope so `onReset(prev)` receives the live pre-reset value instead of the registry placeholder.
|
|
29
118
|
>- Fixed `deleteStore()` in request scope so `onDelete(prev)` receives the live pre-delete value.
|
|
@@ -39,31 +128,45 @@
|
|
|
39
128
|
><details>
|
|
40
129
|
><summary><strong>0.1.4-beta.0 --> 2026-03-23</strong></summary>
|
|
41
130
|
>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
>-
|
|
45
|
-
|
|
131
|
+
>### Breaking
|
|
132
|
+
>
|
|
133
|
+
>- Breaking: changed `stroid/persist`, `stroid/sync`, and `stroid/devtools` to side-effect-free modules that export explicit installers (`installPersist`, `installSync`, `installDevtools`) instead of auto-registering on import.
|
|
134
|
+
>
|
|
135
|
+
>### Add
|
|
136
|
+
>
|
|
46
137
|
>- Added `stroid/psr` as a dedicated native PSR contract entrypoint with committed-only no-track snapshot reads, observation helpers, and explicit timing-contract reporting.
|
|
47
138
|
>- Added a canonical `RuntimePatch` model under the PSR surface and lowered `setStore`, `replaceStore`, `resetStore`, and `hydrateStores` into serializable runtime patch records internally.
|
|
48
139
|
>- Added public PSR patch-write APIs via `applyStorePatch()` and `applyStorePatchesAtomic()` for canonical `set` and root-level `merge` patches.
|
|
49
|
-
>- Hardened transaction commit semantics so failed batched commits roll back staged store state, reset metrics, and queued notifications, while commit-phase feature hook errors no longer break atomic batches.
|
|
50
140
|
>- Added computed classification descriptors plus snapshot evaluation APIs for Phase 5 PSR-native integration, defaulting unclassified computeds to `opaque` so only explicitly deterministic nodes are simulated.
|
|
141
|
+
>- Added a Phase 8 faithfulness suite that locks preview-vs-commit equivalence for deterministic public PSR flows, verifies public atomic rollback visibility rules, exercises async-boundary stop conditions, and smoke-tests production usage from only public entrypoints.
|
|
142
|
+
>- Added a 250K unique-subscriber benchmark, a 250K concurrent subscriber benchmark with real-world multi-store fanout scenarios, and lean performance-suite coverage for concurrent subscriber and sync broadcast timing; refreshed benchmark harnesses to use explicit feature installers and truly unique subscriber callbacks.
|
|
143
|
+
>
|
|
144
|
+
>### Change
|
|
145
|
+
>
|
|
146
|
+
>- Expanded the public PSR patch surface to support nested `merge`, `delete`, and `insert`, with canonical path-array behavior and `failedPatchId` reporting for both single and atomic failures.
|
|
147
|
+
>- Hardened public PSR package-level contract coverage to verify built `dist` entrypoints can detect, read, subscribe to, and patch stores created through the main `stroid` entrypoint.
|
|
148
|
+
>- Tightened public PSR patch rejection semantics with stable `unsupported-op` and `unsupported-path-shape` reason codes for unsupported patch forms.
|
|
51
149
|
>- Hardened Phase 6 graph identity with stable runtime node IDs, store-granularity runtime graphs, typed dependency edges, and PSR graph reads that accept both stable node IDs and legacy computed store names.
|
|
52
150
|
>- Hardened Phase 7 timing semantics with explicit governance modes, mutation authority, causality-boundary reporting, and concrete contract reasons for async persistence, sync authority sharing, and async-boundary computed propagation.
|
|
53
|
-
>- Added a Phase 8 faithfulness suite that locks preview-vs-commit equivalence for deterministic public PSR flows, verifies public atomic rollback visibility rules, exercises async-boundary stop conditions, and smoke-tests production usage from only public entrypoints.
|
|
54
151
|
>- Expanded built-package PSR contract tests to cover committed-final subscription timing, idempotent unsubscribe behavior, computed-settle notification ordering, and timing/governance downgrade claims.
|
|
55
|
-
>- Added a dedicated public PSR guide and support matrix covering patch support, reason codes, runtime node ID treatment, subscription timing, and downgrade rules.
|
|
56
152
|
>- Hardened production SSR computed registration so computed stores inherit explicit global SSR opt-in from already-global dependencies and fail cleanly without leaving stray computed registrations when global creation is unsupported.
|
|
57
|
-
>-
|
|
153
|
+
>- Updated package exports, docs, and feature-install guidance to make optional feature registration explicit and more tree-shakeable.
|
|
154
|
+
>- Stopped publishing `.map` source maps in the npm tarball to reduce package weight while keeping local build/debug output unchanged.
|
|
155
|
+
>- Removed dead `./vue` and `./svelte` package exports that did not have built output behind them.
|
|
156
|
+
>
|
|
157
|
+
>### Fix
|
|
158
|
+
>
|
|
159
|
+
>- Fixed the published ESM package layout so `stroid`, `stroid/psr`, and sibling entrypoints share one runtime registry/computed graph instead of shipping isolated bundled state.
|
|
160
|
+
>- Hardened transaction commit semantics so failed batched commits roll back staged store state, reset metrics, and queued notifications, while commit-phase feature hook errors no longer break atomic batches.
|
|
58
161
|
>- Fixed `createStoreForRequest` so the documented callback API now exposes `api.snapshot()`.
|
|
59
162
|
>- Fixed `createStoreForRequest().set(name, object)` so later external mutation of the caller payload no longer mutates request state.
|
|
60
163
|
>- Fixed `createStoreForRequest()` so request-scope writes made during `hydrate()` now persist into later `snapshot()` output and repeated `hydrate()` calls.
|
|
61
164
|
>- Fixed `fetchStore()` timeouts without a caller-provided signal so the internally created request is now aborted when the timeout fires.
|
|
62
165
|
>- Fixed `fetchStore()` request versioning so a timed-out request can no longer reuse a cleared version and overwrite a newer in-flight response.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
>-
|
|
166
|
+
>
|
|
167
|
+
>### Docs
|
|
168
|
+
>
|
|
169
|
+
>- Added a dedicated public PSR guide and support matrix covering patch support, reason codes, runtime node ID treatment, subscription timing, and downgrade rules.
|
|
67
170
|
></details>
|
|
68
171
|
>
|
|
69
172
|
---
|
|
@@ -71,6 +174,16 @@
|
|
|
71
174
|
><details>
|
|
72
175
|
><summary><strong>0.1.3 --> 2026-03-22</strong></summary>
|
|
73
176
|
>
|
|
177
|
+
>### Breaking
|
|
178
|
+
>
|
|
179
|
+
>- None.
|
|
180
|
+
>
|
|
181
|
+
>### Add
|
|
182
|
+
>
|
|
183
|
+
>- None.
|
|
184
|
+
>
|
|
185
|
+
>### Fix
|
|
186
|
+
>
|
|
74
187
|
>- Fixed async rate limiting so `fetchStore(..., { cacheKey })` is throttled per `cacheSlot` instead of incorrectly sharing one counter across the whole store name.
|
|
75
188
|
>- Fixed `createSelector` dependency tracking for object-valued reads so cached selector results no longer go stale when object references change without primitive leaf access.
|
|
76
189
|
>- Fixed `setStoreBatch` teardown so a later commit-phase feature error does not discard notifications that were already queued by earlier successful commits.
|
|
@@ -94,8 +207,9 @@
|
|
|
94
207
|
><details>
|
|
95
208
|
><summary><strong>0.1.2 --> 2026-03-19</strong></summary>
|
|
96
209
|
>
|
|
97
|
-
|
|
210
|
+
>### Breaking
|
|
98
211
|
>
|
|
212
|
+
>- Breaking changes to the `stroid/core` export surface and hydration defaults to improve bundle size and security.
|
|
99
213
|
>- `hydrateStores` now requires an explicit trust argument at the TypeScript level (compile-time enforcement).
|
|
100
214
|
>- Default snapshot mode changed to `"shallow"` (was `"deep"`). Override per-store with `snapshot: "deep"` or globally with `configureStroid({ defaultSnapshotMode: "deep" })`.
|
|
101
215
|
>
|
|
@@ -111,7 +225,7 @@
|
|
|
111
225
|
>- `Array.from` elimination: replaced per-flush subscriber array allocations with a registry-level reusable buffer.
|
|
112
226
|
>- `buildFlushPlan` collapse: reduced passes, preserved `pendingBuffer` semantics, and removed the terminal `orderedNames.slice()` allocation.
|
|
113
227
|
>
|
|
114
|
-
>###
|
|
228
|
+
>### Add
|
|
115
229
|
>
|
|
116
230
|
>- `allowTrusted` hydration flag (aliasing `allowHydration`; `allowUntrusted` deprecated).
|
|
117
231
|
>- `allowTrustedHydration` config alias.
|
|
@@ -139,7 +253,7 @@
|
|
|
139
253
|
>- Reserved `stroid/vue` and `stroid/svelte` entry points (adapter placeholders, not implemented).
|
|
140
254
|
>- `onStoreLifecycle` registry hook for single-listener lifecycle events (devtools-oriented).
|
|
141
255
|
>
|
|
142
|
-
>###
|
|
256
|
+
>### Change
|
|
143
257
|
>
|
|
144
258
|
>- `createStoreForRequest` now hydrates with `{ allowTrusted: true }`.
|
|
145
259
|
>- `getStore` now respects `snapshot` mode (`deep`/`shallow`/`ref`) for both whole-store and path reads.
|
|
@@ -163,7 +277,7 @@
|
|
|
163
277
|
>- `deepClone` throws on non-cloneable values.
|
|
164
278
|
>- `endTransaction` now executes all pending commit callbacks, capturing the first error while allowing remaining commits to run.
|
|
165
279
|
>
|
|
166
|
-
>###
|
|
280
|
+
>### Fix
|
|
167
281
|
>
|
|
168
282
|
>- Helper store typings align with stricter `createStore` overloads.
|
|
169
283
|
>- `replaceStore` now participates in `setStoreBatch` transactions.
|
|
@@ -200,20 +314,20 @@
|
|
|
200
314
|
>
|
|
201
315
|
>- If you used `stroid/core` for batching, reset, or hydration — import those from `stroid` instead.
|
|
202
316
|
>
|
|
203
|
-
>###
|
|
317
|
+
>### Add
|
|
204
318
|
>
|
|
205
319
|
>- Public feature installer entrypoints and a `features` option bag for custom feature registration.
|
|
206
320
|
>- Optional structural sharing via `configureStroid({ mutatorProduce })` (supports a global Immer shim).
|
|
207
321
|
>- `strictAsyncUsageErrors` to throw on async usage errors when enabled.
|
|
208
322
|
>
|
|
209
|
-
>###
|
|
323
|
+
>### Change
|
|
210
324
|
>
|
|
211
325
|
>- SSR request APIs are now fully typed; `snapshotStrategy` drives the default snapshot mode.
|
|
212
326
|
>- Config is registry-scoped to avoid cross-request bleed in SSR.
|
|
213
327
|
>- Transaction snapshot caching scoped to the active batch.
|
|
214
328
|
>- Internal layering tightened; added guard against restricted lifecycle imports.
|
|
215
329
|
>
|
|
216
|
-
>###
|
|
330
|
+
>### Fix
|
|
217
331
|
>
|
|
218
332
|
>- Chunked flush delivery no longer mixes snapshots within a single notification.
|
|
219
333
|
>- Persist sequencing avoids stale writes when debounce timers overlap.
|
|
@@ -228,7 +342,7 @@
|
|
|
228
342
|
><details>
|
|
229
343
|
><summary><strong>0.1.0 --> 2026-03-14</strong></summary>
|
|
230
344
|
>
|
|
231
|
-
>###
|
|
345
|
+
>### Add
|
|
232
346
|
>
|
|
233
347
|
>- `configureStroid({ strictMissingFeatures: true })` to hard-fail when a feature is used without its side-effect import.
|
|
234
348
|
>- `configureStroid({ allowUntrustedHydration: true })` to opt in to `hydrateStores` on untrusted snapshots.
|
|
@@ -240,14 +354,14 @@
|
|
|
240
354
|
>- `configureStroid({ strictMutatorReturns: true })` to forbid mutator return values.
|
|
241
355
|
>- `StrictStoreMap` opt-in type mode.
|
|
242
356
|
>
|
|
243
|
-
>### Breaking
|
|
357
|
+
>### Breaking
|
|
244
358
|
>
|
|
245
359
|
>- Removed `mergeStore` and `chain` from the public API.
|
|
246
360
|
>- `setStoreBatch` is now transactional (staged writes, atomic commit, rollback on error).
|
|
247
361
|
>- `createStore`, `deleteStore`, `hydrateStores` are disallowed inside a batch.
|
|
248
362
|
>- `hydrateStores` requires explicit trust via third argument or config.
|
|
249
363
|
>
|
|
250
|
-
>###
|
|
364
|
+
>### Fix
|
|
251
365
|
>
|
|
252
366
|
>- `deleteStore` no longer emits an intermediate null notification.
|
|
253
367
|
>- Async fetch 60s timeout now clears on completion.
|
|
@@ -261,17 +375,17 @@
|
|
|
261
375
|
><details>
|
|
262
376
|
><summary><strong>0.0.4 --> 2026-03-06</strong></summary>
|
|
263
377
|
>
|
|
264
|
-
>###
|
|
378
|
+
>### Add
|
|
265
379
|
>
|
|
266
380
|
>- Persistence recovery hooks: `persist.onMigrationFail` and `persist.onStorageCleared`.
|
|
267
381
|
>- Sync hardening: `sync.maxPayloadBytes` and snapshot requests for reconnecting tabs.
|
|
268
382
|
>
|
|
269
|
-
>###
|
|
383
|
+
>### Change
|
|
270
384
|
>
|
|
271
385
|
>- Docs: converted repo docs into chapter-based handbook; aligned README and API chapters with real package surface.
|
|
272
386
|
>- Packaging: rebuilt `dist` from current `src`; fixed `stroid/react` build entry.
|
|
273
387
|
>
|
|
274
|
-
>###
|
|
388
|
+
>### Fix
|
|
275
389
|
>
|
|
276
390
|
>- `hydrateStores` rejects invalid schema payloads without leaving broken store shells.
|
|
277
391
|
>- Middleware throws no longer poison later notifications.
|
|
@@ -283,7 +397,7 @@
|
|
|
283
397
|
><details>
|
|
284
398
|
><summary><strong>0.0.3 --> 2026-03-04</strong></summary>
|
|
285
399
|
>
|
|
286
|
-
>###
|
|
400
|
+
>### Fix
|
|
287
401
|
>
|
|
288
402
|
>- Persistence catches `localStorage.setItem` errors (e.g., `QuotaExceededError`) and routes to `onError`.
|
|
289
403
|
>- Async fetch metadata cleans up when a store is deleted.
|
|
@@ -299,14 +413,14 @@
|
|
|
299
413
|
><details>
|
|
300
414
|
><summary><strong>0.0.2 --> 2026-03-03</strong></summary>
|
|
301
415
|
>
|
|
302
|
-
>###
|
|
416
|
+
>### Add
|
|
303
417
|
>
|
|
304
418
|
>- SSR helpers: `createStoreForRequest` and `hydrateStores`.
|
|
305
419
|
>- Store helpers: `createEntityStore`, `createListStore`, `createCounterStore`.
|
|
306
420
|
>- Observability: `getHistory`, `clearHistory`, `getMetrics`.
|
|
307
421
|
>- Sync tuning: optional `channel` and `conflictResolver`.
|
|
308
422
|
>
|
|
309
|
-
>###
|
|
423
|
+
>### Fix
|
|
310
424
|
>
|
|
311
425
|
>- Hydration safety around theme toggles.
|
|
312
426
|
></details>
|
|
@@ -323,4 +437,4 @@
|
|
|
323
437
|
>- Safety: path/type guard warnings, persist key collision warning.
|
|
324
438
|
>- CRC table lazy init.
|
|
325
439
|
></details>
|
|
326
|
-
>
|
|
440
|
+
>
|