feat: release 1.5.3 - fix the SSR localStorage crash on Node 22+

Patch the app-breaking regression 1.5.2 shipped: every server render threw
`localStorage.getItem is not a function`, so the UI only appeared behind a Vite
error overlay.

Node 22+ exposes a `localStorage` global that is not a Storage when no valid
`--localstorage-file` is set, which defeats the `typeof localStorage` guard the
language layer used. The code fix landed in 3363620; this commit cuts it as a
release and adds `npm test`, which fails if the unsafe idiom reappears.

Docs: docs/changelogs/2026-09-16-ssr-storage-fix.md
This commit is contained in:
Benjiyaya
2026-09-16 04:22:07 +08:00
parent 33636200f3
commit bf557d8d5e
6 changed files with 243 additions and 4 deletions
+2 -1
View File
@@ -1,12 +1,13 @@
{
"name": "calliope-web",
"version": "1.5.2",
"version": "1.5.3",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"test": "node scripts/check-storage-ssr.mjs",
"lint": "prettier --check . && eslint .",
"format": "prettier --write ."
},