From 5c80003cfc12119d6ed55dd100f21a08f8aff9aa Mon Sep 17 00:00:00 2001 From: Eduardo Pereira Date: Wed, 1 May 2024 00:25:56 -0300 Subject: [PATCH] Add Steps component to `v3.mdx` --- src/content/docs/en/guides/upgrade-to/v3.mdx | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/content/docs/en/guides/upgrade-to/v3.mdx b/src/content/docs/en/guides/upgrade-to/v3.mdx index 4965a22ba9de1..7530a226483ff 100644 --- a/src/content/docs/en/guides/upgrade-to/v3.mdx +++ b/src/content/docs/en/guides/upgrade-to/v3.mdx @@ -3,7 +3,8 @@ title: Upgrade to Astro v3 description: How to upgrade your project to the latest version of Astro (v3.0). i18nReady: true --- -import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro' +import { Steps } from '@astrojs/starlight/components'; +import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro'; This guide will help you migrate from Astro v2 to Astro v3. @@ -72,8 +73,6 @@ These features are now available by default: Read more about these two exciting features and more in [the 3.0 Blog post](https://astro.build/blog/astro-3/)! - - ## Astro v3.0 Breaking Changes Astro v3.0 includes some breaking changes, as well as the removal of some previously deprecated features. If your project doesn't work as expected after upgrading to v3.0, check this guide for an overview of all breaking changes and instructions on how to update your codebase. @@ -90,14 +89,13 @@ Astro v3.0 drops Node 16 support entirely so that all Astro users can take advan Check that both your development environment and your deployment environment are using **Node `18.14.1` or higher**. + 1. Check your local version of Node using: ```sh node -v ``` - - 2. Check your [deployment environment's](/en/guides/deploy/) own documentation to verify that they support Node 18. You can specify Node `18.14.1` for your Astro project either in a dashboard configuration setting or a `.nvmrc` file. @@ -105,6 +103,7 @@ Astro v3.0 drops Node 16 support entirely so that all Astro users can take advan ```bash title=".nvmrc" 18.14.1 ``` + ### Removed: Support for TypeScript 4 @@ -317,7 +316,6 @@ An [error message indicating that `getStaticPath()`'s return value must be an ar In Astro v2.x, [`astro check`](/en/reference/cli-reference/#astro-check) was included in Astro by default, and its dependencies were bundled in Astro. This meant a larger package whether or not you ever used `astro check`. This also prevented you from having control over the version of TypeScript and the Astro Language Server to use. - Astro v3.0 moves the `astro check` command out of Astro core and now requires an external package `@astrojs/check`. Additionally, you must install `typescript` in your project to use the `astro check` command. #### What should I do? @@ -434,7 +432,6 @@ Astro v3.0 changes the [default port](/en/reference/cli-reference/#--port-number Update any existing references to `localhost:3000`, for example in tests or in your `README`, to reflect the new port `localhost:4321`. - ### Changed default: import.meta.env.BASE_URL `trailingSlash` In Astro v2.x, `import.meta.env.BASE_URL` appended your [`base`](/en/reference/configuration-reference/#base) setting with a [trailingSlash](/en/reference/configuration-reference/#trailingslash) by default. `trailingSlash: "ignore"` also appended a trailing slash. @@ -486,7 +483,6 @@ Astro v3.0 introduces a new, default value: `"attribute"`. By default, styles ar To retain your project's current [style scoping](/en/guides/styling/#scoped-styles), update the configuration file to the previous default value: - ```js title="astro.config.mjs" ins={4} import { defineConfig } from "astro/config"; @@ -504,7 +500,6 @@ Astro v3.0 changes the default value of `inlineStylesheets` to `"auto"`. Stylesh #### What should I do? If you want to keep your project's current behavior, set `build.inlineStylesheets` to the previous default, `"never"`: - ```js title="astro.config.mjs" ins={4-6} import { defineConfig } from "astro/config"; @@ -646,7 +641,6 @@ await devServer.stop(); await build(); ``` - ### Changed: internal Astro API entry point export paths In Astro v2.x, you could import internal Astro APIs from `astro/internal/*` and `astro/runtime/server/*`.