diff --git a/.changeset/five-stingrays-collect.md b/.changeset/five-stingrays-collect.md new file mode 100644 index 000000000..b4d51aa5b --- /dev/null +++ b/.changeset/five-stingrays-collect.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fixes the static build to write to 404.html diff --git a/.changeset/fresh-ladybugs-think.md b/.changeset/fresh-ladybugs-think.md new file mode 100644 index 000000000..bdf29ac19 --- /dev/null +++ b/.changeset/fresh-ladybugs-think.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fixes use of private .env variables with the static build diff --git a/.changeset/modern-elephants-burn.md b/.changeset/modern-elephants-burn.md new file mode 100644 index 000000000..b868ecfb6 --- /dev/null +++ b/.changeset/modern-elephants-burn.md @@ -0,0 +1,19 @@ +--- +'astro': minor +--- + +New default build strategy + +This change marks the "static build" as the new default build strategy. If you are unfamiliar with this build strategy check out the [migration guide](https://docs.astro.build/en/migrate/#planned-deprecations) on how to change your code to be compatible with this new bulid strategy. + +If you'd like to keep using the old build strategy, use the flag `--legacy-build` both in your `astro dev` and `astro build` scripts, for ex: + +```json +{ + "scripts": { + "build": "astro build --legacy-build" + } +} +``` + +Note that the legacy build *is* deprecated and will be removed in a future version. You should only use this flag until you have the time to migration your code. diff --git a/.changeset/new-pianos-boil.md b/.changeset/new-pianos-boil.md new file mode 100644 index 000000000..bb3c1a728 --- /dev/null +++ b/.changeset/new-pianos-boil.md @@ -0,0 +1,7 @@ +--- +'astro': minor +--- + +## Updated `
` and `` behavior + +Since `astro@0.21`, Astro placed certain restrictions on what files could use `` or `` tags. In `astro@0.24`, the restrictions have been lifted. Astro will be able to correctly handle `` and `` tags in _any_ component, not just those in `src/pages/` or `src/layouts/`. diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 000000000..9532184e9 --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,57 @@ +{ + "mode": "pre", + "tag": "next", + "initialVersions": { + "@example/blog": "0.0.1", + "@example/blog-multiple-authors": "0.0.1", + "@example/component": "0.0.1", + "@example/my-component-demo": "0.0.1", + "@example/my-component": "0.0.1", + "@example/docs": "0.0.1", + "@example/env-vars": "0.0.1", + "@example/fast-build": "0.0.1", + "@example/framework-alpine": "0.0.1", + "@example/framework-lit": "0.0.1", + "@example/framework-multiple": "0.0.1", + "@example/framework-preact": "0.0.1", + "@example/framework-react": "0.0.1", + "@example/framework-solid": "0.0.1", + "@example/framework-svelte": "0.0.1", + "@example/framework-vue": "0.0.1", + "@example/minimal": "0.0.1", + "@example/non-html-pages": "0.0.1", + "@example/portfolio": "0.0.1", + "@example/portfolio-svelte": "0.0.1", + "@example/ssr": "0.0.1", + "@example/starter": "0.0.1", + "@example/subpath": "0.0.1", + "@example/with-markdown": "0.0.1", + "@example/with-markdown-plugins": "0.0.2", + "@example/with-markdown-shiki": "0.0.1", + "@example/with-nanostores": "0.0.1", + "@example/with-tailwindcss": "0.0.1", + "@example/with-vite-plugin-pwa": "0.0.1", + "astro": "0.23.3", + "@astrojs/parser": "0.22.1", + "@astrojs/prism": "0.4.0", + "@astrojs/test-custom-element-renderer": "0.1.0", + "@astrojs/test-static-build-pkg": "0.0.3", + "create-astro": "0.7.1", + "@astrojs/markdown-remark": "0.6.2", + "@astrojs/renderer-lit": "0.4.0", + "@astrojs/renderer-preact": "0.5.0", + "@astrojs/renderer-react": "0.5.0", + "@astrojs/renderer-solid": "0.4.0", + "@astrojs/renderer-svelte": "0.4.0", + "@astrojs/renderer-vue": "0.4.0", + "astro-scripts": "0.0.1", + "astro.build": "0.0.1", + "docs": "0.0.7" + }, + "changesets": [ + "fresh-ladybugs-think", + "modern-elephants-burn", + "new-pianos-boil", + "thick-ravens-chew" + ] +} diff --git a/.changeset/thick-ravens-chew.md b/.changeset/thick-ravens-chew.md new file mode 100644 index 000000000..3e7710d42 --- /dev/null +++ b/.changeset/thick-ravens-chew.md @@ -0,0 +1,5 @@ +--- +"astro": patch +--- + +Replace `send` dependency with `sirv` diff --git a/.npmrc b/.npmrc index 6e736d195..492d20357 100644 --- a/.npmrc +++ b/.npmrc @@ -3,19 +3,19 @@ prefer-workspace-packages=true link-workspace-packages=true save-workspace-protocol=false # This prevents the examples to have the `workspace:` prefix -use-node-version=14.19.0 - -# Rather than shamefully hoisting everything, just make problematic packages public -public-hoist-pattern[]=autoprefixer -public-hoist-pattern[]=astro -public-hoist-pattern[]=remark-* -public-hoist-pattern[]=rehype-* -public-hoist-pattern[]=react -public-hoist-pattern[]=react-dom -public-hoist-pattern[]=preact -public-hoist-pattern[]=preact-render-to-string -public-hoist-pattern[]=vue -public-hoist-pattern[]=svelte -public-hoist-pattern[]=solid-js -public-hoist-pattern[]=lit -public-hoist-pattern[]=@webcomponents/template-shadowroot +shamefully-hoist=true +# TODO: We would like to move to individual opt-in hoisting, but Astro was not originally +# written with this in mind. In the future, it would be good to hoist individual packages only. +# public-hoist-pattern[]=autoprefixer +# public-hoist-pattern[]=astro +# public-hoist-pattern[]=remark-* +# public-hoist-pattern[]=rehype-* +# public-hoist-pattern[]=react +# public-hoist-pattern[]=react-dom +# public-hoist-pattern[]=preact +# public-hoist-pattern[]=preact-render-to-string +# public-hoist-pattern[]=vue +# public-hoist-pattern[]=svelte +# public-hoist-pattern[]=solid-js +# public-hoist-pattern[]=lit +# public-hoist-pattern[]=@webcomponents/template-shadowroot diff --git a/comp.txt b/comp.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/examples/blog-multiple-authors/package.json b/examples/blog-multiple-authors/package.json index 124600953..2d8b33dc2 100644 --- a/examples/blog-multiple-authors/package.json +++ b/examples/blog-multiple-authors/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/renderer-preact": "^0.5.0", - "astro": "^0.23.7", + "astro": "^0.24.0-next.0", "sass": "^1.49.8" } } diff --git a/examples/blog/package.json b/examples/blog/package.json index 68c0ca62c..737c86a51 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -9,7 +9,7 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^0.23.7", + "astro": "^0.24.0-next.0", "@astrojs/renderer-preact": "^0.5.0" } } diff --git a/examples/component/demo/package.json b/examples/component/demo/package.json index 6fb878f6e..438e6485e 100644 --- a/examples/component/demo/package.json +++ b/examples/component/demo/package.json @@ -9,7 +9,7 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^0.23.7", - "@example/my-component": "workspace:*" + "@example/my-component": "workspace:*", + "astro": "^0.24.0-next.0" } } diff --git a/examples/component/package.json b/examples/component/package.json index dc1c119cf..613eac1a9 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -8,6 +8,6 @@ "serve": "astro --project-root demo preview" }, "devDependencies": { - "astro": "^0.23.7" + "astro": "^0.24.0-next.0" } } diff --git a/examples/docs/package.json b/examples/docs/package.json index 620bf726f..406c1f51f 100644 --- a/examples/docs/package.json +++ b/examples/docs/package.json @@ -9,12 +9,16 @@ "preview": "astro preview" }, "dependencies": { + "@algolia/client-search": "^4.12.0", "@docsearch/css": "^3.0.0", - "@docsearch/react": "^1.0.0-alpha.28" + "@docsearch/react": "^3.0.0", + "@types/react": "^17.0.39", + "react": "^17.0.2", + "react-dom": "^17.0.2" }, "devDependencies": { "@astrojs/renderer-react": "^0.5.0", "@astrojs/renderer-preact": "^0.5.0", - "astro": "^0.23.7" + "astro": "^0.24.0-next.0" } } diff --git a/examples/docs/src/components/Header/Search.tsx b/examples/docs/src/components/Header/Search.tsx index bbe02073d..ebc563c61 100644 --- a/examples/docs/src/components/Header/Search.tsx +++ b/examples/docs/src/components/Header/Search.tsx @@ -57,6 +57,7 @@ export default function Search() { initialScrollY={window.scrollY} onClose={onClose} indexName={(CONFIG as any).ALGOLIA.indexName} + appId={(CONFIG as any).ALGOLIA.appId} apiKey={(CONFIG as any).ALGOLIA.apiKey} transformItems={(items) => { return items.map((item) => { diff --git a/examples/docs/src/config.ts b/examples/docs/src/config.ts index 5953dd97a..174765d27 100644 --- a/examples/docs/src/config.ts +++ b/examples/docs/src/config.ts @@ -26,6 +26,7 @@ export const KNOWN_LANGUAGES = { // See "Algolia" section of the README for more information. // export const ALGOLIA = { // indexName: 'XXXXXXXXXX', +// appId: 'XXXXXXXXXX', // apiKey: 'XXXXXXXXXX', // } diff --git a/examples/env-vars/package.json b/examples/env-vars/package.json index 5b1dc8623..1751b14a7 100644 --- a/examples/env-vars/package.json +++ b/examples/env-vars/package.json @@ -9,6 +9,6 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^0.23.7" + "astro": "^0.24.0-next.0" } } diff --git a/examples/fast-build/package.json b/examples/fast-build/package.json index 1259721d0..0a7bd74ff 100644 --- a/examples/fast-build/package.json +++ b/examples/fast-build/package.json @@ -12,10 +12,10 @@ "devDependencies": { "@astrojs/renderer-vue": "^0.4.0", "@astrojs/renderer-preact": "^0.5.0", - "astro": "^0.23.7", "sass": "^1.49.8", + "astro": "^0.24.0-next.0", + "preact": "~10.6.5", "unocss": "^0.15.5", - "vite-imagetools": "^4.0.1", - "@astrojs/renderer-vue": "^0.4.0" + "vite-imagetools": "^4.0.1" } } diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index 49384258a..87154d440 100644 --- a/examples/framework-alpine/package.json +++ b/examples/framework-alpine/package.json @@ -9,6 +9,6 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^0.23.7" + "astro": "^0.24.0-next.0" } } diff --git a/examples/framework-lit/package.json b/examples/framework-lit/package.json index e15c32b8e..61d97814e 100644 --- a/examples/framework-lit/package.json +++ b/examples/framework-lit/package.json @@ -10,6 +10,6 @@ }, "devDependencies": { "@astrojs/renderer-lit": "^0.4.0", - "astro": "^0.23.7" + "astro": "^0.24.0-next.0" } } diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index 5b3c53da5..aef07762e 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -13,8 +13,8 @@ "@astrojs/renderer-preact": "^0.5.0", "@astrojs/renderer-react": "^0.5.0", "@astrojs/renderer-solid": "^0.4.0", - "@astrojs/renderer-svelte": "^0.4.0", + "@astrojs/renderer-svelte": "^0.5.1", "@astrojs/renderer-vue": "^0.4.0", - "astro": "^0.23.7" + "astro": "^0.24.0-next.0" } } diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json index 1fa0b2a64..7c946770e 100644 --- a/examples/framework-preact/package.json +++ b/examples/framework-preact/package.json @@ -10,6 +10,6 @@ }, "devDependencies": { "@astrojs/renderer-preact": "^0.5.0", - "astro": "^0.23.7" + "astro": "^0.24.0-next.0" } } diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index 4d1762a87..7b0d66d1a 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -10,6 +10,6 @@ }, "devDependencies": { "@astrojs/renderer-react": "^0.5.0", - "astro": "^0.23.7" + "astro": "^0.24.0-next.0" } } diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index 5bb22ea55..c782f3533 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -10,6 +10,6 @@ }, "devDependencies": { "@astrojs/renderer-solid": "^0.4.0", - "astro": "^0.23.7" + "astro": "^0.24.0-next.0" } } diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index 7dd4d12e2..83fecfe4f 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -9,7 +9,7 @@ "preview": "astro preview" }, "devDependencies": { - "@astrojs/renderer-svelte": "^0.4.0", - "astro": "^0.23.7" + "@astrojs/renderer-svelte": "^0.5.1", + "astro": "^0.24.0-next.0" } } diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index 8662c303f..fdce32fc4 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -10,6 +10,6 @@ }, "devDependencies": { "@astrojs/renderer-vue": "^0.4.0", - "astro": "^0.23.7" + "astro": "^0.24.0-next.0" } } diff --git a/examples/minimal/package.json b/examples/minimal/package.json index aa4ce339e..16bea438c 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -9,6 +9,6 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^0.23.7" + "astro": "^0.24.0-next.0" } } diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json index 665ca4a45..837ead14b 100644 --- a/examples/non-html-pages/package.json +++ b/examples/non-html-pages/package.json @@ -9,6 +9,6 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^0.23.7" + "astro": "^0.24.0-next.0" } } diff --git a/examples/portfolio-svelte/package.json b/examples/portfolio-svelte/package.json index b9c83a2e8..73ade49a0 100644 --- a/examples/portfolio-svelte/package.json +++ b/examples/portfolio-svelte/package.json @@ -9,7 +9,7 @@ "preview": "astro preview" }, "devDependencies": { - "@astrojs/renderer-svelte": "^0.4.0", - "astro": "^0.23.7" + "@astrojs/renderer-svelte": "^0.5.1", + "astro": "^0.24.0-next.0" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index 744cfaddd..5629af7d4 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -10,6 +10,6 @@ }, "devDependencies": { "@astrojs/renderer-preact": "^0.5.0", - "astro": "^0.23.7" + "astro": "^0.24.0-next.0" } } diff --git a/examples/ssr/package.json b/examples/ssr/package.json index 9da47f6a3..0075e0f30 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -11,10 +11,9 @@ "server": "node server/server.mjs" }, "devDependencies": { - "@astrojs/renderer-svelte": "^0.4.0", - "astro": "^0.23.7", + "@astrojs/renderer-svelte": "^0.5.1", + "astro": "^0.24.0-next.0", "unocss": "^0.15.5", - "vite-imagetools": "^4.0.1", - "@astrojs/renderer-svelte": "^0.5.1" + "vite-imagetools": "^4.0.1" } } diff --git a/examples/starter/package.json b/examples/starter/package.json index 80bdb70f4..963e78d53 100644 --- a/examples/starter/package.json +++ b/examples/starter/package.json @@ -9,6 +9,6 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^0.23.7" + "astro": "^0.24.0-next.0" } } diff --git a/examples/subpath/package.json b/examples/subpath/package.json index 43b01d9f7..55001eee2 100644 --- a/examples/subpath/package.json +++ b/examples/subpath/package.json @@ -9,7 +9,7 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^0.23.7", - "@astrojs/renderer-react": "^0.5.0" + "@astrojs/renderer-react": "^0.5.0", + "astro": "^0.24.0-next.0" } } diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json index a275c3612..6092c7ec3 100644 --- a/examples/with-markdown-plugins/package.json +++ b/examples/with-markdown-plugins/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/markdown-remark": "^0.6.1", - "astro": "^0.23.7", + "astro": "^0.24.0-next.0", "hast-util-select": "5.0.1", "rehype-autolink-headings": "^6.1.0", "rehype-slug": "^5.0.0", diff --git a/examples/with-markdown-shiki/package.json b/examples/with-markdown-shiki/package.json index 9ec931950..83b6a66a9 100644 --- a/examples/with-markdown-shiki/package.json +++ b/examples/with-markdown-shiki/package.json @@ -10,6 +10,6 @@ }, "devDependencies": { "@astrojs/markdown-remark": "^0.6.1", - "astro": "^0.23.7" + "astro": "^0.24.0-next.0" } } diff --git a/examples/with-markdown/package.json b/examples/with-markdown/package.json index 144e8d6de..d5374964c 100644 --- a/examples/with-markdown/package.json +++ b/examples/with-markdown/package.json @@ -11,9 +11,9 @@ "devDependencies": { "@astrojs/renderer-preact": "^0.5.0", "@astrojs/renderer-react": "^0.5.0", - "@astrojs/renderer-svelte": "^0.4.0", + "@astrojs/renderer-svelte": "^0.5.1", "@astrojs/renderer-vue": "^0.4.0", "@astrojs/markdown-remark": "^0.6.1", - "astro": "^0.23.7" + "astro": "^0.24.0-next.0" } } diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index 6777c58d1..405842aec 100644 --- a/examples/with-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -13,18 +13,18 @@ "@nanostores/react": "^0.1.5", "@nanostores/vue": "^0.4.1", "nanostores": "^0.5.7", - "solid-nanostores": "0.0.6" + "solid-nanostores": "0.0.6", + "preact": "^10.6.5", + "react": "^17.0.2", + "react-dom": "^17.0.2", + "vue": "^3.2.0" }, "devDependencies": { "@astrojs/renderer-react": "^0.5.0", - "@astrojs/renderer-svelte": "^0.4.0", "@astrojs/renderer-vue": "^0.4.0", "@astrojs/renderer-preact": "^0.5.0", "@astrojs/renderer-solid": "^0.4.0", - "astro": "^0.23.7", - "@astrojs/renderer-preact": "^0.5.0", - "@astrojs/renderer-react": "^0.5.0", "@astrojs/renderer-svelte": "^0.5.1", - "@astrojs/renderer-vue": "^0.4.0" + "astro": "^0.24.0-next.0" } } diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index a34e085f3..4e99fdef6 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -10,9 +10,9 @@ }, "devDependencies": { "@astrojs/renderer-preact": "^0.5.0", - "astro": "^0.23.7", + "postcss": "^8.3.8", + "astro": "^0.24.0-next.0", "autoprefixer": "^10.4.0", - "tailwindcss": "^3.0.5", - "@astrojs/renderer-preact": "^0.5.0" + "tailwindcss": "^3.0.5" } } diff --git a/examples/with-vite-plugin-pwa/package.json b/examples/with-vite-plugin-pwa/package.json index 9324eef67..2c7c5d408 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": "^0.23.7", + "astro": "^0.24.0-next.0", "vite-plugin-pwa": "0.11.11", "workbox-window": "^6.5.0" } diff --git a/package.json b/package.json index b4c1e386d..13f6e0482 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,8 @@ "peerDependencyRules": { "ignoreMissing": [ "@babel/core", - "@babel/plugin-transform-react-jsx" + "@babel/plugin-transform-react-jsx", + "vite" ] } }, @@ -51,20 +52,20 @@ "@astrojs/webapi": "workspace:*" }, "devDependencies": { - "@changesets/changelog-github": "^0.4.2", - "@changesets/cli": "^2.16.0", - "@octokit/action": "^3.15.4", - "@typescript-eslint/eslint-plugin": "^5.0.0", - "@typescript-eslint/parser": "^5.0.0", + "@changesets/changelog-github": "^0.4.3", + "@changesets/cli": "^2.21.1", + "@octokit/action": "^3.18.0", + "@typescript-eslint/eslint-plugin": "^5.14.0", + "@typescript-eslint/parser": "^5.14.0", "del": "^6.0.0", "esbuild": "0.13.7", - "eslint": "^8.0.1", - "eslint-config-prettier": "^8.3.0", + "eslint": "^8.10.0", + "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", - "execa": "^6.0.0", - "prettier": "^2.4.1", + "execa": "^6.1.0", + "prettier": "^2.5.1", "pretty-bytes": "^6.0.0", - "tiny-glob": "^0.2.8", + "tiny-glob": "^0.2.9", "turbo": "^1.1.5", "typescript": "4.5.2" } diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index fa4f3a6bc..142756d04 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,35 @@ # astro +## 0.24.0-next.0 + +### Minor Changes + +- [#2705](https://github.com/withastro/astro/pull/2705) [`8ce63ee6`](https://github.com/withastro/astro/commit/8ce63ee658677ecabcb3068f00413b51e7db30ef) Thanks [@natemoo-re](https://github.com/natemoo-re)! - New default build strategy + + This change marks the "static build" as the new default build strategy. If you are unfamiliar with this build strategy check out the [migration guide](https://docs.astro.build/en/migrate/#planned-deprecations) on how to change your code to be compatible with this new bulid strategy. + + If you'd like to keep using the old build strategy, use the flag `--legacy-build` both in your `astro dev` and `astro build` scripts, for ex: + + ```json + { + "scripts": { + "build": "astro build --legacy-build" + } + } + ``` + + Note that the legacy build _is_ deprecated and will be removed in a future version. You should only use this flag until you have the time to migration your code. + + - **Updated `` and `` behavior** + + Since `astro@0.21`, Astro placed certain restrictions on what files could use `` or `` tags. In `astro@0.24`, the restrictions have been lifted. Astro will be able to correctly handle `` and `` tags in _any_ component, not just those in `src/pages/` or `src/layouts/`. + +### Patch Changes + +- [#2705](https://github.com/withastro/astro/pull/2705) [`176d4082`](https://github.com/withastro/astro/commit/176d4082ca642e3d7b996529f1efed7048b4d04f) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Fixes use of private .env variables with the static build + +* [#2705](https://github.com/withastro/astro/pull/2705) [`a483c044`](https://github.com/withastro/astro/commit/a483c0446ba222edf4258f4683cd918ea209b8f4) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Replace `send` dependency with `sirv` + ## 0.23.7 ### Patch Changes @@ -96,12 +126,12 @@ ```typescript // src/pages/company.json.ts export async function get() { - return { - body: JSON.stringify({ - name: 'Astro Technology Company', - url: 'https://astro.build/', - }), - }; + return { + body: JSON.stringify({ + name: 'Astro Technology Company', + url: 'https://astro.build/', + }), + }; } ``` @@ -263,12 +293,12 @@ ```typescript // src/pages/company.json.ts export async function get() { - return { - body: JSON.stringify({ - name: 'Astro Technology Company', - url: 'https://astro.build/', - }), - }; + return { + body: JSON.stringify({ + name: 'Astro Technology Company', + url: 'https://astro.build/', + }), + }; } ``` @@ -1623,10 +1653,10 @@ For convenience, you may now also move your `astro.config.js` file to a top-leve ```js export default { - markdownOptions: { - remarkPlugins: ['remark-slug', ['remark-autolink-headings', { behavior: 'prepend' }]], - rehypePlugins: ['rehype-slug', ['rehype-autolink-headings', { behavior: 'prepend' }]], - }, + markdownOptions: { + remarkPlugins: ['remark-slug', ['remark-autolink-headings', { behavior: 'prepend' }]], + rehypePlugins: ['rehype-slug', ['rehype-autolink-headings', { behavior: 'prepend' }]], + }, }; ``` @@ -1646,10 +1676,10 @@ For convenience, you may now also move your `astro.config.js` file to a top-leve ```js export default { - name: '@matthewp/my-renderer', - server: './server.js', - client: './client.js', - hydrationPolyfills: ['./my-polyfill.js'], + name: '@matthewp/my-renderer', + server: './server.js', + client: './client.js', + hydrationPolyfills: ['./my-polyfill.js'], }; ``` diff --git a/packages/astro/package.json b/packages/astro/package.json index 508ddfb84..69818591e 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "0.23.7", + "version": "0.24.0-next.0", "description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.", "type": "module", "author": "withastro", @@ -54,11 +54,11 @@ "dev": "astro-scripts dev \"src/**/*.ts\"", "postbuild": "astro-scripts copy \"src/**/*.astro\"", "benchmark": "node test/benchmark/dev.bench.js && node test/benchmark/build.bench.js", - "test": "mocha --parallel --timeout 15000 --ignore **/lit-element.test.js && mocha **/lit-element.test.js", - "test:match": "mocha --timeout 15000 -g" + "test": "mocha --parallel --timeout 20000 --ignore **/lit-element.test.js && mocha --timeout 20000 **/lit-element.test.js", + "test:match": "mocha --timeout 20000 -g" }, "dependencies": { - "@astrojs/compiler": "^0.11.4", + "@astrojs/compiler": "^0.12.0-next.8", "@astrojs/language-server": "^0.8.6", "@astrojs/markdown-remark": "^0.6.4", "@astrojs/prism": "0.4.0", @@ -95,7 +95,7 @@ "resolve": "^1.20.0", "rollup": "^2.64.0", "semver": "^7.3.5", - "send": "^0.17.1", + "sirv": "^2.0.2", "serialize-javascript": "^6.0.0", "shiki": "^0.10.0", "shorthash": "^0.0.2", diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index dab4b9a65..e945b8dd6 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -27,8 +27,10 @@ export interface CLIFlags { hostname?: string; port?: number; config?: string; + /** @deprecated */ experimentalStaticBuild?: boolean; experimentalSsr?: boolean; + legacyBuild?: boolean; drafts?: boolean; } @@ -266,12 +268,19 @@ export interface AstroUserConfig { */ drafts?: boolean; /** - * Experimental: Enables "static build mode" for faster builds. + * Enables "legacy build mode" for compatibility with older Astro versions. * Default: false */ + legacyBuild?: boolean; + /** + * @deprecated + * Experimental: Enables "static build mode" for faster builds. + * Default: true + */ experimentalStaticBuild?: boolean; /** * Enable a build for SSR support. + * Default: false */ experimentalSsr?: boolean; }; @@ -506,17 +515,6 @@ export type Params = Record