diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 527ef6df7d..ead596c395 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -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", diff --git a/.github/scripts/announce.mjs b/.github/scripts/announce.mjs index 2e05a7ae8a..df73040372 100755 --- a/.github/scripts/announce.mjs +++ b/.github/scripts/announce.mjs @@ -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); } diff --git a/.github/workflows/continuous_benchmark.yml b/.github/workflows/continuous_benchmark.yml index 00a7e0c5b1..757b333a45 100644 --- a/.github/workflows/continuous_benchmark.yml +++ b/.github/workflows/continuous_benchmark.yml @@ -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 diff --git a/.github/workflows/snapshot-release.yml b/.github/workflows/snapshot-release.yml index ae8d3060fa..612ca32a74 100644 --- a/.github/workflows/snapshot-release.yml +++ b/.github/workflows/snapshot-release.yml @@ -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 diff --git a/benchmark/bench/_template.js b/benchmark/bench/_template.js index 867ecf13b6..ae96d72ad5 100644 --- a/benchmark/bench/_template.js +++ b/benchmark/bench/_template.js @@ -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) {} diff --git a/package.json b/package.json index 1da000f566..aa25258ea0 100644 --- a/package.json +++ b/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": { diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index b9da39f43e..e0d4e02b13 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -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 diff --git a/packages/astro/e2e/fixtures/actions-blog/package.json b/packages/astro/e2e/fixtures/actions-blog/package.json index 60b4ec57cf..55a2198b32 100644 --- a/packages/astro/e2e/fixtures/actions-blog/package.json +++ b/packages/astro/e2e/fixtures/actions-blog/package.json @@ -19,6 +19,6 @@ "astro": "workspace:*", "react": "^18.3.1", "react-dom": "^18.3.1", - "typescript": "^5.6.3" + "typescript": "^5.7.2" } } diff --git a/packages/astro/e2e/fixtures/actions-react-19/package.json b/packages/astro/e2e/fixtures/actions-react-19/package.json index 1664761cc7..1e7cfdb2dc 100644 --- a/packages/astro/e2e/fixtures/actions-react-19/package.json +++ b/packages/astro/e2e/fixtures/actions-react-19/package.json @@ -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", diff --git a/packages/astro/e2e/fixtures/astro-component/package.json b/packages/astro/e2e/fixtures/astro-component/package.json index 382af0b40c..c5bfede174 100644 --- a/packages/astro/e2e/fixtures/astro-component/package.json +++ b/packages/astro/e2e/fixtures/astro-component/package.json @@ -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" } } diff --git a/packages/astro/e2e/fixtures/astro-envs/package.json b/packages/astro/e2e/fixtures/astro-envs/package.json index b35082d519..3621fe50ae 100644 --- a/packages/astro/e2e/fixtures/astro-envs/package.json +++ b/packages/astro/e2e/fixtures/astro-envs/package.json @@ -5,6 +5,6 @@ "dependencies": { "@astrojs/vue": "workspace:*", "astro": "workspace:*", - "vue": "^3.5.12" + "vue": "^3.5.13" } } diff --git a/packages/astro/e2e/fixtures/client-only/package.json b/packages/astro/e2e/fixtures/client-only/package.json index b8ff805958..e8f700e796 100644 --- a/packages/astro/e2e/fixtures/client-only/package.json +++ b/packages/astro/e2e/fixtures/client-only/package.json @@ -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" } } diff --git a/packages/astro/e2e/fixtures/dev-toolbar/package.json b/packages/astro/e2e/fixtures/dev-toolbar/package.json index b4430b4257..19f95504b6 100644 --- a/packages/astro/e2e/fixtures/dev-toolbar/package.json +++ b/packages/astro/e2e/fixtures/dev-toolbar/package.json @@ -5,6 +5,6 @@ "dependencies": { "@astrojs/preact": "workspace:*", "astro": "workspace:*", - "preact": "^10.24.3" + "preact": "^10.25.0" } } diff --git a/packages/astro/e2e/fixtures/error-cyclic/package.json b/packages/astro/e2e/fixtures/error-cyclic/package.json index bc798e2f2a..6496a5b918 100644 --- a/packages/astro/e2e/fixtures/error-cyclic/package.json +++ b/packages/astro/e2e/fixtures/error-cyclic/package.json @@ -5,6 +5,6 @@ "dependencies": { "@astrojs/preact": "workspace:*", "astro": "workspace:*", - "preact": "^10.24.3" + "preact": "^10.25.0" } } diff --git a/packages/astro/e2e/fixtures/error-sass/package.json b/packages/astro/e2e/fixtures/error-sass/package.json index 04457de959..69c4fd8f89 100644 --- a/packages/astro/e2e/fixtures/error-sass/package.json +++ b/packages/astro/e2e/fixtures/error-sass/package.json @@ -4,6 +4,6 @@ "private": true, "dependencies": { "astro": "workspace:*", - "sass": "^1.80.6" + "sass": "^1.81.0" } } diff --git a/packages/astro/e2e/fixtures/errors/package.json b/packages/astro/e2e/fixtures/errors/package.json index 77c4067785..f4ca284f18 100644 --- a/packages/astro/e2e/fixtures/errors/package.json +++ b/packages/astro/e2e/fixtures/errors/package.json @@ -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" } } diff --git a/packages/astro/e2e/fixtures/hmr/package.json b/packages/astro/e2e/fixtures/hmr/package.json index b8178a33f6..e20aa0cf3f 100644 --- a/packages/astro/e2e/fixtures/hmr/package.json +++ b/packages/astro/e2e/fixtures/hmr/package.json @@ -4,6 +4,6 @@ "private": true, "devDependencies": { "astro": "workspace:*", - "sass": "^1.80.6" + "sass": "^1.81.0" } } diff --git a/packages/astro/e2e/fixtures/hydration-race/package.json b/packages/astro/e2e/fixtures/hydration-race/package.json index c91d50a706..2a3defe411 100644 --- a/packages/astro/e2e/fixtures/hydration-race/package.json +++ b/packages/astro/e2e/fixtures/hydration-race/package.json @@ -9,6 +9,6 @@ "dependencies": { "@astrojs/preact": "workspace:*", "astro": "workspace:*", - "preact": "^10.24.3" + "preact": "^10.25.0" } } diff --git a/packages/astro/e2e/fixtures/multiple-frameworks/package.json b/packages/astro/e2e/fixtures/multiple-frameworks/package.json index 2dc3337963..c17bc11072 100644 --- a/packages/astro/e2e/fixtures/multiple-frameworks/package.json +++ b/packages/astro/e2e/fixtures/multiple-frameworks/package.json @@ -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" } } diff --git a/packages/astro/e2e/fixtures/namespaced-component/package.json b/packages/astro/e2e/fixtures/namespaced-component/package.json index 348013a318..499b28a9a8 100644 --- a/packages/astro/e2e/fixtures/namespaced-component/package.json +++ b/packages/astro/e2e/fixtures/namespaced-component/package.json @@ -8,6 +8,6 @@ "astro": "workspace:*" }, "dependencies": { - "preact": "^10.24.3" + "preact": "^10.25.0" } } diff --git a/packages/astro/e2e/fixtures/nested-in-preact/package.json b/packages/astro/e2e/fixtures/nested-in-preact/package.json index b7ee395b7a..2128f23436 100644 --- a/packages/astro/e2e/fixtures/nested-in-preact/package.json +++ b/packages/astro/e2e/fixtures/nested-in-preact/package.json @@ -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" } } diff --git a/packages/astro/e2e/fixtures/nested-in-react/package.json b/packages/astro/e2e/fixtures/nested-in-react/package.json index 8482e4a956..c97f11b407 100644 --- a/packages/astro/e2e/fixtures/nested-in-react/package.json +++ b/packages/astro/e2e/fixtures/nested-in-react/package.json @@ -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" } } diff --git a/packages/astro/e2e/fixtures/nested-in-solid/package.json b/packages/astro/e2e/fixtures/nested-in-solid/package.json index a0cb765f1d..04fce3438f 100644 --- a/packages/astro/e2e/fixtures/nested-in-solid/package.json +++ b/packages/astro/e2e/fixtures/nested-in-solid/package.json @@ -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" } } diff --git a/packages/astro/e2e/fixtures/nested-in-svelte/package.json b/packages/astro/e2e/fixtures/nested-in-svelte/package.json index 7a76711b65..3f32ade861 100644 --- a/packages/astro/e2e/fixtures/nested-in-svelte/package.json +++ b/packages/astro/e2e/fixtures/nested-in-svelte/package.json @@ -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" } } diff --git a/packages/astro/e2e/fixtures/nested-in-vue/package.json b/packages/astro/e2e/fixtures/nested-in-vue/package.json index 9ee7a0ea46..b8ffa1ecde 100644 --- a/packages/astro/e2e/fixtures/nested-in-vue/package.json +++ b/packages/astro/e2e/fixtures/nested-in-vue/package.json @@ -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" } } diff --git a/packages/astro/e2e/fixtures/nested-recursive/package.json b/packages/astro/e2e/fixtures/nested-recursive/package.json index feeb21cb86..fcaf4d6fa3 100644 --- a/packages/astro/e2e/fixtures/nested-recursive/package.json +++ b/packages/astro/e2e/fixtures/nested-recursive/package.json @@ -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" diff --git a/packages/astro/e2e/fixtures/preact-compat-component/package.json b/packages/astro/e2e/fixtures/preact-compat-component/package.json index aa1d3370c8..2e4c7fd3b6 100644 --- a/packages/astro/e2e/fixtures/preact-compat-component/package.json +++ b/packages/astro/e2e/fixtures/preact-compat-component/package.json @@ -5,6 +5,6 @@ "dependencies": { "@astrojs/preact": "workspace:*", "astro": "workspace:*", - "preact": "^10.24.3" + "preact": "^10.25.0" } } diff --git a/packages/astro/e2e/fixtures/preact-component/package.json b/packages/astro/e2e/fixtures/preact-component/package.json index b3870b482a..3f795116b3 100644 --- a/packages/astro/e2e/fixtures/preact-component/package.json +++ b/packages/astro/e2e/fixtures/preact-component/package.json @@ -6,6 +6,6 @@ "@astrojs/mdx": "workspace:*", "@astrojs/preact": "workspace:*", "astro": "workspace:*", - "preact": "^10.24.3" + "preact": "^10.25.0" } } diff --git a/packages/astro/e2e/fixtures/preact-lazy-component/package.json b/packages/astro/e2e/fixtures/preact-lazy-component/package.json index a92516e9f5..0dbde4fc3b 100644 --- a/packages/astro/e2e/fixtures/preact-lazy-component/package.json +++ b/packages/astro/e2e/fixtures/preact-lazy-component/package.json @@ -6,6 +6,6 @@ "@astrojs/mdx": "workspace:*", "@astrojs/preact": "workspace:*", "astro": "workspace:*", - "preact": "^10.24.3" + "preact": "^10.25.0" } } diff --git a/packages/astro/e2e/fixtures/svelte-component/package.json b/packages/astro/e2e/fixtures/svelte-component/package.json index c4baf86162..67fb2f47e9 100644 --- a/packages/astro/e2e/fixtures/svelte-component/package.json +++ b/packages/astro/e2e/fixtures/svelte-component/package.json @@ -6,6 +6,6 @@ "@astrojs/mdx": "workspace:*", "@astrojs/svelte": "workspace:*", "astro": "workspace:*", - "svelte": "^5.1.16" + "svelte": "^5.2.9" } } diff --git a/packages/astro/e2e/fixtures/tailwindcss/package.json b/packages/astro/e2e/fixtures/tailwindcss/package.json index ab69e74fbc..d683cc95f4 100644 --- a/packages/astro/e2e/fixtures/tailwindcss/package.json +++ b/packages/astro/e2e/fixtures/tailwindcss/package.json @@ -7,6 +7,6 @@ "astro": "workspace:*", "autoprefixer": "^10.4.20", "postcss": "^8.4.49", - "tailwindcss": "^3.4.14" + "tailwindcss": "^3.4.15" } } diff --git a/packages/astro/e2e/fixtures/view-transitions/package.json b/packages/astro/e2e/fixtures/view-transitions/package.json index 3c94c27007..406bf1eec3 100644 --- a/packages/astro/e2e/fixtures/view-transitions/package.json +++ b/packages/astro/e2e/fixtures/view-transitions/package.json @@ -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" } } diff --git a/packages/astro/e2e/fixtures/vue-component/package.json b/packages/astro/e2e/fixtures/vue-component/package.json index 4f6f31dd6e..6301385691 100644 --- a/packages/astro/e2e/fixtures/vue-component/package.json +++ b/packages/astro/e2e/fixtures/vue-component/package.json @@ -6,6 +6,6 @@ "@astrojs/mdx": "workspace:*", "@astrojs/vue": "workspace:*", "astro": "workspace:*", - "vue": "^3.5.12" + "vue": "^3.5.13" } } diff --git a/packages/astro/package.json b/packages/astro/package.json index 6c64e5cd73..3c42c576a4 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -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" }, diff --git a/packages/astro/src/assets/utils/vendor/image-size/types/jpg.ts b/packages/astro/src/assets/utils/vendor/image-size/types/jpg.ts index 1ccf2d99f1..763cfc98c0 100644 --- a/packages/astro/src/assets/utils/vendor/image-size/types/jpg.ts +++ b/packages/astro/src/assets/utils/vendor/image-size/types/jpg.ts @@ -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 } diff --git a/packages/astro/src/i18n/middleware.ts b/packages/astro/src/i18n/middleware.ts index 7c2fc1406b..eefb8a9dd5 100644 --- a/packages/astro/src/i18n/middleware.ts +++ b/packages/astro/src/i18n/middleware.ts @@ -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; diff --git a/packages/astro/src/vite-plugin-astro-server/request.ts b/packages/astro/src/vite-plugin-astro-server/request.ts index 98cf2b5022..e0e3c32d17 100644 --- a/packages/astro/src/vite-plugin-astro-server/request.ts +++ b/packages/astro/src/vite-plugin-astro-server/request.ts @@ -63,7 +63,6 @@ export async function handleRequest({ url, pathname: resolvedPathname, body, - origin, pipeline, manifestData, incomingRequest: incomingRequest, diff --git a/packages/astro/src/vite-plugin-astro-server/route.ts b/packages/astro/src/vite-plugin-astro-server/route.ts index 7c2a5bd9a6..b4158b854d 100644 --- a/packages/astro/src/vite-plugin-astro-server/route.ts +++ b/packages/astro/src/vite-plugin-astro-server/route.ts @@ -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. diff --git a/packages/astro/test/fixtures/0-css/package.json b/packages/astro/test/fixtures/0-css/package.json index 8956aaf0ae..e431453445 100644 --- a/packages/astro/test/fixtures/0-css/package.json +++ b/packages/astro/test/fixtures/0-css/package.json @@ -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" } } diff --git a/packages/astro/test/fixtures/alias-tsconfig-baseurl-only/package.json b/packages/astro/test/fixtures/alias-tsconfig-baseurl-only/package.json index 61ea81e432..5ff6cb3a5d 100644 --- a/packages/astro/test/fixtures/alias-tsconfig-baseurl-only/package.json +++ b/packages/astro/test/fixtures/alias-tsconfig-baseurl-only/package.json @@ -5,6 +5,6 @@ "dependencies": { "@astrojs/svelte": "workspace:*", "astro": "workspace:*", - "svelte": "^5.1.16" + "svelte": "^5.2.9" } } diff --git a/packages/astro/test/fixtures/alias-tsconfig/package.json b/packages/astro/test/fixtures/alias-tsconfig/package.json index 07e81ac0b9..2158297d6e 100644 --- a/packages/astro/test/fixtures/alias-tsconfig/package.json +++ b/packages/astro/test/fixtures/alias-tsconfig/package.json @@ -6,6 +6,6 @@ "@astrojs/svelte": "workspace:*", "@test/namespace-package": "workspace:*", "astro": "workspace:*", - "svelte": "^5.1.16" + "svelte": "^5.2.9" } } diff --git a/packages/astro/test/fixtures/alias/package.json b/packages/astro/test/fixtures/alias/package.json index c237d7a6ed..84307ac7c4 100644 --- a/packages/astro/test/fixtures/alias/package.json +++ b/packages/astro/test/fixtures/alias/package.json @@ -5,6 +5,6 @@ "dependencies": { "@astrojs/svelte": "workspace:*", "astro": "workspace:*", - "svelte": "^5.1.16" + "svelte": "^5.2.9" } } diff --git a/packages/astro/test/fixtures/astro-basic/package.json b/packages/astro/test/fixtures/astro-basic/package.json index 6f29652a57..17f2b4791f 100644 --- a/packages/astro/test/fixtures/astro-basic/package.json +++ b/packages/astro/test/fixtures/astro-basic/package.json @@ -6,6 +6,6 @@ "@astrojs/mdx": "workspace:*", "@astrojs/preact": "workspace:*", "astro": "workspace:*", - "preact": "^10.24.3" + "preact": "^10.25.0" } } diff --git a/packages/astro/test/fixtures/astro-children/package.json b/packages/astro/test/fixtures/astro-children/package.json index 7f341a250b..6e382352ba 100644 --- a/packages/astro/test/fixtures/astro-children/package.json +++ b/packages/astro/test/fixtures/astro-children/package.json @@ -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" } } diff --git a/packages/astro/test/fixtures/astro-client-only/package.json b/packages/astro/test/fixtures/astro-client-only/package.json index 5245701755..e9e13efc09 100644 --- a/packages/astro/test/fixtures/astro-client-only/package.json +++ b/packages/astro/test/fixtures/astro-client-only/package.json @@ -9,6 +9,6 @@ "astro": "workspace:*", "react": "^18.3.1", "react-dom": "^18.3.1", - "svelte": "^5.1.16" + "svelte": "^5.2.9" } } diff --git a/packages/astro/test/fixtures/astro-dynamic/package.json b/packages/astro/test/fixtures/astro-dynamic/package.json index a308d8796f..5e45360209 100644 --- a/packages/astro/test/fixtures/astro-dynamic/package.json +++ b/packages/astro/test/fixtures/astro-dynamic/package.json @@ -8,6 +8,6 @@ "astro": "workspace:*", "react": "^18.3.1", "react-dom": "^18.3.1", - "svelte": "^5.1.16" + "svelte": "^5.2.9" } } diff --git a/packages/astro/test/fixtures/astro-envs/package.json b/packages/astro/test/fixtures/astro-envs/package.json index 5a6ee80c8c..06b4c4d9db 100644 --- a/packages/astro/test/fixtures/astro-envs/package.json +++ b/packages/astro/test/fixtures/astro-envs/package.json @@ -5,6 +5,6 @@ "dependencies": { "@astrojs/vue": "workspace:*", "astro": "workspace:*", - "vue": "^3.5.12" + "vue": "^3.5.13" } } diff --git a/packages/astro/test/fixtures/astro-expr/package.json b/packages/astro/test/fixtures/astro-expr/package.json index 96656b9545..6d1089cf17 100644 --- a/packages/astro/test/fixtures/astro-expr/package.json +++ b/packages/astro/test/fixtures/astro-expr/package.json @@ -5,6 +5,6 @@ "dependencies": { "@astrojs/preact": "workspace:*", "astro": "workspace:*", - "preact": "^10.24.3" + "preact": "^10.25.0" } } diff --git a/packages/astro/test/fixtures/astro-fallback/package.json b/packages/astro/test/fixtures/astro-fallback/package.json index 84db68bc57..e6e6793f65 100644 --- a/packages/astro/test/fixtures/astro-fallback/package.json +++ b/packages/astro/test/fixtures/astro-fallback/package.json @@ -5,6 +5,6 @@ "dependencies": { "@astrojs/preact": "workspace:*", "astro": "workspace:*", - "preact": "^10.24.3" + "preact": "^10.25.0" } } diff --git a/packages/astro/test/fixtures/astro-slot-with-client/package.json b/packages/astro/test/fixtures/astro-slot-with-client/package.json index 4169f78818..fb31c27f0c 100644 --- a/packages/astro/test/fixtures/astro-slot-with-client/package.json +++ b/packages/astro/test/fixtures/astro-slot-with-client/package.json @@ -4,6 +4,6 @@ "dependencies": { "@astrojs/preact": "workspace:*", "astro": "workspace:*", - "preact": "^10.24.3" + "preact": "^10.25.0" } } diff --git a/packages/astro/test/fixtures/astro-slots-nested/package.json b/packages/astro/test/fixtures/astro-slots-nested/package.json index 6d541872ec..e0bcc2bc56 100644 --- a/packages/astro/test/fixtures/astro-slots-nested/package.json +++ b/packages/astro/test/fixtures/astro-slots-nested/package.json @@ -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" } } diff --git a/packages/astro/test/fixtures/before-hydration/package.json b/packages/astro/test/fixtures/before-hydration/package.json index 7e3219bf5c..49e1f878f9 100644 --- a/packages/astro/test/fixtures/before-hydration/package.json +++ b/packages/astro/test/fixtures/before-hydration/package.json @@ -4,6 +4,6 @@ "dependencies": { "@astrojs/preact": "workspace:*", "astro": "workspace:*", - "preact": "^10.24.3" + "preact": "^10.25.0" } } diff --git a/packages/astro/test/fixtures/build-assets/package.json b/packages/astro/test/fixtures/build-assets/package.json index 9bc24fec7f..15c1e94ca6 100644 --- a/packages/astro/test/fixtures/build-assets/package.json +++ b/packages/astro/test/fixtures/build-assets/package.json @@ -4,6 +4,6 @@ "dependencies": { "@astrojs/preact": "workspace:*", "astro": "workspace:*", - "preact": "^10.24.3" + "preact": "^10.25.0" } } diff --git a/packages/astro/test/fixtures/component-library-shared/package.json b/packages/astro/test/fixtures/component-library-shared/package.json index ee8da2977a..373ebff969 100644 --- a/packages/astro/test/fixtures/component-library-shared/package.json +++ b/packages/astro/test/fixtures/component-library-shared/package.json @@ -18,7 +18,7 @@ "astro": "workspace:*" }, "dependencies": { - "preact": "^10.24.3", + "preact": "^10.25.0", "react": "^18.3.1" } } diff --git a/packages/astro/test/fixtures/component-library/package.json b/packages/astro/test/fixtures/component-library/package.json index 7538d70a58..3454d4e339 100644 --- a/packages/astro/test/fixtures/component-library/package.json +++ b/packages/astro/test/fixtures/component-library/package.json @@ -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" } } diff --git a/packages/astro/test/fixtures/container-custom-renderers/package.json b/packages/astro/test/fixtures/container-custom-renderers/package.json index 1699ea90f8..76e5750ab4 100644 --- a/packages/astro/test/fixtures/container-custom-renderers/package.json +++ b/packages/astro/test/fixtures/container-custom-renderers/package.json @@ -9,6 +9,6 @@ "astro": "workspace:*", "react": "^18.3.1", "react-dom": "^18.3.1", - "vue": "^3.5.12" + "vue": "^3.5.13" } } diff --git a/packages/astro/test/fixtures/content-layer-markdoc/package.json b/packages/astro/test/fixtures/content-layer-markdoc/package.json index 07db171916..b706a4e010 100644 --- a/packages/astro/test/fixtures/content-layer-markdoc/package.json +++ b/packages/astro/test/fixtures/content-layer-markdoc/package.json @@ -6,6 +6,6 @@ "@astrojs/markdoc": "workspace:*", "@astrojs/preact": "workspace:*", "astro": "workspace:*", - "preact": "^10.24.3" + "preact": "^10.25.0" } } \ No newline at end of file diff --git a/packages/astro/test/fixtures/css-dangling-references/package.json b/packages/astro/test/fixtures/css-dangling-references/package.json index 1b4ea51e7b..e4ecc83be0 100644 --- a/packages/astro/test/fixtures/css-dangling-references/package.json +++ b/packages/astro/test/fixtures/css-dangling-references/package.json @@ -5,6 +5,6 @@ "dependencies": { "@astrojs/svelte": "workspace:*", "astro": "workspace:*", - "svelte": "^5.1.16" + "svelte": "^5.2.9" } } \ No newline at end of file diff --git a/packages/astro/test/fixtures/entry-file-names/package.json b/packages/astro/test/fixtures/entry-file-names/package.json index e06b7b3970..dbb20e4123 100644 --- a/packages/astro/test/fixtures/entry-file-names/package.json +++ b/packages/astro/test/fixtures/entry-file-names/package.json @@ -5,6 +5,6 @@ "dependencies": { "@astrojs/preact": "workspace:", "astro": "workspace:*", - "preact": "^10.24.3" + "preact": "^10.25.0" } } diff --git a/packages/astro/test/fixtures/fetch/package.json b/packages/astro/test/fixtures/fetch/package.json index 280c58bf9c..1189cebc3a 100644 --- a/packages/astro/test/fixtures/fetch/package.json +++ b/packages/astro/test/fixtures/fetch/package.json @@ -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" } } diff --git a/packages/astro/test/fixtures/hydration-race/package.json b/packages/astro/test/fixtures/hydration-race/package.json index b854e236c2..2a55441d61 100644 --- a/packages/astro/test/fixtures/hydration-race/package.json +++ b/packages/astro/test/fixtures/hydration-race/package.json @@ -9,6 +9,6 @@ "dependencies": { "@astrojs/preact": "workspace:*", "astro": "workspace:*", - "preact": "^10.24.3" + "preact": "^10.25.0" } } diff --git a/packages/astro/test/fixtures/i18n-routing/src/pages/404.astro b/packages/astro/test/fixtures/i18n-routing/src/pages/404.astro index fce4a30b83..bfde753739 100644 --- a/packages/astro/test/fixtures/i18n-routing/src/pages/404.astro +++ b/packages/astro/test/fixtures/i18n-routing/src/pages/404.astro @@ -7,6 +7,7 @@ const currentLocale = Astro.currentLocale;
Current Locale: {currentLocale ? currentLocale : "none"}