mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
Merge branch 'main' into next
This commit is contained in:
commit
2da81e53c3
103 changed files with 188 additions and 173 deletions
1
.github/renovate.json5
vendored
1
.github/renovate.json5
vendored
|
@ -16,6 +16,7 @@
|
|||
"@biomejs/biome",
|
||||
"@types/node",
|
||||
"@preact/preset-vite", // v2.8.3 starts to use Vite's esbuild for perf, but this conflicts with the react plugin
|
||||
"astro-embed", // TODO: investigate upgrade (zod import issues with atproto)
|
||||
"drizzle-orm", // TODO: investigate upgrade (has type issues)
|
||||
"sharp",
|
||||
|
||||
|
|
6
.github/scripts/announce.mjs
vendored
6
.github/scripts/announce.mjs
vendored
|
@ -6,7 +6,7 @@ import { setOutput } from './utils.mjs';
|
|||
const { GITHUB_REF = 'main' } = process.env;
|
||||
const baseUrl = new URL(`https://github.com/withastro/astro/blob/${GITHUB_REF}/`);
|
||||
|
||||
const emojis = ['🎉', '🥳', '🚀', '🧑🚀', '🎊', '🏆', '✅', '🤩', '🤖', '🙌'];
|
||||
const emojis = ['🎉', '🥳', '🚀', '🧑', '🎊', '🏆', '✅', '🤩', '🤖', '🙌'];
|
||||
const descriptors = [
|
||||
'new releases',
|
||||
'hot and fresh updates',
|
||||
|
@ -141,7 +141,7 @@ async function generateMessage() {
|
|||
message += `\nAlso ${item(extraVerbs)}:`;
|
||||
|
||||
const remainingPackages = packages.filter((p) => p.name !== name);
|
||||
for (const { name, version, url } of remainingPackages) {
|
||||
for (const { name, version, _url } of remainingPackages) {
|
||||
message += `\n• \`${name}@${version}\``;
|
||||
}
|
||||
|
||||
|
@ -159,7 +159,7 @@ async function generateMessage() {
|
|||
|
||||
async function run() {
|
||||
const content = await generateMessage();
|
||||
console.log(content);
|
||||
console.info(content);
|
||||
setOutput('DISCORD_MESSAGE', content);
|
||||
}
|
||||
|
||||
|
|
2
.github/workflows/continuous_benchmark.yml
vendored
2
.github/workflows/continuous_benchmark.yml
vendored
|
@ -47,7 +47,7 @@ jobs:
|
|||
run: pnpm run build
|
||||
|
||||
- name: Run the benchmarks
|
||||
uses: CodSpeedHQ/action@fa1dcde8d58f2ab0b407a6a24d6cc5a8c1444a8c # v3.1.0
|
||||
uses: CodSpeedHQ/action@513a19673a831f139e8717bf45ead67e47f00044 # v3.2.0
|
||||
timeout-minutes: 30
|
||||
with:
|
||||
run: pnpm benchmark codspeed
|
||||
|
|
8
.github/workflows/snapshot-release.yml
vendored
8
.github/workflows/snapshot-release.yml
vendored
|
@ -63,7 +63,13 @@ jobs:
|
|||
ref: ${{ steps.refs.outputs.head_ref }}
|
||||
fetch-depth: 0
|
||||
|
||||
- run: git fetch origin main:main
|
||||
- name: Extract base branch from .changeset/config.json
|
||||
id: getBaseBranch
|
||||
run: |
|
||||
baseBranch=$(jq -r '.baseBranch' .changeset/config.json)
|
||||
echo "baseBranch=${baseBranch}" >> $GITHUB_OUTPUT
|
||||
|
||||
- run: git fetch origin ${{ steps.getBaseBranch.outputs.baseBranch }}:${{ steps.getBaseBranch.outputs.baseBranch }}
|
||||
|
||||
- name: Setup PNPM
|
||||
uses: pnpm/action-setup@v3
|
||||
|
|
|
@ -6,7 +6,7 @@ export const defaultProject = 'project-name';
|
|||
* Use `console.log` to report the results too. Logs that start with 10 `=`
|
||||
* and end with 10 `=` will be extracted by CI to display in the PR comment.
|
||||
* Usually after the first 10 `=` you'll want to add a title like `#### Test`.
|
||||
* @param {URL} projectDir
|
||||
* @param {URL} outputFile
|
||||
* @param {URL} _projectDir
|
||||
* @param {URL} _outputFile
|
||||
*/
|
||||
export async function run(projectDir, outputFile) {}
|
||||
export async function run(_projectDir, _outputFile) {}
|
||||
|
|
12
package.json
12
package.json
|
@ -60,16 +60,16 @@
|
|||
"@changesets/cli": "^2.27.10",
|
||||
"@types/node": "^18.17.8",
|
||||
"esbuild": "^0.21.5",
|
||||
"eslint": "^9.14.0",
|
||||
"eslint-plugin-regexp": "^2.6.0",
|
||||
"eslint": "^9.15.0",
|
||||
"eslint-plugin-regexp": "^2.7.0",
|
||||
"globby": "^14.0.2",
|
||||
"only-allow": "^1.2.1",
|
||||
"prettier": "^3.3.3",
|
||||
"prettier": "^3.4.1",
|
||||
"prettier-plugin-astro": "^0.14.1",
|
||||
"publint": "^0.2.12",
|
||||
"turbo": "^2.2.3",
|
||||
"typescript": "~5.6.3",
|
||||
"typescript-eslint": "^8.13.0"
|
||||
"turbo": "^2.3.3",
|
||||
"typescript": "~5.7.2",
|
||||
"typescript-eslint": "^8.16.0"
|
||||
},
|
||||
"pnpm": {
|
||||
"peerDependencyRules": {
|
||||
|
|
|
@ -1407,6 +1407,14 @@
|
|||
- Updated dependencies [[`83a2a64`](https://github.com/withastro/astro/commit/83a2a648418ad30f4eb781d1c1b5f2d8a8ac846e)]:
|
||||
- @astrojs/markdown-remark@6.0.0-alpha.0
|
||||
|
||||
## 4.16.16
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#12542](https://github.com/withastro/astro/pull/12542) [`65e50eb`](https://github.com/withastro/astro/commit/65e50eb7b6d7b10a193bba7d292804ac0e55be18) Thanks [@kadykov](https://github.com/kadykov)! - Fix JPEG image size determination
|
||||
|
||||
- [#12525](https://github.com/withastro/astro/pull/12525) [`cf0d8b0`](https://github.com/withastro/astro/commit/cf0d8b08a0f16bba7310d1a92c82b5a276682e8c) Thanks [@ematipico](https://github.com/ematipico)! - Fixes an issue where with `i18n` enabled, Astro couldn't render the `404.astro` component for non-existent routes.
|
||||
|
||||
## 4.16.15
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -19,6 +19,6 @@
|
|||
"astro": "workspace:*",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"typescript": "^5.6.3"
|
||||
"typescript": "^5.7.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
"astro": "workspace:*",
|
||||
"react": "19.0.0-rc-fb9a90fa48-20240614",
|
||||
"react-dom": "19.0.0-rc-fb9a90fa48-20240614",
|
||||
"typescript": "^5.6.3"
|
||||
"typescript": "^5.7.2"
|
||||
},
|
||||
"overrides": {
|
||||
"@types/react": "npm:types-react",
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/preact": "workspace:*",
|
||||
"@e2e/astro-linked-lib": "link:../_deps/astro-linked-lib",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/vue": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"vue": "^3.5.12"
|
||||
"vue": "^3.5.13"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
"astro": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"preact": "^10.24.3",
|
||||
"preact": "^10.25.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"solid-js": "^1.9.3",
|
||||
"svelte": "^5.1.16",
|
||||
"vue": "^3.5.12"
|
||||
"svelte": "^5.2.9",
|
||||
"vue": "^3.5.13"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
"private": true,
|
||||
"dependencies": {
|
||||
"astro": "workspace:*",
|
||||
"sass": "^1.80.6"
|
||||
"sass": "^1.81.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
"@astrojs/svelte": "workspace:*",
|
||||
"@astrojs/vue": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3",
|
||||
"preact": "^10.25.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"sass": "^1.80.6",
|
||||
"sass": "^1.81.0",
|
||||
"solid-js": "^1.9.3",
|
||||
"svelte": "^5.1.16",
|
||||
"vue": "^3.5.12"
|
||||
"svelte": "^5.2.9",
|
||||
"vue": "^3.5.13"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
"private": true,
|
||||
"devDependencies": {
|
||||
"astro": "workspace:*",
|
||||
"sass": "^1.80.6"
|
||||
"sass": "^1.81.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
"dependencies": {
|
||||
"@webcomponents/template-shadowroot": "^0.2.1",
|
||||
"lit": "^3.2.1",
|
||||
"preact": "^10.24.3",
|
||||
"preact": "^10.25.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"solid-js": "^1.9.3",
|
||||
"svelte": "^5.1.16",
|
||||
"vue": "^3.5.12"
|
||||
"svelte": "^5.2.9",
|
||||
"vue": "^3.5.13"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
"astro": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
"astro": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"preact": "^10.24.3",
|
||||
"preact": "^10.25.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"solid-js": "^1.9.3",
|
||||
"svelte": "^5.1.16",
|
||||
"vue": "^3.5.12"
|
||||
"svelte": "^5.2.9",
|
||||
"vue": "^3.5.13"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
"astro": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"preact": "^10.24.3",
|
||||
"preact": "^10.25.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"solid-js": "^1.9.3",
|
||||
"svelte": "^5.1.16",
|
||||
"vue": "^3.5.12"
|
||||
"svelte": "^5.2.9",
|
||||
"vue": "^3.5.13"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
"astro": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"preact": "^10.24.3",
|
||||
"preact": "^10.25.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"solid-js": "^1.9.3",
|
||||
"svelte": "^5.1.16",
|
||||
"vue": "^3.5.12"
|
||||
"svelte": "^5.2.9",
|
||||
"vue": "^3.5.13"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
"astro": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"preact": "^10.24.3",
|
||||
"preact": "^10.25.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"solid-js": "^1.9.3",
|
||||
"svelte": "^5.1.16",
|
||||
"vue": "^3.5.12"
|
||||
"svelte": "^5.2.9",
|
||||
"vue": "^3.5.13"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
"astro": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"preact": "^10.24.3",
|
||||
"preact": "^10.25.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"solid-js": "^1.9.3",
|
||||
"svelte": "^5.1.16",
|
||||
"vue": "^3.5.12"
|
||||
"svelte": "^5.2.9",
|
||||
"vue": "^3.5.13"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,12 +11,12 @@
|
|||
"astro": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"preact": "^10.24.3",
|
||||
"preact": "^10.25.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"solid-js": "^1.9.3",
|
||||
"svelte": "^5.1.16",
|
||||
"vue": "^3.5.12"
|
||||
"svelte": "^5.2.9",
|
||||
"vue": "^3.5.13"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "astro dev"
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/mdx": "workspace:*",
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/mdx": "workspace:*",
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/mdx": "workspace:*",
|
||||
"@astrojs/svelte": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"svelte": "^5.1.16"
|
||||
"svelte": "^5.2.9"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,6 @@
|
|||
"astro": "workspace:*",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"postcss": "^8.4.49",
|
||||
"tailwindcss": "^3.4.14"
|
||||
"tailwindcss": "^3.4.15"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"solid-js": "^1.9.3",
|
||||
"svelte": "^5.1.16",
|
||||
"vue": "^3.5.12"
|
||||
"svelte": "^5.2.9",
|
||||
"vue": "^3.5.13"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/mdx": "workspace:*",
|
||||
"@astrojs/vue": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"vue": "^3.5.12"
|
||||
"vue": "^3.5.13"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
"aria-query": "^5.3.2",
|
||||
"axobject-query": "^4.1.0",
|
||||
"boxen": "8.0.1",
|
||||
"ci-info": "^4.0.0",
|
||||
"ci-info": "^4.1.0",
|
||||
"clsx": "^2.1.1",
|
||||
"common-ancestor-path": "^1.0.1",
|
||||
"cookie": "^0.7.2",
|
||||
|
@ -150,7 +150,7 @@
|
|||
"http-cache-semantics": "^4.1.1",
|
||||
"js-yaml": "^4.1.0",
|
||||
"kleur": "^4.1.5",
|
||||
"magic-string": "^0.30.12",
|
||||
"magic-string": "^0.30.14",
|
||||
"magicast": "^0.3.5",
|
||||
"micromatch": "^4.0.8",
|
||||
"mrmime": "^2.0.0",
|
||||
|
@ -161,7 +161,7 @@
|
|||
"prompts": "^2.4.2",
|
||||
"rehype": "^13.0.2",
|
||||
"semver": "^7.6.3",
|
||||
"shiki": "^1.22.2",
|
||||
"shiki": "^1.23.1",
|
||||
"tinyexec": "^0.3.1",
|
||||
"tsconfck": "^3.1.4",
|
||||
"ultrahtml": "^1.5.3",
|
||||
|
@ -170,7 +170,7 @@
|
|||
"vite": "^6.0.1",
|
||||
"vitefu": "^1.0.4",
|
||||
"which-pm": "^3.0.0",
|
||||
"xxhash-wasm": "^1.0.2",
|
||||
"xxhash-wasm": "^1.1.0",
|
||||
"yargs-parser": "^21.1.1",
|
||||
"yocto-spinner": "^0.1.0",
|
||||
"zod": "^3.23.8",
|
||||
|
@ -182,13 +182,13 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@astrojs/check": "^0.9.4",
|
||||
"@playwright/test": "^1.48.2",
|
||||
"@playwright/test": "^1.49.0",
|
||||
"@types/aria-query": "^5.0.4",
|
||||
"@types/common-ancestor-path": "^1.0.2",
|
||||
"@types/cssesc": "^3.0.2",
|
||||
"@types/debug": "^4.1.12",
|
||||
"@types/diff": "^5.2.3",
|
||||
"@types/dlv": "^1.1.4",
|
||||
"@types/dlv": "^1.1.5",
|
||||
"@types/hast": "^3.0.4",
|
||||
"@types/html-escaper": "^3.0.2",
|
||||
"@types/http-cache-semantics": "^4.0.4",
|
||||
|
@ -211,9 +211,9 @@
|
|||
"rehype-slug": "^6.0.0",
|
||||
"rehype-toc": "^3.0.2",
|
||||
"remark-code-titles": "^0.1.2",
|
||||
"rollup": "^4.24.4",
|
||||
"sass": "^1.80.6",
|
||||
"undici": "^6.20.1",
|
||||
"rollup": "^4.27.4",
|
||||
"sass": "^1.81.0",
|
||||
"undici": "^6.21.0",
|
||||
"unified": "^11.0.5",
|
||||
"vitest": "^2.1.6"
|
||||
},
|
||||
|
|
|
@ -122,7 +122,8 @@ export const JPG: IImage = {
|
|||
|
||||
// Every JPEG block must begin with a 0xFF
|
||||
if (input[i] !== 0xff) {
|
||||
input = input.slice(1)
|
||||
// Change from upstream: fix non-0xFF blocks skipping
|
||||
input = input.slice(i)
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import type { SSRManifest, SSRManifestI18n } from '../core/app/types.js';
|
||||
import { ROUTE_TYPE_HEADER } from '../core/constants.js';
|
||||
import { REROUTE_DIRECTIVE_HEADER, ROUTE_TYPE_HEADER } from '../core/constants.js';
|
||||
import type { MiddlewareHandler } from '../types/public/common.js';
|
||||
import type { APIContext } from '../types/public/context.js';
|
||||
import {
|
||||
|
@ -66,6 +66,12 @@ export function createI18nMiddleware(
|
|||
return async (context, next) => {
|
||||
const response = await next();
|
||||
const type = response.headers.get(ROUTE_TYPE_HEADER);
|
||||
|
||||
// This is case where we are internally rendering a 404/500, so we need to bypass checks that were done already
|
||||
const isReroute = response.headers.get(REROUTE_DIRECTIVE_HEADER);
|
||||
if (isReroute === 'no' && typeof i18n.fallback === 'undefined') {
|
||||
return response;
|
||||
}
|
||||
// If the route we're processing is not a page, then we ignore it
|
||||
if (type !== 'page' && type !== 'fallback') {
|
||||
return response;
|
||||
|
|
|
@ -63,7 +63,6 @@ export async function handleRequest({
|
|||
url,
|
||||
pathname: resolvedPathname,
|
||||
body,
|
||||
origin,
|
||||
pipeline,
|
||||
manifestData,
|
||||
incomingRequest: incomingRequest,
|
||||
|
|
|
@ -131,7 +131,6 @@ type HandleRoute = {
|
|||
url: URL;
|
||||
pathname: string;
|
||||
body: ArrayBuffer | undefined;
|
||||
origin: string;
|
||||
manifestData: ManifestData;
|
||||
incomingRequest: http.IncomingMessage;
|
||||
incomingResponse: http.ServerResponse;
|
||||
|
@ -143,7 +142,6 @@ export async function handleRoute({
|
|||
url,
|
||||
pathname,
|
||||
body,
|
||||
origin,
|
||||
pipeline,
|
||||
manifestData,
|
||||
incomingRequest,
|
||||
|
@ -160,12 +158,10 @@ export async function handleRoute({
|
|||
let request: Request;
|
||||
let renderContext: RenderContext;
|
||||
let mod: ComponentInstance | undefined = undefined;
|
||||
let options: SSROptions | undefined = undefined;
|
||||
let route: RouteData;
|
||||
const middleware = (await loadMiddleware(loader)).onRequest;
|
||||
const locals = Reflect.get(incomingRequest, clientLocalsSymbol);
|
||||
|
||||
const filePath: URL | undefined = matchedRoute.filePath;
|
||||
const { preloadedComponent } = matchedRoute;
|
||||
route = matchedRoute.route;
|
||||
|
||||
|
@ -185,15 +181,6 @@ export async function handleRoute({
|
|||
if (value) incomingResponse.setHeader(name, value);
|
||||
}
|
||||
|
||||
options = {
|
||||
pipeline,
|
||||
filePath,
|
||||
preload: preloadedComponent,
|
||||
pathname,
|
||||
request,
|
||||
route,
|
||||
};
|
||||
|
||||
mod = preloadedComponent;
|
||||
|
||||
renderContext = await RenderContext.create({
|
||||
|
@ -252,18 +239,17 @@ export async function handleRoute({
|
|||
|
||||
if (statusCode === 404 && response.headers.get(REROUTE_DIRECTIVE_HEADER) !== 'no') {
|
||||
const fourOhFourRoute = await matchRoute('/404', manifestData, pipeline);
|
||||
if (options && options.route !== fourOhFourRoute?.route)
|
||||
return handleRoute({
|
||||
...options,
|
||||
matchedRoute: fourOhFourRoute,
|
||||
url: new URL(pathname, url),
|
||||
body,
|
||||
origin,
|
||||
if (fourOhFourRoute) {
|
||||
renderContext = await RenderContext.create({
|
||||
locals,
|
||||
pipeline,
|
||||
manifestData,
|
||||
incomingRequest,
|
||||
incomingResponse,
|
||||
pathname,
|
||||
middleware: isDefaultPrerendered404(fourOhFourRoute.route) ? undefined : middleware,
|
||||
request,
|
||||
routeData: fourOhFourRoute.route,
|
||||
});
|
||||
response = await renderContext.render(fourOhFourRoute.preloadedComponent);
|
||||
}
|
||||
}
|
||||
|
||||
// We remove the internally-used header before we send the response to the user agent.
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"astro": "workspace:*",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"svelte": "^5.1.16",
|
||||
"vue": "^3.5.12"
|
||||
"svelte": "^5.2.9",
|
||||
"vue": "^3.5.13"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/svelte": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"svelte": "^5.1.16"
|
||||
"svelte": "^5.2.9"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/svelte": "workspace:*",
|
||||
"@test/namespace-package": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"svelte": "^5.1.16"
|
||||
"svelte": "^5.2.9"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/svelte": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"svelte": "^5.1.16"
|
||||
"svelte": "^5.2.9"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/mdx": "workspace:*",
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
"@astrojs/svelte": "workspace:*",
|
||||
"@astrojs/vue": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3",
|
||||
"svelte": "^5.1.16",
|
||||
"vue": "^3.5.12"
|
||||
"preact": "^10.25.0",
|
||||
"svelte": "^5.2.9",
|
||||
"vue": "^3.5.13"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
"astro": "workspace:*",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"svelte": "^5.1.16"
|
||||
"svelte": "^5.2.9"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
"astro": "workspace:*",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"svelte": "^5.1.16"
|
||||
"svelte": "^5.2.9"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/vue": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"vue": "^3.5.12"
|
||||
"vue": "^3.5.13"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
"@astrojs/svelte": "workspace:*",
|
||||
"@astrojs/vue": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3",
|
||||
"preact": "^10.25.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"solid-js": "^1.9.3",
|
||||
"svelte": "^5.1.16",
|
||||
"vue": "^3.5.12"
|
||||
"svelte": "^5.2.9",
|
||||
"vue": "^3.5.13"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"astro": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"preact": "^10.24.3",
|
||||
"preact": "^10.25.0",
|
||||
"react": "^18.3.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
"@astrojs/svelte": "workspace:*",
|
||||
"@test/component-library-shared": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3",
|
||||
"preact": "^10.25.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"svelte": "^5.1.16"
|
||||
"svelte": "^5.2.9"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
"astro": "workspace:*",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"vue": "^3.5.12"
|
||||
"vue": "^3.5.13"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/markdoc": "workspace:*",
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
}
|
||||
}
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/svelte": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"svelte": "^5.1.16"
|
||||
"svelte": "^5.2.9"
|
||||
}
|
||||
}
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
"@astrojs/svelte": "workspace:*",
|
||||
"@astrojs/vue": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3",
|
||||
"svelte": "^5.1.16",
|
||||
"vue": "^3.5.12"
|
||||
"preact": "^10.25.0",
|
||||
"svelte": "^5.2.9",
|
||||
"vue": "^3.5.13"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ const currentLocale = Astro.currentLocale;
|
|||
</head>
|
||||
<body>
|
||||
<h1>404 - Not Found</h1>
|
||||
<h2>Custom 404</h2>
|
||||
<p>Current Locale: {currentLocale ? currentLocale : "none"}</p>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
"astro": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"preact": "^10.24.3",
|
||||
"preact": "^10.25.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"solid-js": "^1.9.3",
|
||||
"svelte": "^5.1.16",
|
||||
"vue": "^3.5.12"
|
||||
"svelte": "^5.2.9",
|
||||
"vue": "^3.5.13"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
"autoprefixer": "^10.4.20",
|
||||
"postcss": "^8.4.49",
|
||||
"solid-js": "^1.9.3",
|
||||
"svelte": "^5.1.16",
|
||||
"vue": "^3.5.12"
|
||||
"svelte": "^5.2.9",
|
||||
"vue": "^3.5.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
"postcss-preset-env": "^10.0.9"
|
||||
"postcss-preset-env": "^10.1.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/preact": "workspace:*",
|
||||
"@test/react-lib": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/preact": "workspace:*",
|
||||
"@preact/signals": "1.3.0",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:",
|
||||
"astro": "workspace:",
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/svelte": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"svelte": "^5.1.16"
|
||||
"svelte": "^5.2.9"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/svelte": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"svelte": "^5.1.16"
|
||||
"svelte": "^5.2.9"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/mdx": "workspace:*",
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/mdx": "workspace:*",
|
||||
"@astrojs/svelte": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"svelte": "^5.1.16"
|
||||
"svelte": "^5.2.9"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/mdx": "workspace:*",
|
||||
"@astrojs/vue": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"vue": "^3.5.12"
|
||||
"vue": "^3.5.13"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"@astrojs/preact": "workspace:*",
|
||||
"@astrojs/react": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3",
|
||||
"preact": "^10.25.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1"
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/preact": "workspace:*",
|
||||
"@test/static-build-pkg": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/svelte": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"svelte": "^5.1.16"
|
||||
"svelte": "^5.2.9"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/tailwind": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"postcss": "^8.4.49",
|
||||
"tailwindcss": "^3.4.14"
|
||||
"tailwindcss": "^3.4.15"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/vue": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"vue": "^3.5.12"
|
||||
"vue": "^3.5.13"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/vue": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"vue": "^3.5.12"
|
||||
"vue": "^3.5.13"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"@astrojs/svelte": "workspace:*",
|
||||
"@astrojs/vue": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"svelte": "^5.1.16",
|
||||
"vue": "^3.5.12"
|
||||
"svelte": "^5.2.9",
|
||||
"vue": "^3.5.13"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,6 +83,12 @@ describe('[DEV] i18n routing', () => {
|
|||
assert.equal((await response.text()).includes('Endurance'), true);
|
||||
});
|
||||
|
||||
it('should render the 404.astro file', async () => {
|
||||
const response = await fixture.fetch('/do-not-exist');
|
||||
assert.equal(response.status, 404);
|
||||
assert.match(await response.text(), /Custom 404/);
|
||||
});
|
||||
|
||||
it('should return the correct locale on 404 page for non existing default locale page', async () => {
|
||||
const response = await fixture.fetch('/es/nonexistent-page');
|
||||
assert.equal(response.status, 404);
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
"drizzle-orm": "^0.31.2",
|
||||
"github-slugger": "^2.0.0",
|
||||
"kleur": "^4.1.5",
|
||||
"nanoid": "^5.0.8",
|
||||
"nanoid": "^5.0.9",
|
||||
"open": "^10.1.0",
|
||||
"prompts": "^2.4.2",
|
||||
"yargs-parser": "^21.1.1",
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"simple-stack-form": "^0.1.12",
|
||||
"typescript": "^5.6.3",
|
||||
"typescript": "^5.7.2",
|
||||
"zod": "^3.23.8"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
"alpinejs": "^3.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@playwright/test": "1.48.2",
|
||||
"@playwright/test": "1.49.0",
|
||||
"astro": "workspace:*",
|
||||
"astro-scripts": "workspace:*",
|
||||
"vite": "^6.0.1"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"private": true,
|
||||
"dependencies": {
|
||||
"@astrojs/alpinejs": "workspace:*",
|
||||
"@types/alpinejs": "^3.13.10",
|
||||
"@types/alpinejs": "^3.13.11",
|
||||
"alpinejs": "^3.14.3",
|
||||
"astro": "workspace:*"
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"private": true,
|
||||
"dependencies": {
|
||||
"@astrojs/alpinejs": "workspace:*",
|
||||
"@types/alpinejs": "^3.13.10",
|
||||
"@types/alpinejs": "^3.13.11",
|
||||
"alpinejs": "^3.14.3",
|
||||
"astro": "workspace:*"
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"private": true,
|
||||
"dependencies": {
|
||||
"@astrojs/alpinejs": "workspace:*",
|
||||
"@types/alpinejs": "^3.13.10",
|
||||
"@types/alpinejs": "^3.13.11",
|
||||
"alpinejs": "^3.14.3",
|
||||
"astro": "workspace:*"
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/markdoc": "workspace:*",
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
"remark-rehype": "^11.1.1",
|
||||
"remark-shiki-twoslash": "^3.1.3",
|
||||
"remark-toc": "^9.0.0",
|
||||
"shiki": "^1.22.2",
|
||||
"shiki": "^1.23.1",
|
||||
"unified": "^11.0.5",
|
||||
"vite": "^6.0.1"
|
||||
},
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/mdx": "workspace:*",
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
"devDependencies": {
|
||||
"astro": "workspace:*",
|
||||
"astro-scripts": "workspace:*",
|
||||
"preact": "^10.24.3"
|
||||
"preact": "^10.25.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"preact": "^10.6.5"
|
||||
|
|
|
@ -16,6 +16,7 @@ type Props = {
|
|||
const StaticHtml = ({ value, name, hydrate = true }: Props) => {
|
||||
if (!value) return null;
|
||||
const tagName = hydrate ? 'astro-slot' : 'astro-static-slot';
|
||||
// @ts-expect-error pass `name` as a prop, ignoring type errors
|
||||
return h(tagName, { name, dangerouslySetInnerHTML: { __html: value } });
|
||||
};
|
||||
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
"astro": "workspace:*",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"vue": "^3.5.12"
|
||||
"vue": "^3.5.13"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
"devDependencies": {
|
||||
"astro": "workspace:*",
|
||||
"astro-scripts": "workspace:*",
|
||||
"svelte": "^5.1.16"
|
||||
"svelte": "^5.2.9"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"astro": "^5.0.0-beta.9",
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
"astro-scripts": "workspace:*",
|
||||
"cheerio": "1.0.0",
|
||||
"linkedom": "^0.18.5",
|
||||
"vue": "^3.5.12"
|
||||
"vue": "^3.5.13"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"astro": "^5.0.0-alpha.0",
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/vue": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"vite-svg-loader": "5.1.0",
|
||||
"vue": "^3.5.12"
|
||||
"vue": "^3.5.13"
|
||||
}
|
||||
}
|
|
@ -9,6 +9,6 @@
|
|||
"@astrojs/vue": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"vite-svg-loader": "5.1.0",
|
||||
"vue": "^3.5.12"
|
||||
"vue": "^3.5.13"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/vue": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"vite-svg-loader": "5.1.0",
|
||||
"vue": "^3.5.12"
|
||||
"vue": "^3.5.13"
|
||||
}
|
||||
}
|
|
@ -45,7 +45,7 @@
|
|||
"remark-parse": "^11.0.0",
|
||||
"remark-rehype": "^11.1.1",
|
||||
"remark-smartypants": "^3.0.2",
|
||||
"shiki": "^1.22.2",
|
||||
"shiki": "^1.23.1",
|
||||
"unified": "^11.0.5",
|
||||
"unist-util-remove-position": "^5.0.0",
|
||||
"unist-util-visit": "^5.0.0",
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue