Skip to content

Upgrade Astro 5 → 6 and Starlight 0.34 → 0.38#37

Open
ejntaylor wants to merge 1 commit into
mainfrom
ejntaylor/astro-6-upgrade
Open

Upgrade Astro 5 → 6 and Starlight 0.34 → 0.38#37
ejntaylor wants to merge 1 commit into
mainfrom
ejntaylor/astro-6-upgrade

Conversation

@ejntaylor
Copy link
Copy Markdown
Contributor

Summary

  • Bumps Astro to v6, Starlight to v0.38, and Astro-6-compatible releases of starlight-openapi, starlight-llms-txt, and astro-og-canvas.
  • Adds @astrojs/compiler-rs as an explicit dependency so Rollup can resolve Astro's dynamic import during the static build (Astro 6 ships a dynamic import("@astrojs/compiler-rs") but does not declare it in its own dependencies).
  • Two small code changes for v6:
    • src/content.config.ts: import z from astro/zod (the astro:content re-export is deprecated in v6).
    • src/pages/open-graph/[...route].js: rename slugid (Astro 6 removed the legacy content-collection backwards-compat shim, so docsLoader entries now expose id only) and await OGImageRoute(...) (its return type is now a Promise).

Versions

Package From To
astro ^5.9.2 ^6.0.0 (resolves to 6.1.9)
@astrojs/starlight ^0.34.3 ^0.38.4
@astrojs/sitemap ^3.4.1 ^3.7.2
starlight-openapi ^0.22.1 ^0.25.0
starlight-llms-txt ^0.5.1 ^0.8.1
astro-og-canvas ^0.5.3 ^0.11.1
@astrojs/compiler-rs ^0.1.9 (new)

Test plan

  • npm install succeeds with no peer-dependency errors
  • npm run build completes (190 pages, including all three OpenAPI references and OG images)
  • npm run dev boots; home page returns 200
  • Spot-check sidebar navigation, search (Pagefind), and OpenAPI reference pages in a deploy preview
  • Verify generated llms.txt / llms-full.txt look right
  • Confirm OG images render correctly (Twitter / Slack share preview)

Notes

  • Node ≥ 22.12.0 is now required (Astro 6 dropped Node 18/20). Local dev uses Node 22.19.0 — confirm CI / Netlify build image.
  • No usage of Astro.glob, <ViewTransitions />, emitESMImage, loadManifest, loadApp, NodeApp, or ASSETS_PREFIX in the codebase, so the major v6 removals don't apply here.

🤖 Generated with Claude Code

Bumps Astro to v6, Starlight to v0.38, and all related plugins
(starlight-openapi, starlight-llms-txt, astro-og-canvas) to their
first Astro-6-compatible releases. Adds @astrojs/compiler-rs as an
explicit dependency so Rollup can resolve Astro's dynamic import.

Code changes for v6 compatibility:
- src/content.config.ts: import `z` from `astro/zod` (the
  `astro:content` re-export is deprecated in v6).
- src/pages/open-graph/[...route].js: rename `slug` → `id` (the
  legacy content-collection backwards-compat shim was removed) and
  `await OGImageRoute(...)` (its return type is now a Promise).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 24, 2026

Deploy Preview for deluxe-meerkat-8daf24 failed.

Name Link
🔨 Latest commit 3ecbdef
🔍 Latest deploy log https://app.netlify.com/projects/deluxe-meerkat-8daf24/deploys/69eb2aa16d9fa20008313e5d

@coderbuds
Copy link
Copy Markdown

coderbuds Bot commented Apr 24, 2026

Migration covering the required updates.

🎯 Quality: 70% Good · 📦 Size: Oversized — strongly consider breaking this down

📈 This month: Your 85th PR — above team average · Averaging Good

See how your team is trending →

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