Upgrade Astro to v7 and update related dependencies - #3514
Conversation
Consolidates the open dependabot Astro PRs (#3458, #3509, #3510, #3511, #3513) into a single coordinated upgrade from Astro 5 to Astro 7: - astro 5.18.2 -> 7.2.10 (both apps) - @astrojs/mdx 5.0.6 -> 8.0.0 - @astrojs/vercel 9.0.5 -> 11.0.9 - @astrojs/starlight 0.37.7 -> 0.42.0 - @astrojs/sitemap 3.7.3 -> 3.7.4 - starlight-typedoc 0.21.5 -> 0.23.1 - sharp 0.34.5 -> 0.35.x (matches existing workspace override) Code changes for the Astro 6/7 breaking changes: - Migrate legacy content collections (removed in Astro 6) to the Content Layer API: src/content/config.ts moves to src/content.config.ts with the glob() loader in landing and Starlight's docsLoader() in docs, and entry.slug / entry.render() become entry.id / render(entry). - Replace the removed <ViewTransitions /> component with <ClientRouter />. - Drop the deprecated @astrojs/starlight/props Props import from the Starlight Head override. - Accept the Astro 6 endpoint trailing-slash change in the Vercel route assertions (/index.md route no longer matches a trailing slash). - Keep the landing e2e dev server in the foreground: Astro 7 detaches `astro dev` into a background daemon when it detects an AI coding agent (opted out via ASTRO_DEV_BACKGROUND), and strip Vitest's VITEST env marker, which makes the Vite 8 dev server 404 every route. - Raise Node to >= 22.12 (Astro 7 minimum) in the workspace engines and the docs Dockerfile, and align the Dockerfile's pnpm with the workspace's packageManager version. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KB5E2kb34UW1yqBNuEjgpF
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (14)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe PR upgrades Node.js, pnpm, Astro packages, and content loading APIs. It updates documentation and landing-site integrations, changes blog routes to use ChangesAstro platform migration
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: 🟡 Moderate · up to This update migrates the sites to Astro 7 and updates their runtime tooling. The content, routing, and test migrations are internally consistent in the supplied changes, but the Starlight release-age exemption should be confirmed against the effective CI configuration before merging to ensure dependency-install policy remains intentional. Sequence Diagram(s)sequenceDiagram
participant BlogContentCollection
participant getStaticPaths
participant BlogPostPage
BlogContentCollection->>getStaticPaths: Load blog entries with glob
getStaticPaths->>BlogPostPage: Pass post.id as slug
BlogPostPage->>BlogPostPage: Render post with render(post)
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 5 files. (9 skipped: 9 unsupported.)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 ESLint
landing/src/pages/rss.xml.js(node:2) ESLintIgnoreWarning: The ".eslintignore" file is no longer supported. Switch to using the "ignores" property in "eslint.config.js": https://eslint.org/docs/latest/use/configure/migration-guide#ignore-files Oops! Something went wrong! :( ESLint: 10.9.1 A config object is using the "root" key, which is not supported in flat config system. Flat configs always act as if they are the root config file, so this key can be safely removed. landing/test/dist.test.tsESLint skipped: the matched ESLint configuration already failed (config-incompatibility). landing/test/setup/dev-server.tsESLint skipped: the matched ESLint configuration already failed (config-incompatibility).
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
`astro check` (and the Vercel landing deploy) failed with ts(2339) because the spread-literal type has no VITEST property to delete. Annotate the env as NodeJS.ProcessEnv. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KB5E2kb34UW1yqBNuEjgpF
|
Coverage Impact This PR will not change total coverage. 🚦 See full report on Qlty Cloud »🛟 Help
|

Summary
This PR upgrades the project from Astro v5 to v7, along with corresponding updates to related dependencies and necessary code migrations to support the new Astro API.
Key Changes
Astro Framework Upgrade
landinganddocs-srcpackages@astrojs/mdx: v5.0.6 → v8.0.0@astrojs/vercel: v9.0.5 → v11.0.9@astrojs/starlight: v0.37.7 → v0.42.0starlight-typedoc: v0.21.5 → v0.23.1Content Collections API Migration
content.config.tsfiles to use the new Astro v7 loader pattern:globloader for blog content in landing packagedocsLoader()for Starlight docs in docs-src packageastro/zodinstead ofastro:contentpost.slugtopost.idthroughout the codebaserender()function calls to use the new standalonerender()import fromastro:contentView Transitions API Update
ViewTransitionscomponent withClientRouterinBaseHead.astroStarlight Component Updates
Propstype import from@astrojs/starlight/propsinHeadWithPosthog.astroInfrastructure & Tooling
sharpfrom v0.34.5 to v0.35.0@astrojs/starlight@0.42.0tominimumReleaseAgeExcludein pnpm-workspace.yamlDev Server Configuration
ASTRO_DEV_BACKGROUND: '0'and removedVITESTfrom child process environmentTest Updates
dist.test.tsto reflect Astro v6+ behavior where endpoints with file extensions are not served with trailing slashesNotable Implementation Details
post.idinstead ofpost.slughttps://claude.ai/code/session_01KB5E2kb34UW1yqBNuEjgpF
Summary by CodeRabbit
Bug Fixes
Documentation
Chores