Merge remote-tracking branch 'origin/main' into next
This commit is contained in:
commit
d43ca69c1d
21 changed files with 146 additions and 99 deletions
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
'@astrojs/svelte': patch
|
||||
---
|
||||
|
||||
Filter unknown `class` prop warnings
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
'create-astro': patch
|
||||
---
|
||||
|
||||
Update 'dev' command for Bun users
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Ensure dotfiles are cleaned during static builds
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
'@astrojs/vercel': patch
|
||||
---
|
||||
|
||||
Update image support to work with latest version of Astro
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
"astro": patch
|
||||
---
|
||||
|
||||
Fix a handful of edge cases with prerendered 404/500 pages
|
5
.changeset/many-ears-drum.md
Normal file
5
.changeset/many-ears-drum.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Fix missing type for `imageConfig` export from `astro:assets`
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
'@astrojs/solid-js': patch
|
||||
---
|
||||
|
||||
Update `babel-preset-solid` dependency to `^1.7.7`
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
ViewTransition: bug fix for lost scroll position in browser history
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
'create-astro': patch
|
||||
---
|
||||
|
||||
Verify internet connection and that `--template` exists before continuing
|
|
@ -1,27 +0,0 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Added support for optimizing remote images from authorized sources when using `astro:assets`. This comes with two new parameters to specify which domains (`image.domains`) and host patterns (`image.remotePatterns`) are authorized for remote images.
|
||||
|
||||
For example, the following configuration will only allow remote images from `astro.build` to be optimized:
|
||||
|
||||
```ts
|
||||
// astro.config.mjs
|
||||
export default defineConfig({
|
||||
image: {
|
||||
domains: ["astro.build"],
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
The following configuration will only allow remote images from HTTPS hosts:
|
||||
|
||||
```ts
|
||||
// astro.config.mjs
|
||||
export default defineConfig({
|
||||
image: {
|
||||
remotePatterns: [{ protocol: "https" }],
|
||||
}
|
||||
});
|
||||
```
|
|
@ -1,21 +0,0 @@
|
|||
---
|
||||
'@astrojs/react': minor
|
||||
---
|
||||
|
||||
Optionally parse React slots as React children.
|
||||
|
||||
This adds a new configuration option for the React integration `experimentalReactChildren`:
|
||||
|
||||
```js
|
||||
export default {
|
||||
integrations: [
|
||||
react({
|
||||
experimentalReactChildren: true,
|
||||
})
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
With this enabled, children passed to React from Astro components via the default slot are parsed as React components.
|
||||
|
||||
This enables better compatibility with certain React components which manipulate their children.
|
|
@ -477,6 +477,62 @@
|
|||
- @astrojs/internal-helpers@0.2.0-beta.0
|
||||
- @astrojs/markdown-remark@3.0.0-beta.0
|
||||
|
||||
## 2.10.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#8144](https://github.com/withastro/astro/pull/8144) [`04caa99c4`](https://github.com/withastro/astro/commit/04caa99c48ce604ca3b90302ff0df8dcdbeee650) Thanks [@lilnasy](https://github.com/lilnasy)! - Fixed an issue where data entries' id included backslashes instead of forward slashes on Windows.
|
||||
|
||||
## 2.10.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#8136](https://github.com/withastro/astro/pull/8136) [`97c8760d7`](https://github.com/withastro/astro/commit/97c8760d78ffd172149f7776442725861576fba7) Thanks [@andremralves](https://github.com/andremralves)! - Fix 404 response leading to an infinite loop when there is no 404 page.
|
||||
|
||||
## 2.10.10
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#8127](https://github.com/withastro/astro/pull/8127) [`b12c8471f`](https://github.com/withastro/astro/commit/b12c8471f413c0291de4a9c444bfe3079a192034) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Do not throw Error when users pass an object with a "type" property
|
||||
|
||||
- [#8092](https://github.com/withastro/astro/pull/8092) [`7177f7579`](https://github.com/withastro/astro/commit/7177f7579b6e866f0fd895b3fd079d8ba330b1a9) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Ensure dotfiles are cleaned during static builds
|
||||
|
||||
- [#8122](https://github.com/withastro/astro/pull/8122) [`fa6b68a77`](https://github.com/withastro/astro/commit/fa6b68a776c5b3cc8167fc042b7d305234ebcff9) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Improve fidelity of time stats when running `astro build`
|
||||
|
||||
- [#8070](https://github.com/withastro/astro/pull/8070) [`097a8e4e9`](https://github.com/withastro/astro/commit/097a8e4e916c7df18eafdaa6c8d6ce2991c17ab6) Thanks [@lilnasy](https://github.com/lilnasy)! - Fix a handful of edge cases with prerendered 404/500 pages
|
||||
|
||||
- [#8123](https://github.com/withastro/astro/pull/8123) [`1f6497c33`](https://github.com/withastro/astro/commit/1f6497c3341231ee76fc4538cfe7624cf4721d56) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Open to configured `base` when `astro dev --open` runs
|
||||
|
||||
- [#8105](https://github.com/withastro/astro/pull/8105) [`0e0fa605d`](https://github.com/withastro/astro/commit/0e0fa605d109cc91e08a1ae1cc560ea240fe631b) Thanks [@martrapp](https://github.com/martrapp)! - ViewTransition: bug fix for lost scroll position in browser history
|
||||
|
||||
- [#8116](https://github.com/withastro/astro/pull/8116) [`b290f0a99`](https://github.com/withastro/astro/commit/b290f0a99778a9b9c1045f3cd06b6aee934d7c03) Thanks [@martrapp](https://github.com/martrapp)! - On back navigation only animate view transitions that were animated going forward.
|
||||
|
||||
- [#7778](https://github.com/withastro/astro/pull/7778) [`d6b494376`](https://github.com/withastro/astro/commit/d6b4943764989c0e89df2d6875cd19691566dfb3) Thanks [@y-nk](https://github.com/y-nk)! - Added support for optimizing remote images from authorized sources when using `astro:assets`. This comes with two new parameters to specify which domains (`image.domains`) and host patterns (`image.remotePatterns`) are authorized for remote images.
|
||||
|
||||
For example, the following configuration will only allow remote images from `astro.build` to be optimized:
|
||||
|
||||
```ts
|
||||
// astro.config.mjs
|
||||
export default defineConfig({
|
||||
image: {
|
||||
domains: ['astro.build'],
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
The following configuration will only allow remote images from HTTPS hosts:
|
||||
|
||||
```ts
|
||||
// astro.config.mjs
|
||||
export default defineConfig({
|
||||
image: {
|
||||
remotePatterns: [{ protocol: 'https' }],
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
- [#8109](https://github.com/withastro/astro/pull/8109) [`da6e3da1c`](https://github.com/withastro/astro/commit/da6e3da1ce00bed625fc568cfe4693713448e93f) Thanks [@martrapp](https://github.com/martrapp)! - fix: reinsert attribute to specify direction of ViewTransition (forward / back)
|
||||
|
||||
## 2.10.9
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -202,7 +202,10 @@ export function getDataEntryId({
|
|||
collection,
|
||||
}: Pick<ContentPaths, 'contentDir'> & { entry: URL; collection: string }): string {
|
||||
const relativePath = getRelativeEntryPath(entry, collection, contentDir);
|
||||
const withoutFileExt = relativePath.replace(new RegExp(path.extname(relativePath) + '$'), '');
|
||||
const withoutFileExt = normalizePath(relativePath).replace(
|
||||
new RegExp(path.extname(relativePath) + '$'),
|
||||
''
|
||||
);
|
||||
|
||||
return withoutFileExt;
|
||||
}
|
||||
|
|
|
@ -218,7 +218,7 @@ export async function handleRoute({
|
|||
}
|
||||
|
||||
let response = await pipeline.renderRoute(renderContext, mod);
|
||||
if (response.status === 404) {
|
||||
if (response.status === 404 && has404Route(manifestData)) {
|
||||
const fourOhFourRoute = await matchRoute('/404', manifestData, pipeline);
|
||||
return handleRoute({
|
||||
...options,
|
||||
|
@ -342,3 +342,7 @@ function getStatus(matchedRoute?: MatchedRoute): 404 | 500 | undefined {
|
|||
if (matchedRoute.route.route === '/404') return 404;
|
||||
if (matchedRoute.route.route === '/500') return 500;
|
||||
}
|
||||
|
||||
function has404Route(manifest: ManifestData): RouteData | undefined {
|
||||
return manifest.routes.find((route) => route.route === '/404');
|
||||
}
|
||||
|
|
|
@ -14,6 +14,14 @@
|
|||
|
||||
- [`1eae2e3f7`](https://github.com/withastro/astro/commit/1eae2e3f7d693c9dfe91c8ccfbe606d32bf2fb81) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Remove support for Node 16. The lowest supported version by Astro and all integrations is now v18.14.1. As a reminder, Node 16 will be deprecated on the 11th September 2023.
|
||||
|
||||
## 3.2.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#7944](https://github.com/withastro/astro/pull/7944) [`dff0f0f8d`](https://github.com/withastro/astro/commit/dff0f0f8ddd531c5d92a90ac00fdb86d71f77509) Thanks [@colinhacks](https://github.com/colinhacks)! - Update 'dev' command for Bun users
|
||||
|
||||
- [#8102](https://github.com/withastro/astro/pull/8102) [`e6e1de4f0`](https://github.com/withastro/astro/commit/e6e1de4f08ddba3a7703136a81f275de1976dc9e) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Verify internet connection and that `--template` exists before continuing
|
||||
|
||||
## 3.2.1
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -39,6 +39,15 @@
|
|||
- Updated dependencies [[`1eae2e3f7`](https://github.com/withastro/astro/commit/1eae2e3f7d693c9dfe91c8ccfbe606d32bf2fb81), [`76ddef19c`](https://github.com/withastro/astro/commit/76ddef19ccab6e5f7d3a5740cd41acf10e334b38), [`9b4f70a62`](https://github.com/withastro/astro/commit/9b4f70a629f55e461759ba46f68af7097a2e9215), [`3fdf509b2`](https://github.com/withastro/astro/commit/3fdf509b2731a9b2f972d89291e57cf78d62c769), [`2f951cd40`](https://github.com/withastro/astro/commit/2f951cd403dfcc2c3ca6aae618ae3e1409516e32), [`c022a4217`](https://github.com/withastro/astro/commit/c022a4217a805d223c1494e9eda4e48bbf810388), [`67becaa58`](https://github.com/withastro/astro/commit/67becaa580b8f787df58de66b7008b7098f1209c), [`bc37331d8`](https://github.com/withastro/astro/commit/bc37331d8154e3e95a8df9131e4e014e78a7a9e7), [`dfc2d93e3`](https://github.com/withastro/astro/commit/dfc2d93e3c645995379358fabbdfa9aab99f43d8), [`3dc1ca2fa`](https://github.com/withastro/astro/commit/3dc1ca2fac8d9965cc5085a5d09e72ed87b4281a), [`1be84dfee`](https://github.com/withastro/astro/commit/1be84dfee3ce8e6f5cc624f99aec4e980f6fde37), [`35f01df79`](https://github.com/withastro/astro/commit/35f01df797d23315f2bee2fc3fd795adb0559c58), [`3fdf509b2`](https://github.com/withastro/astro/commit/3fdf509b2731a9b2f972d89291e57cf78d62c769), [`78de801f2`](https://github.com/withastro/astro/commit/78de801f21fd4ca1653950027d953bf08614566b), [`59d6e569f`](https://github.com/withastro/astro/commit/59d6e569f63e175c97e82e94aa7974febfb76f7c), [`7723c4cc9`](https://github.com/withastro/astro/commit/7723c4cc93298c2e6530e55da7afda048f22cf81), [`fb5cd6b56`](https://github.com/withastro/astro/commit/fb5cd6b56dc27a71366ed5e1ab8bfe9b8f96bac5), [`631b9c410`](https://github.com/withastro/astro/commit/631b9c410d5d66fa384674027ba95d69ebb5063f)]:
|
||||
- astro@3.0.0-beta.0
|
||||
|
||||
## 5.3.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#8141](https://github.com/withastro/astro/pull/8141) [`4c15c0696`](https://github.com/withastro/astro/commit/4c15c069691ca25efcb9ebb7d9b45605cd136ed3) Thanks [@lilnasy](https://github.com/lilnasy)! - Fixed an issue where the preview mode handled 404 and 500 routes differently from running app with node directly.
|
||||
|
||||
- Updated dependencies [[`04caa99c4`](https://github.com/withastro/astro/commit/04caa99c48ce604ca3b90302ff0df8dcdbeee650)]:
|
||||
- astro@2.10.12
|
||||
|
||||
## 5.3.4
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -38,15 +38,7 @@ const preview: CreatePreviewServer = async function ({
|
|||
}
|
||||
|
||||
const handler: http.RequestListener = (req, res) => {
|
||||
ssrHandler(req, res, (ssrErr: any) => {
|
||||
if (ssrErr) {
|
||||
res.writeHead(500);
|
||||
res.end(ssrErr.toString());
|
||||
} else {
|
||||
res.writeHead(404);
|
||||
res.end();
|
||||
}
|
||||
});
|
||||
ssrHandler(req, res);
|
||||
};
|
||||
|
||||
const baseWithoutTrailingSlash: string = base.endsWith('/')
|
||||
|
|
|
@ -45,6 +45,40 @@
|
|||
|
||||
- [`1eae2e3f7`](https://github.com/withastro/astro/commit/1eae2e3f7d693c9dfe91c8ccfbe606d32bf2fb81) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Remove support for Node 16. The lowest supported version by Astro and all integrations is now v18.14.1. As a reminder, Node 16 will be deprecated on the 11th September 2023.
|
||||
|
||||
## 2.3.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#8149](https://github.com/withastro/astro/pull/8149) [`531cc3e49`](https://github.com/withastro/astro/commit/531cc3e490bc3bc1b896eeaec05664571df5bb24) Thanks [@matthewp](https://github.com/matthewp)! - Fix missing package file regression
|
||||
|
||||
## 2.3.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#8137](https://github.com/withastro/astro/pull/8137) [`8c0a4ed10`](https://github.com/withastro/astro/commit/8c0a4ed106efeda286f0aae8b959008f9462b5ec) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Fix missing export for new `experimentalReactChildren` option
|
||||
|
||||
## 2.3.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- [#8082](https://github.com/withastro/astro/pull/8082) [`16a3fdf93`](https://github.com/withastro/astro/commit/16a3fdf93165a1a0404c1db0973871345b2c591b) Thanks [@matthewp](https://github.com/matthewp)! - Optionally parse React slots as React children.
|
||||
|
||||
This adds a new configuration option for the React integration `experimentalReactChildren`:
|
||||
|
||||
```js
|
||||
export default {
|
||||
integrations: [
|
||||
react({
|
||||
experimentalReactChildren: true,
|
||||
}),
|
||||
],
|
||||
};
|
||||
```
|
||||
|
||||
With this enabled, children passed to React from Astro components via the default slot are parsed as React components.
|
||||
|
||||
This enables better compatibility with certain React components which manipulate their children.
|
||||
|
||||
## 2.2.2
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -20,6 +20,12 @@
|
|||
|
||||
- [`1eae2e3f7`](https://github.com/withastro/astro/commit/1eae2e3f7d693c9dfe91c8ccfbe606d32bf2fb81) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Remove support for Node 16. The lowest supported version by Astro and all integrations is now v18.14.1. As a reminder, Node 16 will be deprecated on the 11th September 2023.
|
||||
|
||||
## 2.2.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#8107](https://github.com/withastro/astro/pull/8107) [`5b4b78245`](https://github.com/withastro/astro/commit/5b4b782451ba9a7d685d56990b471740616e9610) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Update `babel-preset-solid` dependency to `^1.7.7`
|
||||
|
||||
## 2.2.0
|
||||
|
||||
### Minor Changes
|
||||
|
|
|
@ -20,6 +20,15 @@
|
|||
- Updated dependencies [[`1eae2e3f7`](https://github.com/withastro/astro/commit/1eae2e3f7d693c9dfe91c8ccfbe606d32bf2fb81), [`76ddef19c`](https://github.com/withastro/astro/commit/76ddef19ccab6e5f7d3a5740cd41acf10e334b38), [`9b4f70a62`](https://github.com/withastro/astro/commit/9b4f70a629f55e461759ba46f68af7097a2e9215), [`3fdf509b2`](https://github.com/withastro/astro/commit/3fdf509b2731a9b2f972d89291e57cf78d62c769), [`2f951cd40`](https://github.com/withastro/astro/commit/2f951cd403dfcc2c3ca6aae618ae3e1409516e32), [`c022a4217`](https://github.com/withastro/astro/commit/c022a4217a805d223c1494e9eda4e48bbf810388), [`67becaa58`](https://github.com/withastro/astro/commit/67becaa580b8f787df58de66b7008b7098f1209c), [`bc37331d8`](https://github.com/withastro/astro/commit/bc37331d8154e3e95a8df9131e4e014e78a7a9e7), [`dfc2d93e3`](https://github.com/withastro/astro/commit/dfc2d93e3c645995379358fabbdfa9aab99f43d8), [`3dc1ca2fa`](https://github.com/withastro/astro/commit/3dc1ca2fac8d9965cc5085a5d09e72ed87b4281a), [`1be84dfee`](https://github.com/withastro/astro/commit/1be84dfee3ce8e6f5cc624f99aec4e980f6fde37), [`35f01df79`](https://github.com/withastro/astro/commit/35f01df797d23315f2bee2fc3fd795adb0559c58), [`3fdf509b2`](https://github.com/withastro/astro/commit/3fdf509b2731a9b2f972d89291e57cf78d62c769), [`78de801f2`](https://github.com/withastro/astro/commit/78de801f21fd4ca1653950027d953bf08614566b), [`59d6e569f`](https://github.com/withastro/astro/commit/59d6e569f63e175c97e82e94aa7974febfb76f7c), [`7723c4cc9`](https://github.com/withastro/astro/commit/7723c4cc93298c2e6530e55da7afda048f22cf81), [`fb5cd6b56`](https://github.com/withastro/astro/commit/fb5cd6b56dc27a71366ed5e1ab8bfe9b8f96bac5), [`631b9c410`](https://github.com/withastro/astro/commit/631b9c410d5d66fa384674027ba95d69ebb5063f)]:
|
||||
- astro@3.0.0-beta.0
|
||||
|
||||
## 3.1.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#7291](https://github.com/withastro/astro/pull/7291) [`0bf2cca5d`](https://github.com/withastro/astro/commit/0bf2cca5d7fe1fb025feae00ab3c12ed80f9ea9a) Thanks [@kitschpatrol](https://github.com/kitschpatrol)! - Filter unknown `class` prop warnings
|
||||
|
||||
- Updated dependencies [[`b12c8471f`](https://github.com/withastro/astro/commit/b12c8471f413c0291de4a9c444bfe3079a192034), [`7177f7579`](https://github.com/withastro/astro/commit/7177f7579b6e866f0fd895b3fd079d8ba330b1a9), [`fa6b68a77`](https://github.com/withastro/astro/commit/fa6b68a776c5b3cc8167fc042b7d305234ebcff9), [`097a8e4e9`](https://github.com/withastro/astro/commit/097a8e4e916c7df18eafdaa6c8d6ce2991c17ab6), [`1f6497c33`](https://github.com/withastro/astro/commit/1f6497c3341231ee76fc4538cfe7624cf4721d56), [`0e0fa605d`](https://github.com/withastro/astro/commit/0e0fa605d109cc91e08a1ae1cc560ea240fe631b), [`b290f0a99`](https://github.com/withastro/astro/commit/b290f0a99778a9b9c1045f3cd06b6aee934d7c03), [`d6b494376`](https://github.com/withastro/astro/commit/d6b4943764989c0e89df2d6875cd19691566dfb3), [`da6e3da1c`](https://github.com/withastro/astro/commit/da6e3da1ce00bed625fc568cfe4693713448e93f)]:
|
||||
- astro@2.10.10
|
||||
|
||||
## 3.1.0
|
||||
|
||||
### Minor Changes
|
||||
|
|
|
@ -122,6 +122,15 @@
|
|||
- astro@3.0.0-beta.0
|
||||
- @astrojs/internal-helpers@0.2.0-beta.0
|
||||
|
||||
## 3.8.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#7778](https://github.com/withastro/astro/pull/7778) [`d6b494376`](https://github.com/withastro/astro/commit/d6b4943764989c0e89df2d6875cd19691566dfb3) Thanks [@y-nk](https://github.com/y-nk)! - Update image support to work with latest version of Astro
|
||||
|
||||
- Updated dependencies [[`b12c8471f`](https://github.com/withastro/astro/commit/b12c8471f413c0291de4a9c444bfe3079a192034), [`7177f7579`](https://github.com/withastro/astro/commit/7177f7579b6e866f0fd895b3fd079d8ba330b1a9), [`fa6b68a77`](https://github.com/withastro/astro/commit/fa6b68a776c5b3cc8167fc042b7d305234ebcff9), [`097a8e4e9`](https://github.com/withastro/astro/commit/097a8e4e916c7df18eafdaa6c8d6ce2991c17ab6), [`1f6497c33`](https://github.com/withastro/astro/commit/1f6497c3341231ee76fc4538cfe7624cf4721d56), [`0e0fa605d`](https://github.com/withastro/astro/commit/0e0fa605d109cc91e08a1ae1cc560ea240fe631b), [`b290f0a99`](https://github.com/withastro/astro/commit/b290f0a99778a9b9c1045f3cd06b6aee934d7c03), [`d6b494376`](https://github.com/withastro/astro/commit/d6b4943764989c0e89df2d6875cd19691566dfb3), [`da6e3da1c`](https://github.com/withastro/astro/commit/da6e3da1ce00bed625fc568cfe4693713448e93f)]:
|
||||
- astro@2.10.10
|
||||
|
||||
## 3.8.1
|
||||
|
||||
### Patch Changes
|
||||
|
|
Loading…
Reference in a new issue