Skip to content

Commit

Permalink
Merge pull request #9247 from withastro/next
Browse files Browse the repository at this point in the history
Merge the `next` branch into `main` for the 4.0 release
  • Loading branch information
matthewp committed Nov 30, 2023
2 parents ff8eadb + 05628aa commit fbf145a
Show file tree
Hide file tree
Showing 408 changed files with 7,823 additions and 5,424 deletions.
5 changes: 5 additions & 0 deletions .changeset/angry-swans-fry.md
Original file line number Diff line number Diff line change
@@ -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.
9 changes: 9 additions & 0 deletions .changeset/beige-jokes-report.md
Original file line number Diff line number Diff line change
@@ -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.
6 changes: 6 additions & 0 deletions .changeset/big-cooks-notice.md
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 5 additions & 0 deletions .changeset/brown-jars-lick.md
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 5 additions & 0 deletions .changeset/calm-baboons-watch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': minor
---

Update CLI logging experience
9 changes: 9 additions & 0 deletions .changeset/clever-beds-notice.md
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 5 additions & 0 deletions .changeset/famous-eels-trade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Ensure the dev-overlay-window is anchored to the bottom
17 changes: 17 additions & 0 deletions .changeset/gentle-cobras-wash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
'astro': minor
---

Adds the `astro preferences` command to manage user preferences. User preferences are specific to individual Astro users, unlike the `astro.config.mjs` file which changes behavior for everyone working on a project.

User preferences are scoped to the current project by default, stored in a local `.astro/settings.json` file. Using the `--global` flag, user preferences can also be applied to every Astro project on the current machine. Global user preferences are stored in an operating system-specific location.

```sh
# Disable the dev overlay for the current user in the current project
npm run astro preferences disable devOverlay
# Disable the dev overlay for the current user in all Astro projects on this machine
npm run astro preferences --global disable devOverlay

# Check if the dev overlay is enabled for the current user
npm run astro preferences list devOverlay
```
5 changes: 5 additions & 0 deletions .changeset/giant-snails-perform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/vercel': major
---

Removes deprecated `analytics` option. Use the `webAnalytics` option instead.
5 changes: 5 additions & 0 deletions .changeset/green-impalas-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fix SVG icons not showing properly in the extended dropdown menu of the dev overlay
5 changes: 5 additions & 0 deletions .changeset/grumpy-seas-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Improve high contrast mode with the Dev Overlay
5 changes: 5 additions & 0 deletions .changeset/khaki-fans-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/markdown-remark': patch
---

Fixes `RemarkRehype` type's `handler` and `handlers` properties
8 changes: 8 additions & 0 deletions .changeset/light-ties-poke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@astrojs/svelte': major
'@astrojs/react': patch
'@astrojs/vue': patch
'astro': major
---

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.
5 changes: 5 additions & 0 deletions .changeset/mighty-rats-flow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Update the look and feel of the dev overlay
5 changes: 5 additions & 0 deletions .changeset/modern-candles-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-astro': patch
---

Stop clearing the console on start
5 changes: 5 additions & 0 deletions .changeset/odd-rivers-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': major
---

Removes the opt-in `handleForms` property for `<ViewTransitions />`. Form submissions are now handled by default and can be disabled by setting `data-astro-reload` on relevant `<form />` elements.
21 changes: 21 additions & 0 deletions .changeset/plenty-candles-help.md
Original file line number Diff line number Diff line change
@@ -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,
],
},
},
})
```
62 changes: 62 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"mode": "pre",
"tag": "beta",
"initialVersions": {
"astro": "3.5.5",
"@astrojs/prism": "3.0.0",
"@astrojs/rss": "3.0.0",
"create-astro": "4.5.1",
"@astrojs/alpinejs": "0.3.1",
"@astrojs/cloudflare": "0.0.0",
"@astrojs/lit": "3.0.3",
"@astrojs/markdoc": "0.7.2",
"@astrojs/mdx": "1.1.5",
"@astrojs/netlify": "0.0.0",
"@astrojs/node": "6.0.4",
"@astrojs/partytown": "2.0.2",
"@astrojs/preact": "3.0.1",
"@astrojs/prefetch": "0.4.1",
"@astrojs/react": "3.0.5",
"@astrojs/sitemap": "3.0.3",
"@astrojs/solid-js": "3.0.2",
"@astrojs/svelte": "4.0.4",
"@astrojs/tailwind": "5.0.2",
"@astrojs/vercel": "5.2.0",
"@astrojs/vue": "3.0.4",
"@astrojs/internal-helpers": "0.2.1",
"@astrojs/markdown-remark": "3.5.0",
"@astrojs/telemetry": "3.0.4",
"@astrojs/underscore-redirects": "0.3.3",
"@astrojs/upgrade": "0.0.1"
},
"changesets": [
"angry-swans-fry",
"beige-jokes-report",
"big-cooks-notice",
"brown-jars-lick",
"calm-baboons-watch",
"clever-beds-notice",
"famous-eels-trade",
"gentle-cobras-wash",
"giant-snails-perform",
"grumpy-seas-switch",
"khaki-fans-sell",
"light-ties-poke",
"modern-candles-sip",
"odd-rivers-happen",
"plenty-candles-help",
"rude-hairs-whisper",
"sharp-starfishes-compete",
"shiny-trees-sip",
"short-deers-whisper",
"slow-hornets-try",
"sour-games-burn",
"spicy-starfishes-shake",
"tasty-dryers-bathe",
"three-chairs-sip",
"tricky-dragons-explain",
"weak-wolves-bow",
"wicked-sloths-develop",
"wild-apricots-rescue"
]
}
5 changes: 5 additions & 0 deletions .changeset/rude-hairs-whisper.md
Original file line number Diff line number Diff line change
@@ -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.
20 changes: 20 additions & 0 deletions .changeset/sharp-starfishes-compete.md
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 5 additions & 0 deletions .changeset/shiny-trees-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/markdown-remark': major
---

Removes deprecated APIs. All Astro packages had been refactored to not use these APIs.
5 changes: 5 additions & 0 deletions .changeset/short-deers-whisper.md
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions .changeset/slow-hornets-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/rss': major
---

Removes the `drafts` option as the feature is deprecated in Astro 3.0
13 changes: 13 additions & 0 deletions .changeset/sour-games-burn.md
Original file line number Diff line number Diff line change
@@ -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`
5 changes: 5 additions & 0 deletions .changeset/spicy-starfishes-shake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Ensure overlay x-ray z-index is higher than the island
27 changes: 27 additions & 0 deletions .changeset/tasty-dryers-bathe.md
Original file line number Diff line number Diff line change
@@ -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
```
5 changes: 5 additions & 0 deletions .changeset/three-chairs-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': minor
---

Update error log formatting
5 changes: 5 additions & 0 deletions .changeset/tricky-dragons-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fixes a number of small user experience bugs with the dev overlay
5 changes: 5 additions & 0 deletions .changeset/weak-wolves-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': major
---

Removes deprecated `app.match()` option, `matchNotFound`
11 changes: 11 additions & 0 deletions .changeset/wicked-sloths-develop.md
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 5 additions & 0 deletions .changeset/wild-apricots-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/svelte': major
---

Drops support for Svelte 3 as `@sveltejs/vite-plugin-svelte` is updated to `3.0.0` which does not support Svelte 3
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ If you have gotten permission from the core contributors, you can enter into pre
- Run: `pnpm exec changeset pre enter next` in the project root
- Create a new PR from the changes created by this command
- Review, approve, and more the PR to enter prerelease mode.
- If successful, The "Version Packages" PR (if one exists) will now say "Version Packages (next)".
- If successful, The "[ci] release" PR (if one exists) will now say "[ci] release (next)".

### Exiting prerelease mode

Expand All @@ -257,7 +257,7 @@ Exiting prerelease mode should happen once an experimental release is ready to g
- Run: `pnpm exec changeset pre exit` in the project root
- Create a new PR from the changes created by this command.
- Review, approve, and more the PR to enter prerelease mode.
- If successful, The "Version Packages (next)" PR (if one exists) will now say "Version Packages".
- If successful, The "[ci] release (next)" PR (if one exists) will now say "[ci] release".

### Releasing `astro@latest` while in prerelease mode

Expand Down
2 changes: 1 addition & 1 deletion benchmark/packages/timer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"astro": "workspace:*"
},
"devDependencies": {
"@types/server-destroy": "^1.0.1",
"@types/server-destroy": "^1.0.3",
"astro": "workspace:*",
"astro-scripts": "workspace:*"
}
Expand Down
1 change: 1 addition & 0 deletions benchmark/packages/timer/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export function getAdapter(): AstroAdapter {
serverEntrypoint: '@benchmark/timer/server.js',
previewEntrypoint: '@benchmark/timer/preview.js',
exports: ['handler'],
supportedAstroFeatures: {},
};
}

Expand Down
2 changes: 1 addition & 1 deletion examples/basics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^3.6.4"
"astro": "^4.0.0-beta.2"
}
}
6 changes: 3 additions & 3 deletions examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.6.4"
"astro": "^4.0.0-beta.2"
}
}
2 changes: 1 addition & 1 deletion examples/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^3.6.4"
"astro": "^4.0.0-beta.2"
},
"peerDependencies": {
"astro": "^3.0.0"
Expand Down
Loading

0 comments on commit fbf145a

Please sign in to comment.