From 7a297fa009ae381e788536cf4f4d2d78040e4f46 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 18 Jan 2024 18:00:24 +0000 Subject: [PATCH] [ci] release --- .changeset/smart-rules-train.md | 5 -- examples/basics/package.json | 2 +- examples/blog/package.json | 2 +- examples/component/package.json | 2 +- examples/framework-alpine/package.json | 2 +- examples/framework-lit/package.json | 2 +- examples/framework-multiple/package.json | 2 +- examples/framework-preact/package.json | 2 +- examples/framework-react/package.json | 2 +- examples/framework-solid/package.json | 2 +- examples/framework-svelte/package.json | 2 +- examples/framework-vue/package.json | 2 +- examples/hackernews/package.json | 2 +- examples/integration/package.json | 2 +- examples/middleware/package.json | 2 +- examples/minimal/package.json | 2 +- examples/non-html-pages/package.json | 2 +- examples/portfolio/package.json | 2 +- examples/ssr/package.json | 2 +- examples/starlog/package.json | 2 +- examples/view-transitions/package.json | 2 +- examples/with-markdoc/package.json | 2 +- examples/with-markdown-plugins/package.json | 2 +- examples/with-markdown-shiki/package.json | 2 +- examples/with-mdx/package.json | 2 +- examples/with-nanostores/package.json | 2 +- examples/with-tailwindcss/package.json | 2 +- examples/with-vitest/package.json | 2 +- packages/astro/CHANGELOG.md | 6 +++ packages/astro/package.json | 2 +- .../astro/src/core/routing/manifest/create.ts | 2 +- .../astro/test/units/routing/manifest.test.js | 34 ++++++------ pnpm-lock.yaml | 54 +++++++++---------- 33 files changed, 79 insertions(+), 78 deletions(-) delete mode 100644 .changeset/smart-rules-train.md diff --git a/.changeset/smart-rules-train.md b/.changeset/smart-rules-train.md deleted file mode 100644 index 4d396762976fa..0000000000000 --- a/.changeset/smart-rules-train.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"astro": patch ---- - -Fixes a regression in routing priority between `index.astro` and dynamic routes with rest parameters diff --git a/examples/basics/package.json b/examples/basics/package.json index 4396a8c5edba2..5bd74167d0427 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.2.0" + "astro": "^4.2.1" } } diff --git a/examples/blog/package.json b/examples/blog/package.json index 9e34110bcb8f0..6825d1c8d0e3d 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -14,6 +14,6 @@ "@astrojs/mdx": "^2.0.5", "@astrojs/rss": "^4.0.2", "@astrojs/sitemap": "^3.0.5", - "astro": "^4.2.0" + "astro": "^4.2.1" } } diff --git a/examples/component/package.json b/examples/component/package.json index e46b14f1aa416..6b549e7122373 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^4.2.0" + "astro": "^4.2.1" }, "peerDependencies": { "astro": "^3.0.0" diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index d9ea812a27f11..32b3a3c986311 100644 --- a/examples/framework-alpine/package.json +++ b/examples/framework-alpine/package.json @@ -14,6 +14,6 @@ "@astrojs/alpinejs": "^0.3.2", "@types/alpinejs": "^3.13.5", "alpinejs": "^3.13.3", - "astro": "^4.2.0" + "astro": "^4.2.1" } } diff --git a/examples/framework-lit/package.json b/examples/framework-lit/package.json index 75dfbf86d9601..621523a249511 100644 --- a/examples/framework-lit/package.json +++ b/examples/framework-lit/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/lit": "^4.0.1", "@webcomponents/template-shadowroot": "^0.2.1", - "astro": "^4.2.0", + "astro": "^4.2.1", "lit": "^2.8.0" } } diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index df1693cadf33d..6d9a7d4f9bd59 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -16,7 +16,7 @@ "@astrojs/solid-js": "^4.0.1", "@astrojs/svelte": "^5.0.3", "@astrojs/vue": "^4.0.8", - "astro": "^4.2.0", + "astro": "^4.2.1", "preact": "^10.19.2", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json index 2f0cd24022f24..1da422d8f4474 100644 --- a/examples/framework-preact/package.json +++ b/examples/framework-preact/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/preact": "^3.1.0", "@preact/signals": "^1.2.1", - "astro": "^4.2.0", + "astro": "^4.2.1", "preact": "^10.19.2" } } diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index d5bef87718ce0..432d585d80c7c 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -14,7 +14,7 @@ "@astrojs/react": "^3.0.9", "@types/react": "^18.2.37", "@types/react-dom": "^18.2.15", - "astro": "^4.2.0", + "astro": "^4.2.1", "react": "^18.2.0", "react-dom": "^18.2.0" } diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index 1c675eb890bfe..2f0ba2a787de0 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/solid-js": "^4.0.1", - "astro": "^4.2.0", + "astro": "^4.2.1", "solid-js": "^1.8.5" } } diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index 95d33eeb478b5..4e5fbf094de66 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/svelte": "^5.0.3", - "astro": "^4.2.0", + "astro": "^4.2.1", "svelte": "^4.2.5" } } diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index a6bf53e60518b..60e0ae6ad6227 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/vue": "^4.0.8", - "astro": "^4.2.0", + "astro": "^4.2.1", "vue": "^3.3.8" } } diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json index 85e3d3a4e8454..be1bcd740ee6d 100644 --- a/examples/hackernews/package.json +++ b/examples/hackernews/package.json @@ -12,6 +12,6 @@ }, "dependencies": { "@astrojs/node": "^8.0.0", - "astro": "^4.2.0" + "astro": "^4.2.1" } } diff --git a/examples/integration/package.json b/examples/integration/package.json index a3cb5a1c23f28..90803ebd9cd27 100644 --- a/examples/integration/package.json +++ b/examples/integration/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^4.2.0" + "astro": "^4.2.1" }, "peerDependencies": { "astro": "^3.0.0" diff --git a/examples/middleware/package.json b/examples/middleware/package.json index ceba29d505f48..06bcaa2682fc4 100644 --- a/examples/middleware/package.json +++ b/examples/middleware/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "@astrojs/node": "^8.0.0", - "astro": "^4.2.0", + "astro": "^4.2.1", "html-minifier": "^4.0.0" }, "devDependencies": { diff --git a/examples/minimal/package.json b/examples/minimal/package.json index 3b4bd48aea8ce..b481dfbe74b2b 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.2.0" + "astro": "^4.2.1" } } diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json index cebb677f920f3..5138dab7b1a82 100644 --- a/examples/non-html-pages/package.json +++ b/examples/non-html-pages/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.2.0" + "astro": "^4.2.1" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index 17b2adb49ac14..edc358f6b0340 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.2.0" + "astro": "^4.2.1" } } diff --git a/examples/ssr/package.json b/examples/ssr/package.json index f0bae9b7dd32c..5d88434baa16a 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -14,7 +14,7 @@ "dependencies": { "@astrojs/node": "^8.0.0", "@astrojs/svelte": "^5.0.3", - "astro": "^4.2.0", + "astro": "^4.2.1", "svelte": "^4.2.5" } } diff --git a/examples/starlog/package.json b/examples/starlog/package.json index d55016e30e522..41b698aa73594 100644 --- a/examples/starlog/package.json +++ b/examples/starlog/package.json @@ -10,7 +10,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.2.0", + "astro": "^4.2.1", "sass": "^1.69.5", "sharp": "^0.32.6" } diff --git a/examples/view-transitions/package.json b/examples/view-transitions/package.json index cfe9fc7108eb8..3c324d50cbad7 100644 --- a/examples/view-transitions/package.json +++ b/examples/view-transitions/package.json @@ -12,6 +12,6 @@ "devDependencies": { "@astrojs/tailwind": "^5.1.0", "@astrojs/node": "^8.0.0", - "astro": "^4.2.0" + "astro": "^4.2.1" } } diff --git a/examples/with-markdoc/package.json b/examples/with-markdoc/package.json index f43178c5a8c72..fe7d09f2f9f2e 100644 --- a/examples/with-markdoc/package.json +++ b/examples/with-markdoc/package.json @@ -12,6 +12,6 @@ }, "dependencies": { "@astrojs/markdoc": "^0.8.3", - "astro": "^4.2.0" + "astro": "^4.2.1" } } diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json index e7af1d92255ca..221ad543b12c1 100644 --- a/examples/with-markdown-plugins/package.json +++ b/examples/with-markdown-plugins/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/markdown-remark": "^4.1.0", - "astro": "^4.2.0", + "astro": "^4.2.1", "hast-util-select": "^6.0.2", "rehype-autolink-headings": "^7.1.0", "rehype-slug": "^6.0.0", diff --git a/examples/with-markdown-shiki/package.json b/examples/with-markdown-shiki/package.json index fbaf776f5cd80..e37aeb1d17cb2 100644 --- a/examples/with-markdown-shiki/package.json +++ b/examples/with-markdown-shiki/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.2.0" + "astro": "^4.2.1" } } diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json index ee41060d37a95..b4746a24f7f2b 100644 --- a/examples/with-mdx/package.json +++ b/examples/with-mdx/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/mdx": "^2.0.5", "@astrojs/preact": "^3.1.0", - "astro": "^4.2.0", + "astro": "^4.2.1", "preact": "^10.19.2" } } diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index e32f8276d0a4d..184edb41151bb 100644 --- a/examples/with-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/preact": "^3.1.0", "@nanostores/preact": "^0.5.0", - "astro": "^4.2.0", + "astro": "^4.2.1", "nanostores": "^0.9.5", "preact": "^10.19.2" } diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index 7a8b64cd19074..bfae6b612005b 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -14,7 +14,7 @@ "@astrojs/mdx": "^2.0.5", "@astrojs/tailwind": "^5.1.0", "@types/canvas-confetti": "^1.6.3", - "astro": "^4.2.0", + "astro": "^4.2.1", "autoprefixer": "^10.4.15", "canvas-confetti": "^1.9.1", "postcss": "^8.4.28", diff --git a/examples/with-vitest/package.json b/examples/with-vitest/package.json index 5166450c1363e..96450f6afd5e3 100644 --- a/examples/with-vitest/package.json +++ b/examples/with-vitest/package.json @@ -12,7 +12,7 @@ "test": "vitest" }, "dependencies": { - "astro": "^4.2.0", + "astro": "^4.2.1", "vitest": "^0.34.2" } } diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index 629cd5232cf92..39573513f1022 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,11 @@ # astro +## 4.2.1 + +### Patch Changes + +- [#9726](https://github.com/withastro/astro/pull/9726) [`a4b696def3a7eb18c1ae48b10fd3758a1874b6fe`](https://github.com/withastro/astro/commit/a4b696def3a7eb18c1ae48b10fd3758a1874b6fe) Thanks [@Fryuni](https://github.com/Fryuni)! - Fixes a regression in routing priority between `index.astro` and dynamic routes with rest parameters + ## 4.2.0 ### Minor Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index b5b289fc84cfd..0453011d9c360 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "4.2.0", + "version": "4.2.1", "description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.", "type": "module", "author": "withastro", diff --git a/packages/astro/src/core/routing/manifest/create.ts b/packages/astro/src/core/routing/manifest/create.ts index 874cfadc23eb2..6ab297a5ee223 100644 --- a/packages/astro/src/core/routing/manifest/create.ts +++ b/packages/astro/src/core/routing/manifest/create.ts @@ -197,7 +197,7 @@ function routeComparator(a: ManifestRouteData, b: ManifestRouteData) { // For sorting purposes, an index route is considered to have one more segment than the URL it represents. const aLength = a.isIndex ? a.segments.length + 1 : a.segments.length; const bLength = b.isIndex ? b.segments.length + 1 : b.segments.length; - + // Sort more specific routes before less specific routes if (aLength !== bLength) { return aLength > bLength ? -1 : 1; diff --git a/packages/astro/test/units/routing/manifest.test.js b/packages/astro/test/units/routing/manifest.test.js index 55724d2c9ec7b..7bfdf68391506 100644 --- a/packages/astro/test/units/routing/manifest.test.js +++ b/packages/astro/test/units/routing/manifest.test.js @@ -129,23 +129,23 @@ describe('routing - createRouteManifest', () => { }); expect(getManifestRoutes(manifest)).to.deep.equal([ - { - "route": "/", - "type": "page", - }, - { - "route": "/static", - "type": "page", - }, - { - "route": "/[dynamic]", - "type": "page", - }, - { - "route": "/[...rest]", - "type": "page", - }, - ]); + { + route: '/', + type: 'page', + }, + { + route: '/static', + type: 'page', + }, + { + route: '/[dynamic]', + type: 'page', + }, + { + route: '/[...rest]', + type: 'page', + }, + ]); }); it('injected routes are sorted in legacy mode above filesystem routes', async () => { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8b4be1d965932..641f6e9b2662e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -125,7 +125,7 @@ importers: examples/basics: dependencies: astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro examples/blog: @@ -140,13 +140,13 @@ importers: specifier: ^3.0.5 version: link:../../packages/integrations/sitemap astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro examples/component: devDependencies: astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro examples/framework-alpine: @@ -161,7 +161,7 @@ importers: specifier: ^3.13.3 version: 3.13.3 astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro examples/framework-lit: @@ -173,7 +173,7 @@ importers: specifier: ^0.2.1 version: 0.2.1 astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro lit: specifier: ^2.8.0 @@ -197,7 +197,7 @@ importers: specifier: ^4.0.8 version: link:../../packages/integrations/vue astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro preact: specifier: ^10.19.2 @@ -227,7 +227,7 @@ importers: specifier: ^1.2.1 version: 1.2.1(preact@10.19.3) astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro preact: specifier: ^10.19.2 @@ -245,7 +245,7 @@ importers: specifier: ^18.2.15 version: 18.2.18 astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro react: specifier: ^18.2.0 @@ -260,7 +260,7 @@ importers: specifier: ^4.0.1 version: link:../../packages/integrations/solid astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro solid-js: specifier: ^1.8.5 @@ -272,7 +272,7 @@ importers: specifier: ^5.0.3 version: link:../../packages/integrations/svelte astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro svelte: specifier: ^4.2.5 @@ -284,7 +284,7 @@ importers: specifier: ^4.0.8 version: link:../../packages/integrations/vue astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro vue: specifier: ^3.3.8 @@ -296,13 +296,13 @@ importers: specifier: ^8.0.0 version: link:../../packages/integrations/node astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro examples/integration: devDependencies: astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro examples/middleware: @@ -311,7 +311,7 @@ importers: specifier: ^8.0.0 version: link:../../packages/integrations/node astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro html-minifier: specifier: ^4.0.0 @@ -324,19 +324,19 @@ importers: examples/minimal: dependencies: astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro examples/non-html-pages: dependencies: astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro examples/portfolio: dependencies: astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro examples/ssr: @@ -348,7 +348,7 @@ importers: specifier: ^5.0.3 version: link:../../packages/integrations/svelte astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro svelte: specifier: ^4.2.5 @@ -357,7 +357,7 @@ importers: examples/starlog: dependencies: astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro sass: specifier: ^1.69.5 @@ -375,7 +375,7 @@ importers: specifier: ^5.1.0 version: link:../../packages/integrations/tailwind astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro examples/with-markdoc: @@ -384,7 +384,7 @@ importers: specifier: ^0.8.3 version: link:../../packages/integrations/markdoc astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro examples/with-markdown-plugins: @@ -393,7 +393,7 @@ importers: specifier: ^4.1.0 version: link:../../packages/markdown/remark astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro hast-util-select: specifier: ^6.0.2 @@ -414,7 +414,7 @@ importers: examples/with-markdown-shiki: dependencies: astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro examples/with-mdx: @@ -426,7 +426,7 @@ importers: specifier: ^3.1.0 version: link:../../packages/integrations/preact astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro preact: specifier: ^10.19.2 @@ -441,7 +441,7 @@ importers: specifier: ^0.5.0 version: 0.5.0(nanostores@0.9.5)(preact@10.19.3) astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro nanostores: specifier: ^0.9.5 @@ -462,7 +462,7 @@ importers: specifier: ^1.6.3 version: 1.6.4 astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro autoprefixer: specifier: ^10.4.15 @@ -480,7 +480,7 @@ importers: examples/with-vitest: dependencies: astro: - specifier: ^4.2.0 + specifier: ^4.2.1 version: link:../../packages/astro vitest: specifier: ^0.34.2