-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Astro 4.0 breaking changes tracker #5390
Comments
Updated Vite to 5.0In Astro v3.0, it uses Vite 4 as the development server and bundler. Astro v4.0 updates it to Vite 5. What should I do?Check the Vite migration guide for the breaking changes and migrate over as needed. There are no breaking changes from Astro itself. PR: withastro/astro#9122 (implementation) |
Updated all unified, remark, and rehype dependenciesIn Astro v3.x, unified v10 and its related compatible remark/rehype packages were used to process markdown and MDX. Astro v4.0 upgrades unified to v11 and the other remark/rehype packages to latest. What should I do?If you used custom remark/rehype packages, update all of them to latest to ensure they support unified v11. There should not be any significant breaking changes, but make sure to double-check your markdown/MDX pages before deploying. PR: withastro/astro#9138 (implementation) |
Renamed injected route
|
Removed support for returning simple objects from endpointsIn Astro v3.x, returning simple objects from endpoints was deprecated but still supported for compatibility with Astro v2. A Astro v4.0 removes support for it and requires endpoints to always return a What should I do?Update your endpoints to return a export async function GET() {
return { body: { "title": "Bob's blog" }};
return new Response(JSON.stringify({ "title": "Bob's blog" }));
}
To remove usage of export async function GET() {
const file = await fs.readFile('./bob.png');
- return new ResponseWithEncoding(file.toString('binary'), undefined, 'binary');
+ return new Response(file.buffer);
}; PR: withastro/astro#9181 (implementation) |
Removed deprecated features from Astro v3In Astro v3.x:
Astro v4.0 removes the deprecated features:
What should I do?
PR: withastro/astro#9168 (implementation) Kevin - Docs suggested edits: (Thanks Kevin, these are all covered in the implementation PR!) |
Removed Shiki language path property supportIn Astro v3.x, a Shiki language passed to Astro v4.0 removes partial compatibility support for the What should I do?The language JSON file should be imported and passed to the option instead. // astro.config.js
+ import customLang from './custom.tmLanguage.json'
export default defineConfig({
markdown: {
shikiConfig: {
langs: [
- { path: '../../custom.tmLanguage.json' },
+ customLang,
],
},
},
}) PR: withastro/astro#9196 (implementation) |
Integration API: Switched
|
Added
|
View Transitions: handle
|
Followup additional deprecations from #5390 (comment)
Removed deprecated features from Astro v3In Astro v3.x:
Astro v4.0 removes the deprecated features:
What should I do?
PR: withastro/astro#9263 (implementation) |
As of this moment, everything added here is represented in the migration guide! 🥳 I will merge the guide early, but not link to it until Tuesday. After merging, it will be available directly at https://docs.astro.build/en/guides/upgrade-to/v4/ for preview and checking. It can still be changed! But I expect changes to be minor at that point, and individual PRs to update will be fine. |
📋 Explain your issue
This issue is to track 4.0 breaking changes to be part of the guide.
You know the drill, use the following template:
Example upgrade guide: https://docs.astro.build/en/guides/upgrade-to/v3/
EMOJI LEGEND
👍 - this has been added to our Astro 4.0 Upgrade Guide #5481
😄 - NO CORRESPONDING DOCS CHANGES NEEDED
🚀 - Docs need updating because of this change
🎉 - Docs PR for needed changes exists
👎 - Not actually a BREAKING change! Doesn't need to be listed in the guide!
The text was updated successfully, but these errors were encountered: