diff --git a/.changeset/good-humans-sniff.md b/.changeset/good-humans-sniff.md deleted file mode 100644 index d5174e271..000000000 --- a/.changeset/good-humans-sniff.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Include server CSS in the SSR manifest assets diff --git a/.changeset/quiet-pumpkins-hunt.md b/.changeset/quiet-pumpkins-hunt.md deleted file mode 100644 index 17cd703c2..000000000 --- a/.changeset/quiet-pumpkins-hunt.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Expose `file` and `url` properties when fetching `.astro` files with `Astro.glob()` diff --git a/examples/basics/package.json b/examples/basics/package.json index c36be10ea..6a3659bd9 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -9,6 +9,6 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^1.0.0-beta.30" + "astro": "^1.0.0-beta.31" } } diff --git a/examples/blog-multiple-authors/package.json b/examples/blog-multiple-authors/package.json index acc1ce173..c761ea010 100644 --- a/examples/blog-multiple-authors/package.json +++ b/examples/blog-multiple-authors/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/preact": "^0.1.2", - "astro": "^1.0.0-beta.30", + "astro": "^1.0.0-beta.31", "sass": "^1.51.0" }, "dependencies": { diff --git a/examples/blog/package.json b/examples/blog/package.json index 17c48df72..bba799e87 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/preact": "^0.1.2", - "astro": "^1.0.0-beta.30" + "astro": "^1.0.0-beta.31" }, "dependencies": { "preact": "^10.7.2" diff --git a/examples/component/demo/package.json b/examples/component/demo/package.json index 0ecc25517..aef0bba68 100644 --- a/examples/component/demo/package.json +++ b/examples/component/demo/package.json @@ -10,6 +10,6 @@ }, "devDependencies": { "@example/my-component": "workspace:*", - "astro": "^1.0.0-beta.30" + "astro": "^1.0.0-beta.31" } } diff --git a/examples/component/package.json b/examples/component/package.json index 52aed79ac..29f9490b5 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -8,6 +8,6 @@ "serve": "astro --root demo preview" }, "devDependencies": { - "astro": "^1.0.0-beta.30" + "astro": "^1.0.0-beta.31" } } diff --git a/examples/docs/package.json b/examples/docs/package.json index 6993b7aa2..c61170b55 100644 --- a/examples/docs/package.json +++ b/examples/docs/package.json @@ -20,6 +20,6 @@ "devDependencies": { "@astrojs/preact": "^0.1.2", "@astrojs/react": "^0.1.2", - "astro": "^1.0.0-beta.30" + "astro": "^1.0.0-beta.31" } } diff --git a/examples/env-vars/package.json b/examples/env-vars/package.json index bf0055e28..637133008 100644 --- a/examples/env-vars/package.json +++ b/examples/env-vars/package.json @@ -9,6 +9,6 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^1.0.0-beta.30" + "astro": "^1.0.0-beta.31" } } diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index 13eb720ec..ffc172bc4 100644 --- a/examples/framework-alpine/package.json +++ b/examples/framework-alpine/package.json @@ -9,7 +9,7 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^1.0.0-beta.30" + "astro": "^1.0.0-beta.31" }, "dependencies": { "alpinejs": "^3.10.2" diff --git a/examples/framework-lit/package.json b/examples/framework-lit/package.json index 0809af5e3..1de2c4639 100644 --- a/examples/framework-lit/package.json +++ b/examples/framework-lit/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/lit": "^0.1.3", - "astro": "^1.0.0-beta.30" + "astro": "^1.0.0-beta.31" }, "dependencies": { "@webcomponents/template-shadowroot": "^0.1.0", diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index f0b5e2046..ae9ade5b1 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -15,7 +15,7 @@ "@astrojs/solid-js": "^0.1.2", "@astrojs/svelte": "^0.1.3", "@astrojs/vue": "^0.1.4", - "astro": "^1.0.0-beta.30" + "astro": "^1.0.0-beta.31" }, "dependencies": { "@webcomponents/template-shadowroot": "^0.1.0", diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json index 1d3e803b6..2cddb40ee 100644 --- a/examples/framework-preact/package.json +++ b/examples/framework-preact/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/preact": "^0.1.2", - "astro": "^1.0.0-beta.30" + "astro": "^1.0.0-beta.31" }, "dependencies": { "preact": "^10.7.2" diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index 9a86f6f9e..0615a7c35 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/react": "^0.1.2", - "astro": "^1.0.0-beta.30" + "astro": "^1.0.0-beta.31" }, "dependencies": { "@types/react": "^18.0.9", diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index c401c8544..bb9a81d0d 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/solid-js": "^0.1.2", - "astro": "^1.0.0-beta.30" + "astro": "^1.0.0-beta.31" }, "dependencies": { "solid-js": "^1.4.2" diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index 4852f24b9..82e5af65d 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/svelte": "^0.1.3", - "astro": "^1.0.0-beta.30" + "astro": "^1.0.0-beta.31" }, "dependencies": { "svelte": "^3.48.0" diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index 0def95cea..d9a93b3c3 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/vue": "^0.1.4", - "astro": "^1.0.0-beta.30" + "astro": "^1.0.0-beta.31" }, "dependencies": { "vue": "^3.2.34" diff --git a/examples/integrations-playground/package.json b/examples/integrations-playground/package.json index 71f2b0d6c..1a0e76230 100644 --- a/examples/integrations-playground/package.json +++ b/examples/integrations-playground/package.json @@ -16,7 +16,7 @@ "@astrojs/solid-js": "0.1.2", "@astrojs/tailwind": "^0.2.1", "@astrojs/turbolinks": "^0.1.3", - "astro": "^1.0.0-beta.30", + "astro": "^1.0.0-beta.31", "solid-js": "^1.4.2" }, "dependencies": { diff --git a/examples/minimal/package.json b/examples/minimal/package.json index b22d4caa9..f5edc252c 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -9,6 +9,6 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^1.0.0-beta.30" + "astro": "^1.0.0-beta.31" } } diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json index 23678acae..0260b6cce 100644 --- a/examples/non-html-pages/package.json +++ b/examples/non-html-pages/package.json @@ -9,6 +9,6 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^1.0.0-beta.30" + "astro": "^1.0.0-beta.31" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index a1df8e559..2c88e9435 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/preact": "^0.1.2", - "astro": "^1.0.0-beta.30", + "astro": "^1.0.0-beta.31", "sass": "^1.51.0" }, "dependencies": { diff --git a/examples/ssr/package.json b/examples/ssr/package.json index 09a0cebf8..8cc1b9e31 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -11,7 +11,7 @@ "devDependencies": { "@astrojs/node": "^0.1.1", "@astrojs/svelte": "^0.1.3", - "astro": "^1.0.0-beta.30", + "astro": "^1.0.0-beta.31", "concurrently": "^7.2.0", "lightcookie": "^1.0.25", "unocss": "^0.15.6", diff --git a/examples/starter/package.json b/examples/starter/package.json index abbd61580..dee1f1d69 100644 --- a/examples/starter/package.json +++ b/examples/starter/package.json @@ -9,6 +9,6 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^1.0.0-beta.30" + "astro": "^1.0.0-beta.31" } } diff --git a/examples/subpath/package.json b/examples/subpath/package.json index 7971d0f87..8cd7fdbdb 100644 --- a/examples/subpath/package.json +++ b/examples/subpath/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/react": "^0.1.2", - "astro": "^1.0.0-beta.30", + "astro": "^1.0.0-beta.31", "sass": "^1.51.0" }, "dependencies": { diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json index 6b874b4d9..ac3b948cf 100644 --- a/examples/with-markdown-plugins/package.json +++ b/examples/with-markdown-plugins/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/markdown-remark": "^0.9.4", - "astro": "^1.0.0-beta.30", + "astro": "^1.0.0-beta.31", "hast-util-select": "5.0.1", "rehype-autolink-headings": "^6.1.1", "rehype-slug": "^5.0.1", diff --git a/examples/with-markdown-shiki/package.json b/examples/with-markdown-shiki/package.json index 282d25eef..04ed09792 100644 --- a/examples/with-markdown-shiki/package.json +++ b/examples/with-markdown-shiki/package.json @@ -10,6 +10,6 @@ }, "devDependencies": { "@astrojs/markdown-remark": "^0.9.4", - "astro": "^1.0.0-beta.30" + "astro": "^1.0.0-beta.31" } } diff --git a/examples/with-markdown/package.json b/examples/with-markdown/package.json index bc8f719ea..cf0d1882a 100644 --- a/examples/with-markdown/package.json +++ b/examples/with-markdown/package.json @@ -14,7 +14,7 @@ "@astrojs/react": "^0.1.2", "@astrojs/svelte": "^0.1.3", "@astrojs/vue": "^0.1.4", - "astro": "^1.0.0-beta.30" + "astro": "^1.0.0-beta.31" }, "dependencies": { "preact": "^10.7.2", diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index fbe879c23..563669249 100644 --- a/examples/with-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -25,6 +25,6 @@ "@astrojs/solid-js": "^0.1.2", "@astrojs/svelte": "^0.1.3", "@astrojs/vue": "^0.1.4", - "astro": "^1.0.0-beta.30" + "astro": "^1.0.0-beta.31" } } diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index 8635d6760..b8ea5d504 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/tailwind": "^0.2.1", - "astro": "^1.0.0-beta.30", + "astro": "^1.0.0-beta.31", "autoprefixer": "^10.4.7", "canvas-confetti": "^1.5.1", "postcss": "^8.4.14", diff --git a/examples/with-vite-plugin-pwa/package.json b/examples/with-vite-plugin-pwa/package.json index d59874ca5..308b0268c 100644 --- a/examples/with-vite-plugin-pwa/package.json +++ b/examples/with-vite-plugin-pwa/package.json @@ -9,7 +9,7 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^1.0.0-beta.30", + "astro": "^1.0.0-beta.31", "vite-plugin-pwa": "0.11.11", "workbox-window": "^6.5.3" } diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index 7f8491d8f..1f26d2a14 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,15 @@ # astro +## 1.0.0-beta.31 + +### Patch Changes + +- [#3402](https://github.com/withastro/astro/pull/3402) [`0c9f770e`](https://github.com/withastro/astro/commit/0c9f770e8ab361f11549f1e24114e557fdcca65d) Thanks [@matthewp](https://github.com/matthewp)! - Include server CSS in the SSR manifest assets + +* [#3406](https://github.com/withastro/astro/pull/3406) [`4007aebc`](https://github.com/withastro/astro/commit/4007aebc6aba8d732abed7c001f59e61678ea3f2) Thanks [@matthewp](https://github.com/matthewp)! - Provides a better error message when using @adobe/react-spectrum + +- [#3385](https://github.com/withastro/astro/pull/3385) [`d34859d7`](https://github.com/withastro/astro/commit/d34859d75008812fcd101e197ce835bcc1ee2017) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Expose `file` and `url` properties when fetching `.astro` files with `Astro.glob()` + ## 1.0.0-beta.30 ### Patch Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index 0e44ba1b4..89d8708e0 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "1.0.0-beta.30", + "version": "1.0.0-beta.31", "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/errors.ts b/packages/astro/src/core/errors.ts index c37a05740..35893bb9a 100644 --- a/packages/astro/src/core/errors.ts +++ b/packages/astro/src/core/errors.ts @@ -41,9 +41,20 @@ export function fixViteErrorMessage(_err: unknown, server: ViteDevServer) { return err; } +const incompatiblePackages = { + 'react-spectrum': `@adobe/react-spectrum is not compatible with Vite's server-side rendering mode at the moment. You can still use React Spectrum from the client. Create an island React component and use the client:only directive. From there you can use React Spectrum.`, +}; +const incompatPackageExp = new RegExp(`(${Object.keys(incompatiblePackages).join('|')})`); + function generateHint(err: ErrorWithMetadata): string | undefined { if (/Unknown file extension \"\.(jsx|vue|svelte|astro)\" for /.test(err.message)) { return 'You likely need to add this package to `vite.ssr.noExternal` in your astro config file.'; + } else { + const res = incompatPackageExp.exec(err.stack); + if (res) { + const key = res[0] as keyof typeof incompatiblePackages; + return incompatiblePackages[key]; + } } return undefined; } diff --git a/packages/astro/src/template/5xx.ts b/packages/astro/src/template/5xx.ts index a40c3e47d..0354fbbfb 100644 --- a/packages/astro/src/template/5xx.ts +++ b/packages/astro/src/template/5xx.ts @@ -71,9 +71,9 @@ export default function template({ statusCode ? `${statusCode}: ` : '' }${title} -
${encode(error)}+ ${url ? `${url}` : ''} -
${encode(stack)}+
${encode(stack)}