Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .changeset/dark-carpets-turn.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fancy-roses-spend.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/few-apples-double.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fix-advanced-routing-404-fallback.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fix-astro-marks-all-features.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/fix-i18n-redirect-header.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/fix-node-build-format-file.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/fix-route-pattern-casing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Fixes `Astro.routePattern` to preserve original casing of dynamic parameter names from filenames. Previously, a file at `src/pages/blog/[postId].astro` would return `/blog/[postid]` for `Astro.routePattern` due to an internal `.toLowerCase()` call. It now correctly returns `/blog/[postId]`.
5 changes: 0 additions & 5 deletions .changeset/funky-deserts-invite.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/thick-trains-talk.md

This file was deleted.

4 changes: 2 additions & 2 deletions examples/advanced-routing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/node": "^10.1.2",
"astro": "^6.4.2",
"@astrojs/node": "^10.1.3",
"astro": "^6.4.3",
"hono": "^4.12.14"
}
}
2 changes: 1 addition & 1 deletion examples/basics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^6.4.2"
"astro": "^6.4.3"
}
}
2 changes: 1 addition & 1 deletion examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@astrojs/mdx": "^6.0.1",
"@astrojs/rss": "^4.0.18",
"@astrojs/sitemap": "^3.7.3",
"astro": "^6.4.2",
"astro": "^6.4.3",
"sharp": "^0.34.3"
}
}
2 changes: 1 addition & 1 deletion examples/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^6.4.2"
"astro": "^6.4.3"
},
"peerDependencies": {
"astro": "^5.0.0 || ^6.0.0"
Expand Down
4 changes: 2 additions & 2 deletions examples/container-with-vitest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"test": "vitest run"
},
"dependencies": {
"@astrojs/react": "^5.0.6",
"astro": "^6.4.2",
"@astrojs/react": "^5.0.7",
"astro": "^6.4.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"vitest": "^4.1.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-alpine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"@astrojs/alpinejs": "^0.5.0",
"@types/alpinejs": "^3.13.11",
"alpinejs": "^3.15.8",
"astro": "^6.4.2"
"astro": "^6.4.3"
}
}
6 changes: 3 additions & 3 deletions examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/preact": "^5.1.4",
"@astrojs/react": "^5.0.6",
"@astrojs/preact": "^5.1.5",
"@astrojs/react": "^5.0.7",
"@astrojs/solid-js": "^6.0.1",
"@astrojs/svelte": "^8.1.2",
"@astrojs/vue": "^6.0.1",
"@types/react": "^18.3.28",
"@types/react-dom": "^18.3.7",
"astro": "^6.4.2",
"astro": "^6.4.3",
"preact": "^10.28.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
4 changes: 2 additions & 2 deletions examples/framework-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/preact": "^5.1.4",
"@astrojs/preact": "^5.1.5",
"@preact/signals": "^2.8.1",
"astro": "^6.4.2",
"astro": "^6.4.3",
"preact": "^10.28.4"
}
}
4 changes: 2 additions & 2 deletions examples/framework-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/react": "^5.0.6",
"@astrojs/react": "^5.0.7",
"@types/react": "^18.3.28",
"@types/react-dom": "^18.3.7",
"astro": "^6.4.2",
"astro": "^6.4.3",
"react": "^18.3.1",
"react-dom": "^18.3.1"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"dependencies": {
"@astrojs/solid-js": "^6.0.1",
"astro": "^6.4.2",
"astro": "^6.4.3",
"solid-js": "^1.9.11"
}
}
2 changes: 1 addition & 1 deletion examples/framework-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"dependencies": {
"@astrojs/svelte": "^8.1.2",
"astro": "^6.4.2",
"astro": "^6.4.3",
"svelte": "^5.53.5"
}
}
2 changes: 1 addition & 1 deletion examples/framework-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"dependencies": {
"@astrojs/vue": "^6.0.1",
"astro": "^6.4.2",
"astro": "^6.4.3",
"vue": "^3.5.29"
}
}
4 changes: 2 additions & 2 deletions examples/hackernews/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/node": "^10.1.2",
"astro": "^6.4.2"
"@astrojs/node": "^10.1.3",
"astro": "^6.4.3"
}
}
2 changes: 1 addition & 1 deletion examples/integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^6.4.2"
"astro": "^6.4.3"
},
"peerDependencies": {
"astro": "^4.0.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^6.4.2"
"astro": "^6.4.3"
}
}
2 changes: 1 addition & 1 deletion examples/portfolio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^6.4.2"
"astro": "^6.4.3"
}
}
4 changes: 2 additions & 2 deletions examples/ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"server": "node dist/server/entry.mjs"
},
"dependencies": {
"@astrojs/node": "^10.1.2",
"@astrojs/node": "^10.1.3",
"@astrojs/svelte": "^8.1.2",
"astro": "^6.4.2",
"astro": "^6.4.3",
"svelte": "^5.53.5"
}
}
2 changes: 1 addition & 1 deletion examples/starlog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^6.4.2",
"astro": "^6.4.3",
"sass": "^1.97.3",
"sharp": "^0.34.3"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/toolbar-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"devDependencies": {
"@types/node": "^22.10.6",
"astro": "^6.4.2"
"astro": "^6.4.3"
},
"engines": {
"node": ">=22.12.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/with-markdoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
},
"dependencies": {
"@astrojs/markdoc": "^1.0.6",
"astro": "^6.4.2"
"astro": "^6.4.3"
}
}
4 changes: 2 additions & 2 deletions examples/with-mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
},
"dependencies": {
"@astrojs/mdx": "^6.0.1",
"@astrojs/preact": "^5.1.4",
"astro": "^6.4.2",
"@astrojs/preact": "^5.1.5",
"astro": "^6.4.3",
"preact": "^10.28.4"
}
}
4 changes: 2 additions & 2 deletions examples/with-nanostores/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/preact": "^5.1.4",
"@astrojs/preact": "^5.1.5",
"@nanostores/preact": "^1.0.0",
"astro": "^6.4.2",
"astro": "^6.4.3",
"nanostores": "^1.1.1",
"preact": "^10.28.4"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/with-tailwindcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@astrojs/mdx": "^6.0.1",
"@tailwindcss/vite": "^4.2.1",
"@types/canvas-confetti": "^1.9.0",
"astro": "^6.4.2",
"astro": "^6.4.3",
"canvas-confetti": "^1.9.4",
"tailwindcss": "^4.2.1"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/with-vitest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"test": "vitest"
},
"dependencies": {
"astro": "^6.4.2",
"astro": "^6.4.3",
"vitest": "^4.1.0"
}
}
16 changes: 16 additions & 0 deletions packages/astro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# astro

## 6.4.3

### Patch Changes

- [#16900](https://github.com/withastro/astro/pull/16900) [`17a0fbd`](https://github.com/withastro/astro/commit/17a0fbd34d11db765e79caf269bfd5f43ef51da8) Thanks [@ocavue](https://github.com/ocavue)! - Bumps `devalue` dependency to v5.8.1

- [#16016](https://github.com/withastro/astro/pull/16016) [`0d85e1b`](https://github.com/withastro/astro/commit/0d85e1b7ea58a243bd1b61bdfb951c4fd87b9db5) Thanks [@felmonon](https://github.com/felmonon)! - Fix a false positive in the dev toolbar accessibility audit for anchors with text inside closed `<details>` elements.

- [#16911](https://github.com/withastro/astro/pull/16911) [`79c6c46`](https://github.com/withastro/astro/commit/79c6c469a735bece8a80200f7b188e15f1abff24) Thanks [@astrobot-houston](https://github.com/astrobot-houston)! - Fixes a bug where `experimental.advancedRouting` with `astro/hono` handlers threw `TypeError: Cannot read properties of undefined (reading 'route')` for unmatched routes instead of rendering the custom 404 page.

- [#16899](https://github.com/withastro/astro/pull/16899) [`239c469`](https://github.com/withastro/astro/commit/239c469cd2cd66d147a302a2ca14e07a0891f9b8) Thanks [@matthewp](https://github.com/matthewp)! - Fixes a false "does not call the middleware() handler" warning when using `astro()` in a custom `src/app.ts` and the first request is a redirect route.

- [#16887](https://github.com/withastro/astro/pull/16887) [`493acdb`](https://github.com/withastro/astro/commit/493acdb4abc56534e9efa68af16e3ef273d7d88b) Thanks [@astrobot-houston](https://github.com/astrobot-houston)! - Fixes `redirectToDefaultLocale` not working after the Advanced Routing refactoring.

- [#16908](https://github.com/withastro/astro/pull/16908) [`ef53ab9`](https://github.com/withastro/astro/commit/ef53ab91e8362b50bb1a3ab73d9350b93ea41de4) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Improves optimized fallbacks generation when using the Fonts API by using better metrics for bold variants

## 6.4.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "astro",
"version": "6.4.2",
"version": "6.4.3",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/core/routing/create-manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ function joinSegments(segments: RoutePart[][]): string {
return segment.map((rp) => (rp.dynamic ? `[${rp.content}]` : rp.content)).join('');
});

return `/${arr.join('/')}`.toLowerCase();
return `/${arr.join('/')}`;
}

function replaceOrKeep(original: string, from: string, to: string): string {
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/core/routing/parse-route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,5 @@ function joinSegments(segments: RoutePart[][]): string {
return segment.map((part) => (part.dynamic ? `[${part.content}]` : part.content)).join('');
});

return `/${arr.join('/')}`.toLowerCase();
return `/${arr.join('/')}`;
}
6 changes: 1 addition & 5 deletions packages/astro/src/runtime/server/render/head.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,7 @@ export function renderAllHeadContent(result: SSRResult) {
// In the future, it may be better to have only an array of head elements to avoid these assumptions.
content += styles.join('\n') + links.join('\n') + scripts.join('\n');

if (result._metadata.extraHead.length > 0) {
for (const part of result._metadata.extraHead) {
content += part;
}
}
content += result._metadata.extraHead.join('');

return markHTMLString(content);
}
Expand Down
26 changes: 26 additions & 0 deletions packages/astro/test/units/routing/parse-route.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,30 @@ describe('parseRoute', () => {
assert.equal(pageRoute.route, '/blog/post');
assert.equal(pageRoute.isIndex, false);
});

it('preserves casing of dynamic param names in route pattern', () => {
const options: ParseRouteConfig = {
config: { base: '/', trailingSlash: 'ignore' } as AstroConfig,
pageExtensions: [],
};

const route = parseRoute('blog/[postId].astro', options, {
component: 'src/pages/blog/[postId].astro',
});
assert.equal(route.route, '/blog/[postId]');
assert.deepEqual(route.params, ['postId']);
});

it('preserves casing of multiple camelCase dynamic params', () => {
const options: ParseRouteConfig = {
config: { base: '/', trailingSlash: 'ignore' } as AstroConfig,
pageExtensions: [],
};

const route = parseRoute('users/[userId]/posts/[postSlug].astro', options, {
component: 'src/pages/users/[userId]/posts/[postSlug].astro',
});
assert.equal(route.route, '/users/[userId]/posts/[postSlug]');
assert.deepEqual(route.params, ['userId', 'postSlug']);
});
});
Loading
Loading