diff --git a/.changeset/hot-badgers-run.md b/.changeset/hot-badgers-run.md deleted file mode 100644 index 53c9fbf..0000000 --- a/.changeset/hot-badgers-run.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@stainless-code/persist": patch ---- - -`createStorage` now shape-checks the resolved backend and treats one missing `getItem`/`setItem`/`removeItem` as unavailable. Fixes the Node 22+ SSR crash where `localStorage` exists as an object (so the availability lookup doesn't throw) but its methods are `undefined` without a valid `--localstorage-file` path — previously this passed availability and threw `storage.getItem is not a function` inside `hydrate`; now `persistSource`/`persistStore`/`persistAtom` collapse to the no-op `PersistApi`. diff --git a/CHANGELOG.md b/CHANGELOG.md index c945587..c7f285d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # @stainless-code/persist +## 0.1.1 + +### Patch Changes + +- [#4](https://github.com/stainless-code/persist/pull/4) [`efc5614`](https://github.com/stainless-code/persist/commit/efc5614799cd26c7e81b8a679d13f058deadd475) Thanks [@SutuSebastian](https://github.com/SutuSebastian)! - `createStorage` now shape-checks the resolved backend and treats one missing `getItem`/`setItem`/`removeItem` as unavailable. Fixes the Node 22+ SSR crash where `localStorage` exists as an object (so the availability lookup doesn't throw) but its methods are `undefined` without a valid `--localstorage-file` path — previously this passed availability and threw `storage.getItem is not a function` inside `hydrate`; now `persistSource`/`persistStore`/`persistAtom` collapse to the no-op `PersistApi`. + ## 0.1.0 ### Minor Changes diff --git a/package.json b/package.json index afbe1c7..b1a30c2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@stainless-code/persist", - "version": "0.1.0", + "version": "0.1.1", "description": "Hydration-aware persistence middleware for reactive stores (storage × codec seams, TanStack Store adapters, React hydration hook)", "keywords": [ "hydration", diff --git a/skills/tanstack-store/SKILL.md b/skills/tanstack-store/SKILL.md index d06ac59..5c03de5 100644 --- a/skills/tanstack-store/SKILL.md +++ b/skills/tanstack-store/SKILL.md @@ -4,7 +4,7 @@ description: Persist a @tanstack/store Store or writable Atom with @stainless-co license: MIT metadata: library: "@stainless-code/persist" - library_version: "0.1.0" + library_version: "0.1.1" framework: "tanstack-store" sources: - README.md