Upgrade Astro from version 5 to 6 - #4078
Draft
dev-dist wants to merge 2 commits into
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request upgrades the project to Node.js 22 and updates major dependencies, including Astro and related integrations, to their latest versions. It also introduces improved handling for mixed React and Preact components by adding a custom integration that ensures the correct renderer is used, even when components are re-exported through shared barrel files. Additionally, configuration files and scripts are updated to reflect these changes and improve compatibility.
Node.js and Dependency Upgrades
.nvmrc,.tool-versions,package.json, and CI workflow files for consistency and to leverage the latest features and security updates. [1] [2] [3] [4] [5]astroto 6.x,@astrojs/react,@astrojs/preact,@astrojs/mdx,@astrojs/prism, and@astrojs/vercelto their respective 5.x or 6.x versions, andviteto 7.x. [1] [2] [3] [4]React/Preact Renderer Handling
src/integrations/jsx-renderer-tag) that automatically tags each component export with the correct renderer based on its@jsxImportSourcepragma, ensuring correct SSR behavior even with barrel file imports. [1] [2] [3]astro.config.tsto explicitly list all Preact files, ensuring that Preact and React integrations only process their intended files and preventing accidental miscompilation. [1] [2]Configuration and Code Quality
root: trueto.eslintrc.cjsto ensure ESLint uses the correct configuration root.es-module-lexeras a new dependency to support the custom renderer tagging integration.astro.config.tsand removed an unused import insrc/features/utils/index.ts. [1] [2]Other Compatibility Fixes
src/content.config.tsto usez.enuminstead ofz.nativeEnumfor improved compatibility with the latest Astro versions. [1] [2]runHighlighterWithAstroinsrc/components/CodeSample/CodeSample.astroto useawait, ensuring correct syntax highlighting.