stroid 0.1.4-beta.0 → 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 +427 -288
- package/README.md +1125 -118
- package/dist/async-internal.d.ts +30 -0
- package/dist/async.d.ts +7 -12
- package/dist/async.js +1 -33
- 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/chunk-YU5GMPCC.js +2 -0
- package/dist/computed.d.ts +6 -5
- package/dist/computed.js +1 -12
- package/dist/core-internal.d.ts +23 -0
- package/dist/core.d.ts +3 -2
- package/dist/core.js +1 -22
- 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 -22
- 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 -35
- 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 +20 -11
- package/dist/psr.js +1 -18
- 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 -36
- package/dist/registry.d.ts +23 -14
- package/dist/runtime-admin.js +1 -1
- package/dist/runtime-tools.d.ts +38 -65
- package/dist/runtime-tools.js +1 -3
- 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 -19
- package/dist/server.js +1 -12
- package/dist/shared.d.ts +36 -0
- package/dist/store-registry.d.ts +5 -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 -22
- package/dist/tsdoc-metadata.json +1 -1
- 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} +26 -10
- package/dist/types.d.ts +12 -2
- package/package.json +111 -44
- package/dist/computed-types.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,301 +1,440 @@
|
|
|
1
1
|
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project are documented in this file.
|
|
4
|
-
Format: [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
5
|
-
Versioning: [Semantic Versioning](https://semver.org/).
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
<details open>
|
|
9
|
-
<summary><strong>Unreleased</strong></summary>
|
|
10
|
-
|
|
11
|
-
- No unreleased changes yet.
|
|
12
|
-
|
|
13
|
-
</details>
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
<details>
|
|
18
|
-
<summary><strong>0.1.4-beta.0 --> 2026-03-23</strong></summary>
|
|
19
|
-
|
|
20
|
-
- Added `stroid/psr` as a dedicated native PSR contract entrypoint with committed-only no-track snapshot reads, observation helpers, and explicit timing-contract reporting.
|
|
21
|
-
- Added a canonical `RuntimePatch` model under the PSR surface and lowered `setStore`, `replaceStore`, `resetStore`, and `hydrateStores` into serializable runtime patch records internally.
|
|
22
|
-
- Added public PSR patch-write APIs via `applyStorePatch()` and `applyStorePatchesAtomic()` for canonical `set` and root-level `merge` patches.
|
|
23
|
-
- 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.
|
|
24
|
-
- 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.
|
|
25
|
-
- 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.
|
|
26
|
-
- 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.
|
|
27
|
-
- 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.
|
|
28
|
-
- 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.
|
|
29
|
-
- 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.
|
|
30
|
-
- 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.
|
|
31
|
-
- Updated package exports, docs, and feature-install guidance to make optional feature registration explicit and more tree-shakeable.
|
|
32
|
-
- Stopped publishing `.map` source maps in the npm tarball to reduce package weight while keeping local build/debug output unchanged.
|
|
33
|
-
- Removed dead `./vue` and `./svelte` package exports that did not have built output behind them.
|
|
34
|
-
|
|
35
|
-
</details>
|
|
2
|
+
>[!IMPORTANT]
|
|
3
|
+
>All notable changes to this project are documented in this file.
|
|
4
|
+
>Format: [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
5
|
+
>Versioning: [Semantic Versioning](https://semver.org/).
|
|
6
|
+
>Version_Migration : [docs/STROID_VERSION_MIGRATION/INDEX.md](docs/STROID_VERSION_MIGRATION/INDEX.md)
|
|
36
7
|
|
|
37
8
|
---
|
|
38
9
|
|
|
39
|
-
|
|
40
|
-
|
|
10
|
+
>[!WARNING]
|
|
11
|
+
><details open>
|
|
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
|
|
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>
|
|
41
93
|
|
|
42
|
-
- Fixed async rate limiting so `fetchStore(..., { cacheKey })` is throttled per `cacheSlot` instead of incorrectly sharing one counter across the whole store name.
|
|
43
|
-
- Fixed `createSelector` dependency tracking for object-valued reads so cached selector results no longer go stale when object references change without primitive leaf access.
|
|
44
|
-
- Fixed `setStoreBatch` teardown so a later commit-phase feature error does not discard notifications that were already queued by earlier successful commits.
|
|
45
|
-
- Fixed persist unload listeners so deleting and recreating a persisted store no longer accumulates stale `pagehide` / `beforeunload` flush handlers.
|
|
46
|
-
- Fixed sync-applied remote state so feature write hooks still run, allowing `persist` and other write-driven features to observe synced updates.
|
|
47
|
-
- Fixed `clearAllStores()` under `assertRuntime: true` so a successful clear logs normally instead of throwing from the success path.
|
|
48
|
-
- Fixed sync checksum handling so incoming sync payloads are now verified before remote state is accepted.
|
|
49
|
-
- Fixed async request defaults so bodyless `GET` / `HEAD` / `DELETE` requests no longer send `Content-Type: application/json`.
|
|
50
|
-
- Fixed `createComputed(..., { autoDispose: true })` so computed stores are removed after their last dependency is deleted.
|
|
51
|
-
- Fixed `resetStore()` for falsy initial values (`false`, `0`, `""`, `null`) so registered stores no longer report `not-found` during reset.
|
|
52
|
-
- Replaced the default registry scope's `import.meta.url`-based identifier with a stable bundler-safe string to avoid webpack / Next.js resolution failures.
|
|
53
|
-
- Hardened SSR write-context isolation by routing `runWithWriteContext(...)` through the server AsyncLocalStorage runner instead of relying only on a module-level fallback context.
|
|
54
|
-
- Hardened inline notification delivery to snapshot the subscriber list per flush instead of reusing a shared registry buffer.
|
|
55
|
-
- Tightened React hook type coverage for ambient `StoreStateMap` usage, including `useStore`, `useStoreField`, `useStoreStatic`, `useSelector`, `useFormStore`, `useAsyncStore`, and `useAsyncStoreSuspense`.
|
|
56
|
-
- Clarified React selector recreation warnings and docs so they describe selector churn and cache reuse accurately instead of implying repeated re-subscriptions.
|
|
57
|
-
- Upgraded the transitive `flatted` resolution to `3.4.2` via `npm overrides` to address the Dependabot alert in the eslint / flat-cache toolchain path.
|
|
58
|
-
|
|
59
|
-
</details>
|
|
60
94
|
|
|
61
95
|
---
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
-
|
|
86
|
-
- `
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
- Store metrics now include reset timing (`resetCount`, `totalResetMs`, `lastResetMs`).
|
|
93
|
-
- API Extractor configuration and `docs:api` script for generating typed API reports.
|
|
94
|
-
- `IStoreCore` shared interface and `store-core` adapter for layer boundaries.
|
|
95
|
-
- ESLint layer guards for async-cache and store-notify imports.
|
|
96
|
-
- Optional TypeScript layer configs (`tsconfig.layers.json`) for build-time dependency checks.
|
|
97
|
-
- `sync.insecure` option to explicitly allow unauthenticated sync in production.
|
|
98
|
-
- `onValidationError` hook for hydrate trust validation failures.
|
|
99
|
-
- `acknowledgeLooseTypes` config flag to silence the loose-type dev warning.
|
|
100
|
-
- `pathCacheSize` config to tune per-store path validation cache limits.
|
|
101
|
-
- `HydrateSnapshotFor<Map>` helper type for stricter hydration typing.
|
|
102
|
-
- Internal lifecycle hook hub for decoupled cross-layer events.
|
|
103
|
-
- Lazy store lifecycle helpers: `isLazyStore`, `isLazyPending`, `isStoreMaterialized`.
|
|
104
|
-
- `autoCorrelationIds` config and `fetchStore` correlation/trace context propagation.
|
|
105
|
-
- `getStoreHealth()` unified observability helper for per-store and global metrics.
|
|
106
|
-
- `findColdStores()` to surface cold/stale/write-only stores.
|
|
107
|
-
- Root exports for `getMetrics` and `getAsyncMetrics` for discoverability.
|
|
108
|
-
- Reserved `stroid/vue` and `stroid/svelte` entry points (adapter placeholders, not implemented).
|
|
109
|
-
- `onStoreLifecycle` registry hook for single-listener lifecycle events (devtools-oriented).
|
|
110
|
-
|
|
111
|
-
### Changed
|
|
112
|
-
|
|
113
|
-
- `createStoreForRequest` now hydrates with `{ allowTrusted: true }`.
|
|
114
|
-
- `getStore` now respects `snapshot` mode (`deep`/`shallow`/`ref`) for both whole-store and path reads.
|
|
115
|
-
- `setStore` TypeScript overloads consolidated to reduce IntelliSense noise.
|
|
116
|
-
- Lazy store typings now require `lazy: true` when initial data is a function.
|
|
117
|
-
- Sync loop guard is enabled by default (opt out with `sync: { loopGuard: false }`).
|
|
118
|
-
- Unauthenticated sync is blocked in production unless `authToken`, `verify`, or `insecure` is provided.
|
|
119
|
-
- `hydrateStores` throws in dev when `trust.validate` throws; routes via `onError` in production.
|
|
120
|
-
- `hydrateStores` returns structured `failed` entries with `blocked` reasons.
|
|
121
|
-
- `mutatorProduce: "immer"` now uses `registerMutatorProduce`.
|
|
122
|
-
- `useStore` warns once in dev when store names are untyped.
|
|
123
|
-
- `useStore` broad-subscription warnings now surface outside dev (once per store).
|
|
124
|
-
- `snapshot: "shallow"` now dev-freezes the top-level snapshot.
|
|
125
|
-
- Notification pipeline split into `notification/*` modules.
|
|
126
|
-
- Async cache cleanup hooks now register through lifecycle hooks.
|
|
127
|
-
- `resetStore` reports `lazy-uninitialized` when called before materialization.
|
|
128
|
-
- `setStoreBatch` throws in production SSR on the global registry (requires request scope).
|
|
129
|
-
- Store metadata now tracks read counts and last-read timestamps.
|
|
130
|
-
- Middleware contexts include optional `correlationId`/`traceContext`.
|
|
131
|
-
- React hooks live exclusively under `stroid/react`.
|
|
132
|
-
- `deepClone` throws on non-cloneable values.
|
|
133
|
-
- `endTransaction` now executes all pending commit callbacks, capturing the first error while allowing remaining commits to run.
|
|
134
|
-
|
|
135
|
-
### Fixed
|
|
136
|
-
|
|
137
|
-
- Helper store typings align with stricter `createStore` overloads.
|
|
138
|
-
- `replaceStore` now participates in `setStoreBatch` transactions.
|
|
139
|
-
- Removed dead `runInline` logic from the chunked notify queue.
|
|
140
|
-
- Selector reads in request scope no longer leak through the default registry.
|
|
141
|
-
- React hooks now resolve the active request registry when `RegistryScope` is omitted during SSR hydration.
|
|
142
|
-
- Chunked flush now snapshots subscribers per task to avoid mid-flush corruption.
|
|
143
|
-
- `injectTransactionRunner` ignores unsafe reinjection attempts.
|
|
144
|
-
- `endTransaction` surfaces commit-phase errors.
|
|
145
|
-
- Persist writes re-check the latest sequence before `setItem`.
|
|
146
|
-
- `fetchStore` sets an error state when `transform` returns a Promise.
|
|
147
|
-
- Async rate limiting is enforced per store (not per cache slot).
|
|
148
|
-
- `hydrateStores` recomputes affected computed stores after hydration.
|
|
149
|
-
- User `onError` callbacks are now isolated from core operations if they throw.
|
|
150
|
-
|
|
151
|
-
### Docs
|
|
152
|
-
|
|
153
|
-
- Hydration examples now reference `allowTrusted` language.
|
|
154
|
-
- Sync options documentation now includes `loopGuard`.
|
|
155
|
-
- README now documents `registerMutatorProduce`, `sync.insecure`, and `onValidationError`.
|
|
156
|
-
- React SSR docs now mention `stores.registry` and the automatic request-registry fallback.
|
|
157
|
-
|
|
158
|
-
</details>
|
|
159
|
-
|
|
96
|
+
>[!WARNING]
|
|
97
|
+
><details >
|
|
98
|
+
><summary><strong>0.1.4 --> 2026-3-30 </strong></summary>
|
|
99
|
+
>
|
|
100
|
+
>### Breaking
|
|
101
|
+
>
|
|
102
|
+
>- None.
|
|
103
|
+
>
|
|
104
|
+
>### Add
|
|
105
|
+
>
|
|
106
|
+
>- None.
|
|
107
|
+
>
|
|
108
|
+
>### Fix
|
|
109
|
+
>
|
|
110
|
+
>- Fixed async persist hydration so Promise-returning `persist.driver.getItem()` now loads stored state even when crypto hooks and checksums stay synchronous.
|
|
111
|
+
>- Fixed persist hydration payload guards so falsy serialized values (`""`, `"0"`, `"false"`) now hydrate correctly instead of being treated as missing data.
|
|
112
|
+
>- Fixed async persist clear detection so `onStorageCleared` now resolves Promise-based drivers instead of treating every pending read as "present".
|
|
113
|
+
>- Fixed focus revalidation cleanup so queued staggered and batched refetch timers are cancelled when the returned cleanup runs.
|
|
114
|
+
>- Fixed async inflight dedupe contracts so raw callers no longer inherit another caller's transformed result for the same cache slot.
|
|
115
|
+
>- Fixed computed identity checks so stable object outputs no longer trigger redundant `replaceStore()` writes during dependency recompute or `hydrateStores()` recompute.
|
|
116
|
+
>- Fixed request-scoped selectors so `createSelector(...)` now reads carrier-backed state during `createStoreForRequest().hydrate(...)`.
|
|
117
|
+
>- Fixed `resetStore()` in request scope so `onReset(prev)` receives the live pre-reset value instead of the registry placeholder.
|
|
118
|
+
>- Fixed `deleteStore()` in request scope so `onDelete(prev)` receives the live pre-delete value.
|
|
119
|
+
>- Fixed request-scope delete cleanup so removing a store also clears its carrier-backed value instead of leaving hidden stale request state behind.
|
|
120
|
+
>- Fixed request-scope `hydrateStores()` runtime patches so canonical root `set` patches always include the committed hydrated value.
|
|
121
|
+
>- Fixed public feature hook contexts so `onStoreCreate` and `onStoreWrite` expose committed request-scoped state through `ctx.getStoreValue()` and `ctx.getAllStores()`.
|
|
122
|
+
>- Fixed public delete feature hook contexts so `beforeStoreDelete` exposes committed request-scoped state through `ctx.prev`, `ctx.getStoreValue()`, and `ctx.getAllStores()`.
|
|
123
|
+
>
|
|
124
|
+
></details>
|
|
125
|
+
>
|
|
160
126
|
---
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
-
|
|
176
|
-
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
-
|
|
184
|
-
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
127
|
+
>[!CAUTION]
|
|
128
|
+
><details>
|
|
129
|
+
><summary><strong>0.1.4-beta.0 --> 2026-03-23</strong></summary>
|
|
130
|
+
>
|
|
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
|
+
>
|
|
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.
|
|
138
|
+
>- Added a canonical `RuntimePatch` model under the PSR surface and lowered `setStore`, `replaceStore`, `resetStore`, and `hydrateStores` into serializable runtime patch records internally.
|
|
139
|
+
>- Added public PSR patch-write APIs via `applyStorePatch()` and `applyStorePatchesAtomic()` for canonical `set` and root-level `merge` patches.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
161
|
+
>- Fixed `createStoreForRequest` so the documented callback API now exposes `api.snapshot()`.
|
|
162
|
+
>- Fixed `createStoreForRequest().set(name, object)` so later external mutation of the caller payload no longer mutates request state.
|
|
163
|
+
>- Fixed `createStoreForRequest()` so request-scope writes made during `hydrate()` now persist into later `snapshot()` output and repeated `hydrate()` calls.
|
|
164
|
+
>- Fixed `fetchStore()` timeouts without a caller-provided signal so the internally created request is now aborted when the timeout fires.
|
|
165
|
+
>- Fixed `fetchStore()` request versioning so a timed-out request can no longer reuse a cleared version and overwrite a newer in-flight response.
|
|
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.
|
|
170
|
+
></details>
|
|
171
|
+
>
|
|
197
172
|
---
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
- `
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
173
|
+
>[!WARNING]
|
|
174
|
+
><details>
|
|
175
|
+
><summary><strong>0.1.3 --> 2026-03-22</strong></summary>
|
|
176
|
+
>
|
|
177
|
+
>### Breaking
|
|
178
|
+
>
|
|
179
|
+
>- None.
|
|
180
|
+
>
|
|
181
|
+
>### Add
|
|
182
|
+
>
|
|
183
|
+
>- None.
|
|
184
|
+
>
|
|
185
|
+
>### Fix
|
|
186
|
+
>
|
|
187
|
+
>- Fixed async rate limiting so `fetchStore(..., { cacheKey })` is throttled per `cacheSlot` instead of incorrectly sharing one counter across the whole store name.
|
|
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.
|
|
189
|
+
>- Fixed `setStoreBatch` teardown so a later commit-phase feature error does not discard notifications that were already queued by earlier successful commits.
|
|
190
|
+
>- Fixed persist unload listeners so deleting and recreating a persisted store no longer accumulates stale `pagehide` / `beforeunload` flush handlers.
|
|
191
|
+
>- Fixed sync-applied remote state so feature write hooks still run, allowing `persist` and other write-driven features to observe synced updates.
|
|
192
|
+
>- Fixed `clearAllStores()` under `assertRuntime: true` so a successful clear logs normally instead of throwing from the success path.
|
|
193
|
+
>- Fixed sync checksum handling so incoming sync payloads are now verified before remote state is accepted.
|
|
194
|
+
>- Fixed async request defaults so bodyless `GET` / `HEAD` / `DELETE` requests no longer send `Content-Type: application/json`.
|
|
195
|
+
>- Fixed `createComputed(..., { autoDispose: true })` so computed stores are removed after their last dependency is deleted.
|
|
196
|
+
>- Fixed `resetStore()` for falsy initial values (`false`, `0`, `""`, `null`) so registered stores no longer report `not-found` during reset.
|
|
197
|
+
>- Replaced the default registry scope's `import.meta.url`-based identifier with a stable bundler-safe string to avoid webpack / Next.js resolution failures.
|
|
198
|
+
>- Hardened SSR write-context isolation by routing `runWithWriteContext(...)` through the server AsyncLocalStorage runner instead of relying only on a module-level fallback context.
|
|
199
|
+
>- Hardened inline notification delivery to snapshot the subscriber list per flush instead of reusing a shared registry buffer.
|
|
200
|
+
>- Tightened React hook type coverage for ambient `StoreStateMap` usage, including `useStore`, `useStoreField`, `useStoreStatic`, `useSelector`, `useFormStore`, `useAsyncStore`, and `useAsyncStoreSuspense`.
|
|
201
|
+
>- Clarified React selector recreation warnings and docs so they describe selector churn and cache reuse accurately instead of implying repeated re-subscriptions.
|
|
202
|
+
>- Upgraded the transitive `flatted` resolution to `3.4.2` via `npm overrides` to address the Dependabot alert in the eslint / flat-cache toolchain path.
|
|
203
|
+
></details>
|
|
204
|
+
>
|
|
231
205
|
---
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
206
|
+
>[!CAUTION]
|
|
207
|
+
><details>
|
|
208
|
+
><summary><strong>0.1.2 --> 2026-03-19</strong></summary>
|
|
209
|
+
>
|
|
210
|
+
>### Breaking
|
|
211
|
+
>
|
|
212
|
+
>- Breaking changes to the `stroid/core` export surface and hydration defaults to improve bundle size and security.
|
|
213
|
+
>- `hydrateStores` now requires an explicit trust argument at the TypeScript level (compile-time enforcement).
|
|
214
|
+
>- Default snapshot mode changed to `"shallow"` (was `"deep"`). Override per-store with `snapshot: "deep"` or globally with `configureStroid({ defaultSnapshotMode: "deep" })`.
|
|
215
|
+
>
|
|
216
|
+
>### Migration
|
|
217
|
+
>
|
|
218
|
+
>- If you use `stroid/core` for batching, reset, or hydration — move those imports to `stroid`.
|
|
219
|
+
>- If you call `hydrateStores` without a trust argument — add `{ allowTrusted: true }` as the third argument.
|
|
220
|
+
>- If your app relies on deep-clone snapshot semantics — add `snapshot: "deep"` to affected stores or set `configureStroid({ defaultSnapshotMode: "deep" })`.
|
|
221
|
+
>
|
|
222
|
+
>### Performance
|
|
223
|
+
>
|
|
224
|
+
>- Hot-path proxy avoidance: `deliverFlush` now captures direct registry references once and reuses them during the flush loop.
|
|
225
|
+
>- `Array.from` elimination: replaced per-flush subscriber array allocations with a registry-level reusable buffer.
|
|
226
|
+
>- `buildFlushPlan` collapse: reduced passes, preserved `pendingBuffer` semantics, and removed the terminal `orderedNames.slice()` allocation.
|
|
227
|
+
>
|
|
228
|
+
>### Add
|
|
229
|
+
>
|
|
230
|
+
>- `allowTrusted` hydration flag (aliasing `allowHydration`; `allowUntrusted` deprecated).
|
|
231
|
+
>- `allowTrustedHydration` config alias.
|
|
232
|
+
>- `sync.loopGuard` option to suppress immediate rebroadcasts after an incoming sync update.
|
|
233
|
+
>- `registerMutatorProduce` helper for safely registering Immer (or other mutator engines).
|
|
234
|
+
>- `selectorCloneFrozen` config flag to control frozen-state cloning in `createSelector` (dev performance toggle).
|
|
235
|
+
>- `createStoreForRequest` now exposes the request `registry` for `RegistryScope` or advanced SSR usage.
|
|
236
|
+
>- `stroid/server` now re-exports the `StoreRegistry` type for SSR typing.
|
|
237
|
+
>- Store metrics now include reset timing (`resetCount`, `totalResetMs`, `lastResetMs`).
|
|
238
|
+
>- API Extractor configuration and `docs:api` script for generating typed API reports.
|
|
239
|
+
>- `IStoreCore` shared interface and `store-core` adapter for layer boundaries.
|
|
240
|
+
>- ESLint layer guards for async-cache and store-notify imports.
|
|
241
|
+
>- Optional TypeScript layer configs (`tsconfig.layers.json`) for build-time dependency checks.
|
|
242
|
+
>- `sync.insecure` option to explicitly allow unauthenticated sync in production.
|
|
243
|
+
>- `onValidationError` hook for hydrate trust validation failures.
|
|
244
|
+
>- `acknowledgeLooseTypes` config flag to silence the loose-type dev warning.
|
|
245
|
+
>- `pathCacheSize` config to tune per-store path validation cache limits.
|
|
246
|
+
>- `HydrateSnapshotFor<Map>` helper type for stricter hydration typing.
|
|
247
|
+
>- Internal lifecycle hook hub for decoupled cross-layer events.
|
|
248
|
+
>- Lazy store lifecycle helpers: `isLazyStore`, `isLazyPending`, `isStoreMaterialized`.
|
|
249
|
+
>- `autoCorrelationIds` config and `fetchStore` correlation/trace context propagation.
|
|
250
|
+
>- `getStoreHealth()` unified observability helper for per-store and global metrics.
|
|
251
|
+
>- `findColdStores()` to surface cold/stale/write-only stores.
|
|
252
|
+
>- Root exports for `getMetrics` and `getAsyncMetrics` for discoverability.
|
|
253
|
+
>- Reserved `stroid/vue` and `stroid/svelte` entry points (adapter placeholders, not implemented).
|
|
254
|
+
>- `onStoreLifecycle` registry hook for single-listener lifecycle events (devtools-oriented).
|
|
255
|
+
>
|
|
256
|
+
>### Change
|
|
257
|
+
>
|
|
258
|
+
>- `createStoreForRequest` now hydrates with `{ allowTrusted: true }`.
|
|
259
|
+
>- `getStore` now respects `snapshot` mode (`deep`/`shallow`/`ref`) for both whole-store and path reads.
|
|
260
|
+
>- `setStore` TypeScript overloads consolidated to reduce IntelliSense noise.
|
|
261
|
+
>- Lazy store typings now require `lazy: true` when initial data is a function.
|
|
262
|
+
>- Sync loop guard is enabled by default (opt out with `sync: { loopGuard: false }`).
|
|
263
|
+
>- Unauthenticated sync is blocked in production unless `authToken`, `verify`, or `insecure` is provided.
|
|
264
|
+
>- `hydrateStores` throws in dev when `trust.validate` throws; routes via `onError` in production.
|
|
265
|
+
>- `hydrateStores` returns structured `failed` entries with `blocked` reasons.
|
|
266
|
+
>- `mutatorProduce: "immer"` now uses `registerMutatorProduce`.
|
|
267
|
+
>- `useStore` warns once in dev when store names are untyped.
|
|
268
|
+
>- `useStore` broad-subscription warnings now surface outside dev (once per store).
|
|
269
|
+
>- `snapshot: "shallow"` now dev-freezes the top-level snapshot.
|
|
270
|
+
>- Notification pipeline split into `notification/*` modules.
|
|
271
|
+
>- Async cache cleanup hooks now register through lifecycle hooks.
|
|
272
|
+
>- `resetStore` reports `lazy-uninitialized` when called before materialization.
|
|
273
|
+
>- `setStoreBatch` throws in production SSR on the global registry (requires request scope).
|
|
274
|
+
>- Store metadata now tracks read counts and last-read timestamps.
|
|
275
|
+
>- Middleware contexts include optional `correlationId`/`traceContext`.
|
|
276
|
+
>- React hooks live exclusively under `stroid/react`.
|
|
277
|
+
>- `deepClone` throws on non-cloneable values.
|
|
278
|
+
>- `endTransaction` now executes all pending commit callbacks, capturing the first error while allowing remaining commits to run.
|
|
279
|
+
>
|
|
280
|
+
>### Fix
|
|
281
|
+
>
|
|
282
|
+
>- Helper store typings align with stricter `createStore` overloads.
|
|
283
|
+
>- `replaceStore` now participates in `setStoreBatch` transactions.
|
|
284
|
+
>- Removed dead `runInline` logic from the chunked notify queue.
|
|
285
|
+
>- Selector reads in request scope no longer leak through the default registry.
|
|
286
|
+
>- React hooks now resolve the active request registry when `RegistryScope` is omitted during SSR hydration.
|
|
287
|
+
>- Chunked flush now snapshots subscribers per task to avoid mid-flush corruption.
|
|
288
|
+
>- `injectTransactionRunner` ignores unsafe reinjection attempts.
|
|
289
|
+
>- `endTransaction` surfaces commit-phase errors.
|
|
290
|
+
>- Persist writes re-check the latest sequence before `setItem`.
|
|
291
|
+
>- `fetchStore` sets an error state when `transform` returns a Promise.
|
|
292
|
+
>- Async rate limiting is enforced per store (not per cache slot).
|
|
293
|
+
>- `hydrateStores` recomputes affected computed stores after hydration.
|
|
294
|
+
>- User `onError` callbacks are now isolated from core operations if they throw.
|
|
295
|
+
>
|
|
296
|
+
>### Docs
|
|
297
|
+
>
|
|
298
|
+
>- Hydration examples now reference `allowTrusted` language.
|
|
299
|
+
>- Sync options documentation now includes `loopGuard`.
|
|
300
|
+
>- README now documents `registerMutatorProduce`, `sync.insecure`, and `onValidationError`.
|
|
301
|
+
>- React SSR docs now mention `stores.registry` and the automatic request-registry fallback.
|
|
302
|
+
></details>
|
|
303
|
+
>
|
|
254
304
|
---
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
305
|
+
>[!CAUTION]
|
|
306
|
+
><details>
|
|
307
|
+
><summary><strong>0.1.1 --> 2026-03-15</strong></summary>
|
|
308
|
+
>
|
|
309
|
+
>### Breaking
|
|
310
|
+
>
|
|
311
|
+
>- `stroid/core` now exports only `createStore`, `setStore`, `getStore`, and `deleteStore` (minimal primitives).
|
|
312
|
+
>
|
|
313
|
+
>### Migration
|
|
314
|
+
>
|
|
315
|
+
>- If you used `stroid/core` for batching, reset, or hydration — import those from `stroid` instead.
|
|
316
|
+
>
|
|
317
|
+
>### Add
|
|
318
|
+
>
|
|
319
|
+
>- Public feature installer entrypoints and a `features` option bag for custom feature registration.
|
|
320
|
+
>- Optional structural sharing via `configureStroid({ mutatorProduce })` (supports a global Immer shim).
|
|
321
|
+
>- `strictAsyncUsageErrors` to throw on async usage errors when enabled.
|
|
322
|
+
>
|
|
323
|
+
>### Change
|
|
324
|
+
>
|
|
325
|
+
>- SSR request APIs are now fully typed; `snapshotStrategy` drives the default snapshot mode.
|
|
326
|
+
>- Config is registry-scoped to avoid cross-request bleed in SSR.
|
|
327
|
+
>- Transaction snapshot caching scoped to the active batch.
|
|
328
|
+
>- Internal layering tightened; added guard against restricted lifecycle imports.
|
|
329
|
+
>
|
|
330
|
+
>### Fix
|
|
331
|
+
>
|
|
332
|
+
>- Chunked flush delivery no longer mixes snapshots within a single notification.
|
|
333
|
+
>- Persist sequencing avoids stale writes when debounce timers overlap.
|
|
334
|
+
>- Notification queues and batch depth are registry-scoped for SSR safety.
|
|
335
|
+
>- DTS build succeeds with a type-safe internal cast for SSR options merges.
|
|
336
|
+
>- `useStore` missing-store warning moved to render time for immediate feedback.
|
|
337
|
+
>- Sync warns when authentication is missing or `sign` is configured without `verify`.
|
|
338
|
+
></details>
|
|
339
|
+
>
|
|
271
340
|
---
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
341
|
+
>[!CAUTION]
|
|
342
|
+
><details>
|
|
343
|
+
><summary><strong>0.1.0 --> 2026-03-14</strong></summary>
|
|
344
|
+
>
|
|
345
|
+
>### Add
|
|
346
|
+
>
|
|
347
|
+
>- `configureStroid({ strictMissingFeatures: true })` to hard-fail when a feature is used without its side-effect import.
|
|
348
|
+
>- `configureStroid({ allowUntrustedHydration: true })` to opt in to `hydrateStores` on untrusted snapshots.
|
|
349
|
+
>- `configureStroid({ mutatorProduce })` to plug in a structural-sharing mutator engine.
|
|
350
|
+
>- `getSubscriberCount`, `getAsyncInflightCount`, `getPersistQueueDepth` observability helpers.
|
|
351
|
+
>- `configureStroid({ assertRuntime: true })` to throw on warnings/errors.
|
|
352
|
+
>- `createComputed(...)` for reactive derived stores.
|
|
353
|
+
>- `getComputedGraph()` and `getComputedDeps()` diagnostics.
|
|
354
|
+
>- `configureStroid({ strictMutatorReturns: true })` to forbid mutator return values.
|
|
355
|
+
>- `StrictStoreMap` opt-in type mode.
|
|
356
|
+
>
|
|
357
|
+
>### Breaking
|
|
358
|
+
>
|
|
359
|
+
>- Removed `mergeStore` and `chain` from the public API.
|
|
360
|
+
>- `setStoreBatch` is now transactional (staged writes, atomic commit, rollback on error).
|
|
361
|
+
>- `createStore`, `deleteStore`, `hydrateStores` are disallowed inside a batch.
|
|
362
|
+
>- `hydrateStores` requires explicit trust via third argument or config.
|
|
363
|
+
>
|
|
364
|
+
>### Fix
|
|
365
|
+
>
|
|
366
|
+
>- `deleteStore` no longer emits an intermediate null notification.
|
|
367
|
+
>- Async fetch 60s timeout now clears on completion.
|
|
368
|
+
>- `clearAllStores` now removes stores created during delete hooks.
|
|
369
|
+
>- SSR registry isolation uses `AsyncLocalStorage`-backed registries.
|
|
370
|
+
>- Store names reject `__proto__`, `constructor`, `prototype`.
|
|
371
|
+
></details>
|
|
372
|
+
>
|
|
289
373
|
---
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
374
|
+
>[!TIP]
|
|
375
|
+
><details>
|
|
376
|
+
><summary><strong>0.0.4 --> 2026-03-06</strong></summary>
|
|
377
|
+
>
|
|
378
|
+
>### Add
|
|
379
|
+
>
|
|
380
|
+
>- Persistence recovery hooks: `persist.onMigrationFail` and `persist.onStorageCleared`.
|
|
381
|
+
>- Sync hardening: `sync.maxPayloadBytes` and snapshot requests for reconnecting tabs.
|
|
382
|
+
>
|
|
383
|
+
>### Change
|
|
384
|
+
>
|
|
385
|
+
>- Docs: converted repo docs into chapter-based handbook; aligned README and API chapters with real package surface.
|
|
386
|
+
>- Packaging: rebuilt `dist` from current `src`; fixed `stroid/react` build entry.
|
|
387
|
+
>
|
|
388
|
+
>### Fix
|
|
389
|
+
>
|
|
390
|
+
>- `hydrateStores` rejects invalid schema payloads without leaving broken store shells.
|
|
391
|
+
>- Middleware throws no longer poison later notifications.
|
|
392
|
+
>- Async lifecycle cleanup hardened (inflight metadata clears on store deletion).
|
|
393
|
+
></details>
|
|
394
|
+
>
|
|
395
|
+
---
|
|
396
|
+
>[!WARNING]
|
|
397
|
+
><details>
|
|
398
|
+
><summary><strong>0.0.3 --> 2026-03-04</strong></summary>
|
|
399
|
+
>
|
|
400
|
+
>### Fix
|
|
401
|
+
>
|
|
402
|
+
>- Persistence catches `localStorage.setItem` errors (e.g., `QuotaExceededError`) and routes to `onError`.
|
|
403
|
+
>- Async fetch metadata cleans up when a store is deleted.
|
|
404
|
+
>- `enableRevalidateOnFocus` removes focus/online listeners when the store is deleted.
|
|
405
|
+
>- `useSelector` memoizes with shallow equality, preventing endless re-renders.
|
|
406
|
+
>- Store schemas now enforced on write (`setStore`).
|
|
407
|
+
>- `createStore` no longer overwrites an existing store name.
|
|
408
|
+
>- `setStore` path updates preserve array shapes instead of converting to objects.
|
|
409
|
+
></details>
|
|
410
|
+
>
|
|
411
|
+
---
|
|
412
|
+
>[!TIP]
|
|
413
|
+
><details>
|
|
414
|
+
><summary><strong>0.0.2 --> 2026-03-03</strong></summary>
|
|
415
|
+
>
|
|
416
|
+
>### Add
|
|
417
|
+
>
|
|
418
|
+
>- SSR helpers: `createStoreForRequest` and `hydrateStores`.
|
|
419
|
+
>- Store helpers: `createEntityStore`, `createListStore`, `createCounterStore`.
|
|
420
|
+
>- Observability: `getHistory`, `clearHistory`, `getMetrics`.
|
|
421
|
+
>- Sync tuning: optional `channel` and `conflictResolver`.
|
|
422
|
+
>
|
|
423
|
+
>### Fix
|
|
424
|
+
>
|
|
425
|
+
>- Hydration safety around theme toggles.
|
|
426
|
+
></details>
|
|
427
|
+
>
|
|
428
|
+
---
|
|
429
|
+
>[!TIP]
|
|
430
|
+
><details>
|
|
431
|
+
><summary><strong>0.0.1 --> Initial Release</strong></summary>
|
|
432
|
+
>
|
|
433
|
+
>- tsup-minified ESM bundles with subpath outputs.
|
|
434
|
+
>- `useStore` selector overload with dev warning on broad subscriptions.
|
|
435
|
+
>- Hooks split into core/async/form modules.
|
|
436
|
+
>- Async focus/online revalidation helper.
|
|
437
|
+
>- Safety: path/type guard warnings, persist key collision warning.
|
|
438
|
+
>- CRC table lazy init.
|
|
439
|
+
></details>
|
|
440
|
+
>
|