Skip to content

fix(docs): bump Starlight to 0.41 for astro 7 compat (fixes Workers build) - #362

Merged
sumansaurabh merged 3 commits into
mainfrom
fix/docs-starlight-astro7-compat
Jul 23, 2026
Merged

fix(docs): bump Starlight to 0.41 for astro 7 compat (fixes Workers build)#362
sumansaurabh merged 3 commits into
mainfrom
fix/docs-starlight-astro7-compat

Conversation

@sumansaurabh

Copy link
Copy Markdown
Contributor

What

Keeps the astro 7.1.3 security upgrade (#356) and fixes the Cloudflare Workers Builds: microvm docs deploy, which has been red on main since that merge (bisect-confirmed first-red at the astro-bump commit 8993b6f).

The failure was not astro's fault: @astrojs/starlight@0.39.3 declares peerDependencies.astro: ^6.0.0, so a clean install (npm ci, as the Workers build runs) resolved astro 7 against Starlight's ^6 peer and failed. Local dev masked it (stale node_modules had astro 6).

@astrojs/starlight@0.41.0+ moved its peer to astro ^7.0.2, so the correct fix is to bump Starlight, not downgrade astro — vulnerabilities stay fixed.

Change

  • @astrojs/starlight 0.39.3^0.41.4
  • astro unchanged at 7.1.3
  • package-lock.json regenerated

Docs-only; no content or Go changes.

Verification

$ npm --prefix docs ci && npm --prefix docs run build
[build] 73 page(s) built in 6.64s
[build] Complete!    # astro 7.1.3 + @astrojs/starlight 0.41.4, no ERESOLVE/peer warnings

🤖 Generated with Claude Code

Keeps the astro 7.1.3 security upgrade (#356) and fixes the Cloudflare
"Workers Builds: microvm" docs build, which has been red on main since that
merge. Root cause was NOT astro: @astrojs/starlight@0.39.3 declares
`peerDependencies.astro: ^6.0.0`, so a clean install (npm ci, as the Workers
build runs) resolved astro 7 against Starlight's ^6 peer and failed. Starlight
0.41.0+ moved its peer to `astro ^7.0.2`, so bumping Starlight — not
downgrading astro — is the correct fix.

Verified: `npm ci && npm run build` in docs/ completes (73 pages, no peer
warnings) with astro 7.1.3 + @astrojs/starlight 0.41.4.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 23, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
microvm 26faa92 Commit Preview URL

Branch Preview URL
Jul 23 2026, 01:28 AM

astro 7.1.3 declares engines.node ">=22.12.0". The repo had no Node pin, so
the Cloudflare Workers docs build used its default (older) Node and the astro
7 build failed there — the second half of why "Workers Builds: microvm" went
red at the astro 6->7 bump (the first half, Starlight's ^6 peer, is fixed by
the 0.41.4 bump in this PR). Local dev masked it (Node 22.20 already satisfies).

Add docs/.node-version=22.12.0 (Cloudflare reads it from the build root) and
declare engines.node so the requirement travels with the package.
…p/esbuild linux)

The Cloudflare Workers build failed `npm ci` with "Missing @emnapi/runtime and
@emnapi/core from lock file". Cause: the earlier lock came from a partial
`npm install @astrojs/starlight@...`, which resolved only my macOS platform's
native deps. The astro-7 / Starlight-0.41 bump pulls a newer sharp whose wasm
path (@img/sharp-wasm32) needs @emnapi, and Linux needs @img/sharp-linux-*
etc. — none of which the partial install wrote. npm ci passed locally (mac uses
native sharp) but failed on Cloudflare's Linux.

Fix: clean full regenerate (rm node_modules + lock, npm install). The lock now
carries all platforms' optional natives — @emnapi/{core,runtime},
@img/sharp-{linux,linuxmusl}-*, @esbuild/linux-*, @astrojs/compiler-binding-
linux-* — so `npm ci` is in sync on Linux. lockfileVersion 3 (npm 10.9.2 compat);
astro stays 7.1.3, Starlight 0.41.4. 0 vulnerabilities.
@sumansaurabh
sumansaurabh merged commit 3fe2ddd into main Jul 23, 2026
12 checks passed
@sumansaurabh
sumansaurabh deleted the fix/docs-starlight-astro7-compat branch July 23, 2026 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant