stroid 0.0.3 → 0.0.4
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 +25 -7
- package/README.md +81 -1055
- package/dist/async.js +1 -1
- package/dist/chunk-5F2FD6DX.js +17 -0
- package/dist/chunk-G6JMMJYH.js +5 -0
- package/dist/chunk-JBYLHJKN.js +3 -0
- package/dist/{chunk-KYAUSC7J.js → chunk-K6QIWMMW.js} +1 -1
- package/dist/{core-CLIi-SLm.d.ts → core-CKzRwVaY.d.ts} +8 -0
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/index.d.ts +2 -17
- package/dist/index.js +1 -1
- package/dist/react.d.ts +14 -1
- package/dist/react.js +1 -1
- package/dist/testing.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-3CAQKMKY.js +0 -5
- package/dist/chunk-VNLWP332.js +0 -17
- package/dist/chunk-Y52AULFH.js +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,16 +1,34 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## Unreleased
|
|
6
|
+
|
|
7
|
+
## 0.0.4 - 2026-03-06
|
|
8
|
+
### Added
|
|
9
|
+
- Persistence recovery hooks: `persist.onMigrationFail` and `persist.onStorageCleared`.
|
|
10
|
+
- Sync hardening options and behaviors: `sync.maxPayloadBytes` plus snapshot requests for reconnecting tabs.
|
|
11
|
+
### Changed
|
|
12
|
+
- Docs: converted the repo docs into the chapter-based handbook, then aligned README and API chapters with the real package surface so examples now use `setStore(name, path, value)`, `getStore(name, path)`, `useStore(name, path)`, `subscribeWithSelector(name, selector, equalityFn, listener)`, and `useFormStore(name, field)`.
|
|
13
|
+
- Packaging: rebuilt `dist` from the current `src`, and fixed the `stroid/react` build entry so the published subpath exports `useAsyncStore` and `useFormStore` consistently with the root package and docs.
|
|
14
|
+
### Fixed
|
|
15
|
+
- `hydrateStores` now rejects invalid schema payloads without leaving broken store shells behind.
|
|
16
|
+
- Middleware throws no longer poison later notifications.
|
|
17
|
+
- Critical persistence failures in production now surface through `onError`.
|
|
18
|
+
- Async lifecycle cleanup is hardened: inflight metadata clears on store deletion, lifecycle-owned requests abort on delete, and internal cleanup registrations are removed correctly.
|
|
19
|
+
- Persisted version/schema mismatches can recover through `onMigrationFail`, and cleared storage keys can be detected through `onStorageCleared`.
|
|
20
|
+
- Sync now reports unavailable `BroadcastChannel` transport, rejects oversized payloads safely, orders conflicts with monotonic clocks, and requests fresh snapshots on reconnect/focus/online.
|
|
21
|
+
|
|
22
|
+
## 0.0.3 - 2026-03-04
|
|
23
|
+
### Fixed
|
|
24
|
+
- Persistence now catches `localStorage.setItem` / driver `setItem` errors (e.g., `QuotaExceededError`) and routes them to `onError` instead of letting them bubble and crash. State updates still apply while persistence failures surface to the app.
|
|
8
25
|
- Async fetch metadata (inflight, cache, registry) now cleans up when a store is deleted, avoiding stale entries and refetch surprises.
|
|
9
26
|
- `enableRevalidateOnFocus` now removes its focus/online listeners when the store is deleted, preventing event-listener leaks.
|
|
10
27
|
- React `useSelector` now memoizes selected values with shallow equality, preventing endless re-renders when selectors return new array/object references for unchanged data.
|
|
11
28
|
- Store schemas are now enforced on write (`setStore`/`mergeStore`), blocking invalid shapes at runtime instead of silently accepting them.
|
|
12
29
|
- `createStore` no longer overwrites an existing store name; it warns and keeps the original state.
|
|
13
30
|
- `setStore` path updates now respect existing structure: array paths no longer auto-create missing indices and array shapes are preserved instead of converting to objects.
|
|
31
|
+
- Docs: README updated with the pre-v1 bundle-size promise so the published package README matches the repo.
|
|
14
32
|
|
|
15
33
|
## 0.0.2 - 2026-03-03
|
|
16
34
|
### Added
|