Skip to content

chore: upgrade to Astro 6 - #4343

Open
khadni wants to merge 5 commits into
mainfrom
chore/astro-6-upgrade
Open

khadni wants to merge 5 commits into
mainfrom
chore/astro-6-upgrade

Conversation

@khadni

@khadni khadni commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Step 2 of the Astro 5 => 7 upgrade (step 1 here). Astro 5 is end-of-life and has known vulnerabilities, fixed in Astro 7.

Merge order: this PR is the base of a stack. Merge #4345 (Astro 6 => 7) into this branch first, then merge this PR into main. Don't merge it alone: astro 6.4.8 still has a critical advisory (fixed in 7.2.8) that fails dependency review, and the home page has styling regressions on Astro 6 that #4345 fixes.

Changes

  • Dependencies: astro 6.4.8, @astrojs/vercel 10, @astrojs/mdx 6, @astrojs/react 5, @astrojs/preact 5, @astrojs/prism 4, vite 7.
  • Zod 4: added as a direct dependency. @chainlink/blocks hoisted Zod 3 to the root and broke Astro 6's content schema.
  • React/Preact: the integrations now use include/exclude to pick both the JSX transform and the island renderer. src/utils/preactModules.ts builds the matcher automatically from the @jsxImportSource preact pragma, Preact-only barrels and tsconfig aliases. node_modules stays excluded from the React transform.
  • Code:
    • async Prism highlighter in CodeSample;
    • z imported from astro/zod;
    • getSecret() (astro:env/server) for the CCIP GraphQL endpoint and key: read at runtime, and loaded from .env.local / .env.[mode] in development (Astro 6 inlines import.meta.env at build time);
    • removed the obsolete legacy.collections: false option (the legacy content collections API it opted out of no longer exists in Astro 6).
  • Script: generate-search-index adapted to Vite 7.
  • Preact patch: removed, the fix is included in @astrojs/preact 5.
  • CCIP test-tokens pages: the two wallet widgets switch from client:only to client:load with a mount guard. With Astro 6, the CSS of client:only islands in MDX was either dropped or added to every docs page. It is now scoped to those 2 pages, as before.
  • Dev workaround removed: the @chainlink/blocks SSR pre-bundle plugin (fix: speed up local dev server #4342) is no longer needed. With Astro 6 / Vite 7, page reloads in astro dev take ~0.1s without it.

Verification

  • Full build compared page by page with main (2,945 pages). HTML diffs are benign: entity encoding, is:raw leak fixed, unused CSS no longer loaded.
  • Astro 6 changes the stylesheet order, which causes styling regressions on the home page on this branch alone. Fixed in chore: upgrade to Astro 7 #4345, where the full stack's rendering was compared with production (desktop, tablet, mobile).
  • Typecheck, lint and tests pass.
  • Browser check: islands hydrate, test-tokens widgets styled, no console errors.
  • SSR functions now run on nodejs24.x. Build ~30% faster.

Notes

@vercel

vercel Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
documentation Ready Ready Preview Oct 22, 2026 8:26pm UTC

Request Review

@khadni
khadni marked this pull request as ready for review October 21, 2026 23:46
@khadni
khadni requested review from a team as code owners October 21, 2026 23:46

This branch was successfully deployed

1 active deployment
Preview — c5770425 Deployed Oct 22, 2026 by vercel[bot]
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.

2 participants