stroid 0.1.2 → 0.1.4-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +57 -10
- package/README.md +12 -10
- package/dist/async.d.ts +1 -1
- package/dist/async.js +22 -22
- package/dist/computed-types.d.ts +42 -0
- package/dist/computed-types.js +2 -0
- package/dist/computed.d.ts +15 -2
- package/dist/computed.js +11 -11
- package/dist/core.js +14 -14
- package/dist/devtools.d.ts +1 -1
- package/dist/devtools.js +1 -1
- package/dist/helpers.js +13 -13
- package/dist/index-internal.d.ts +1 -1
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +24 -24
- package/dist/install.js +1 -1
- package/dist/persist.js +1 -1
- package/dist/psr.d.ts +38 -0
- package/dist/psr.js +19 -0
- package/dist/react/index.d.ts +3 -1
- package/dist/react/index.js +25 -25
- package/dist/runtime-admin.js +1 -1
- package/dist/runtime-patch.d.ts +29 -0
- package/dist/runtime-tools.d.ts +6 -1
- package/dist/runtime-tools.js +2 -2
- package/dist/selectors.js +1 -1
- package/dist/server.d.ts +3 -1
- package/dist/server.js +11 -11
- package/dist/store-registry.d.ts +5 -0
- package/dist/sync.js +1 -1
- package/dist/testing.js +17 -17
- package/dist/types.d.ts +1 -1
- package/package.json +40 -39
- package/dist/async.js.map +0 -1
- package/dist/computed.js.map +0 -1
- package/dist/core.js.map +0 -1
- package/dist/devtools.js.map +0 -1
- package/dist/feature.js.map +0 -1
- package/dist/helpers.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/install.js.map +0 -1
- package/dist/persist.js.map +0 -1
- package/dist/react/index.js.map +0 -1
- package/dist/runtime-admin.js.map +0 -1
- package/dist/runtime-tools.js.map +0 -1
- package/dist/selectors.js.map +0 -1
- package/dist/server.js.map +0 -1
- package/dist/sync.js.map +0 -1
- package/dist/testing.js.map +0 -1
- package/dist/types/adapters/options.d.ts +0 -335
- package/dist/types/async/cache.d.ts +0 -39
- 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 -13
- package/dist/types/async/rate.d.ts +0 -5
- package/dist/types/async/registry.d.ts +0 -116
- 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 -29
- package/dist/types/computed/index.d.ts +0 -16
- 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/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 -19
- package/dist/types/core/store-lifecycle/identity.d.ts +0 -23
- package/dist/types/core/store-lifecycle/registry.d.ts +0 -53
- 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 -12
- package/dist/types/core/store-read.d.ts +0 -18
- package/dist/types/core/store-registry.d.ts +0 -108
- 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 -26
- package/dist/types/core/store-write-shared.d.ts +0 -19
- 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 -15
- 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 -58
- 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
|
@@ -5,9 +5,56 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
|
5
5
|
Versioning: [Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
7
|
---
|
|
8
|
-
<details open>
|
|
9
|
-
<summary><strong>Unreleased
|
|
10
|
-
|
|
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>
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
<details>
|
|
40
|
+
<summary><strong>0.1.3 --> 2026-03-22</strong></summary>
|
|
41
|
+
|
|
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.
|
|
11
58
|
|
|
12
59
|
</details>
|
|
13
60
|
|
|
@@ -15,7 +62,7 @@ Versioning: [Semantic Versioning](https://semver.org/).
|
|
|
15
62
|
|
|
16
63
|
|
|
17
64
|
<details>
|
|
18
|
-
<summary><strong>
|
|
65
|
+
<summary><strong>0.1.2 --> 2026-03-19</strong></summary>
|
|
19
66
|
> **Note:** This release contains breaking changes to the `stroid/core` export surface and hydration defaults to improve bundle size and security.
|
|
20
67
|
|
|
21
68
|
- `hydrateStores` now requires an explicit trust argument at the TypeScript level (compile-time enforcement).
|
|
@@ -113,7 +160,7 @@ Versioning: [Semantic Versioning](https://semver.org/).
|
|
|
113
160
|
---
|
|
114
161
|
|
|
115
162
|
<details>
|
|
116
|
-
<summary><strong>0.1.1
|
|
163
|
+
<summary><strong>0.1.1 --> 2026-03-15</strong></summary>
|
|
117
164
|
|
|
118
165
|
### Breaking
|
|
119
166
|
|
|
@@ -150,7 +197,7 @@ Versioning: [Semantic Versioning](https://semver.org/).
|
|
|
150
197
|
---
|
|
151
198
|
|
|
152
199
|
<details>
|
|
153
|
-
<summary><strong>0.1.0
|
|
200
|
+
<summary><strong>0.1.0 --> 2026-03-14</strong></summary>
|
|
154
201
|
|
|
155
202
|
### Added
|
|
156
203
|
|
|
@@ -184,7 +231,7 @@ Versioning: [Semantic Versioning](https://semver.org/).
|
|
|
184
231
|
---
|
|
185
232
|
|
|
186
233
|
<details>
|
|
187
|
-
<summary><strong>0.0.4
|
|
234
|
+
<summary><strong>0.0.4 --> 2026-03-06</strong></summary>
|
|
188
235
|
|
|
189
236
|
### Added
|
|
190
237
|
|
|
@@ -207,7 +254,7 @@ Versioning: [Semantic Versioning](https://semver.org/).
|
|
|
207
254
|
---
|
|
208
255
|
|
|
209
256
|
<details>
|
|
210
|
-
<summary><strong>0.0.3
|
|
257
|
+
<summary><strong>0.0.3 --> 2026-03-04</strong></summary>
|
|
211
258
|
|
|
212
259
|
### Fixed
|
|
213
260
|
|
|
@@ -224,7 +271,7 @@ Versioning: [Semantic Versioning](https://semver.org/).
|
|
|
224
271
|
---
|
|
225
272
|
|
|
226
273
|
<details>
|
|
227
|
-
<summary><strong>0.0.2
|
|
274
|
+
<summary><strong>0.0.2 --> 2026-03-03</strong></summary>
|
|
228
275
|
|
|
229
276
|
### Added
|
|
230
277
|
|
|
@@ -242,7 +289,7 @@ Versioning: [Semantic Versioning](https://semver.org/).
|
|
|
242
289
|
---
|
|
243
290
|
|
|
244
291
|
<details>
|
|
245
|
-
<summary><strong>0.0.1
|
|
292
|
+
<summary><strong>0.0.1 --> Initial Release</strong></summary>
|
|
246
293
|
|
|
247
294
|
- tsup-minified ESM bundles with subpath outputs.
|
|
248
295
|
- `useStore` selector overload with dev warning on broad subscriptions.
|
package/README.md
CHANGED
|
@@ -62,9 +62,9 @@ Each row is independent. Use only what you need.
|
|
|
62
62
|
- `stroid/async`: `fetchStore`, cache, retry, revalidate helpers.
|
|
63
63
|
- `stroid/selectors`: `createSelector`, `subscribeWithSelector`.
|
|
64
64
|
- `stroid/computed`: `createComputed`, `invalidateComputed`, `deleteComputed`, `isComputedStore`.
|
|
65
|
-
- `stroid/persist`:
|
|
66
|
-
- `stroid/sync`:
|
|
67
|
-
- `stroid/devtools`:
|
|
65
|
+
- `stroid/persist`: Explicit persistence installer (`installPersist`) and related types. Side-effect free.
|
|
66
|
+
- `stroid/sync`: Explicit sync installer (`installSync`) and related types. Side-effect free.
|
|
67
|
+
- `stroid/devtools`: Explicit devtools installer (`installDevtools`) plus history helpers. Side-effect free.
|
|
68
68
|
- `stroid/server`: SSR registry helpers (`createStoreForRequest`).
|
|
69
69
|
- `stroid/helpers`: Entity/list/counter store helpers.
|
|
70
70
|
- `stroid/runtime-tools`: Observability and diagnostics.
|
|
@@ -121,13 +121,15 @@ import { createSelector, subscribeWithSelector } from "stroid/selectors"
|
|
|
121
121
|
import { createComputed, invalidateComputed,
|
|
122
122
|
deleteComputed, isComputedStore } from "stroid/computed"
|
|
123
123
|
|
|
124
|
-
// Features (
|
|
125
|
-
import "stroid/persist"
|
|
126
|
-
import "stroid/sync"
|
|
127
|
-
import "stroid/devtools"
|
|
124
|
+
// Features (explicit install — call once at app entry)
|
|
125
|
+
import { installPersist } from "stroid/persist"
|
|
126
|
+
import { installSync } from "stroid/sync"
|
|
127
|
+
import { installDevtools } from "stroid/devtools"
|
|
128
|
+
|
|
129
|
+
installPersist()
|
|
130
|
+
installSync()
|
|
131
|
+
installDevtools()
|
|
128
132
|
|
|
129
|
-
// Note: stroid/persist and stroid/sync are side-effect entrypoints only.
|
|
130
|
-
// All types live on the main "stroid" entry.
|
|
131
133
|
|
|
132
134
|
// Server / SSR
|
|
133
135
|
import { createStoreForRequest } from "stroid/server"
|
|
@@ -144,7 +146,7 @@ import { listStores, getStoreMeta, getMetrics,
|
|
|
144
146
|
getPersistQueueDepth } from "stroid/runtime-tools"
|
|
145
147
|
import { clearAllStores, clearStores } from "stroid/runtime-admin"
|
|
146
148
|
|
|
147
|
-
// Devtools API (after
|
|
149
|
+
// Devtools API (after installDevtools())
|
|
148
150
|
import { getHistory, clearHistory } from "stroid/devtools"
|
|
149
151
|
|
|
150
152
|
// Config
|
package/dist/async.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { F as FetchInput } from './cache.js';
|
|
2
|
-
import { a as StoreDefinition, b as StoreKey,
|
|
2
|
+
import { a as StoreDefinition, b as StoreKey, d as StoreName } from './types.js';
|
|
3
3
|
import { F as FetchOptions } from './registry.js';
|
|
4
4
|
export { a as AsyncStateAdapter, b as AsyncStateSnapshot } from './registry.js';
|
|
5
5
|
import './utility.js';
|