stroid 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +232 -108
- package/README.md +157 -577
- package/dist/async.d.ts +5 -3
- package/dist/async.js +28 -23
- package/dist/async.js.map +1 -0
- package/dist/cache.d.ts +12 -0
- package/dist/computed.d.ts +19 -8
- package/dist/computed.js +12 -10
- package/dist/computed.js.map +1 -0
- package/dist/core.d.ts +5 -5
- package/dist/core.js +16 -23
- package/dist/core.js.map +1 -0
- package/dist/devtools.d.ts +12 -1
- package/dist/devtools.js +2 -1
- package/dist/devtools.js.map +1 -0
- package/dist/feature.d.ts +92 -0
- package/dist/feature.js +2 -0
- package/dist/feature.js.map +1 -0
- package/dist/helpers.d.ts +13 -5
- package/dist/helpers.js +16 -13
- package/dist/helpers.js.map +1 -0
- package/dist/index-internal.d.ts +44 -0
- package/dist/index.d.cts +91 -52
- package/dist/index.d.ts +91 -52
- package/dist/index.js +27 -21
- package/dist/index.js.map +1 -0
- package/dist/install.d.ts +6 -0
- package/dist/install.js +2 -0
- package/dist/install.js.map +1 -0
- package/dist/{options-CB35e3Xo.d.cts → options.d.ts} +52 -2
- package/dist/persist.d.ts +1 -2
- package/dist/persist.js +2 -1
- package/dist/persist.js.map +1 -0
- package/dist/{react.d.cts → react/index.d.ts} +28 -10
- package/dist/react/index.js +38 -0
- package/dist/react/index.js.map +1 -0
- package/dist/registry.d.ts +117 -0
- package/dist/runtime-admin.js +2 -1
- package/dist/runtime-admin.js.map +1 -0
- package/dist/runtime-tools.d.ts +44 -17
- package/dist/runtime-tools.js +3 -2
- package/dist/runtime-tools.js.map +1 -0
- package/dist/selectors.js +2 -1
- package/dist/selectors.js.map +1 -0
- package/dist/server.d.ts +27 -11
- package/dist/server.js +12 -9
- package/dist/server.js.map +1 -0
- package/dist/store-registry.d.ts +80 -0
- package/dist/sync.d.ts +1 -2
- package/dist/sync.js +2 -1
- package/dist/sync.js.map +1 -0
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +16 -13
- package/dist/testing.js.map +1 -0
- package/dist/tsdoc-metadata.json +11 -0
- package/dist/types/adapters/options.d.ts +90 -2
- package/dist/types/async/cache.d.ts +39 -0
- package/dist/types/async/clone.d.ts +9 -1
- package/dist/types/{async-fetch.d.ts → async/fetch.d.ts} +2 -2
- package/dist/types/async/inflight.d.ts +1 -1
- package/dist/types/{async-registry.d.ts → async/registry.d.ts} +25 -5
- package/dist/types/async/request.d.ts +9 -1
- package/dist/types/async.d.ts +10 -2
- package/dist/types/{computed-graph.d.ts → computed/computed-graph.d.ts} +4 -6
- package/dist/types/{computed.d.ts → computed/index.d.ts} +3 -2
- package/dist/types/config.d.ts +9 -1
- package/dist/types/core/index.d.ts +11 -0
- package/dist/types/core/lifecycle-hooks.d.ts +16 -0
- package/dist/types/core/store-admin-impl.d.ts +9 -0
- package/dist/types/core/store-admin.d.ts +9 -0
- package/dist/types/core/store-core.d.ts +13 -0
- package/dist/types/core/store-create.d.ts +16 -0
- package/dist/types/core/store-hydrate-impl.d.ts +35 -0
- package/dist/types/core/store-hydrate.d.ts +9 -0
- package/dist/types/core/store-lifecycle/hooks.d.ts +19 -0
- package/dist/types/{store-lifecycle → core/store-lifecycle}/identity.d.ts +3 -3
- package/dist/types/{store-lifecycle → core/store-lifecycle}/registry.d.ts +22 -8
- package/dist/types/{store-lifecycle → core/store-lifecycle}/types.d.ts +29 -1
- package/dist/types/{store-lifecycle → core/store-lifecycle}/validation.d.ts +11 -3
- package/dist/types/core/store-name.d.ts +28 -0
- package/dist/types/{store-notify.d.ts → core/store-notify.d.ts} +1 -1
- package/dist/types/{store-read.d.ts → core/store-read.d.ts} +8 -2
- package/dist/types/{store-registry.d.ts → core/store-registry.d.ts} +44 -10
- package/dist/types/core/store-replace-impl.d.ts +11 -0
- package/dist/types/core/store-replace.d.ts +9 -0
- package/dist/types/core/store-set-impl.d.ts +13 -0
- package/dist/types/core/store-set.d.ts +9 -0
- package/dist/types/core/store-shared/core.d.ts +13 -0
- package/dist/types/core/store-shared/notify.d.ts +12 -0
- package/dist/types/{store-transaction.d.ts → core/store-transaction.d.ts} +15 -1
- package/dist/types/core/store-write-shared.d.ts +19 -0
- package/dist/types/core/store-write.d.ts +13 -0
- package/dist/types/features/feature-registry.d.ts +91 -0
- package/dist/types/features/lifecycle.d.ts +12 -0
- package/dist/types/index.d.ts +13 -2
- package/dist/types/integrations/query.d.ts +2 -2
- package/dist/types/internals/computed-order.d.ts +3 -0
- package/dist/types/internals/config.d.ts +56 -2
- package/dist/types/internals/reporting.d.ts +1 -0
- package/dist/types/internals/store-admin.d.ts +1 -1
- package/dist/types/internals/store-ops.d.ts +13 -3
- package/dist/types/internals/test-reset.d.ts +2 -0
- package/dist/types/internals/write-context.d.ts +15 -0
- package/dist/types/notification/delivery.d.ts +3 -0
- package/dist/types/notification/index.d.ts +10 -0
- package/dist/types/notification/metrics.d.ts +12 -0
- package/dist/types/notification/priority.d.ts +9 -0
- package/dist/types/notification/scheduler.d.ts +11 -0
- package/dist/types/notification/snapshot.d.ts +8 -0
- package/dist/types/runtime-tools/index.d.ts +58 -0
- package/dist/types/store.d.ts +16 -7
- package/dist/types/types/utility.d.ts +17 -0
- package/dist/types/utils/devfreeze.d.ts +2 -0
- package/dist/types/utils.d.ts +8 -0
- package/dist/{types-grvlY4BX.d.cts → types.d.ts} +30 -2
- package/dist/utility.d.ts +15 -0
- package/package.json +35 -11
- package/dist/async-cache-DFHwcBQL.d.cts +0 -52
- package/dist/async-cache-DFHwcBQL.d.ts +0 -52
- package/dist/async.cjs +0 -29
- package/dist/async.d.cts +0 -40
- package/dist/computed-BbAZm1Dq.d.cts +0 -17
- package/dist/computed-CccdgY5j.d.ts +0 -17
- package/dist/computed.cjs +0 -11
- package/dist/computed.d.cts +0 -29
- package/dist/core.cjs +0 -30
- package/dist/core.d.cts +0 -5
- package/dist/devtools.cjs +0 -1
- package/dist/devtools.d.cts +0 -19
- package/dist/helpers.cjs +0 -20
- package/dist/helpers.d.cts +0 -29
- package/dist/index.cjs +0 -30
- package/dist/options-CB35e3Xo.d.ts +0 -245
- package/dist/persist.cjs +0 -1
- package/dist/persist.d.cts +0 -2
- package/dist/react.cjs +0 -31
- package/dist/react.d.ts +0 -52
- package/dist/react.js +0 -31
- package/dist/runtime-admin.cjs +0 -1
- package/dist/runtime-admin.d.cts +0 -4
- package/dist/runtime-tools.cjs +0 -3
- package/dist/runtime-tools.d.cts +0 -39
- package/dist/selectors.cjs +0 -1
- package/dist/selectors.d.cts +0 -4
- package/dist/server.cjs +0 -10
- package/dist/server.d.cts +0 -14
- package/dist/sync.cjs +0 -1
- package/dist/sync.d.cts +0 -2
- package/dist/testing.cjs +0 -20
- package/dist/testing.d.cts +0 -16
- package/dist/types/async-cache.d.ts +0 -57
- package/dist/types/core.d.ts +0 -1
- package/dist/types/devfreeze.d.ts +0 -1
- package/dist/types/feature-registry.d.ts +0 -69
- package/dist/types/internals/hooks-warnings.d.ts +0 -6
- package/dist/types/store-lifecycle/bind.d.ts +0 -3
- package/dist/types/store-lifecycle/hooks.d.ts +0 -44
- package/dist/types/store-lifecycle.d.ts +0 -20
- package/dist/types/store-name.d.ts +0 -19
- package/dist/types/store-write.d.ts +0 -45
- package/dist/types-grvlY4BX.d.ts +0 -37
- /package/dist/types/{async-retry.d.ts → async/retry.d.ts} +0 -0
- /package/dist/types/{runtime-admin.d.ts → runtime-admin/index.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,130 +1,254 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
All notable changes to this project
|
|
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 Changes</strong></summary>
|
|
10
|
+
>
|
|
11
|
+
|
|
12
|
+
</details>
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
<details>
|
|
18
|
+
<summary><strong>v0.1.2 — 2026-03-19</strong></summary>
|
|
19
|
+
> **Note:** This release contains breaking changes to the `stroid/core` export surface and hydration defaults to improve bundle size and security.
|
|
20
|
+
|
|
21
|
+
- `hydrateStores` now requires an explicit trust argument at the TypeScript level (compile-time enforcement).
|
|
22
|
+
- Default snapshot mode changed to `"shallow"` (was `"deep"`). Override per-store with `snapshot: "deep"` or globally with `configureStroid({ defaultSnapshotMode: "deep" })`.
|
|
23
|
+
|
|
24
|
+
### Migration
|
|
25
|
+
|
|
26
|
+
- If you use `stroid/core` for batching, reset, or hydration — move those imports to `stroid`.
|
|
27
|
+
- If you call `hydrateStores` without a trust argument — add `{ allowTrusted: true }` as the third argument.
|
|
28
|
+
- If your app relies on deep-clone snapshot semantics — add `snapshot: "deep"` to affected stores or set `configureStroid({ defaultSnapshotMode: "deep" })`.
|
|
29
|
+
|
|
30
|
+
### Performance
|
|
31
|
+
|
|
32
|
+
- Hot-path proxy avoidance: `deliverFlush` now captures direct registry references once and reuses them during the flush loop.
|
|
33
|
+
- `Array.from` elimination: replaced per-flush subscriber array allocations with a registry-level reusable buffer.
|
|
34
|
+
- `buildFlushPlan` collapse: reduced passes, preserved `pendingBuffer` semantics, and removed the terminal `orderedNames.slice()` allocation.
|
|
4
35
|
|
|
5
|
-
## 0.1.0 - 2026-03-14
|
|
6
36
|
### Added
|
|
7
|
-
|
|
8
|
-
- `
|
|
9
|
-
- `
|
|
10
|
-
- `
|
|
11
|
-
- `
|
|
12
|
-
- `
|
|
13
|
-
- `
|
|
14
|
-
- `
|
|
15
|
-
-
|
|
16
|
-
-
|
|
37
|
+
|
|
38
|
+
- `allowTrusted` hydration flag (aliasing `allowHydration`; `allowUntrusted` deprecated).
|
|
39
|
+
- `allowTrustedHydration` config alias.
|
|
40
|
+
- `sync.loopGuard` option to suppress immediate rebroadcasts after an incoming sync update.
|
|
41
|
+
- `registerMutatorProduce` helper for safely registering Immer (or other mutator engines).
|
|
42
|
+
- `selectorCloneFrozen` config flag to control frozen-state cloning in `createSelector` (dev performance toggle).
|
|
43
|
+
- `createStoreForRequest` now exposes the request `registry` for `RegistryScope` or advanced SSR usage.
|
|
44
|
+
- `stroid/server` now re-exports the `StoreRegistry` type for SSR typing.
|
|
45
|
+
- Store metrics now include reset timing (`resetCount`, `totalResetMs`, `lastResetMs`).
|
|
46
|
+
- API Extractor configuration and `docs:api` script for generating typed API reports.
|
|
47
|
+
- `IStoreCore` shared interface and `store-core` adapter for layer boundaries.
|
|
48
|
+
- ESLint layer guards for async-cache and store-notify imports.
|
|
49
|
+
- Optional TypeScript layer configs (`tsconfig.layers.json`) for build-time dependency checks.
|
|
50
|
+
- `sync.insecure` option to explicitly allow unauthenticated sync in production.
|
|
51
|
+
- `onValidationError` hook for hydrate trust validation failures.
|
|
52
|
+
- `acknowledgeLooseTypes` config flag to silence the loose-type dev warning.
|
|
53
|
+
- `pathCacheSize` config to tune per-store path validation cache limits.
|
|
54
|
+
- `HydrateSnapshotFor<Map>` helper type for stricter hydration typing.
|
|
55
|
+
- Internal lifecycle hook hub for decoupled cross-layer events.
|
|
56
|
+
- Lazy store lifecycle helpers: `isLazyStore`, `isLazyPending`, `isStoreMaterialized`.
|
|
57
|
+
- `autoCorrelationIds` config and `fetchStore` correlation/trace context propagation.
|
|
58
|
+
- `getStoreHealth()` unified observability helper for per-store and global metrics.
|
|
59
|
+
- `findColdStores()` to surface cold/stale/write-only stores.
|
|
60
|
+
- Root exports for `getMetrics` and `getAsyncMetrics` for discoverability.
|
|
61
|
+
- Reserved `stroid/vue` and `stroid/svelte` entry points (adapter placeholders, not implemented).
|
|
62
|
+
- `onStoreLifecycle` registry hook for single-listener lifecycle events (devtools-oriented).
|
|
17
63
|
|
|
18
64
|
### Changed
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
- `
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
- `
|
|
28
|
-
- `
|
|
29
|
-
- `
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
- `
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
- `
|
|
65
|
+
|
|
66
|
+
- `createStoreForRequest` now hydrates with `{ allowTrusted: true }`.
|
|
67
|
+
- `getStore` now respects `snapshot` mode (`deep`/`shallow`/`ref`) for both whole-store and path reads.
|
|
68
|
+
- `setStore` TypeScript overloads consolidated to reduce IntelliSense noise.
|
|
69
|
+
- Lazy store typings now require `lazy: true` when initial data is a function.
|
|
70
|
+
- Sync loop guard is enabled by default (opt out with `sync: { loopGuard: false }`).
|
|
71
|
+
- Unauthenticated sync is blocked in production unless `authToken`, `verify`, or `insecure` is provided.
|
|
72
|
+
- `hydrateStores` throws in dev when `trust.validate` throws; routes via `onError` in production.
|
|
73
|
+
- `hydrateStores` returns structured `failed` entries with `blocked` reasons.
|
|
74
|
+
- `mutatorProduce: "immer"` now uses `registerMutatorProduce`.
|
|
75
|
+
- `useStore` warns once in dev when store names are untyped.
|
|
76
|
+
- `useStore` broad-subscription warnings now surface outside dev (once per store).
|
|
77
|
+
- `snapshot: "shallow"` now dev-freezes the top-level snapshot.
|
|
78
|
+
- Notification pipeline split into `notification/*` modules.
|
|
79
|
+
- Async cache cleanup hooks now register through lifecycle hooks.
|
|
80
|
+
- `resetStore` reports `lazy-uninitialized` when called before materialization.
|
|
81
|
+
- `setStoreBatch` throws in production SSR on the global registry (requires request scope).
|
|
82
|
+
- Store metadata now tracks read counts and last-read timestamps.
|
|
83
|
+
- Middleware contexts include optional `correlationId`/`traceContext`.
|
|
84
|
+
- React hooks live exclusively under `stroid/react`.
|
|
85
|
+
- `deepClone` throws on non-cloneable values.
|
|
86
|
+
- `endTransaction` now executes all pending commit callbacks, capturing the first error while allowing remaining commits to run.
|
|
40
87
|
|
|
41
88
|
### Fixed
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
- `
|
|
53
|
-
-
|
|
54
|
-
- `
|
|
55
|
-
-
|
|
56
|
-
- Chunked notification delivery now includes subscribers added mid-flush in the same notification cycle.
|
|
57
|
-
- `_hardResetAllStoresForTest` is no longer exported from the main package entry; it remains in `stroid/testing`.
|
|
58
|
-
- Async rate limiter now initializes per-slot windows and prunes stale metadata to avoid unbounded growth.
|
|
59
|
-
- Computed cleanup registrations are now scoped to the active registry, preventing cross-request leaks in SSR.
|
|
60
|
-
- Store delete hooks now iterate the registered feature set (including third-party features).
|
|
61
|
-
- Computed creation logs now use the configured `logSink` instead of raw `console.log`.
|
|
62
|
-
- Async fetch usage errors now route through the configured `logSink.critical` in production.
|
|
63
|
-
- `useAsyncStoreSuspense` no longer allocates a new default options object each render, stabilizing memoization.
|
|
89
|
+
|
|
90
|
+
- Helper store typings align with stricter `createStore` overloads.
|
|
91
|
+
- `replaceStore` now participates in `setStoreBatch` transactions.
|
|
92
|
+
- Removed dead `runInline` logic from the chunked notify queue.
|
|
93
|
+
- Selector reads in request scope no longer leak through the default registry.
|
|
94
|
+
- React hooks now resolve the active request registry when `RegistryScope` is omitted during SSR hydration.
|
|
95
|
+
- Chunked flush now snapshots subscribers per task to avoid mid-flush corruption.
|
|
96
|
+
- `injectTransactionRunner` ignores unsafe reinjection attempts.
|
|
97
|
+
- `endTransaction` surfaces commit-phase errors.
|
|
98
|
+
- Persist writes re-check the latest sequence before `setItem`.
|
|
99
|
+
- `fetchStore` sets an error state when `transform` returns a Promise.
|
|
100
|
+
- Async rate limiting is enforced per store (not per cache slot).
|
|
101
|
+
- `hydrateStores` recomputes affected computed stores after hydration.
|
|
102
|
+
- User `onError` callbacks are now isolated from core operations if they throw.
|
|
64
103
|
|
|
65
104
|
### Docs
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
105
|
+
|
|
106
|
+
- Hydration examples now reference `allowTrusted` language.
|
|
107
|
+
- Sync options documentation now includes `loopGuard`.
|
|
108
|
+
- README now documents `registerMutatorProduce`, `sync.insecure`, and `onValidationError`.
|
|
109
|
+
- React SSR docs now mention `stores.registry` and the automatic request-registry fallback.
|
|
110
|
+
|
|
111
|
+
</details>
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
<details>
|
|
116
|
+
<summary><strong>0.1.1 — 2026-03-15</strong></summary>
|
|
117
|
+
|
|
118
|
+
### Breaking
|
|
119
|
+
|
|
120
|
+
- `stroid/core` now exports only `createStore`, `setStore`, `getStore`, and `deleteStore` (minimal primitives).
|
|
121
|
+
|
|
122
|
+
### Migration
|
|
123
|
+
|
|
124
|
+
- If you used `stroid/core` for batching, reset, or hydration — import those from `stroid` instead.
|
|
125
|
+
|
|
126
|
+
### Added
|
|
127
|
+
|
|
128
|
+
- Public feature installer entrypoints and a `features` option bag for custom feature registration.
|
|
129
|
+
- Optional structural sharing via `configureStroid({ mutatorProduce })` (supports a global Immer shim).
|
|
130
|
+
- `strictAsyncUsageErrors` to throw on async usage errors when enabled.
|
|
80
131
|
|
|
81
132
|
### Changed
|
|
82
|
-
- `v0.0.5` is now the active development branch. `main` stays locked on the released `0.0.4` line until the next release is cut.
|
|
83
|
-
- Release artifacts remain release-managed on this branch: `dist/` may be absent here or still reflect the last released `0.0.4` build while current source/docs continue to move forward.
|
|
84
133
|
|
|
85
|
-
|
|
134
|
+
- SSR request APIs are now fully typed; `snapshotStrategy` drives the default snapshot mode.
|
|
135
|
+
- Config is registry-scoped to avoid cross-request bleed in SSR.
|
|
136
|
+
- Transaction snapshot caching scoped to the active batch.
|
|
137
|
+
- Internal layering tightened; added guard against restricted lifecycle imports.
|
|
138
|
+
|
|
139
|
+
### Fixed
|
|
140
|
+
|
|
141
|
+
- Chunked flush delivery no longer mixes snapshots within a single notification.
|
|
142
|
+
- Persist sequencing avoids stale writes when debounce timers overlap.
|
|
143
|
+
- Notification queues and batch depth are registry-scoped for SSR safety.
|
|
144
|
+
- DTS build succeeds with a type-safe internal cast for SSR options merges.
|
|
145
|
+
- `useStore` missing-store warning moved to render time for immediate feedback.
|
|
146
|
+
- Sync warns when authentication is missing or `sign` is configured without `verify`.
|
|
147
|
+
|
|
148
|
+
</details>
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
<details>
|
|
153
|
+
<summary><strong>0.1.0 — 2026-03-14</strong></summary>
|
|
154
|
+
|
|
155
|
+
### Added
|
|
156
|
+
|
|
157
|
+
- `configureStroid({ strictMissingFeatures: true })` to hard-fail when a feature is used without its side-effect import.
|
|
158
|
+
- `configureStroid({ allowUntrustedHydration: true })` to opt in to `hydrateStores` on untrusted snapshots.
|
|
159
|
+
- `configureStroid({ mutatorProduce })` to plug in a structural-sharing mutator engine.
|
|
160
|
+
- `getSubscriberCount`, `getAsyncInflightCount`, `getPersistQueueDepth` observability helpers.
|
|
161
|
+
- `configureStroid({ assertRuntime: true })` to throw on warnings/errors.
|
|
162
|
+
- `createComputed(...)` for reactive derived stores.
|
|
163
|
+
- `getComputedGraph()` and `getComputedDeps()` diagnostics.
|
|
164
|
+
- `configureStroid({ strictMutatorReturns: true })` to forbid mutator return values.
|
|
165
|
+
- `StrictStoreMap` opt-in type mode.
|
|
166
|
+
|
|
167
|
+
### Breaking Changes
|
|
168
|
+
|
|
169
|
+
- Removed `mergeStore` and `chain` from the public API.
|
|
170
|
+
- `setStoreBatch` is now transactional (staged writes, atomic commit, rollback on error).
|
|
171
|
+
- `createStore`, `deleteStore`, `hydrateStores` are disallowed inside a batch.
|
|
172
|
+
- `hydrateStores` requires explicit trust via third argument or config.
|
|
173
|
+
|
|
174
|
+
### Fixed
|
|
175
|
+
|
|
176
|
+
- `deleteStore` no longer emits an intermediate null notification.
|
|
177
|
+
- Async fetch 60s timeout now clears on completion.
|
|
178
|
+
- `clearAllStores` now removes stores created during delete hooks.
|
|
179
|
+
- SSR registry isolation uses `AsyncLocalStorage`-backed registries.
|
|
180
|
+
- Store names reject `__proto__`, `constructor`, `prototype`.
|
|
181
|
+
|
|
182
|
+
</details>
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
<details>
|
|
187
|
+
<summary><strong>0.0.4 — 2026-03-06</strong></summary>
|
|
188
|
+
|
|
86
189
|
### Added
|
|
190
|
+
|
|
87
191
|
- Persistence recovery hooks: `persist.onMigrationFail` and `persist.onStorageCleared`.
|
|
88
|
-
- Sync hardening
|
|
192
|
+
- Sync hardening: `sync.maxPayloadBytes` and snapshot requests for reconnecting tabs.
|
|
193
|
+
|
|
89
194
|
### Changed
|
|
90
|
-
|
|
91
|
-
-
|
|
195
|
+
|
|
196
|
+
- Docs: converted repo docs into chapter-based handbook; aligned README and API chapters with real package surface.
|
|
197
|
+
- Packaging: rebuilt `dist` from current `src`; fixed `stroid/react` build entry.
|
|
198
|
+
|
|
92
199
|
### Fixed
|
|
93
|
-
|
|
200
|
+
|
|
201
|
+
- `hydrateStores` rejects invalid schema payloads without leaving broken store shells.
|
|
94
202
|
- Middleware throws no longer poison later notifications.
|
|
95
|
-
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
203
|
+
- Async lifecycle cleanup hardened (inflight metadata clears on store deletion).
|
|
204
|
+
|
|
205
|
+
</details>
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
<details>
|
|
210
|
+
<summary><strong>0.0.3 — 2026-03-04</strong></summary>
|
|
99
211
|
|
|
100
|
-
## 0.0.3 - 2026-03-04
|
|
101
212
|
### Fixed
|
|
102
|
-
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
- `
|
|
109
|
-
-
|
|
110
|
-
|
|
111
|
-
|
|
213
|
+
|
|
214
|
+
- Persistence catches `localStorage.setItem` errors (e.g., `QuotaExceededError`) and routes to `onError`.
|
|
215
|
+
- Async fetch metadata cleans up when a store is deleted.
|
|
216
|
+
- `enableRevalidateOnFocus` removes focus/online listeners when the store is deleted.
|
|
217
|
+
- `useSelector` memoizes with shallow equality, preventing endless re-renders.
|
|
218
|
+
- Store schemas now enforced on write (`setStore`).
|
|
219
|
+
- `createStore` no longer overwrites an existing store name.
|
|
220
|
+
- `setStore` path updates preserve array shapes instead of converting to objects.
|
|
221
|
+
|
|
222
|
+
</details>
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
<details>
|
|
227
|
+
<summary><strong>0.0.2 — 2026-03-03</strong></summary>
|
|
228
|
+
|
|
112
229
|
### Added
|
|
113
|
-
|
|
114
|
-
-
|
|
115
|
-
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
|
|
119
|
-
- Docs now reflect actual APIs (persist driver/serialize/encrypt; top-level version/migrations; DevTools boolean + historyLimit).
|
|
230
|
+
|
|
231
|
+
- SSR helpers: `createStoreForRequest` and `hydrateStores`.
|
|
232
|
+
- Store helpers: `createEntityStore`, `createListStore`, `createCounterStore`.
|
|
233
|
+
- Observability: `getHistory`, `clearHistory`, `getMetrics`.
|
|
234
|
+
- Sync tuning: optional `channel` and `conflictResolver`.
|
|
235
|
+
|
|
120
236
|
### Fixed
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
237
|
+
|
|
238
|
+
- Hydration safety around theme toggles.
|
|
239
|
+
|
|
240
|
+
</details>
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
<details>
|
|
245
|
+
<summary><strong>0.0.1 — Initial Release</strong></summary>
|
|
246
|
+
|
|
247
|
+
- tsup-minified ESM bundles with subpath outputs.
|
|
248
|
+
- `useStore` selector overload with dev warning on broad subscriptions.
|
|
249
|
+
- Hooks split into core/async/form modules.
|
|
250
|
+
- Async focus/online revalidation helper.
|
|
251
|
+
- Safety: path/type guard warnings, persist key collision warning.
|
|
252
|
+
- CRC table lazy init.
|
|
253
|
+
|
|
254
|
+
</details>
|