chore(node): move the toolchain to Node 26
- .node-version 22 -> 26 (CI, the release workflows and Workers Builds read it; Workers Builds also has NODE_VERSION=26 set) - package.json engines: node >=26 - vitest: run workers with --no-experimental-webstorage. Node 25+ defines a global `localStorage` that is undefined without --localstorage-file; zustand's persist only falls back to memory when reading the storage throws, so every store `set` crashed on undefined.setItem (39 tests in 4 files). Without Web Storage the stores fall back as they did on 22. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
eb96954d21
commit
3c53fd4fe5
4 files changed
+14
-1
No files matched your search
+1
-1
@@ -1 +1 @@
|
|||||||
22
|
26
|
||||||
Generated
+3
@@ -55,6 +55,9 @@
|
|||||||
"vite": "^8.3.4",
|
"vite": "^8.3.4",
|
||||||
"vitest": "^4.1.11",
|
"vitest": "^4.1.11",
|
||||||
"wrangler": "4.149.0"
|
"wrangler": "4.149.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=26"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@adobe/css-tools": {
|
"node_modules/@adobe/css-tools": {
|
||||||
|
|||||||
@@ -4,6 +4,9 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=26"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "tsc && vite build",
|
"build": "tsc && vite build",
|
||||||
|
|||||||
@@ -20,6 +20,13 @@ export default defineConfig({
|
|||||||
},
|
},
|
||||||
test: {
|
test: {
|
||||||
globals: true,
|
globals: true,
|
||||||
|
// Node 25+ defines a global `localStorage` that is `undefined` unless
|
||||||
|
// `--localstorage-file` is given. zustand's persist only falls back to
|
||||||
|
// memory when reading the storage *throws*, so every store `set` then
|
||||||
|
// crashes on `undefined.setItem`. Without Web Storage the global is gone
|
||||||
|
// and the stores fall back the way they always did on Node 22. The flag is
|
||||||
|
// accepted by Node 22 too.
|
||||||
|
execArgv: ["--no-experimental-webstorage"],
|
||||||
// `.tsx` was absent until v0.35.0, so any component test written here
|
// `.tsx` was absent until v0.35.0, so any component test written here
|
||||||
// would have been collected by nobody and passed silently. Note that the
|
// would have been collected by nobody and passed silently. Note that the
|
||||||
// default environment is node — a test that renders needs an explicit
|
// default environment is node — a test that renders needs an explicit
|
||||||
|
|||||||
Reference in new issue
Block a user