Skip to content

Commit 9a03e19

Browse files
authored
docs(ci): enable localStorage in Node.js 25 to avoid build error (#329)
Node.js 25 became "current" and our CI is now testing it. We now have a failure because "localStorage" is now a thing in Node.js but it's not properly enabled without the arg. So @typescript/vfs, which in the browser detects a "localStorage" and tries to use it (but previously in Node.js wouldn't find it so wouldn't try) finds an implementation that's incomplete. This change activates it, so we don't get the error. But we don't really need it, so this can be wound back when we have a fix in vfs or somewhere else in the stack. Ref: nodejs/node#57666 Ref: microsoft/TypeScript-Website#3449 Ref: microsoft/TypeScript-Website#3450
1 parent 7692f46 commit 9a03e19

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

docs/.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,7 @@ pnpm-debug.log*
2020
# macOS-specific files
2121
.DS_Store
2222
src/content/docs/api
23-
.wrangler/
23+
.wrangler/
24+
25+
# Node.js v25 localStorage file
26+
.astro-localstorage.json

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"private": true,
66
"scripts": {
77
"dev": "astro dev",
8-
"build": "astro build",
8+
"build": "NODE_OPTIONS=\"--localstorage-file=.astro-localstorage.json\" astro build",
99
"preview": "astro preview",
1010
"astro": "astro"
1111
},

0 commit comments

Comments
 (0)