diff --git a/.changeset/curvy-elephants-fry.md b/.changeset/curvy-elephants-fry.md new file mode 100644 index 0000000000..41bbd9e4c3 --- /dev/null +++ b/.changeset/curvy-elephants-fry.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fixes an issue where Astro didn't throw an error when `Astro.rewrite` was used without providing the experimental flag diff --git a/.changeset/duplicated-brackets-generation.md b/.changeset/duplicated-brackets-generation.md deleted file mode 100644 index 4d8e0a4a16..0000000000 --- a/.changeset/duplicated-brackets-generation.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Drop duplicated brackets in data collections schema generation. diff --git a/.changeset/five-owls-check.md b/.changeset/five-owls-check.md deleted file mode 100644 index 68b6929034..0000000000 --- a/.changeset/five-owls-check.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes a case where rewriting `/` would cause an issue, when `trailingSlash` was set to `"never"`. diff --git a/.changeset/fluffy-carrots-search.md b/.changeset/fluffy-carrots-search.md deleted file mode 100644 index 79b7e7a3b7..0000000000 --- a/.changeset/fluffy-carrots-search.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -'astro': minor ---- - -Adds [`ShikiTransformer`](https://shiki.style/packages/transformers#shikijs-transformers) support to the [``](https://docs.astro.build/en/reference/api-reference/#code-) component with a new `transformers` prop. - -Note that `transformers` only applies classes and you must provide your own CSS rules to target the elements of your code block. - -```astro ---- -import { transformerNotationFocus } from '@shikijs/transformers' -import { Code } from 'astro:components' - -const code = `const foo = 'hello' -const bar = ' world' -console.log(foo + bar) // [!code focus] -` ---- - - - - -``` diff --git a/.changeset/honest-shirts-trade.md b/.changeset/honest-shirts-trade.md deleted file mode 100644 index 7708e709ab..0000000000 --- a/.changeset/honest-shirts-trade.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Reverts a logic where it wasn't possible to rewrite `/404` in static mode. It's **now possible** again diff --git a/.changeset/light-bugs-shake.md b/.changeset/light-bugs-shake.md deleted file mode 100644 index c5fe720934..0000000000 --- a/.changeset/light-bugs-shake.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fixes type generation for empty content collections diff --git a/.changeset/old-walls-report.md b/.changeset/old-walls-report.md deleted file mode 100644 index 64dc1f5d2d..0000000000 --- a/.changeset/old-walls-report.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Improves type-checking and error handling to catch case where an image import is passed directly to `getImage()` diff --git a/.changeset/rich-dolls-compete.md b/.changeset/rich-dolls-compete.md deleted file mode 100644 index 1254be9f78..0000000000 --- a/.changeset/rich-dolls-compete.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -"astro": minor ---- - -Improves the developer experience of the `500.astro` file by passing it a new `error` prop. - -When an error is thrown, the special `src/pages/500.astro` page now automatically receives the error as a prop. This allows you to display more specific information about the error on a custom 500 page. - -```astro ---- -// src/pages/500.astro -interface Props { - error: unknown -} - -const { error } = Astro.props ---- - -
{error instanceof Error ? error.message : 'Unknown error'}
-``` - -If an error occurs rendering this page, your host's default 500 error page will be shown to your visitor in production, and Astro's default error overlay will be shown in development. diff --git a/.changeset/silly-pens-fetch.md b/.changeset/silly-pens-fetch.md deleted file mode 100644 index ff336a7990..0000000000 --- a/.changeset/silly-pens-fetch.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'astro': patch ---- - -Corrects an inconsistency in dev where middleware would run for prerendered 404 routes. -Middleware is not run for prerendered 404 routes in production, so this was incorrect. - diff --git a/.changeset/six-fans-kiss.md b/.changeset/six-fans-kiss.md deleted file mode 100644 index f80b87b02d..0000000000 --- a/.changeset/six-fans-kiss.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'astro': patch ---- - -Fixes an issue that would break `Astro.request.url` and `Astro.request.headers` in `astro dev` if HTTP/2 was enabled. - -HTTP/2 is now enabled by default in `astro dev` if `https` is configured in the Vite config. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 7774667cf6..5c5f4e11b8 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,8 @@ blank_issues_enabled: false contact_links: + - name: 💁 Support + url: https://astro.build/chat + about: 'This issue tracker is not for support questions. Join us on Discord for assistance!' - name: 📘 Documentation url: https://github.com/withastro/docs about: File an issue or make an improvement to the docs website. @@ -9,6 +12,3 @@ contact_links: - name: 👾 Chat url: https://astro.build/chat about: Our Discord server is active, come join us! - - name: 💁 Support - url: https://astro.build/chat - about: 'This issue tracker is not for support questions. Join us on Discord for assistance!' diff --git a/.github/renovate.json5 b/.github/renovate.json5 index a782ffd6a7..e988426c94 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -15,6 +15,7 @@ // manually bumping deps "@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 "preact-render-to-string", // https://github.com/withastro/astro/pull/10200 "sharp", diff --git a/.npmrc b/.npmrc index f44bad2825..4912828b6b 100644 --- a/.npmrc +++ b/.npmrc @@ -4,11 +4,11 @@ link-workspace-packages=true save-workspace-protocol=false # This prevents the examples to have the `workspace:` prefix auto-install-peers=false -# `github-slugger` is used by `vite-plugin-markdown-legacy`. -# Temporarily hoist this until we remove the feature. -public-hoist-pattern[]=github-slugger # Vite's esbuild optimizer has trouble optimizing `@astrojs/lit/client-shim.js` # which imports this dependency. public-hoist-pattern[]=@webcomponents/template-shadowroot # There's a lit dependency duplication somewhere causing multiple Lit versions error. public-hoist-pattern[]=*lit* +# `astro sync` could try to import `@astrojs/db` but could fail due to linked dependencies in the monorepo. +# We hoist it here so that it can easily resolve `@astrojs/db` without hardcoded handling. +public-hoist-pattern[]=@astrojs/db diff --git a/biome.json b/biome.json index df61ec83b2..9da3b4db06 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/1.7.1/schema.json", + "$schema": "https://biomejs.dev/schemas/1.8.1/schema.json", "files": { "ignore": [ "vendor", @@ -20,7 +20,6 @@ "benchmark/results/", ".changeset", "pnpm-lock.yaml", - "package.json", "*.astro" ] }, @@ -30,7 +29,7 @@ "linter": { "enabled": false }, "javascript": { "formatter": { - "trailingComma": "es5", + "trailingCommas": "es5", "quoteStyle": "single", "semicolons": "always" } @@ -44,5 +43,15 @@ "indentStyle": "space", "trailingCommas": "none" } - } + }, + "overrides": [ + { + "include": ["package.json"], + "json": { + "formatter": { + "lineWidth": 1 + } + } + } + ] } diff --git a/examples/basics/package.json b/examples/basics/package.json index e3d952e50d..b3fe9f0a0e 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.10.3" + "astro": "^4.11.3" } } diff --git a/examples/blog/package.json b/examples/blog/package.json index 6db52dae24..de50f5c2cf 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -11,9 +11,9 @@ "astro": "astro" }, "dependencies": { - "@astrojs/mdx": "^3.1.1", - "@astrojs/rss": "^4.0.6", + "@astrojs/mdx": "^3.1.2", + "@astrojs/rss": "^4.0.7", "@astrojs/sitemap": "^3.1.6", - "astro": "^4.10.3" + "astro": "^4.11.3" } } diff --git a/examples/component/package.json b/examples/component/package.json index 0a53d80c96..978663b9a2 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^4.10.3" + "astro": "^4.11.3" }, "peerDependencies": { "astro": "^4.0.0" diff --git a/examples/container-with-vitest/package.json b/examples/container-with-vitest/package.json index 38e2543fd4..98808db7a4 100644 --- a/examples/container-with-vitest/package.json +++ b/examples/container-with-vitest/package.json @@ -12,7 +12,7 @@ "test": "vitest run" }, "dependencies": { - "astro": "^4.10.3", + "astro": "^4.11.3", "@astrojs/react": "^3.6.0", "react": "^18.3.1", "react-dom": "^18.3.1", diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index aca1189f14..21b5072bda 100644 --- a/examples/framework-alpine/package.json +++ b/examples/framework-alpine/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/alpinejs": "^0.4.0", "@types/alpinejs": "^3.13.10", - "alpinejs": "^3.14.0", - "astro": "^4.10.3" + "alpinejs": "^3.14.1", + "astro": "^4.11.3" } } diff --git a/examples/framework-lit/package.json b/examples/framework-lit/package.json index 81467a629f..129de636ba 100644 --- a/examples/framework-lit/package.json +++ b/examples/framework-lit/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/lit": "^4.3.0", "@webcomponents/template-shadowroot": "^0.2.1", - "astro": "^4.10.3", + "astro": "^4.11.3", "lit": "^3.1.4" } } diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index 31bd9c9c95..28ae3e31ad 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -18,12 +18,12 @@ "@astrojs/vue": "^4.5.0", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", - "astro": "^4.10.3", + "astro": "^4.11.3", "preact": "^10.22.0", "react": "^18.3.1", "react-dom": "^18.3.1", "solid-js": "^1.8.17", "svelte": "^4.2.18", - "vue": "^3.4.29" + "vue": "^3.4.30" } } diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json index 1938295a73..68595ddabf 100644 --- a/examples/framework-preact/package.json +++ b/examples/framework-preact/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/preact": "^3.5.0", "@preact/signals": "^1.2.3", - "astro": "^4.10.3", + "astro": "^4.11.3", "preact": "^10.22.0" } } diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index 65ac56ac6d..67db6e6366 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -14,7 +14,7 @@ "@astrojs/react": "^3.6.0", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", - "astro": "^4.10.3", + "astro": "^4.11.3", "react": "^18.3.1", "react-dom": "^18.3.1" } diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index 330c432011..94ab2e0229 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/solid-js": "^4.4.0", - "astro": "^4.10.3", + "astro": "^4.11.3", "solid-js": "^1.8.17" } } diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index e6d4ab8e83..d10d741645 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/svelte": "^5.6.0", - "astro": "^4.10.3", + "astro": "^4.11.3", "svelte": "^4.2.18" } } diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index 9b2cbbb8b9..07811d1b30 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/vue": "^4.5.0", - "astro": "^4.10.3", - "vue": "^3.4.29" + "astro": "^4.11.3", + "vue": "^3.4.30" } } diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json index 85221d768a..5ecfb6c4d4 100644 --- a/examples/hackernews/package.json +++ b/examples/hackernews/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "@astrojs/node": "^8.3.1", - "astro": "^4.10.3" + "@astrojs/node": "^8.3.2", + "astro": "^4.11.3" } } diff --git a/examples/integration/package.json b/examples/integration/package.json index d474df38c2..fc68f9f59a 100644 --- a/examples/integration/package.json +++ b/examples/integration/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^4.10.3" + "astro": "^4.11.3" }, "peerDependencies": { "astro": "^4.0.0" diff --git a/examples/middleware/package.json b/examples/middleware/package.json index 5c49204258..784a92647f 100644 --- a/examples/middleware/package.json +++ b/examples/middleware/package.json @@ -12,8 +12,8 @@ "server": "node dist/server/entry.mjs" }, "dependencies": { - "@astrojs/node": "^8.3.1", - "astro": "^4.10.3", + "@astrojs/node": "^8.3.2", + "astro": "^4.11.3", "html-minifier": "^4.0.0" }, "devDependencies": { diff --git a/examples/minimal/package.json b/examples/minimal/package.json index f21a2648c3..76cdfa03af 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.10.3" + "astro": "^4.11.3" } } diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json index 9e8b3fa0a6..ea5d4786da 100644 --- a/examples/non-html-pages/package.json +++ b/examples/non-html-pages/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.10.3" + "astro": "^4.11.3" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index 87302014de..24a29eda94 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.10.3" + "astro": "^4.11.3" } } diff --git a/examples/ssr/package.json b/examples/ssr/package.json index 98e6446738..376303f2c8 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -12,9 +12,9 @@ "server": "node dist/server/entry.mjs" }, "dependencies": { - "@astrojs/node": "^8.3.1", + "@astrojs/node": "^8.3.2", "@astrojs/svelte": "^5.6.0", - "astro": "^4.10.3", + "astro": "^4.11.3", "svelte": "^4.2.18" } } diff --git a/examples/starlog/package.json b/examples/starlog/package.json index b3ec85ebaa..bc3524edb6 100644 --- a/examples/starlog/package.json +++ b/examples/starlog/package.json @@ -10,8 +10,8 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.10.3", - "sass": "^1.77.5", + "astro": "^4.11.3", + "sass": "^1.77.6", "sharp": "^0.33.3" } } diff --git a/examples/toolbar-app/package.json b/examples/toolbar-app/package.json index 29cbbbb5e5..fa10bd67fb 100644 --- a/examples/toolbar-app/package.json +++ b/examples/toolbar-app/package.json @@ -15,6 +15,6 @@ "./app": "./dist/app.js" }, "devDependencies": { - "astro": "^4.10.3" + "astro": "^4.11.3" } } diff --git a/examples/view-transitions/package.json b/examples/view-transitions/package.json index f9437e2737..268fd4f9dc 100644 --- a/examples/view-transitions/package.json +++ b/examples/view-transitions/package.json @@ -11,7 +11,7 @@ }, "devDependencies": { "@astrojs/tailwind": "^5.1.0", - "@astrojs/node": "^8.3.1", - "astro": "^4.10.3" + "@astrojs/node": "^8.3.2", + "astro": "^4.11.3" } } diff --git a/examples/with-markdoc/package.json b/examples/with-markdoc/package.json index 4c1ca16f6e..060e59fe89 100644 --- a/examples/with-markdoc/package.json +++ b/examples/with-markdoc/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "@astrojs/markdoc": "^0.11.0", - "astro": "^4.10.3" + "@astrojs/markdoc": "^0.11.1", + "astro": "^4.11.3" } } diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json index 519743eed0..8b55a2d9fc 100644 --- a/examples/with-markdown-plugins/package.json +++ b/examples/with-markdown-plugins/package.json @@ -11,8 +11,8 @@ "astro": "astro" }, "dependencies": { - "@astrojs/markdown-remark": "^5.1.0", - "astro": "^4.10.3", + "@astrojs/markdown-remark": "^5.1.1", + "astro": "^4.11.3", "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 51c40eee2e..c35f5d9045 100644 --- a/examples/with-markdown-shiki/package.json +++ b/examples/with-markdown-shiki/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.10.3" + "astro": "^4.11.3" } } diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json index 0a09588371..e3563fc3ac 100644 --- a/examples/with-mdx/package.json +++ b/examples/with-mdx/package.json @@ -11,9 +11,9 @@ "astro": "astro" }, "dependencies": { - "@astrojs/mdx": "^3.1.1", + "@astrojs/mdx": "^3.1.2", "@astrojs/preact": "^3.5.0", - "astro": "^4.10.3", + "astro": "^4.11.3", "preact": "^10.22.0" } } diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index 57a6581c9c..2f4e215385 100644 --- a/examples/with-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/preact": "^3.5.0", "@nanostores/preact": "^0.5.1", - "astro": "^4.10.3", + "astro": "^4.11.3", "nanostores": "^0.10.3", "preact": "^10.22.0" } diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index bbb4eb46cd..b270326721 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -11,10 +11,10 @@ "astro": "astro" }, "dependencies": { - "@astrojs/mdx": "^3.1.1", + "@astrojs/mdx": "^3.1.2", "@astrojs/tailwind": "^5.1.0", "@types/canvas-confetti": "^1.6.4", - "astro": "^4.10.3", + "astro": "^4.11.3", "autoprefixer": "^10.4.19", "canvas-confetti": "^1.9.3", "postcss": "^8.4.38", diff --git a/examples/with-vitest/package.json b/examples/with-vitest/package.json index ed6a7500b4..9e687e22c4 100644 --- a/examples/with-vitest/package.json +++ b/examples/with-vitest/package.json @@ -12,7 +12,7 @@ "test": "vitest" }, "dependencies": { - "astro": "^4.10.3", + "astro": "^4.11.3", "vitest": "^1.6.0" } } diff --git a/package.json b/package.json index 7310bde62c..c084688c48 100644 --- a/package.json +++ b/package.json @@ -16,10 +16,10 @@ "dev": "turbo run dev --concurrency=40 --parallel --filter=astro --filter=create-astro --filter=\"@astrojs/*\" --filter=\"@benchmark/*\"", "format": "pnpm run format:code && pnpm run format:imports", "format:ci": "pnpm run format:code:ci && pnpm run format:imports:ci", - "format:code": "biome format ./ --write && prettier -w \"**/*\" --ignore-unknown --cache", - "format:code:ci": "biome format ./ && prettier -w \"**/*\" --ignore-unknown --cache --check", - "format:imports": "biome check --apply .", - "format:imports:ci": "biome ci .", + "format:code": "biome format --write && prettier -w \"**/*\" --ignore-unknown --cache", + "format:code:ci": "biome format && prettier -w \"**/*\" --ignore-unknown --cache --check", + "format:imports": "biome check --formatter-enabled=false --write", + "format:imports:ci": "biome ci --formatter-enabled=false", "test": "turbo run test --concurrency=1 --filter=astro --filter=create-astro --filter=\"@astrojs/*\"", "test:citgm": "pnpm -r --filter=astro test", "test:match": "cd packages/astro && pnpm run test:match", @@ -52,9 +52,9 @@ }, "devDependencies": { "@astrojs/check": "^0.7.0", - "@biomejs/biome": "1.7.1", + "@biomejs/biome": "1.8.1", "@changesets/changelog-github": "^0.5.0", - "@changesets/cli": "^2.27.5", + "@changesets/cli": "^2.27.6", "@eslint/eslintrc": "^3.1.0", "@types/node": "^18.17.8", "esbuild": "^0.21.5", @@ -68,8 +68,8 @@ "prettier-plugin-astro": "^0.14.0", "tiny-glob": "^0.2.9", "turbo": "^1.13.4", - "typescript": "~5.4.5", - "typescript-eslint": "^7.13.0" + "typescript": "~5.5.2", + "typescript-eslint": "^7.13.1" }, "pnpm": { "packageExtensions": { diff --git a/packages/astro-rss/CHANGELOG.md b/packages/astro-rss/CHANGELOG.md index 7d715a523d..042a36c551 100644 --- a/packages/astro-rss/CHANGELOG.md +++ b/packages/astro-rss/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/rss +## 4.0.7 + +### Patch Changes + +- [#11299](https://github.com/withastro/astro/pull/11299) [`8ce66f2`](https://github.com/withastro/astro/commit/8ce66f2ef7328546d823f1076f9bab4217a6be7d) Thanks [@ematipico](https://github.com/ematipico)! - Fixes an issue where the `pagesGlobToRssItems` returned an incorrect type for `items` + ## 4.0.6 ### Patch Changes diff --git a/packages/astro-rss/package.json b/packages/astro-rss/package.json index 812ea3eaac..55197198c0 100644 --- a/packages/astro-rss/package.json +++ b/packages/astro-rss/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/rss", "description": "Add RSS feeds to your Astro projects", - "version": "4.0.6", + "version": "4.0.7", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/packages/astro-rss/src/index.ts b/packages/astro-rss/src/index.ts index f2cb37c86b..84cdad0d90 100644 --- a/packages/astro-rss/src/index.ts +++ b/packages/astro-rss/src/index.ts @@ -32,13 +32,13 @@ export type RSSOptions = { export type RSSFeedItem = { /** Link to item */ - link: z.infer['link']; + link?: z.infer['link']; /** Full content of the item. Should be valid HTML */ content?: z.infer['content']; /** Title of item */ - title: z.infer['title']; + title?: z.infer['title']; /** Publication date of item */ - pubDate: z.infer['pubDate']; + pubDate?: z.infer['pubDate']; /** Item description */ description?: z.infer['description']; /** Append some other XML-valid data to this item */ diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index 0552d97580..db06c91c35 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,111 @@ # astro +## 4.11.3 + +### Patch Changes + +- [#11347](https://github.com/withastro/astro/pull/11347) [`33bdc54`](https://github.com/withastro/astro/commit/33bdc5472929f72fa8e39624598bf929c48e60c0) Thanks [@bluwy](https://github.com/bluwy)! - Fixes installed packages detection when running `astro check` + +- [#11327](https://github.com/withastro/astro/pull/11327) [`0df8142`](https://github.com/withastro/astro/commit/0df81422a81c8f8900684d100e9b8f26365fa0b1) Thanks [@ematipico](https://github.com/ematipico)! - Fixes an issue with the container APIs where a runtime error was thrown during the build, when using `pnpm` as package manager. + +## 4.11.2 + +### Patch Changes + +- [#11335](https://github.com/withastro/astro/pull/11335) [`4c4741b`](https://github.com/withastro/astro/commit/4c4741b42dc531403f7b9647bd51951d0cdb8f5b) Thanks [@ematipico](https://github.com/ematipico)! - Reverts [#11292](https://github.com/withastro/astro/pull/11292), which caused a regression to the input type + +- [#11326](https://github.com/withastro/astro/pull/11326) [`41121fb`](https://github.com/withastro/astro/commit/41121fbe00e144d4d93835811e1c4349664d9003) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Fixes a case where running `astro sync` when using the experimental `astro:env` feature would fail if environment variables were missing + +- [#11338](https://github.com/withastro/astro/pull/11338) [`9752a0b`](https://github.com/withastro/astro/commit/9752a0b27526270fd0066f3db7049e9ae6af1ef8) Thanks [@zaaakher](https://github.com/zaaakher)! - Fixes svg icon margin in devtool tooltip title to look coherent in `rtl` and `ltr` layouts + +- [#11331](https://github.com/withastro/astro/pull/11331) [`f1b78a4`](https://github.com/withastro/astro/commit/f1b78a496034d53b0e9dfc276a4a1b1d691772c4) Thanks [@bluwy](https://github.com/bluwy)! - Removes `resolve` package and simplify internal resolve check + +- [#11339](https://github.com/withastro/astro/pull/11339) [`8fdbf0e`](https://github.com/withastro/astro/commit/8fdbf0e45beffdae3da1e7f36797575c92f8a0ba) Thanks [@matthewp](https://github.com/matthewp)! - Remove non-fatal errors from telemetry + + Previously we tracked non-fatal errors in telemetry to get a good idea of the types of errors that occur in `astro dev`. However this has become noisy over time and results in a lot of data that isn't particularly useful. This removes those non-fatal errors from being tracked. + +## 4.11.1 + +### Patch Changes + +- [#11308](https://github.com/withastro/astro/pull/11308) [`44c61dd`](https://github.com/withastro/astro/commit/44c61ddfd85f1c23f8cec8caeaa5e25897121996) Thanks [@ematipico](https://github.com/ematipico)! - Fixes an issue where custom `404.astro` and `500.astro` were not returning the correct status code when rendered inside a rewriting cycle. + +- [#11302](https://github.com/withastro/astro/pull/11302) [`0622567`](https://github.com/withastro/astro/commit/06225673269201044358788f2a81dbe13912adce) Thanks [@martrapp](https://github.com/martrapp)! - Fixes an issue with the view transition router when redirecting to an URL with different origin. + +- Updated dependencies [[`b6afe6a`](https://github.com/withastro/astro/commit/b6afe6a782f68f4a279463a144baaf99cb96b6dc), [`41064ce`](https://github.com/withastro/astro/commit/41064cee78c1cccd428f710a24c483aeb275fd95)]: + - @astrojs/markdown-remark@5.1.1 + - @astrojs/internal-helpers@0.4.1 + +## 4.11.0 + +### Minor Changes + +- [#11197](https://github.com/withastro/astro/pull/11197) [`4b46bd9`](https://github.com/withastro/astro/commit/4b46bd9bdcbb302f294aa27b8aa07099e104fa17) Thanks [@braebo](https://github.com/braebo)! - Adds [`ShikiTransformer`](https://shiki.style/packages/transformers#shikijs-transformers) support to the [``](https://docs.astro.build/en/reference/api-reference/#code-) component with a new `transformers` prop. + + Note that `transformers` only applies classes and you must provide your own CSS rules to target the elements of your code block. + + ```astro + --- + import { transformerNotationFocus } from '@shikijs/transformers'; + import { Code } from 'astro:components'; + + const code = `const foo = 'hello' + const bar = ' world' + console.log(foo + bar) // [!code focus] + `; + --- + + + + + ``` + +- [#11134](https://github.com/withastro/astro/pull/11134) [`9042be0`](https://github.com/withastro/astro/commit/9042be049157ce859355f911565bc0c3d68f0aa1) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Improves the developer experience of the `500.astro` file by passing it a new `error` prop. + + When an error is thrown, the special `src/pages/500.astro` page now automatically receives the error as a prop. This allows you to display more specific information about the error on a custom 500 page. + + ```astro + --- + // src/pages/500.astro + interface Props { + error: unknown; + } + + const { error } = Astro.props; + --- + +
{error instanceof Error ? error.message : 'Unknown error'}
+ ``` + + If an error occurs rendering this page, your host's default 500 error page will be shown to your visitor in production, and Astro's default error overlay will be shown in development. + +### Patch Changes + +- [#11280](https://github.com/withastro/astro/pull/11280) [`fd3645f`](https://github.com/withastro/astro/commit/fd3645fe8364ec5e280b6802d1468867890d463c) Thanks [@ascorbic](https://github.com/ascorbic)! - Fixes a bug that prevented cookies from being set when using experimental rewrites + +- [#11275](https://github.com/withastro/astro/pull/11275) [`bab700d`](https://github.com/withastro/astro/commit/bab700d69085b1de8f03fc1b0b31651f709cbfe3) Thanks [@syhily](https://github.com/syhily)! - Drop duplicated brackets in data collections schema generation. + +- [#11272](https://github.com/withastro/astro/pull/11272) [`ea987d7`](https://github.com/withastro/astro/commit/ea987d7da589ead9aa4b550f167f5e2f6c939d2e) Thanks [@ematipico](https://github.com/ematipico)! - Fixes a case where rewriting `/` would cause an issue, when `trailingSlash` was set to `"never"`. + +- [#11272](https://github.com/withastro/astro/pull/11272) [`ea987d7`](https://github.com/withastro/astro/commit/ea987d7da589ead9aa4b550f167f5e2f6c939d2e) Thanks [@ematipico](https://github.com/ematipico)! - Reverts a logic where it wasn't possible to rewrite `/404` in static mode. It's **now possible** again + +- [#11264](https://github.com/withastro/astro/pull/11264) [`5a9c9a6`](https://github.com/withastro/astro/commit/5a9c9a60e7c32aa461b86b5bc667cb955e23d4d9) Thanks [@Fryuni](https://github.com/Fryuni)! - Fixes type generation for empty content collections + +- [#11279](https://github.com/withastro/astro/pull/11279) [`9a08d74`](https://github.com/withastro/astro/commit/9a08d74bc00ae2c3bc254f99580a22ce4df1d002) Thanks [@ascorbic](https://github.com/ascorbic)! - Improves type-checking and error handling to catch case where an image import is passed directly to `getImage()` + +- [#11292](https://github.com/withastro/astro/pull/11292) [`7f8f347`](https://github.com/withastro/astro/commit/7f8f34799528ed0b2011e1ea273bd0636f6e767d) Thanks [@jdtjenkins](https://github.com/jdtjenkins)! - Fixes a case where `defineAction` autocomplete for the `accept` prop would not show `"form"` as a possible value + +- [#11273](https://github.com/withastro/astro/pull/11273) [`cb4d078`](https://github.com/withastro/astro/commit/cb4d07819f0dbdfd94bc4f084edf7720ada01323) Thanks [@ascorbic](https://github.com/ascorbic)! - Corrects an inconsistency in dev where middleware would run for prerendered 404 routes. + Middleware is not run for prerendered 404 routes in production, so this was incorrect. + +- [#11284](https://github.com/withastro/astro/pull/11284) [`f4b029b`](https://github.com/withastro/astro/commit/f4b029b08264268c68fc81ea25b264e81f47e683) Thanks [@ascorbic](https://github.com/ascorbic)! - Fixes an issue that would break `Astro.request.url` and `Astro.request.headers` in `astro dev` if HTTP/2 was enabled. + + HTTP/2 is now enabled by default in `astro dev` if `https` is configured in the Vite config. + ## 4.10.3 ### Patch Changes diff --git a/packages/astro/e2e/fixtures/actions-blog/package.json b/packages/astro/e2e/fixtures/actions-blog/package.json index 0bdb564fee..8b2c3824d2 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.4.5" + "typescript": "^5.5.2" } } diff --git a/packages/astro/e2e/fixtures/actions-react-19/package.json b/packages/astro/e2e/fixtures/actions-react-19/package.json index bc2f138c85..d729497732 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.4.5" + "typescript": "^5.5.2" }, "overrides": { "@types/react": "npm:types-react", diff --git a/packages/astro/e2e/fixtures/astro-envs/package.json b/packages/astro/e2e/fixtures/astro-envs/package.json index 6b5ae1c466..6c1c006d84 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.4.29" + "vue": "^3.4.30" } } diff --git a/packages/astro/e2e/fixtures/client-only/package.json b/packages/astro/e2e/fixtures/client-only/package.json index dcff68a6c1..71dbaea83f 100644 --- a/packages/astro/e2e/fixtures/client-only/package.json +++ b/packages/astro/e2e/fixtures/client-only/package.json @@ -16,6 +16,6 @@ "react-dom": "^18.3.1", "solid-js": "^1.8.17", "svelte": "^4.2.18", - "vue": "^3.4.29" + "vue": "^3.4.30" } } diff --git a/packages/astro/e2e/fixtures/error-sass/package.json b/packages/astro/e2e/fixtures/error-sass/package.json index 37918eb2c1..57d060439e 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.77.5" + "sass": "^1.77.6" } } diff --git a/packages/astro/e2e/fixtures/errors/package.json b/packages/astro/e2e/fixtures/errors/package.json index d0fa209f99..0c0a9a37b8 100644 --- a/packages/astro/e2e/fixtures/errors/package.json +++ b/packages/astro/e2e/fixtures/errors/package.json @@ -12,9 +12,9 @@ "preact": "^10.22.0", "react": "^18.3.1", "react-dom": "^18.3.1", - "sass": "^1.77.5", + "sass": "^1.77.6", "solid-js": "^1.8.17", "svelte": "^4.2.18", - "vue": "^3.4.29" + "vue": "^3.4.30" } } diff --git a/packages/astro/e2e/fixtures/hmr/package.json b/packages/astro/e2e/fixtures/hmr/package.json index af6eb2e78a..8f65a830d5 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.77.5" + "sass": "^1.77.6" } } diff --git a/packages/astro/e2e/fixtures/multiple-frameworks/package.json b/packages/astro/e2e/fixtures/multiple-frameworks/package.json index 0a3b38e5ab..9a1a64c50a 100644 --- a/packages/astro/e2e/fixtures/multiple-frameworks/package.json +++ b/packages/astro/e2e/fixtures/multiple-frameworks/package.json @@ -19,6 +19,6 @@ "react-dom": "^18.3.1", "solid-js": "^1.8.17", "svelte": "^4.2.18", - "vue": "^3.4.29" + "vue": "^3.4.30" } } diff --git a/packages/astro/e2e/fixtures/nested-in-preact/package.json b/packages/astro/e2e/fixtures/nested-in-preact/package.json index dd202a5cc9..de0892d4ab 100644 --- a/packages/astro/e2e/fixtures/nested-in-preact/package.json +++ b/packages/astro/e2e/fixtures/nested-in-preact/package.json @@ -16,6 +16,6 @@ "react-dom": "^18.3.1", "solid-js": "^1.8.17", "svelte": "^4.2.18", - "vue": "^3.4.29" + "vue": "^3.4.30" } } diff --git a/packages/astro/e2e/fixtures/nested-in-react/package.json b/packages/astro/e2e/fixtures/nested-in-react/package.json index 0f18830bf8..b86d74abf7 100644 --- a/packages/astro/e2e/fixtures/nested-in-react/package.json +++ b/packages/astro/e2e/fixtures/nested-in-react/package.json @@ -16,6 +16,6 @@ "react-dom": "^18.3.1", "solid-js": "^1.8.17", "svelte": "^4.2.18", - "vue": "^3.4.29" + "vue": "^3.4.30" } } diff --git a/packages/astro/e2e/fixtures/nested-in-solid/package.json b/packages/astro/e2e/fixtures/nested-in-solid/package.json index d474d1e55f..2710565a64 100644 --- a/packages/astro/e2e/fixtures/nested-in-solid/package.json +++ b/packages/astro/e2e/fixtures/nested-in-solid/package.json @@ -16,6 +16,6 @@ "react-dom": "^18.3.1", "solid-js": "^1.8.17", "svelte": "^4.2.18", - "vue": "^3.4.29" + "vue": "^3.4.30" } } diff --git a/packages/astro/e2e/fixtures/nested-in-svelte/package.json b/packages/astro/e2e/fixtures/nested-in-svelte/package.json index 820284e5ea..1f8bc0ed2d 100644 --- a/packages/astro/e2e/fixtures/nested-in-svelte/package.json +++ b/packages/astro/e2e/fixtures/nested-in-svelte/package.json @@ -16,6 +16,6 @@ "react-dom": "^18.3.1", "solid-js": "^1.8.17", "svelte": "^4.2.18", - "vue": "^3.4.29" + "vue": "^3.4.30" } } diff --git a/packages/astro/e2e/fixtures/nested-in-vue/package.json b/packages/astro/e2e/fixtures/nested-in-vue/package.json index f898219577..fc1af8d53c 100644 --- a/packages/astro/e2e/fixtures/nested-in-vue/package.json +++ b/packages/astro/e2e/fixtures/nested-in-vue/package.json @@ -16,6 +16,6 @@ "react-dom": "^18.3.1", "solid-js": "^1.8.17", "svelte": "^4.2.18", - "vue": "^3.4.29" + "vue": "^3.4.30" } } diff --git a/packages/astro/e2e/fixtures/nested-recursive/package.json b/packages/astro/e2e/fixtures/nested-recursive/package.json index 36026a23f5..d9ed42e92a 100644 --- a/packages/astro/e2e/fixtures/nested-recursive/package.json +++ b/packages/astro/e2e/fixtures/nested-recursive/package.json @@ -16,7 +16,7 @@ "react-dom": "^18.3.1", "solid-js": "^1.8.17", "svelte": "^4.2.18", - "vue": "^3.4.29" + "vue": "^3.4.30" }, "scripts": { "dev": "astro dev" diff --git a/packages/astro/e2e/fixtures/view-transitions/package.json b/packages/astro/e2e/fixtures/view-transitions/package.json index 601f9a40d6..b563de999e 100644 --- a/packages/astro/e2e/fixtures/view-transitions/package.json +++ b/packages/astro/e2e/fixtures/view-transitions/package.json @@ -11,6 +11,6 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "svelte": "^4.2.18", - "vue": "^3.4.29" + "vue": "^3.4.30" } } diff --git a/packages/astro/e2e/fixtures/view-transitions/src/pages/one.astro b/packages/astro/e2e/fixtures/view-transitions/src/pages/one.astro index 8e34eb5559..4f11cbbc0d 100644 --- a/packages/astro/e2e/fixtures/view-transitions/src/pages/one.astro +++ b/packages/astro/e2e/fixtures/view-transitions/src/pages/one.astro @@ -11,6 +11,7 @@ import Layout from '../components/Layout.astro'; go to top go to redirect 2 go to a redirect external + redirect cross-origin go to undefined page