diff --git a/.changeset/angry-swans-fry.md b/.changeset/angry-swans-fry.md
new file mode 100644
index 000000000000..ce5c513d5fc3
--- /dev/null
+++ b/.changeset/angry-swans-fry.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Redesign Dev Overlay main screen to show more information, such as the coolest integrations, your current Astro version and more.
diff --git a/.changeset/beige-jokes-report.md b/.changeset/beige-jokes-report.md
new file mode 100644
index 000000000000..ecb97328b6c1
--- /dev/null
+++ b/.changeset/beige-jokes-report.md
@@ -0,0 +1,9 @@
+---
+'@astrojs/mdx': major
+'@astrojs/markdown-remark': major
+'astro': major
+---
+
+Updates the unified, remark, and rehype dependencies to latest. Make sure to update your custom remark and rehype plugins as well to be compatible with the latest versions.
+
+**Potentially breaking change:** The default value of `markdown.remarkRehype.footnoteBackLabel` is changed from `"Back to content"` to `"Back to reference 1"`. See the `mdast-util-to-hast` [commit](https://github.com/syntax-tree/mdast-util-to-hast/commit/56c88e45690be138fad9f0bf367b939d09816863) for more information.
diff --git a/.changeset/big-cooks-notice.md b/.changeset/big-cooks-notice.md
new file mode 100644
index 000000000000..9a0586c73ad4
--- /dev/null
+++ b/.changeset/big-cooks-notice.md
@@ -0,0 +1,6 @@
+---
+'@astrojs/vercel': major
+'@astrojs/node': major
+---
+
+The internals of the integration have been updated to support Astro 4.0. Make sure to upgrade your Astro version as Astro 3.0 is no longer supported.
diff --git a/.changeset/brown-jars-lick.md b/.changeset/brown-jars-lick.md
new file mode 100644
index 000000000000..0d824e445f47
--- /dev/null
+++ b/.changeset/brown-jars-lick.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Fixes an issue where links with the same pathname as the current page, but different search params, were not prefetched.
diff --git a/.changeset/clever-beds-notice.md b/.changeset/clever-beds-notice.md
new file mode 100644
index 000000000000..6be65bde1157
--- /dev/null
+++ b/.changeset/clever-beds-notice.md
@@ -0,0 +1,9 @@
+---
+'astro': major
+---
+
+Removes support for returning simple objects from endpoints (deprecated since Astro 3.0). You should return a `Response` instead.
+
+`ResponseWithEncoding` is also removed. You can refactor the code to return a response with an array buffer instead, which is encoding agnostic.
+
+The types for middlewares have also been revised. To type a middleware function, you should now use `MiddlewareHandler` instead of `MiddlewareResponseHandler`. If you used `defineMiddleware()` to type the function, no changes are needed.
diff --git a/.changeset/famous-eels-trade.md b/.changeset/famous-eels-trade.md
new file mode 100644
index 000000000000..2c3d24898746
--- /dev/null
+++ b/.changeset/famous-eels-trade.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Ensure the dev-overlay-window is anchored to the bottom
diff --git a/.changeset/giant-snails-perform.md b/.changeset/giant-snails-perform.md
new file mode 100644
index 000000000000..e44a0b73060b
--- /dev/null
+++ b/.changeset/giant-snails-perform.md
@@ -0,0 +1,5 @@
+---
+'@astrojs/vercel': major
+---
+
+Removes deprecated `analytics` option. Use the `webAnalytics` option instead.
diff --git a/.changeset/grumpy-seas-switch.md b/.changeset/grumpy-seas-switch.md
new file mode 100644
index 000000000000..85cf0e22fe56
--- /dev/null
+++ b/.changeset/grumpy-seas-switch.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Improve high contrast mode with the Dev Overlay
diff --git a/.changeset/khaki-fans-sell.md b/.changeset/khaki-fans-sell.md
new file mode 100644
index 000000000000..f6d84bdaedac
--- /dev/null
+++ b/.changeset/khaki-fans-sell.md
@@ -0,0 +1,5 @@
+---
+'@astrojs/markdown-remark': patch
+---
+
+Fixes `RemarkRehype` type's `handler` and `handlers` properties
diff --git a/.changeset/odd-rivers-happen.md b/.changeset/odd-rivers-happen.md
new file mode 100644
index 000000000000..2490084bc234
--- /dev/null
+++ b/.changeset/odd-rivers-happen.md
@@ -0,0 +1,5 @@
+---
+'astro': major
+---
+
+Removes the opt-in `handleForms` property for ``. Form submissions are now handled by default and can be disabled by setting `data-astro-reload` on relevant `
` elements.
diff --git a/.changeset/plenty-candles-help.md b/.changeset/plenty-candles-help.md
new file mode 100644
index 000000000000..e7ddf8cb4fcb
--- /dev/null
+++ b/.changeset/plenty-candles-help.md
@@ -0,0 +1,21 @@
+---
+'astro': major
+---
+
+Removes support for Shiki custom language's `path` property. The language JSON file should be imported and passed to the option instead.
+
+```diff
+// astro.config.js
++ import customLang from './custom.tmLanguage.json'
+
+export default defineConfig({
+ markdown: {
+ shikiConfig: {
+ langs: [
+- { path: './custom.tmLanguage.json' },
++ customLang,
+ ],
+ },
+ },
+})
+```
diff --git a/.changeset/pre.json b/.changeset/pre.json
index af2e97775afe..08a455c2fe4a 100644
--- a/.changeset/pre.json
+++ b/.changeset/pre.json
@@ -26,7 +26,27 @@
"@astrojs/internal-helpers": "0.2.1",
"@astrojs/markdown-remark": "3.5.0",
"@astrojs/telemetry": "3.0.4",
- "@astrojs/underscore-redirects": "0.3.3"
+ "@astrojs/underscore-redirects": "0.3.3",
+ "@astrojs/upgrade": "0.0.1"
},
- "changesets": []
+ "changesets": [
+ "angry-swans-fry",
+ "beige-jokes-report",
+ "brown-jars-lick",
+ "calm-baboons-watch",
+ "clever-beds-notice",
+ "giant-snails-perform",
+ "khaki-fans-sell",
+ "light-ties-poke",
+ "modern-candles-sip",
+ "plenty-candles-help",
+ "rude-hairs-whisper",
+ "shiny-trees-sip",
+ "short-deers-whisper",
+ "slow-hornets-try",
+ "sour-games-burn",
+ "tasty-dryers-bathe",
+ "wicked-sloths-develop",
+ "wild-apricots-rescue"
+ ]
}
diff --git a/.changeset/rude-hairs-whisper.md b/.changeset/rude-hairs-whisper.md
new file mode 100644
index 000000000000..a9d7baa4d445
--- /dev/null
+++ b/.changeset/rude-hairs-whisper.md
@@ -0,0 +1,5 @@
+---
+'astro': minor
+---
+
+Renames the `entryPoint` property of the `injectRoute` integrations API to `entrypoint` for consistency. A warning will be shown prompting you to update your code when using the old name.
diff --git a/.changeset/sharp-starfishes-compete.md b/.changeset/sharp-starfishes-compete.md
new file mode 100644
index 000000000000..0eb4f413bcda
--- /dev/null
+++ b/.changeset/sharp-starfishes-compete.md
@@ -0,0 +1,20 @@
+---
+'astro': major
+---
+
+This change only affects maintainers of third-party adapters. In the Integration API, the `app.render()` method of the `App` class has been simplified.
+
+Instead of two optional arguments, it now takes a single optional argument that is an object with two optional properties: `routeData` and `locals`.
+```diff
+ app.render(request)
+
+- app.render(request, routeData)
++ app.render(request, { routeData })
+
+- app.render(request, routeData, locals)
++ app.render(request, { routeData, locals })
+
+- app.render(request, undefined, locals)
++ app.render(request, { locals })
+```
+The current signature is deprecated but will continue to function until next major version.
diff --git a/.changeset/shiny-trees-sip.md b/.changeset/shiny-trees-sip.md
new file mode 100644
index 000000000000..991c7aa92825
--- /dev/null
+++ b/.changeset/shiny-trees-sip.md
@@ -0,0 +1,5 @@
+---
+'@astrojs/markdown-remark': major
+---
+
+Removes deprecated APIs. All Astro packages had been refactored to not use these APIs.
diff --git a/.changeset/short-deers-whisper.md b/.changeset/short-deers-whisper.md
new file mode 100644
index 000000000000..03e0f4480676
--- /dev/null
+++ b/.changeset/short-deers-whisper.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Removes vendored Vite's `importMeta.d.ts` file in favour of Vite 5's new `vite/types/import-meta.d.ts` export
diff --git a/.changeset/slow-hornets-try.md b/.changeset/slow-hornets-try.md
new file mode 100644
index 000000000000..970e7f49105b
--- /dev/null
+++ b/.changeset/slow-hornets-try.md
@@ -0,0 +1,5 @@
+---
+'@astrojs/rss': major
+---
+
+Removes the `drafts` option as the feature is deprecated in Astro 3.0
diff --git a/.changeset/sour-games-burn.md b/.changeset/sour-games-burn.md
new file mode 100644
index 000000000000..f0d596603ddd
--- /dev/null
+++ b/.changeset/sour-games-burn.md
@@ -0,0 +1,13 @@
+---
+"astro": patch
+---
+
+Refactors virtual modules exports. This should not break your project unless you import Astro's internal modules, including:
+
+- `astro/middleware/namespace`
+- `astro/transitions`
+- `astro/transitions/router`
+- `astro/transitions/events`
+- `astro/transitions/types`
+- `astro/prefetch`
+- `astro/i18n`
diff --git a/.changeset/spicy-starfishes-shake.md b/.changeset/spicy-starfishes-shake.md
new file mode 100644
index 000000000000..a283f4d37911
--- /dev/null
+++ b/.changeset/spicy-starfishes-shake.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Ensure overlay x-ray z-index is higher than the island
diff --git a/.changeset/tasty-dryers-bathe.md b/.changeset/tasty-dryers-bathe.md
new file mode 100644
index 000000000000..438597e13b04
--- /dev/null
+++ b/.changeset/tasty-dryers-bathe.md
@@ -0,0 +1,27 @@
+---
+'@astrojs/upgrade': minor
+---
+
+Initial release!
+
+`@astrojs/upgrade` is an automated command-line tool for upgrading Astro and your official Astro integrations together.
+
+Inside of your existing `astro` project, run the following command to install the `latest` version of your integrations.
+
+**With NPM:**
+
+```bash
+npx @astrojs/upgrade
+```
+
+**With Yarn:**
+
+```bash
+yarn dlx @astrojs/upgrade
+```
+
+**With PNPM:**
+
+```bash
+pnpm dlx @astrojs/upgrade
+```
diff --git a/.changeset/tricky-dragons-explain.md b/.changeset/tricky-dragons-explain.md
new file mode 100644
index 000000000000..78ecb1e95752
--- /dev/null
+++ b/.changeset/tricky-dragons-explain.md
@@ -0,0 +1,5 @@
+---
+'astro': patch
+---
+
+Fixes a number of small user experience bugs with the dev overlay
diff --git a/.changeset/weak-wolves-bow.md b/.changeset/weak-wolves-bow.md
new file mode 100644
index 000000000000..484544cd12b7
--- /dev/null
+++ b/.changeset/weak-wolves-bow.md
@@ -0,0 +1,5 @@
+---
+'astro': major
+---
+
+Removes deprecated `app.match()` option, `matchNotFound`
diff --git a/.changeset/wicked-sloths-develop.md b/.changeset/wicked-sloths-develop.md
new file mode 100644
index 000000000000..806e0270728f
--- /dev/null
+++ b/.changeset/wicked-sloths-develop.md
@@ -0,0 +1,11 @@
+---
+'astro': major
+---
+
+Removes deprecated features from Astro 3.0
+
+- Adapters are now required to pass `supportedAstroFeatures` to specify a list of features they support.
+- The `build.split` and `build.excludeMiddleware` options are removed. Use `functionPerRoute` and `edgeMiddleware` from adapters instead.
+- The `markdown.drafts` option and draft feature is removed. Use content collections instead.
+- Lowercase endpoint names are no longer supported. Use uppercase endpoint names instead.
+- `getHeaders()` exported from markdown files is removed. Use `getHeadings()` instead.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index cea4f61e20fd..05a07e125484 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -2,8 +2,7 @@
We welcome contributions of any size and skill level. As an open source project, we believe in giving back to our contributors and are happy to help with guidance on PRs, technical writing, and turning any feature idea into a reality.
-> **Tip for new contributors:**
-> Take a look at [https://github.com/firstcontributions/first-contributions](https://github.com/firstcontributions/first-contributions) for helpful information on contributing
+> [!Tip] > **For new contributors:** Take a look at [https://github.com/firstcontributions/first-contributions](https://github.com/firstcontributions/first-contributions) for helpful information on contributing
## Quick Guide
@@ -46,7 +45,8 @@ To get started, create a codespace for this repository by clicking this 👇
Your new codespace will open in a web-based version of Visual Studio Code. All development dependencies will be preinstalled, and the tests will run automatically ensuring you've got a green base from which to start working.
-**Note**: Dev containers is now an open spec which is supported by [GitHub Codespaces](https://github.com/codespaces) and [other supporting tools](https://containers.dev/supporting).
+> [!Note]
+> Dev containers is now an open spec which is supported by [GitHub Codespaces](https://github.com/codespaces) and [other supporting tools](https://containers.dev/supporting).
### Development
@@ -187,7 +187,7 @@ Understanding in which environment code runs, and at which stage in the process,
Active Astro development happens on the [`main`](https://github.com/withastro/astro/tree/main) branch. `main` always reflects the latest code.
-> **Note:**
+> [!Note]
> During certain periods, we put `main` into a [**prerelease**](https://github.com/changesets/changesets/blob/main/docs/prereleases.md#prereleases) state. Read more about [Releasing Astro](#releasing-astro).
### `latest`
@@ -198,7 +198,8 @@ By default, `create-astro` and [astro.new](https://astro.new) point to this bran
## Releasing Astro
-_Note: Only [core maintainers (L3+)](https://github.com/withastro/.github/blob/main/GOVERNANCE.md#level-3-l3---core) can release new versions of Astro._
+> [!Note]
+> Only [core maintainers (L3+)](https://github.com/withastro/.github/blob/main/GOVERNANCE.md#level-3-l3---core) can release new versions of Astro.
The repo is set up with automatic releases, using the changeset GitHub action & bot.
diff --git a/benchmark/packages/timer/package.json b/benchmark/packages/timer/package.json
index 8ac03985492e..a4a3b8df1b81 100644
--- a/benchmark/packages/timer/package.json
+++ b/benchmark/packages/timer/package.json
@@ -29,7 +29,7 @@
"astro": "workspace:*"
},
"devDependencies": {
- "@types/server-destroy": "^1.0.1",
+ "@types/server-destroy": "^1.0.3",
"astro": "workspace:*",
"astro-scripts": "workspace:*"
}
diff --git a/benchmark/packages/timer/src/index.ts b/benchmark/packages/timer/src/index.ts
index 49edcb5e86a5..2ea41af6624d 100644
--- a/benchmark/packages/timer/src/index.ts
+++ b/benchmark/packages/timer/src/index.ts
@@ -6,6 +6,7 @@ export function getAdapter(): AstroAdapter {
serverEntrypoint: '@benchmark/timer/server.js',
previewEntrypoint: '@benchmark/timer/preview.js',
exports: ['handler'],
+ supportedAstroFeatures: {},
};
}
diff --git a/examples/basics/package.json b/examples/basics/package.json
index 1be44bed6e74..37e88b2eaad9 100644
--- a/examples/basics/package.json
+++ b/examples/basics/package.json
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^3.5.5"
+ "astro": "^4.0.0-beta.1"
}
}
diff --git a/examples/blog/package.json b/examples/blog/package.json
index afee1f0281c6..de7cadfaf80f 100644
--- a/examples/blog/package.json
+++ b/examples/blog/package.json
@@ -11,9 +11,9 @@
"astro": "astro"
},
"dependencies": {
- "@astrojs/mdx": "^1.1.5",
- "@astrojs/rss": "^3.0.0",
+ "@astrojs/mdx": "^2.0.0-beta.0",
+ "@astrojs/rss": "^4.0.0-beta.0",
"@astrojs/sitemap": "^3.0.3",
- "astro": "^3.5.5"
+ "astro": "^4.0.0-beta.1"
}
}
diff --git a/examples/component/package.json b/examples/component/package.json
index 2c781217268b..2a0a0f28dba7 100644
--- a/examples/component/package.json
+++ b/examples/component/package.json
@@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
- "astro": "^3.5.5"
+ "astro": "^4.0.0-beta.1"
},
"peerDependencies": {
"astro": "^3.0.0"
diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json
index 88c5f32295e4..fb949bba7e01 100644
--- a/examples/framework-alpine/package.json
+++ b/examples/framework-alpine/package.json
@@ -12,8 +12,8 @@
},
"dependencies": {
"@astrojs/alpinejs": "^0.3.1",
- "@types/alpinejs": "^3.7.2",
- "alpinejs": "^3.12.3",
- "astro": "^3.5.5"
+ "@types/alpinejs": "^3.13.5",
+ "alpinejs": "^3.13.3",
+ "astro": "^4.0.0-beta.1"
}
}
diff --git a/examples/framework-lit/package.json b/examples/framework-lit/package.json
index 97f9a4dcb29c..1b40e873486a 100644
--- a/examples/framework-lit/package.json
+++ b/examples/framework-lit/package.json
@@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/lit": "^3.0.3",
"@webcomponents/template-shadowroot": "^0.2.1",
- "astro": "^3.5.5",
+ "astro": "^4.0.0-beta.1",
"lit": "^2.8.0"
}
}
diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json
index af251b7d8796..0e26aeec00c7 100644
--- a/examples/framework-multiple/package.json
+++ b/examples/framework-multiple/package.json
@@ -12,16 +12,16 @@
},
"dependencies": {
"@astrojs/preact": "^3.0.1",
- "@astrojs/react": "^3.0.5",
+ "@astrojs/react": "^3.0.7-beta.0",
"@astrojs/solid-js": "^3.0.2",
- "@astrojs/svelte": "^4.0.4",
- "@astrojs/vue": "^3.0.4",
- "astro": "^3.5.5",
- "preact": "^10.17.1",
+ "@astrojs/svelte": "^5.0.0-beta.0",
+ "@astrojs/vue": "^4.0.0-beta.0",
+ "astro": "^4.0.0-beta.1",
+ "preact": "^10.19.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
- "solid-js": "^1.7.11",
- "svelte": "^4.2.0",
- "vue": "^3.3.4"
+ "solid-js": "^1.8.5",
+ "svelte": "^4.2.5",
+ "vue": "^3.3.8"
}
}
diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json
index c8059410c45e..ce44cfaada21 100644
--- a/examples/framework-preact/package.json
+++ b/examples/framework-preact/package.json
@@ -13,7 +13,7 @@
"dependencies": {
"@astrojs/preact": "^3.0.1",
"@preact/signals": "^1.2.1",
- "astro": "^3.5.5",
- "preact": "^10.17.1"
+ "astro": "^4.0.0-beta.1",
+ "preact": "^10.19.2"
}
}
diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json
index 79b09fc45d4c..7f5102910119 100644
--- a/examples/framework-react/package.json
+++ b/examples/framework-react/package.json
@@ -11,10 +11,10 @@
"astro": "astro"
},
"dependencies": {
- "@astrojs/react": "^3.0.5",
- "@types/react": "^18.2.21",
- "@types/react-dom": "^18.2.7",
- "astro": "^3.5.5",
+ "@astrojs/react": "^3.0.7-beta.0",
+ "@types/react": "^18.2.37",
+ "@types/react-dom": "^18.2.15",
+ "astro": "^4.0.0-beta.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json
index 8b1a9a3157f0..ea5bd5f11720 100644
--- a/examples/framework-solid/package.json
+++ b/examples/framework-solid/package.json
@@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/solid-js": "^3.0.2",
- "astro": "^3.5.5",
- "solid-js": "^1.7.11"
+ "astro": "^4.0.0-beta.1",
+ "solid-js": "^1.8.5"
}
}
diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json
index 3badefefbdd6..68e6d2078ac1 100644
--- a/examples/framework-svelte/package.json
+++ b/examples/framework-svelte/package.json
@@ -11,8 +11,8 @@
"astro": "astro"
},
"dependencies": {
- "@astrojs/svelte": "^4.0.4",
- "astro": "^3.5.5",
- "svelte": "^4.2.0"
+ "@astrojs/svelte": "^5.0.0-beta.0",
+ "astro": "^4.0.0-beta.1",
+ "svelte": "^4.2.5"
}
}
diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json
index 99a6b678f005..d279a3644d12 100644
--- a/examples/framework-vue/package.json
+++ b/examples/framework-vue/package.json
@@ -11,8 +11,8 @@
"astro": "astro"
},
"dependencies": {
- "@astrojs/vue": "^3.0.4",
- "astro": "^3.5.5",
- "vue": "^3.3.4"
+ "@astrojs/vue": "^4.0.0-beta.0",
+ "astro": "^4.0.0-beta.1",
+ "vue": "^3.3.8"
}
}
diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json
index fa19009ab647..5c1ad557f067 100644
--- a/examples/hackernews/package.json
+++ b/examples/hackernews/package.json
@@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
- "@astrojs/node": "^6.0.4",
- "astro": "^3.5.5"
+ "@astrojs/node": "^7.0.0-beta.0",
+ "astro": "^4.0.0-beta.1"
}
}
diff --git a/examples/integration/package.json b/examples/integration/package.json
index 262ba7aeb1cb..c9034bcae9cb 100644
--- a/examples/integration/package.json
+++ b/examples/integration/package.json
@@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
- "astro": "^3.5.5"
+ "astro": "^4.0.0-beta.1"
},
"peerDependencies": {
"astro": "^3.0.0"
diff --git a/examples/middleware/package.json b/examples/middleware/package.json
index 7c3da323eecd..a0dafd56967f 100644
--- a/examples/middleware/package.json
+++ b/examples/middleware/package.json
@@ -12,8 +12,8 @@
"server": "node dist/server/entry.mjs"
},
"dependencies": {
- "@astrojs/node": "^6.0.4",
- "astro": "^3.5.5",
+ "@astrojs/node": "^7.0.0-beta.0",
+ "astro": "^4.0.0-beta.1",
"html-minifier": "^4.0.0"
}
}
diff --git a/examples/minimal/package.json b/examples/minimal/package.json
index 9577132a2dc1..2b02ba774f25 100644
--- a/examples/minimal/package.json
+++ b/examples/minimal/package.json
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^3.5.5"
+ "astro": "^4.0.0-beta.1"
}
}
diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json
index 9b8a6e24814d..b6d645bbe407 100644
--- a/examples/non-html-pages/package.json
+++ b/examples/non-html-pages/package.json
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^3.5.5"
+ "astro": "^4.0.0-beta.1"
}
}
diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json
index 375bb8ff5bfd..2030139bb992 100644
--- a/examples/portfolio/package.json
+++ b/examples/portfolio/package.json
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^3.5.5"
+ "astro": "^4.0.0-beta.1"
}
}
diff --git a/examples/ssr/package.json b/examples/ssr/package.json
index 04c0d698420e..bccc8956276f 100644
--- a/examples/ssr/package.json
+++ b/examples/ssr/package.json
@@ -12,9 +12,9 @@
"server": "node dist/server/entry.mjs"
},
"dependencies": {
- "@astrojs/node": "^6.0.4",
- "@astrojs/svelte": "^4.0.4",
- "astro": "^3.5.5",
- "svelte": "^4.2.0"
+ "@astrojs/node": "^7.0.0-beta.0",
+ "@astrojs/svelte": "^5.0.0-beta.0",
+ "astro": "^4.0.0-beta.1",
+ "svelte": "^4.2.5"
}
}
diff --git a/examples/view-transitions/package.json b/examples/view-transitions/package.json
index b2904039ce43..2be6d3945183 100644
--- a/examples/view-transitions/package.json
+++ b/examples/view-transitions/package.json
@@ -10,8 +10,8 @@
"astro": "astro"
},
"devDependencies": {
- "@astrojs/tailwind": "^5.0.2",
- "@astrojs/node": "^6.0.4",
- "astro": "^3.5.5"
+ "@astrojs/tailwind": "^6.0.0-beta.0",
+ "@astrojs/node": "^7.0.0-beta.0",
+ "astro": "^4.0.0-beta.1"
}
}
diff --git a/examples/with-markdoc/package.json b/examples/with-markdoc/package.json
index 8447aa0cff28..b1e18647acec 100644
--- a/examples/with-markdoc/package.json
+++ b/examples/with-markdoc/package.json
@@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
- "@astrojs/markdoc": "^0.7.2",
- "astro": "^3.5.5"
+ "@astrojs/markdoc": "^1.0.0-beta.0",
+ "astro": "^4.0.0-beta.1"
}
}
diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json
index ad51e3f987f1..efb99a814cd5 100644
--- a/examples/with-markdown-plugins/package.json
+++ b/examples/with-markdown-plugins/package.json
@@ -11,11 +11,11 @@
"astro": "astro"
},
"dependencies": {
- "@astrojs/markdown-remark": "^3.5.0",
- "astro": "^3.5.5",
- "hast-util-select": "^5.0.5",
- "rehype-autolink-headings": "^6.1.1",
- "rehype-slug": "^5.1.0",
+ "@astrojs/markdown-remark": "^4.0.0-beta.0",
+ "astro": "^4.0.0-beta.1",
+ "hast-util-select": "^6.0.2",
+ "rehype-autolink-headings": "^7.1.0",
+ "rehype-slug": "^6.0.0",
"rehype-toc": "^3.0.2",
"remark-code-titles": "^0.1.2"
}
diff --git a/examples/with-markdown-shiki/package.json b/examples/with-markdown-shiki/package.json
index f44759d761d9..ae0983a0e291 100644
--- a/examples/with-markdown-shiki/package.json
+++ b/examples/with-markdown-shiki/package.json
@@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^3.5.5"
+ "astro": "^4.0.0-beta.1"
}
}
diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json
index 13f77a46eded..882caf0425ac 100644
--- a/examples/with-mdx/package.json
+++ b/examples/with-mdx/package.json
@@ -11,9 +11,9 @@
"astro": "astro"
},
"dependencies": {
- "@astrojs/mdx": "^1.1.5",
+ "@astrojs/mdx": "^2.0.0-beta.0",
"@astrojs/preact": "^3.0.1",
- "astro": "^3.5.5",
- "preact": "^10.17.1"
+ "astro": "^4.0.0-beta.1",
+ "preact": "^10.19.2"
}
}
diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json
index 14ae5ab8d611..43a406b4db0f 100644
--- a/examples/with-nanostores/package.json
+++ b/examples/with-nanostores/package.json
@@ -13,8 +13,8 @@
"dependencies": {
"@astrojs/preact": "^3.0.1",
"@nanostores/preact": "^0.5.0",
- "astro": "^3.5.5",
- "nanostores": "^0.9.3",
- "preact": "^10.17.1"
+ "astro": "^4.0.0-beta.1",
+ "nanostores": "^0.9.5",
+ "preact": "^10.19.2"
}
}
diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json
index 3a3e83dd3e7c..8a7652b8d884 100644
--- a/examples/with-tailwindcss/package.json
+++ b/examples/with-tailwindcss/package.json
@@ -11,13 +11,13 @@
"astro": "astro"
},
"dependencies": {
- "@astrojs/mdx": "^1.1.5",
- "@astrojs/tailwind": "^5.0.2",
- "@types/canvas-confetti": "^1.6.0",
- "astro": "^3.5.5",
+ "@astrojs/mdx": "^2.0.0-beta.0",
+ "@astrojs/tailwind": "^6.0.0-beta.0",
+ "@types/canvas-confetti": "^1.6.3",
+ "astro": "^4.0.0-beta.1",
"autoprefixer": "^10.4.15",
- "canvas-confetti": "^1.6.0",
+ "canvas-confetti": "^1.9.1",
"postcss": "^8.4.28",
- "tailwindcss": "^3.3.3"
+ "tailwindcss": "^3.3.5"
}
}
diff --git a/examples/with-vite-plugin-pwa/package.json b/examples/with-vite-plugin-pwa/package.json
index adc9a8032c2c..939357b79791 100644
--- a/examples/with-vite-plugin-pwa/package.json
+++ b/examples/with-vite-plugin-pwa/package.json
@@ -11,8 +11,8 @@
"astro": "astro"
},
"dependencies": {
- "astro": "^3.5.5",
- "vite-plugin-pwa": "0.16.4",
+ "astro": "^4.0.0-beta.1",
+ "vite-plugin-pwa": "0.17.0",
"workbox-window": "^7.0.0"
}
}
diff --git a/examples/with-vitest/package.json b/examples/with-vitest/package.json
index 5259966bb9e7..950f19282bb0 100644
--- a/examples/with-vitest/package.json
+++ b/examples/with-vitest/package.json
@@ -12,7 +12,7 @@
"test": "vitest"
},
"dependencies": {
- "astro": "^3.5.5",
+ "astro": "^4.0.0-beta.1",
"vitest": "^0.34.2"
}
}
diff --git a/package.json b/package.json
index 8bf7dc459cb9..98bffa203deb 100644
--- a/package.json
+++ b/package.json
@@ -77,23 +77,23 @@
"astro-benchmark": "workspace:*"
},
"devDependencies": {
- "@astrojs/check": "^0.1.0",
+ "@astrojs/check": "^0.3.1",
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.2",
"@types/node": "^18.17.8",
- "@typescript-eslint/eslint-plugin": "^6.4.1",
- "@typescript-eslint/parser": "^6.4.1",
- "esbuild": "^0.19.2",
- "eslint": "^8.47.0",
+ "@typescript-eslint/eslint-plugin": "^6.11.0",
+ "@typescript-eslint/parser": "^6.11.0",
+ "esbuild": "^0.19.6",
+ "eslint": "^8.54.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-no-only-tests": "^3.1.0",
"eslint-plugin-prettier": "^5.0.0",
"only-allow": "^1.1.1",
"organize-imports-cli": "^0.10.0",
- "prettier": "^3.0.3",
- "prettier-plugin-astro": "^0.12.0",
+ "prettier": "^3.1.0",
+ "prettier-plugin-astro": "^0.12.2",
"tiny-glob": "^0.2.9",
"turbo": "^1.10.12",
- "typescript": "~5.1.6"
+ "typescript": "~5.2.2"
}
}
diff --git a/packages/astro-prism/package.json b/packages/astro-prism/package.json
index eae841073a2d..d62e819a8253 100644
--- a/packages/astro-prism/package.json
+++ b/packages/astro-prism/package.json
@@ -35,7 +35,7 @@
"prismjs": "^1.29.0"
},
"devDependencies": {
- "@types/prismjs": "1.26.0",
+ "@types/prismjs": "1.26.3",
"astro-scripts": "workspace:*"
},
"engines": {
diff --git a/packages/astro-rss/CHANGELOG.md b/packages/astro-rss/CHANGELOG.md
index 26e9c95d73c2..60327a088ea0 100644
--- a/packages/astro-rss/CHANGELOG.md
+++ b/packages/astro-rss/CHANGELOG.md
@@ -1,5 +1,11 @@
# @astrojs/rss
+## 4.0.0-beta.0
+
+### Major Changes
+
+- [#9168](https://github.com/withastro/astro/pull/9168) [`153a5abb9`](https://github.com/withastro/astro/commit/153a5abb905042ac68b712514dc9ec387d3e6b17) Thanks [@bluwy](https://github.com/bluwy)! - Removes the `drafts` option as the feature is deprecated in Astro 3.0
+
## 3.0.0
### Major Changes
diff --git a/packages/astro-rss/README.md b/packages/astro-rss/README.md
index 268f58f26690..c8485b02e3e8 100644
--- a/packages/astro-rss/README.md
+++ b/packages/astro-rss/README.md
@@ -28,7 +28,7 @@ Start by [adding a `site` to your project's `astro.config` for link generation](
import rss from '@astrojs/rss';
import { getCollection } from 'astro:content';
-export async function get(context) {
+export async function GET(context) {
const posts = await getCollection('blog');
return rss({
title: 'Buzz’s Blog',
@@ -55,7 +55,7 @@ Read **[Astro's RSS docs][astro-rss]** for more on using content collections, an
The `rss` default export offers a number of configuration options. Here's a quick reference:
```js
-export function get(context) {
+export function GET(context) {
return rss({
// `` field in output xml
title: 'Buzz’s Blog',
@@ -98,7 +98,7 @@ The base URL to use when generating RSS item links. We recommend using the [endp
```ts
import rss from '@astrojs/rss';
-export const get = (context) =>
+export const GET = (context) =>
rss({
site: context.site,
// ...
@@ -113,14 +113,6 @@ A list of formatted RSS feed items. See [Astro's RSS items documentation](https:
When providing a formatted RSS item list, see the [`RSSFeedItem` type reference](#rssfeeditem).
-### drafts
-
-Type: `boolean (optional)`
-
-**Deprecated**: Manually filter `items` instead.
-
-Set `drafts: true` to include [draft posts](https://docs.astro.build/en/guides/markdown-content/#draft-pages) in the feed output. By default, this option is `false` and draft posts are not included.
-
### stylesheet
Type: `string (optional)`
@@ -136,7 +128,7 @@ A string of valid XML to be injected between your feed's `` and ` rss({
+export const GET = () => rss({
...
customData: 'en-us',
});
@@ -181,7 +173,7 @@ By default, the library will add trailing slashes to the emitted URLs. To preven
```js
import rss from '@astrojs/rss';
-export const get = () =>
+export const GET = () =>
rss({
trailingSlash: false,
});
@@ -361,7 +353,7 @@ This function assumes, but does not verify, you are globbing for items inside `s
// src/pages/rss.xml.js
import rss, { pagesGlobToRssItems } from '@astrojs/rss';
-export async function get(context) {
+export async function GET(context) {
return rss({
title: 'Buzz’s Blog',
description: 'A humble Astronaut’s guide to the stars',
@@ -379,7 +371,7 @@ As `rss()` returns a `Response`, you can also use `getRssString()` to get the RS
// src/pages/rss.xml.js
import { getRssString } from '@astrojs/rss';
-export async function get(context) {
+export async function GET(context) {
const rssString = await getRssString({
title: 'Buzz’s Blog',
...
diff --git a/packages/astro-rss/package.json b/packages/astro-rss/package.json
index c200e6c5942a..86df612b7707 100644
--- a/packages/astro-rss/package.json
+++ b/packages/astro-rss/package.json
@@ -1,7 +1,7 @@
{
"name": "@astrojs/rss",
"description": "Add RSS feeds to your Astro projects",
- "version": "3.0.0",
+ "version": "4.0.0-beta.0",
"type": "module",
"types": "./dist/index.d.ts",
"author": "withastro",
@@ -27,9 +27,9 @@
"test": "mocha --exit --timeout 20000"
},
"devDependencies": {
- "@types/chai": "^4.3.5",
- "@types/chai-as-promised": "^7.1.5",
- "@types/mocha": "^10.0.1",
+ "@types/chai": "^4.3.10",
+ "@types/chai-as-promised": "^7.1.8",
+ "@types/mocha": "^10.0.4",
"astro": "workspace:*",
"astro-scripts": "workspace:*",
"chai": "^4.3.7",
diff --git a/packages/astro-rss/src/index.ts b/packages/astro-rss/src/index.ts
index a611afc1637d..48c5defe855c 100644
--- a/packages/astro-rss/src/index.ts
+++ b/packages/astro-rss/src/index.ts
@@ -27,11 +27,6 @@ export type RSSOptions = {
stylesheet?: z.infer['stylesheet'];
/** Specify custom data in opening of file */
customData?: z.infer['customData'];
- /**
- * Whether to include drafts or not
- * @deprecated Deprecated since version 3.0. Use content collections instead.
- */
- drafts?: z.infer['drafts'];
trailingSlash?: z.infer['trailingSlash'];
};
@@ -48,11 +43,6 @@ export type RSSFeedItem = {
description?: z.infer['description'];
/** Append some other XML-valid data to this item */
customData?: z.infer['customData'];
- /**
- * Whether draft or not
- * @deprecated Deprecated since version 3.0. Use content collections instead.
- */
- draft?: z.infer['draft'];
/** Categories or tags related to the item */
categories?: z.infer['categories'];
/** The item author's email address */
@@ -92,7 +82,6 @@ const rssOptionsValidator = z.object({
return items;
}),
xmlns: z.record(z.string()).optional(),
- drafts: z.boolean().default(false),
stylesheet: z.union([z.string(), z.boolean()]).optional(),
customData: z.string().optional(),
trailingSlash: z.boolean().default(true),
@@ -159,10 +148,7 @@ export function pagesGlobToRssItems(items: GlobResult): Promise {
- const { site } = rssOptions;
- const items = rssOptions.drafts
- ? rssOptions.items
- : rssOptions.items.filter((item) => !item.draft);
+ const { items, site } = rssOptions;
const xmlOptions = {
ignoreAttributes: false,
diff --git a/packages/astro-rss/src/schema.ts b/packages/astro-rss/src/schema.ts
index eb15ecd58409..98aa35f81212 100644
--- a/packages/astro-rss/src/schema.ts
+++ b/packages/astro-rss/src/schema.ts
@@ -8,7 +8,6 @@ export const rssSchema = z.object({
.refine((value) => !isNaN(value.getTime())),
description: z.string().optional(),
customData: z.string().optional(),
- draft: z.boolean().optional(),
categories: z.array(z.string()).optional(),
author: z.string().optional(),
commentsUrl: z.string().optional(),
diff --git a/packages/astro-rss/test/rss.test.js b/packages/astro-rss/test/rss.test.js
index 5dfb48b32adf..cc7bff82b2ed 100644
--- a/packages/astro-rss/test/rss.test.js
+++ b/packages/astro-rss/test/rss.test.js
@@ -156,36 +156,12 @@ describe('getRssString', () => {
chai.expect(str).to.contain(customData);
});
- it('should filter out entries marked as `draft`', async () => {
- const str = await getRssString({
- title,
- description,
- items: [phpFeedItem, { ...web1FeedItem, draft: true }],
- site,
- });
-
- chai.expect(str).xml.to.equal(validXmlWithoutWeb1FeedResult);
- });
-
- it('should respect drafts option', async () => {
- const str = await getRssString({
- title,
- description,
- items: [phpFeedItem, { ...web1FeedItem, draft: true }],
- site,
- drafts: true,
- });
-
- chai.expect(str).xml.to.equal(validXmlResult);
- });
-
it('should not append trailing slash to URLs with the given option', async () => {
const str = await getRssString({
title,
description,
- items: [phpFeedItem, { ...web1FeedItem, draft: true }],
+ items: [phpFeedItem],
site,
- drafts: true,
trailingSlash: false,
});
diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md
index a3061833944f..d698935e2bff 100644
--- a/packages/astro/CHANGELOG.md
+++ b/packages/astro/CHANGELOG.md
@@ -1,5 +1,134 @@
# astro
+## 4.0.0-beta.1
+
+### Patch Changes
+
+- [#9118](https://github.com/withastro/astro/pull/9118) [`000e8f465`](https://github.com/withastro/astro/commit/000e8f4654cae9982e21e0a858366c4844139db6) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Redesign Dev Overlay main screen to show more information, such as the coolest integrations, your current Astro version and more.
+
+- [#9118](https://github.com/withastro/astro/pull/9118) [`000e8f465`](https://github.com/withastro/astro/commit/000e8f4654cae9982e21e0a858366c4844139db6) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Fixes an issue where links with the same pathname as the current page, but different search params, were not prefetched.
+
+## 4.0.0-beta.0
+
+### Major Changes
+
+- [#9138](https://github.com/withastro/astro/pull/9138) [`abf601233`](https://github.com/withastro/astro/commit/abf601233f8188d118a8cb063c777478d8d9f1a3) Thanks [@bluwy](https://github.com/bluwy)! - Updates the unified, remark, and rehype dependencies to latest. Make sure to update your custom remark and rehype plugins as well to be compatible with the latest versions.
+
+ **Potentially breaking change:** The default value of `markdown.remarkRehype.footnoteBackLabel` is changed from `"Back to content"` to `"Back to reference 1"`. See the `mdast-util-to-hast` [commit](https://github.com/syntax-tree/mdast-util-to-hast/commit/56c88e45690be138fad9f0bf367b939d09816863) for more information.
+
+- [#9181](https://github.com/withastro/astro/pull/9181) [`cdabf6ef0`](https://github.com/withastro/astro/commit/cdabf6ef02be7220fd2b6bdcef924ceca089381e) Thanks [@bluwy](https://github.com/bluwy)! - Removes support for returning simple objects from endpoints (deprecated since Astro 3.0). You should return a `Response` instead.
+
+ `ResponseWithEncoding` is also removed. You can refactor the code to return a response with an array buffer instead, which is encoding agnostic.
+
+ The types for middlewares have also been revised. To type a middleware function, you should now use `MiddlewareHandler` instead of `MiddlewareResponseHandler`. If you used `defineMiddleware()` to type the function, no changes are needed.
+
+- [#9122](https://github.com/withastro/astro/pull/9122) [`1c48ed286`](https://github.com/withastro/astro/commit/1c48ed286538ab9e354eca4e4dcd7c6385c96721) Thanks [@bluwy](https://github.com/bluwy)! - Adds Vite 5 support. There are no breaking changes from Astro. Check the [Vite migration guide](https://vitejs.dev/guide/migration.html) for details of the breaking changes from Vite instead.
+
+- [#9196](https://github.com/withastro/astro/pull/9196) [`37697a2c5`](https://github.com/withastro/astro/commit/37697a2c5511572dc29c0a4ea46f90c2f62be8e6) Thanks [@bluwy](https://github.com/bluwy)! - Removes support for Shiki custom language's `path` property. The language JSON file should be imported and passed to the option instead.
+
+ ```diff
+ // astro.config.js
+ + import customLang from './custom.tmLanguage.json'
+
+ export default defineConfig({
+ markdown: {
+ shikiConfig: {
+ langs: [
+ - { path: './custom.tmLanguage.json' },
+ + customLang,
+ ],
+ },
+ },
+ })
+ ```
+
+- [#9168](https://github.com/withastro/astro/pull/9168) [`153a5abb9`](https://github.com/withastro/astro/commit/153a5abb905042ac68b712514dc9ec387d3e6b17) Thanks [@bluwy](https://github.com/bluwy)! - Removes deprecated features from Astro 3.0
+
+ - Adapters are now required to pass `supportedAstroFeatures` to specify a list of features they support.
+ - The `build.split` and `build.excludeMiddleware` options are removed. Use `functionPerRoute` and `edgeMiddleware` from adapters instead.
+ - The `markdown.drafts` option and draft feature is removed. Use content collections instead.
+ - Lowercase endpoint names are no longer supported. Use uppercase endpoint names instead.
+ - `getHeaders()` exported from markdown files is removed. Use `getHeadings()` instead.
+
+### Minor Changes
+
+- [#9105](https://github.com/withastro/astro/pull/9105) [`6201bbe96`](https://github.com/withastro/astro/commit/6201bbe96c2a083fb201e4a43a9bd88499821a3e) Thanks [@FredKSchott](https://github.com/FredKSchott)! - Update CLI logging experience
+
+- [#9161](https://github.com/withastro/astro/pull/9161) [`bd0c2e9ae`](https://github.com/withastro/astro/commit/bd0c2e9ae3389a9d3085050c1e8134ae98dff299) Thanks [@bluwy](https://github.com/bluwy)! - Renames the `entryPoint` property of the `injectRoute` integrations API to `entrypoint` for consistency. A warning will be shown prompting you to update your code when using the old name.
+
+### Patch Changes
+
+- [#9149](https://github.com/withastro/astro/pull/9149) [`0fe3a7ed5`](https://github.com/withastro/astro/commit/0fe3a7ed5d7bb1a9fce1623e84ba14104b51223c) Thanks [@bluwy](https://github.com/bluwy)! - Removes vendored Vite's `importMeta.d.ts` file in favour of Vite 5's new `vite/types/import-meta.d.ts` export
+
+- [#9150](https://github.com/withastro/astro/pull/9150) [`710be505c`](https://github.com/withastro/astro/commit/710be505c9ddf416e77a75343d8cae9c497d72c6) Thanks [@bluwy](https://github.com/bluwy)! - Refactors virtual modules exports. This should not break your project unless you import Astro's internal modules, including:
+
+ - `astro/middleware/namespace`
+ - `astro/transitions`
+ - `astro/transitions/router`
+ - `astro/transitions/events`
+ - `astro/transitions/types`
+ - `astro/prefetch`
+ - `astro/i18n`
+
+- Updated dependencies [[`abf601233`](https://github.com/withastro/astro/commit/abf601233f8188d118a8cb063c777478d8d9f1a3), [`addb57c8e`](https://github.com/withastro/astro/commit/addb57c8e80b7b67ec61224666f3a1db5c44410c), [`c7953645e`](https://github.com/withastro/astro/commit/c7953645eeaaf9e87c6db4494b0023d2c1878ff0)]:
+ - @astrojs/markdown-remark@4.0.0-beta.0
+
+## 3.6.1
+
+### Patch Changes
+
+- [#9173](https://github.com/withastro/astro/pull/9173) [`04fdc1c61`](https://github.com/withastro/astro/commit/04fdc1c613171409ed1a2bd887326e26cdb8b5ef) Thanks [@lilnasy](https://github.com/lilnasy)! - Fixes an issue where having a middleware prevented the SSR app from being deployed on Netlify.
+
+- [#9186](https://github.com/withastro/astro/pull/9186) [`607542c7c`](https://github.com/withastro/astro/commit/607542c7cf9fe9813c06f1d96615d6c793262d22) Thanks [@martrapp](https://github.com/martrapp)! - Fixes a view transition issue on webKit browsers that prevented scrolling to #fragments
+
+## 3.6.0
+
+### Minor Changes
+
+- [#9090](https://github.com/withastro/astro/pull/9090) [`c87223c21`](https://github.com/withastro/astro/commit/c87223c21ab5d515fb8f04ee10be5c0ca51e0b29) Thanks [@martrapp](https://github.com/martrapp)! - Take full control over the behavior of view transitions!
+
+ Three new events now complement the existing `astro:after-swap` and `astro:page-load` events:
+
+ ```javascript
+ 'astro:before-preparation'; // Control how the DOM and other resources of the target page are loaded
+ 'astro:after-preparation'; // Last changes before taking off? Remove that loading indicator? Here you go!
+ 'astro:before-swap'; // Control how the DOM is updated to match the new page
+ ```
+
+ The `astro:before-*` events allow you to change properties and strategies of the view transition implementation.
+ The `astro:after-*` events are notifications that a phase is complete.
+ Head over to docs to see [the full view transitions lifecycle](https://docs.astro.build/en/guides/view-transitions/#lifecycle-events) including these new events!
+
+- [#9092](https://github.com/withastro/astro/pull/9092) [`0ea4bd47e`](https://github.com/withastro/astro/commit/0ea4bd47e0d7cc98c43568a55aa87da772bd2e0a) Thanks [@smitbarmase](https://github.com/smitbarmase)! - Changes the fallback prefetch behavior on slow connections and when data saver mode is enabled. Instead of disabling prefetch entirely, the `tap` strategy will be used.
+
+- [#9166](https://github.com/withastro/astro/pull/9166) [`cba6cf32d`](https://github.com/withastro/astro/commit/cba6cf32d9bf1f5c3268808f185a4824d6fbd7f4) Thanks [@matthewp](https://github.com/matthewp)! - The Picture component is no longer experimental
+
+ The `` component, part of `astro:assets`, has exited experimental status and is now recommended for use. There are no code changes to the component, and no upgrade to your project is necessary.
+
+ This is only a change in documentation/recommendation. If you were waiting to use the `` component until it had exited the experimental stage, wait no more!
+
+- [#9092](https://github.com/withastro/astro/pull/9092) [`0ea4bd47e`](https://github.com/withastro/astro/commit/0ea4bd47e0d7cc98c43568a55aa87da772bd2e0a) Thanks [@smitbarmase](https://github.com/smitbarmase)! - Adds a `ignoreSlowConnection` option to the `prefetch()` API to prefetch even on data saver mode or slow connection.
+
+## 3.5.7
+
+### Patch Changes
+
+- [#9157](https://github.com/withastro/astro/pull/9157) [`7ff8d62bf`](https://github.com/withastro/astro/commit/7ff8d62bf861694067491ff17d01b1b0f6809d6b) Thanks [@ematipico](https://github.com/ematipico)! - Revert fix around fallback system, which broken injected styles
+
+## 3.5.6
+
+### Patch Changes
+
+- [#9121](https://github.com/withastro/astro/pull/9121) [`f4efd1c80`](https://github.com/withastro/astro/commit/f4efd1c808476c7e60fe00fcfb86276cf14fee79) Thanks [@peng](https://github.com/peng)! - Adds a warning if `astro add` fetches a package but returns a non-404 status
+
+- [#9142](https://github.com/withastro/astro/pull/9142) [`7d55cf68d`](https://github.com/withastro/astro/commit/7d55cf68d89cb46bfb89a109b09af61be8431c89) Thanks [@ematipico](https://github.com/ematipico)! - Consistely emit fallback routes in the correct folders.
+
+- [#9119](https://github.com/withastro/astro/pull/9119) [`306781795`](https://github.com/withastro/astro/commit/306781795d5f4b755bbdf650a937f1f3c00030bd) Thanks [@ematipico](https://github.com/ematipico)! - Fix a flaw in the i18n fallback logic, where the routes didn't preserve their metadata, such as hoisted scripts
+
+- [#9140](https://github.com/withastro/astro/pull/9140) [`7742fd7dc`](https://github.com/withastro/astro/commit/7742fd7dc26533c6f7cd497b00b72de935c57628) Thanks [@martrapp](https://github.com/martrapp)! - View Transitions: handle clicks on SVGAElements and image maps"
+
+- [#9101](https://github.com/withastro/astro/pull/9101) [`e3dce215a`](https://github.com/withastro/astro/commit/e3dce215a5ea06bcff1b21027e5613e6518c69d4) Thanks [@ematipico](https://github.com/ematipico)! - Add a new property `Astro.currentLocale`, available when `i18n` is enabled.
+
## 3.5.5
### Patch Changes
diff --git a/packages/astro/client.d.ts b/packages/astro/client.d.ts
index f2af4a88c0a1..c3a7652ecec6 100644
--- a/packages/astro/client.d.ts
+++ b/packages/astro/client.d.ts
@@ -1,4 +1,4 @@
-///
+///
// eslint-disable-next-line @typescript-eslint/no-namespace
declare namespace App {
@@ -106,33 +106,55 @@ declare module '*.avif' {
}
declare module 'astro:transitions' {
- type TransitionModule = typeof import('./dist/transitions/index.js');
+ type TransitionModule = typeof import('./dist/virtual-modules/transitions.js');
export const slide: TransitionModule['slide'];
export const fade: TransitionModule['fade'];
+ export const createAnimationScope: TransitionModule['createAnimationScope'];
type ViewTransitionsModule = typeof import('./components/ViewTransitions.astro');
export const ViewTransitions: ViewTransitionsModule['default'];
}
declare module 'astro:transitions/client' {
- type TransitionRouterModule = typeof import('./dist/transitions/router.js');
- export const supportsViewTransitions: TransitionRouterModule['supportsViewTransitions'];
- export const transitionEnabledOnThisPage: TransitionRouterModule['transitionEnabledOnThisPage'];
+ type TransitionRouterModule = typeof import('./dist/virtual-modules/transitions-router.js');
export const navigate: TransitionRouterModule['navigate'];
- export type Options = import('./dist/transitions/router.js').Options;
+
+ type TransitionUtilModule = typeof import('./dist/virtual-modules/transitions-util.js');
+ export const supportsViewTransitions: TransitionUtilModule['supportsViewTransitions'];
+ export const getFallback: TransitionUtilModule['getFallback'];
+ export const transitionEnabledOnThisPage: TransitionUtilModule['transitionEnabledOnThisPage'];
+
+ export type Fallback = import('./dist/virtual-modules/transitions-types.js').Fallback;
+ export type Direction = import('./dist/virtual-modules/transitions-types.ts').Direction;
+ export type NavigationTypeString =
+ import('./dist/virtual-modules/transitions-types.js').NavigationTypeString;
+ export type Options = import('./dist/virtual-modules/transitions-types.js').Options;
+
+ type EventModule = typeof import('./dist/virtual-modules/transitions-events.js');
+ export const TRANSITION_BEFORE_PREPARATION: EventModule['TRANSITION_BEFORE_PREPARATION'];
+ export const TRANSITION_AFTER_PREPARATION: EventModule['TRANSITION_AFTER_PREPARATION'];
+ export const TRANSITION_BEFORE_SWAP: EventModule['TRANSITION_BEFORE_SWAP'];
+ export const TRANSITION_AFTER_SWAP: EventModule['TRANSITION_AFTER_SWAP'];
+ export const TRANSITION_PAGE_LOAD: EventModule['TRANSITION_PAGE_LOAD'];
+ export type TransitionBeforePreparationEvent =
+ import('./dist/virtual-modules/transitions-events.js').TransitionBeforePreparationEvent;
+ export type TransitionBeforeSwapEvent =
+ import('./dist/virtual-modules/transitions-events.js').TransitionBeforeSwapEvent;
+ export const isTransitionBeforePreparationEvent: EventModule['isTransitionBeforePreparationEvent'];
+ export const isTransitionBeforeSwapEvent: EventModule['isTransitionBeforeSwapEvent'];
}
declare module 'astro:prefetch' {
- export { prefetch, PrefetchOptions } from 'astro/prefetch';
+ export { prefetch, PrefetchOptions } from 'astro/virtual-modules/prefetch.js';
}
declare module 'astro:i18n' {
- export type GetLocaleOptions = import('./dist/i18n/index.js').GetLocaleOptions;
+ export type GetLocaleOptions = import('./dist/virtual-modules/i18n.js').GetLocaleOptions;
/**
* @param {string} locale A locale
* @param {string} [path=""] An optional path to add after the `locale`.
- * @param {import('./dist/i18n/index.js').GetLocaleOptions} options Customise the generated path
+ * @param {import('./dist/virtual-modules/i18n.js').GetLocaleOptions} options Customise the generated path
* @return {string}
*
* Returns a _relative_ path with passed locale.
@@ -161,7 +183,7 @@ declare module 'astro:i18n' {
*
* @param {string} locale A locale
* @param {string} [path=""] An optional path to add after the `locale`.
- * @param {import('./dist/i18n/index.js').GetLocaleOptions} options Customise the generated path
+ * @param {import('./dist/virtual-modules/i18n.js').GetLocaleOptions} options Customise the generated path
* @return {string}
*
* Returns an absolute path with the passed locale. The behaviour is subject to change based on `site` configuration.
@@ -191,7 +213,7 @@ declare module 'astro:i18n' {
/**
* @param {string} [path=""] An optional path to add after the `locale`.
- * @param {import('./dist/i18n/index.js').GetLocaleOptions} options Customise the generated path
+ * @param {import('./dist/virtual-modules/i18n.js').GetLocaleOptions} options Customise the generated path
* @return {string[]}
*
* Works like `getRelativeLocaleUrl` but it emits the relative URLs for ALL locales:
@@ -199,7 +221,7 @@ declare module 'astro:i18n' {
export const getRelativeLocaleUrlList: (path?: string, options?: GetLocaleOptions) => string[];
/**
* @param {string} [path=""] An optional path to add after the `locale`.
- * @param {import('./dist/i18n/index.js').GetLocaleOptions} options Customise the generated path
+ * @param {import('./dist/virtual-modules/i18n.js').GetLocaleOptions} options Customise the generated path
* @return {string[]}
*
* Works like `getAbsoluteLocaleUrl` but it emits the absolute URLs for ALL locales:
@@ -208,7 +230,7 @@ declare module 'astro:i18n' {
}
declare module 'astro:middleware' {
- export * from 'astro/middleware/namespace';
+ export * from 'astro/virtual-modules/middleware.js';
}
declare module 'astro:components' {
@@ -221,8 +243,6 @@ interface ExportedMarkdownModuleEntities {
file: MD['file'];
url: MD['url'];
getHeadings: MD['getHeadings'];
- /** @deprecated Renamed to `getHeadings()` */
- getHeaders: () => void;
Content: MD['Content'];
rawContent: MD['rawContent'];
compiledContent: MD['compiledContent'];
diff --git a/packages/astro/components/Code.astro b/packages/astro/components/Code.astro
index 506a3ed3c0d1..93da72add710 100644
--- a/packages/astro/components/Code.astro
+++ b/packages/astro/components/Code.astro
@@ -1,7 +1,4 @@
---
-import path from 'node:path';
-import fs from 'node:fs';
-import { fileURLToPath } from 'node:url';
import type {
BuiltinLanguage,
BuiltinTheme,
@@ -64,23 +61,6 @@ const {
// shiki -> shikiji compat
if (typeof lang === 'object') {
- // shikiji does not support `path`
- // https://github.com/shikijs/shiki/blob/facb6ff37996129626f8066a5dccb4608e45f649/packages/shiki/src/loader.ts#L98
- const langPath = (lang as any).path;
- if (langPath) {
- // shiki resolves path from within its package directory :shrug:
- const astroRoot = fileURLToPath(new URL('../', import.meta.url));
- const normalizedPath = path.isAbsolute(langPath) ? langPath : path.resolve(astroRoot, langPath);
- try {
- const content = fs.readFileSync(normalizedPath, 'utf-8');
- const parsed = JSON.parse(content);
- Object.assign(lang, parsed);
- } catch (e) {
- throw new Error(`Unable to find language file at ${normalizedPath}`, {
- cause: e,
- });
- }
- }
// `id` renamed to `name` (always override)
if ((lang as any).id) {
lang.name = (lang as any).id;
diff --git a/packages/astro/components/ViewTransitions.astro b/packages/astro/components/ViewTransitions.astro
index 089d8d8e554e..934ae650f39a 100644
--- a/packages/astro/components/ViewTransitions.astro
+++ b/packages/astro/components/ViewTransitions.astro
@@ -3,10 +3,14 @@ type Fallback = 'none' | 'animate' | 'swap';
export interface Props {
fallback?: Fallback;
+ /** @deprecated handleForms is enabled by default in Astro 4.0
+ *
+ * Set `data-astro-reload` on your form to opt-out of the default behavior.
+ */
handleForms?: boolean;
}
-const { fallback = 'animate', handleForms } = Astro.props;
+const { fallback = 'animate' } = Astro.props;
---
-{handleForms ? : ''}
Hello