From cc30be81ea00d3a3015c7fbaeab5da1a9b0c256d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 13 Oct 2022 16:01:52 +0000 Subject: [PATCH 1/2] [ci] release --- .changeset/cyan-paws-fry.md | 38 ----- .changeset/early-pillows-deliver.md | 5 - .changeset/fifty-ads-march.md | 19 --- .changeset/giant-news-speak.md | 18 --- .changeset/happy-mayflies-sort.md | 5 - .changeset/metal-pumas-walk.md | 43 ------ .changeset/new-hotels-unite.md | 6 - .changeset/selfish-foxes-bake.md | 14 -- .changeset/serious-icons-dream.md | 5 - .changeset/sixty-ladybugs-return.md | 5 - .changeset/stupid-points-refuse.md | 49 ------- .changeset/ten-candles-relate.md | 7 - .changeset/ten-phones-drop.md | 5 - .changeset/thin-parents-breathe.md | 5 - .changeset/warm-mangos-dance.md | 5 - .changeset/witty-sheep-wave.md | 7 - examples/basics/package.json | 2 +- examples/blog/package.json | 2 +- examples/component/package.json | 4 +- examples/deno/package.json | 4 +- examples/docs/package.json | 2 +- examples/framework-alpine/package.json | 2 +- examples/framework-lit/package.json | 2 +- examples/framework-multiple/package.json | 6 +- examples/framework-preact/package.json | 2 +- examples/framework-react/package.json | 2 +- examples/framework-solid/package.json | 4 +- examples/framework-svelte/package.json | 4 +- examples/framework-vue/package.json | 2 +- examples/integration/package.json | 4 +- examples/minimal/package.json | 2 +- examples/non-html-pages/package.json | 2 +- examples/portfolio/package.json | 2 +- examples/ssr/package.json | 6 +- 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 | 4 +- examples/with-vite-plugin-pwa/package.json | 2 +- examples/with-vitest/package.json | 2 +- packages/astro/CHANGELOG.md | 136 ++++++++++++++++++ packages/astro/package.json | 2 +- packages/integrations/cloudflare/CHANGELOG.md | 44 ++++++ packages/integrations/cloudflare/package.json | 2 +- packages/integrations/deno/CHANGELOG.md | 44 ++++++ packages/integrations/deno/package.json | 2 +- packages/integrations/image/CHANGELOG.md | 50 +++++++ packages/integrations/image/package.json | 2 +- packages/integrations/netlify/CHANGELOG.md | 44 ++++++ packages/integrations/netlify/package.json | 2 +- packages/integrations/node/CHANGELOG.md | 120 ++++++++++++++++ packages/integrations/node/package.json | 2 +- packages/integrations/solid/CHANGELOG.md | 6 + packages/integrations/solid/package.json | 2 +- packages/integrations/svelte/CHANGELOG.md | 6 + packages/integrations/svelte/package.json | 2 +- packages/integrations/tailwind/CHANGELOG.md | 8 ++ packages/integrations/tailwind/package.json | 2 +- packages/integrations/vercel/CHANGELOG.md | 44 ++++++ packages/integrations/vercel/package.json | 2 +- pnpm-lock.yaml | 81 ++++++----- 62 files changed, 594 insertions(+), 315 deletions(-) delete mode 100644 .changeset/cyan-paws-fry.md delete mode 100644 .changeset/early-pillows-deliver.md delete mode 100644 .changeset/fifty-ads-march.md delete mode 100644 .changeset/giant-news-speak.md delete mode 100644 .changeset/happy-mayflies-sort.md delete mode 100644 .changeset/metal-pumas-walk.md delete mode 100644 .changeset/new-hotels-unite.md delete mode 100644 .changeset/selfish-foxes-bake.md delete mode 100644 .changeset/serious-icons-dream.md delete mode 100644 .changeset/sixty-ladybugs-return.md delete mode 100644 .changeset/stupid-points-refuse.md delete mode 100644 .changeset/ten-candles-relate.md delete mode 100644 .changeset/ten-phones-drop.md delete mode 100644 .changeset/thin-parents-breathe.md delete mode 100644 .changeset/warm-mangos-dance.md delete mode 100644 .changeset/witty-sheep-wave.md diff --git a/.changeset/cyan-paws-fry.md b/.changeset/cyan-paws-fry.md deleted file mode 100644 index df2585ecb929..000000000000 --- a/.changeset/cyan-paws-fry.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -'astro': minor -'@astrojs/node': minor ---- - -# Adapter support for `astro preview` - -Adapters are now about to support the `astro preview` command via a new integration option. The Node.js adapter `@astrojs/node` is the first of the built-in adapters to gain support for this. What this means is that if you are using `@astrojs/node` you can new preview your SSR app by running: - -```shell -npm run preview -``` - -## Adapter API - -We will be updating the other first party Astro adapters to support preview over time. Adapters can opt-in to this feature by providing the `previewEntrypoint` via the `setAdapter` function in `astro:config:done` hook. The Node.js adapter's code looks like this: - -```diff -export default function() { - return { - name: '@astrojs/node', - hooks: { - 'astro:config:done': ({ setAdapter, config }) => { - setAdapter({ - name: '@astrojs/node', - serverEntrypoint: '@astrojs/node/server.js', -+ previewEntrypoint: '@astrojs/node/preview.js', - exports: ['handler'], - }); - - // more here - } - } - }; -} -``` - -The `previewEntrypoint` is a module in the adapter's package that is a Node.js script. This script is run when `astro preview` is run and is charged with starting up the built server. See the Node.js implementation in `@astrojs/node` to see how that is implemented. diff --git a/.changeset/early-pillows-deliver.md b/.changeset/early-pillows-deliver.md deleted file mode 100644 index 745ff35f07b0..000000000000 --- a/.changeset/early-pillows-deliver.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/svelte': patch ---- - -Allow class to be passed into Svelte islands diff --git a/.changeset/fifty-ads-march.md b/.changeset/fifty-ads-march.md deleted file mode 100644 index d06e8fc36cc2..000000000000 --- a/.changeset/fifty-ads-march.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -'astro': minor ---- - -## New properties for API routes - -In API routes, you can now get the `site`, `generator`, `url`, `clientAddress`, `props`, and `redirect` fields on the APIContext, which is the first parameter passed to an API route. This was done to make the APIContext more closely align with the `Astro` global in .astro pages. - -For example, here's how you might use the `clientAddress`, which is the user's IP address, to selectively allow users. - -```js -export function post({ clientAddress, request, redirect }) { - if(!allowList.has(clientAddress)) { - return redirect('/not-allowed'); - } -} -``` - -Check out the docs for more information on the newly available fields: https://docs.astro.build/en/core-concepts/endpoints/#server-endpoints-api-routes diff --git a/.changeset/giant-news-speak.md b/.changeset/giant-news-speak.md deleted file mode 100644 index f0fb38d64b2e..000000000000 --- a/.changeset/giant-news-speak.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -'astro': minor ---- - -Added support for updating TypeScript settings automatically when using `astro add` - -The `astro add` command will now automatically update your `tsconfig.json` with the proper TypeScript settings needed for the chosen frameworks. - -For instance, typing `astro add solid` will update your `tsconfig.json` with the following settings, per [Solid's TypeScript guide](https://www.solidjs.com/guides/typescript): - -```json -{ - "compilerOptions": { - "jsx": "preserve", - "jsxImportSource": "solid-js" - } -} -``` diff --git a/.changeset/happy-mayflies-sort.md b/.changeset/happy-mayflies-sort.md deleted file mode 100644 index 2038ea1b31e0..000000000000 --- a/.changeset/happy-mayflies-sort.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/image': patch ---- - -Fix image external config in build diff --git a/.changeset/metal-pumas-walk.md b/.changeset/metal-pumas-walk.md deleted file mode 100644 index a6b15a07f3ef..000000000000 --- a/.changeset/metal-pumas-walk.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -'@astrojs/node': major ---- - -# Standalone mode for the Node.js adapter - -New in `@astrojs/node` is support for __standalone mode__. With standalone mode you can start your production server without needing to write any server JavaScript yourself. The server starts simply by running the script like so: - -```shell -node ./dist/server/entry.mjs -``` - -To enable standalone mode, set the new `mode` to `'standalone'` option in your Astro config: - -```js -import { defineConfig } from 'astro/config'; -import nodejs from '@astrojs/node'; - -export default defineConfig({ - output: 'server', - adapter: nodejs({ - mode: 'standalone' - }) -}); -``` - -See the @astrojs/node documentation to learn all of the options available in standalone mode. - -## Breaking change - -This is a semver major change because the new `mode` option is required. Existing @astrojs/node users who are using their own HTTP server framework such as Express can upgrade by setting the `mode` option to `'middleware'` in order to build to a middleware mode, which is the same behavior and API as before. - -```js -import { defineConfig } from 'astro/config'; -import nodejs from '@astrojs/node'; - -export default defineConfig({ - output: 'server', - adapter: nodejs({ - mode: 'middleware' - }) -}); -``` diff --git a/.changeset/new-hotels-unite.md b/.changeset/new-hotels-unite.md deleted file mode 100644 index 8febc2d47eda..000000000000 --- a/.changeset/new-hotels-unite.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'astro': minor ---- - -- Added `isRestart` and `addWatchFile` to integration step `isRestart`. -- Restart dev server automatically when tsconfig changes. diff --git a/.changeset/selfish-foxes-bake.md b/.changeset/selfish-foxes-bake.md deleted file mode 100644 index 9e253388ac91..000000000000 --- a/.changeset/selfish-foxes-bake.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'astro': minor ---- - -## Support passing a custom status code for Astro.redirect - -New in this minor is the ability to pass a status code to `Astro.redirect`. By default it uses `302` but now you can pass another code as the second argument: - -```astro ---- -// This page was moved -return Astro.redirect('/posts/new-post-name', 301); ---- -``` diff --git a/.changeset/serious-icons-dream.md b/.changeset/serious-icons-dream.md deleted file mode 100644 index 968f8a4b451e..000000000000 --- a/.changeset/serious-icons-dream.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Skip JSX tagging for export statements with source diff --git a/.changeset/sixty-ladybugs-return.md b/.changeset/sixty-ladybugs-return.md deleted file mode 100644 index 0f8282dc59da..000000000000 --- a/.changeset/sixty-ladybugs-return.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Upgrade Astro compiler to 0.27.1 diff --git a/.changeset/stupid-points-refuse.md b/.changeset/stupid-points-refuse.md deleted file mode 100644 index e79106541cbf..000000000000 --- a/.changeset/stupid-points-refuse.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -'astro': minor -'@astrojs/cloudflare': minor -'@astrojs/deno': minor -'@astrojs/image': minor -'@astrojs/netlify': minor -'@astrojs/node': minor -'@astrojs/vercel': minor ---- - -# New build configuration - -The ability to customize SSR build configuration more granularly is now available in Astro. You can now customize the output folder for `server` (the server code for SSR), `client` (your client-side JavaScript and assets), and `serverEntry` (the name of the entrypoint server module). Here are the defaults: - -```js -import { defineConfig } from 'astro/config'; - -export default defineConfig({ - output: 'server', - build: { - server: './dist/server/', - client: './dist/client/', - serverEntry: 'entry.mjs', - } -}); -``` - -These new configuration options are only supported in SSR mode and are ignored when building to SSG (a static site). - -## Integration hook change - -The integration hook `astro:build:start` includes a param `buildConfig` which includes all of these same options. You can continue to use this param in Astro 1.x, but it is deprecated in favor of the new `build.config` options. All of the built-in adapters have been updated to the new format. If you have an integration that depends on this param we suggest upgrading to do this instead: - -```js -export default function myIntegration() { - return { - name: 'my-integration', - hooks: { - 'astro:config:setup': ({ updateConfig }) => { - updateConfig({ - build: { - server: '...' - } - }); - } - } - } -} -``` diff --git a/.changeset/ten-candles-relate.md b/.changeset/ten-candles-relate.md deleted file mode 100644 index 402e46a1cdee..000000000000 --- a/.changeset/ten-candles-relate.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@astrojs/tailwind': minor ---- - -## HMR on config file changes - -New in this release is the ability for config changes to automatically reflect via HMR. Now when you edit your `tsconfig.json` or `tailwind.config.js` configs, the changes will reload automatically without the need to restart your dev server. diff --git a/.changeset/ten-phones-drop.md b/.changeset/ten-phones-drop.md deleted file mode 100644 index 4233ec43300a..000000000000 --- a/.changeset/ten-phones-drop.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/solid-js': minor ---- - -Auto ssr.noExternal solidjs dependencies diff --git a/.changeset/thin-parents-breathe.md b/.changeset/thin-parents-breathe.md deleted file mode 100644 index 2867ab3b62f7..000000000000 --- a/.changeset/thin-parents-breathe.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Support strict dependency install for libraries with JSX diff --git a/.changeset/warm-mangos-dance.md b/.changeset/warm-mangos-dance.md deleted file mode 100644 index f73664e699d0..000000000000 --- a/.changeset/warm-mangos-dance.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/image': patch ---- - -Support relative protocol image URL diff --git a/.changeset/witty-sheep-wave.md b/.changeset/witty-sheep-wave.md deleted file mode 100644 index cac7841e4659..000000000000 --- a/.changeset/witty-sheep-wave.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'astro': patch ---- - -Update Astro.cookies.set types to allow booleans and numbers - -Note that booleans and numbers were already allowed, they just were not allowed by the type definitions. diff --git a/examples/basics/package.json b/examples/basics/package.json index 0317758cacfe..0a5b48aaaa68 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.7" + "astro": "^1.5.0" } } diff --git a/examples/blog/package.json b/examples/blog/package.json index 722b1a2fe74a..6baaa6746c36 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.7", + "astro": "^1.5.0", "@astrojs/mdx": "^0.11.4", "@astrojs/rss": "^1.0.2", "@astrojs/sitemap": "^1.0.0" diff --git a/examples/component/package.json b/examples/component/package.json index 107065147611..4fd6e320d083 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -15,9 +15,9 @@ ], "scripts": {}, "devDependencies": { - "astro": "^1.4.7" + "astro": "^1.5.0" }, "peerDependencies": { - "astro": "^1.4.7" + "astro": "^1.5.0" } } diff --git a/examples/deno/package.json b/examples/deno/package.json index bd3af4dba2a9..b5171bfe123e 100644 --- a/examples/deno/package.json +++ b/examples/deno/package.json @@ -10,9 +10,9 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.7" + "astro": "^1.5.0" }, "devDependencies": { - "@astrojs/deno": "^1.1.0" + "@astrojs/deno": "^1.2.0" } } diff --git a/examples/docs/package.json b/examples/docs/package.json index d84a96527e27..34ea9c03d438 100644 --- a/examples/docs/package.json +++ b/examples/docs/package.json @@ -12,7 +12,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.7", + "astro": "^1.5.0", "preact": "^10.7.3", "react": "^18.1.0", "react-dom": "^18.1.0", diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index b22c9c637010..581f3b6637fe 100644 --- a/examples/framework-alpine/package.json +++ b/examples/framework-alpine/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.7", + "astro": "^1.5.0", "alpinejs": "^3.10.2", "@astrojs/alpinejs": "^0.1.2", "@types/alpinejs": "^3.7.0" diff --git a/examples/framework-lit/package.json b/examples/framework-lit/package.json index b0742ff94ee2..160dcd4d2cda 100644 --- a/examples/framework-lit/package.json +++ b/examples/framework-lit/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.7", + "astro": "^1.5.0", "lit": "^2.2.5", "@astrojs/lit": "^1.0.0", "@webcomponents/template-shadowroot": "^0.1.0" diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index 9adb7a9e154a..4b25ab7bd9e1 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.7", + "astro": "^1.5.0", "preact": "^10.7.3", "react": "^18.1.0", "react-dom": "^18.1.0", @@ -20,8 +20,8 @@ "vue": "^3.2.37", "@astrojs/preact": "^1.2.0", "@astrojs/react": "^1.2.0", - "@astrojs/solid-js": "^1.1.1", - "@astrojs/svelte": "^1.0.1", + "@astrojs/solid-js": "^1.2.0", + "@astrojs/svelte": "^1.0.2", "@astrojs/vue": "^1.1.0" } } diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json index 6460bff844f6..6a94916a3bd0 100644 --- a/examples/framework-preact/package.json +++ b/examples/framework-preact/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.7", + "astro": "^1.5.0", "preact": "^10.7.3", "@astrojs/preact": "^1.2.0", "@preact/signals": "^1.1.0" diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index 44cb415ba088..88bdd9917607 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.7", + "astro": "^1.5.0", "react": "^18.1.0", "react-dom": "^18.1.0", "@astrojs/react": "^1.2.0", diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index 9ba2cf652e03..2c19e901596b 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -11,8 +11,8 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.7", + "astro": "^1.5.0", "solid-js": "^1.4.3", - "@astrojs/solid-js": "^1.1.1" + "@astrojs/solid-js": "^1.2.0" } } diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index 020a1d13541b..1a5fc2cc55cd 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "svelte": "^3.48.0", - "@astrojs/svelte": "^1.0.1", - "astro": "^1.4.7" + "@astrojs/svelte": "^1.0.2", + "astro": "^1.5.0" } } diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index a27c9c40792b..779ddf150a84 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.7", + "astro": "^1.5.0", "vue": "^3.2.37", "@astrojs/vue": "^1.1.0" } diff --git a/examples/integration/package.json b/examples/integration/package.json index 8beb4f8660e7..3dfd744ca77d 100644 --- a/examples/integration/package.json +++ b/examples/integration/package.json @@ -15,9 +15,9 @@ ], "scripts": {}, "devDependencies": { - "astro": "^1.4.7" + "astro": "^1.5.0" }, "peerDependencies": { - "astro": "^1.4.7" + "astro": "^1.5.0" } } diff --git a/examples/minimal/package.json b/examples/minimal/package.json index 4cc8bb39b514..d184053a454e 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.7" + "astro": "^1.5.0" } } diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json index 3dd1d0889826..703c90365fe6 100644 --- a/examples/non-html-pages/package.json +++ b/examples/non-html-pages/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.7" + "astro": "^1.5.0" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index dd6ac8137e0e..7cd4cafe6563 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.7" + "astro": "^1.5.0" } } diff --git a/examples/ssr/package.json b/examples/ssr/package.json index bbc19e2bd2b6..e792eb3ae337 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -13,10 +13,10 @@ }, "devDependencies": {}, "dependencies": { - "astro": "^1.4.7", + "astro": "^1.5.0", "svelte": "^3.48.0", - "@astrojs/svelte": "^1.0.1", - "@astrojs/node": "^1.1.0", + "@astrojs/svelte": "^1.0.2", + "@astrojs/node": "^2.0.0", "concurrently": "^7.2.1", "lightcookie": "^1.0.25", "unocss": "^0.15.6", diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json index abb6fe575a67..12acd79c92d7 100644 --- a/examples/with-markdown-plugins/package.json +++ b/examples/with-markdown-plugins/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.7", + "astro": "^1.5.0", "@astrojs/markdown-remark": "^1.1.3", "hast-util-select": "5.0.1", "rehype-autolink-headings": "^6.1.1", diff --git a/examples/with-markdown-shiki/package.json b/examples/with-markdown-shiki/package.json index e899f3874a0c..2413062dee02 100644 --- a/examples/with-markdown-shiki/package.json +++ b/examples/with-markdown-shiki/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.7" + "astro": "^1.5.0" } } diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json index be6fba5237c9..1a7157ac114c 100644 --- a/examples/with-mdx/package.json +++ b/examples/with-mdx/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.7", + "astro": "^1.5.0", "preact": "^10.6.5", "@astrojs/preact": "^1.2.0", "@astrojs/mdx": "^0.11.4" diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index a25ad90bb0c4..c17a816c65e5 100644 --- a/examples/with-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.7", + "astro": "^1.5.0", "preact": "^10.7.3", "@astrojs/preact": "^1.2.0", "nanostores": "^0.5.12", diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index 4ffa96751753..26095362ef8b 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -11,9 +11,9 @@ "astro": "astro" }, "dependencies": { - "@astrojs/tailwind": "^2.0.2", + "@astrojs/tailwind": "^2.1.0", "@types/canvas-confetti": "^1.4.3", - "astro": "^1.4.7", + "astro": "^1.5.0", "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 5ed93e41d680..0b5202148697 100644 --- a/examples/with-vite-plugin-pwa/package.json +++ b/examples/with-vite-plugin-pwa/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.7", + "astro": "^1.5.0", "vite-plugin-pwa": "0.11.11", "workbox-window": "^6.5.3" } diff --git a/examples/with-vitest/package.json b/examples/with-vitest/package.json index 778e86b41516..f78c36630d93 100644 --- a/examples/with-vitest/package.json +++ b/examples/with-vitest/package.json @@ -12,7 +12,7 @@ "test": "vitest" }, "dependencies": { - "astro": "^1.4.7", + "astro": "^1.5.0", "vitest": "^0.20.3" } } diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index 9bf98dcf3dfc..8d531f11d407 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,141 @@ # astro +## 1.5.0 + +### Minor Changes + +- [#5056](https://github.com/withastro/astro/pull/5056) [`e55af8a23`](https://github.com/withastro/astro/commit/e55af8a23233b6335f45b7a04b9d026990fb616c) Thanks [@matthewp](https://github.com/matthewp)! - # Adapter support for `astro preview` + + Adapters are now about to support the `astro preview` command via a new integration option. The Node.js adapter `@astrojs/node` is the first of the built-in adapters to gain support for this. What this means is that if you are using `@astrojs/node` you can new preview your SSR app by running: + + ```shell + npm run preview + ``` + + ## Adapter API + + We will be updating the other first party Astro adapters to support preview over time. Adapters can opt-in to this feature by providing the `previewEntrypoint` via the `setAdapter` function in `astro:config:done` hook. The Node.js adapter's code looks like this: + + ```diff + export default function() { + return { + name: '@astrojs/node', + hooks: { + 'astro:config:done': ({ setAdapter, config }) => { + setAdapter({ + name: '@astrojs/node', + serverEntrypoint: '@astrojs/node/server.js', + + previewEntrypoint: '@astrojs/node/preview.js', + exports: ['handler'], + }); + + // more here + } + } + }; + } + ``` + + The `previewEntrypoint` is a module in the adapter's package that is a Node.js script. This script is run when `astro preview` is run and is charged with starting up the built server. See the Node.js implementation in `@astrojs/node` to see how that is implemented. + +- [#4986](https://github.com/withastro/astro/pull/4986) [`ebd364e39`](https://github.com/withastro/astro/commit/ebd364e392035b379dd00b8f2f15a4cc09ee88e6) Thanks [@bluwy](https://github.com/bluwy)! - ## New properties for API routes + + In API routes, you can now get the `site`, `generator`, `url`, `clientAddress`, `props`, and `redirect` fields on the APIContext, which is the first parameter passed to an API route. This was done to make the APIContext more closely align with the `Astro` global in .astro pages. + + For example, here's how you might use the `clientAddress`, which is the user's IP address, to selectively allow users. + + ```js + export function post({ clientAddress, request, redirect }) { + if (!allowList.has(clientAddress)) { + return redirect('/not-allowed'); + } + } + ``` + + Check out the docs for more information on the newly available fields: https://docs.astro.build/en/core-concepts/endpoints/#server-endpoints-api-routes + +- [#4959](https://github.com/withastro/astro/pull/4959) [`0ea6187f9`](https://github.com/withastro/astro/commit/0ea6187f95f68d1a3ed98ef4d660e71206883bac) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Added support for updating TypeScript settings automatically when using `astro add` + + The `astro add` command will now automatically update your `tsconfig.json` with the proper TypeScript settings needed for the chosen frameworks. + + For instance, typing `astro add solid` will update your `tsconfig.json` with the following settings, per [Solid's TypeScript guide](https://www.solidjs.com/guides/typescript): + + ```json + { + "compilerOptions": { + "jsx": "preserve", + "jsxImportSource": "solid-js" + } + } + ``` + +- [#4947](https://github.com/withastro/astro/pull/4947) [`a5e3ecc80`](https://github.com/withastro/astro/commit/a5e3ecc8039c1e115ce5597362e18cd35d04e40b) Thanks [@JuanM04](https://github.com/JuanM04)! - - Added `isRestart` and `addWatchFile` to integration step `isRestart`. + + - Restart dev server automatically when tsconfig changes. + +- [#4986](https://github.com/withastro/astro/pull/4986) [`ebd364e39`](https://github.com/withastro/astro/commit/ebd364e392035b379dd00b8f2f15a4cc09ee88e6) Thanks [@bluwy](https://github.com/bluwy)! - ## Support passing a custom status code for Astro.redirect + + New in this minor is the ability to pass a status code to `Astro.redirect`. By default it uses `302` but now you can pass another code as the second argument: + + ```astro + --- + // This page was moved + return Astro.redirect('/posts/new-post-name', 301); + --- + ``` + +- [#5056](https://github.com/withastro/astro/pull/5056) [`e55af8a23`](https://github.com/withastro/astro/commit/e55af8a23233b6335f45b7a04b9d026990fb616c) Thanks [@matthewp](https://github.com/matthewp)! - # New build configuration + + The ability to customize SSR build configuration more granularly is now available in Astro. You can now customize the output folder for `server` (the server code for SSR), `client` (your client-side JavaScript and assets), and `serverEntry` (the name of the entrypoint server module). Here are the defaults: + + ```js + import { defineConfig } from 'astro/config'; + + export default defineConfig({ + output: 'server', + build: { + server: './dist/server/', + client: './dist/client/', + serverEntry: 'entry.mjs', + }, + }); + ``` + + These new configuration options are only supported in SSR mode and are ignored when building to SSG (a static site). + + ## Integration hook change + + The integration hook `astro:build:start` includes a param `buildConfig` which includes all of these same options. You can continue to use this param in Astro 1.x, but it is deprecated in favor of the new `build.config` options. All of the built-in adapters have been updated to the new format. If you have an integration that depends on this param we suggest upgrading to do this instead: + + ```js + export default function myIntegration() { + return { + name: 'my-integration', + hooks: { + 'astro:config:setup': ({ updateConfig }) => { + updateConfig({ + build: { + server: '...', + }, + }); + }, + }, + }; + } + ``` + +### Patch Changes + +- [#5057](https://github.com/withastro/astro/pull/5057) [`baf88ee9e`](https://github.com/withastro/astro/commit/baf88ee9e5e692a94981d7a696fbdcb4cd8ab2a6) Thanks [@bluwy](https://github.com/bluwy)! - Skip JSX tagging for export statements with source + +- [#5044](https://github.com/withastro/astro/pull/5044) [`44ea0c6d9`](https://github.com/withastro/astro/commit/44ea0c6d941a26a3c38fc6dc045a8a25215d154a) Thanks [@JuanM04](https://github.com/JuanM04)! - Upgrade Astro compiler to 0.27.1 + +- [#5059](https://github.com/withastro/astro/pull/5059) [`f7fcdfe62`](https://github.com/withastro/astro/commit/f7fcdfe6210b3cf08cad92c49b64adf169b9e744) Thanks [@bluwy](https://github.com/bluwy)! - Support strict dependency install for libraries with JSX + +- [#5047](https://github.com/withastro/astro/pull/5047) [`1e2799243`](https://github.com/withastro/astro/commit/1e27992437aa0371b8550acb3e3f79e62721a506) Thanks [@matthewp](https://github.com/matthewp)! - Update Astro.cookies.set types to allow booleans and numbers + + Note that booleans and numbers were already allowed, they just were not allowed by the type definitions. + ## 1.4.7 ### Patch Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index 16a9a004de70..805f92ac19a8 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "1.4.7", + "version": "1.5.0", "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/integrations/cloudflare/CHANGELOG.md b/packages/integrations/cloudflare/CHANGELOG.md index 6eb0368ced60..19c246cdfbdb 100644 --- a/packages/integrations/cloudflare/CHANGELOG.md +++ b/packages/integrations/cloudflare/CHANGELOG.md @@ -1,5 +1,49 @@ # @astrojs/cloudflare +## 3.1.0 + +### Minor Changes + +- [#5056](https://github.com/withastro/astro/pull/5056) [`e55af8a23`](https://github.com/withastro/astro/commit/e55af8a23233b6335f45b7a04b9d026990fb616c) Thanks [@matthewp](https://github.com/matthewp)! - # New build configuration + + The ability to customize SSR build configuration more granularly is now available in Astro. You can now customize the output folder for `server` (the server code for SSR), `client` (your client-side JavaScript and assets), and `serverEntry` (the name of the entrypoint server module). Here are the defaults: + + ```js + import { defineConfig } from 'astro/config'; + + export default defineConfig({ + output: 'server', + build: { + server: './dist/server/', + client: './dist/client/', + serverEntry: 'entry.mjs', + }, + }); + ``` + + These new configuration options are only supported in SSR mode and are ignored when building to SSG (a static site). + + ## Integration hook change + + The integration hook `astro:build:start` includes a param `buildConfig` which includes all of these same options. You can continue to use this param in Astro 1.x, but it is deprecated in favor of the new `build.config` options. All of the built-in adapters have been updated to the new format. If you have an integration that depends on this param we suggest upgrading to do this instead: + + ```js + export default function myIntegration() { + return { + name: 'my-integration', + hooks: { + 'astro:config:setup': ({ updateConfig }) => { + updateConfig({ + build: { + server: '...', + }, + }); + }, + }, + }; + } + ``` + ## 3.0.0 ### Major Changes diff --git a/packages/integrations/cloudflare/package.json b/packages/integrations/cloudflare/package.json index 94834b609c0e..b33216c09063 100644 --- a/packages/integrations/cloudflare/package.json +++ b/packages/integrations/cloudflare/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/cloudflare", "description": "Deploy your site to cloudflare pages functions", - "version": "3.0.0", + "version": "3.1.0", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/packages/integrations/deno/CHANGELOG.md b/packages/integrations/deno/CHANGELOG.md index a096145168d1..d6d4e93e06e4 100644 --- a/packages/integrations/deno/CHANGELOG.md +++ b/packages/integrations/deno/CHANGELOG.md @@ -1,5 +1,49 @@ # @astrojs/node +## 1.2.0 + +### Minor Changes + +- [#5056](https://github.com/withastro/astro/pull/5056) [`e55af8a23`](https://github.com/withastro/astro/commit/e55af8a23233b6335f45b7a04b9d026990fb616c) Thanks [@matthewp](https://github.com/matthewp)! - # New build configuration + + The ability to customize SSR build configuration more granularly is now available in Astro. You can now customize the output folder for `server` (the server code for SSR), `client` (your client-side JavaScript and assets), and `serverEntry` (the name of the entrypoint server module). Here are the defaults: + + ```js + import { defineConfig } from 'astro/config'; + + export default defineConfig({ + output: 'server', + build: { + server: './dist/server/', + client: './dist/client/', + serverEntry: 'entry.mjs', + }, + }); + ``` + + These new configuration options are only supported in SSR mode and are ignored when building to SSG (a static site). + + ## Integration hook change + + The integration hook `astro:build:start` includes a param `buildConfig` which includes all of these same options. You can continue to use this param in Astro 1.x, but it is deprecated in favor of the new `build.config` options. All of the built-in adapters have been updated to the new format. If you have an integration that depends on this param we suggest upgrading to do this instead: + + ```js + export default function myIntegration() { + return { + name: 'my-integration', + hooks: { + 'astro:config:setup': ({ updateConfig }) => { + updateConfig({ + build: { + server: '...', + }, + }); + }, + }, + }; + } + ``` + ## 1.1.0 ### Minor Changes diff --git a/packages/integrations/deno/package.json b/packages/integrations/deno/package.json index 4b2752e7d83b..cedf5f813ce2 100644 --- a/packages/integrations/deno/package.json +++ b/packages/integrations/deno/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/deno", "description": "Deploy your site to a Deno server", - "version": "1.1.0", + "version": "1.2.0", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/packages/integrations/image/CHANGELOG.md b/packages/integrations/image/CHANGELOG.md index 224725a4abe6..8bc7b470ed33 100644 --- a/packages/integrations/image/CHANGELOG.md +++ b/packages/integrations/image/CHANGELOG.md @@ -1,5 +1,55 @@ # @astrojs/image +## 0.10.0 + +### Minor Changes + +- [#5056](https://github.com/withastro/astro/pull/5056) [`e55af8a23`](https://github.com/withastro/astro/commit/e55af8a23233b6335f45b7a04b9d026990fb616c) Thanks [@matthewp](https://github.com/matthewp)! - # New build configuration + + The ability to customize SSR build configuration more granularly is now available in Astro. You can now customize the output folder for `server` (the server code for SSR), `client` (your client-side JavaScript and assets), and `serverEntry` (the name of the entrypoint server module). Here are the defaults: + + ```js + import { defineConfig } from 'astro/config'; + + export default defineConfig({ + output: 'server', + build: { + server: './dist/server/', + client: './dist/client/', + serverEntry: 'entry.mjs', + }, + }); + ``` + + These new configuration options are only supported in SSR mode and are ignored when building to SSG (a static site). + + ## Integration hook change + + The integration hook `astro:build:start` includes a param `buildConfig` which includes all of these same options. You can continue to use this param in Astro 1.x, but it is deprecated in favor of the new `build.config` options. All of the built-in adapters have been updated to the new format. If you have an integration that depends on this param we suggest upgrading to do this instead: + + ```js + export default function myIntegration() { + return { + name: 'my-integration', + hooks: { + 'astro:config:setup': ({ updateConfig }) => { + updateConfig({ + build: { + server: '...', + }, + }); + }, + }, + }; + } + ``` + +### Patch Changes + +- [#5073](https://github.com/withastro/astro/pull/5073) [`93f72f90b`](https://github.com/withastro/astro/commit/93f72f90bc8b29b1bf1402354f1ed6a110411243) Thanks [@bluwy](https://github.com/bluwy)! - Fix image external config in build + +- [#5072](https://github.com/withastro/astro/pull/5072) [`3918787cb`](https://github.com/withastro/astro/commit/3918787cb9676a8c6b9be371ae90edeb676f4e8f) Thanks [@bluwy](https://github.com/bluwy)! - Support relative protocol image URL + ## 0.9.3 ### Patch Changes diff --git a/packages/integrations/image/package.json b/packages/integrations/image/package.json index 202bd427be71..293a985e29a4 100644 --- a/packages/integrations/image/package.json +++ b/packages/integrations/image/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/image", "description": "Load and transform images in your Astro site.", - "version": "0.9.3", + "version": "0.10.0", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/packages/integrations/netlify/CHANGELOG.md b/packages/integrations/netlify/CHANGELOG.md index adc4116cb092..7e5fccff3937 100644 --- a/packages/integrations/netlify/CHANGELOG.md +++ b/packages/integrations/netlify/CHANGELOG.md @@ -1,5 +1,49 @@ # @astrojs/netlify +## 1.2.0 + +### Minor Changes + +- [#5056](https://github.com/withastro/astro/pull/5056) [`e55af8a23`](https://github.com/withastro/astro/commit/e55af8a23233b6335f45b7a04b9d026990fb616c) Thanks [@matthewp](https://github.com/matthewp)! - # New build configuration + + The ability to customize SSR build configuration more granularly is now available in Astro. You can now customize the output folder for `server` (the server code for SSR), `client` (your client-side JavaScript and assets), and `serverEntry` (the name of the entrypoint server module). Here are the defaults: + + ```js + import { defineConfig } from 'astro/config'; + + export default defineConfig({ + output: 'server', + build: { + server: './dist/server/', + client: './dist/client/', + serverEntry: 'entry.mjs', + }, + }); + ``` + + These new configuration options are only supported in SSR mode and are ignored when building to SSG (a static site). + + ## Integration hook change + + The integration hook `astro:build:start` includes a param `buildConfig` which includes all of these same options. You can continue to use this param in Astro 1.x, but it is deprecated in favor of the new `build.config` options. All of the built-in adapters have been updated to the new format. If you have an integration that depends on this param we suggest upgrading to do this instead: + + ```js + export default function myIntegration() { + return { + name: 'my-integration', + hooks: { + 'astro:config:setup': ({ updateConfig }) => { + updateConfig({ + build: { + server: '...', + }, + }); + }, + }, + }; + } + ``` + ## 1.1.0 ### Minor Changes diff --git a/packages/integrations/netlify/package.json b/packages/integrations/netlify/package.json index 4e30dca2ddeb..12d4e566cb56 100644 --- a/packages/integrations/netlify/package.json +++ b/packages/integrations/netlify/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/netlify", "description": "Deploy your site to Netlify", - "version": "1.1.0", + "version": "1.2.0", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/packages/integrations/node/CHANGELOG.md b/packages/integrations/node/CHANGELOG.md index 045b370e78f5..f6e6a46f9a6e 100644 --- a/packages/integrations/node/CHANGELOG.md +++ b/packages/integrations/node/CHANGELOG.md @@ -1,5 +1,125 @@ # @astrojs/node +## 2.0.0 + +### Major Changes + +- [#5056](https://github.com/withastro/astro/pull/5056) [`e55af8a23`](https://github.com/withastro/astro/commit/e55af8a23233b6335f45b7a04b9d026990fb616c) Thanks [@matthewp](https://github.com/matthewp)! - # Standalone mode for the Node.js adapter + + New in `@astrojs/node` is support for **standalone mode**. With standalone mode you can start your production server without needing to write any server JavaScript yourself. The server starts simply by running the script like so: + + ```shell + node ./dist/server/entry.mjs + ``` + + To enable standalone mode, set the new `mode` to `'standalone'` option in your Astro config: + + ```js + import { defineConfig } from 'astro/config'; + import nodejs from '@astrojs/node'; + + export default defineConfig({ + output: 'server', + adapter: nodejs({ + mode: 'standalone', + }), + }); + ``` + + See the @astrojs/node documentation to learn all of the options available in standalone mode. + + ## Breaking change + + This is a semver major change because the new `mode` option is required. Existing @astrojs/node users who are using their own HTTP server framework such as Express can upgrade by setting the `mode` option to `'middleware'` in order to build to a middleware mode, which is the same behavior and API as before. + + ```js + import { defineConfig } from 'astro/config'; + import nodejs from '@astrojs/node'; + + export default defineConfig({ + output: 'server', + adapter: nodejs({ + mode: 'middleware', + }), + }); + ``` + +### Minor Changes + +- [#5056](https://github.com/withastro/astro/pull/5056) [`e55af8a23`](https://github.com/withastro/astro/commit/e55af8a23233b6335f45b7a04b9d026990fb616c) Thanks [@matthewp](https://github.com/matthewp)! - # Adapter support for `astro preview` + + Adapters are now about to support the `astro preview` command via a new integration option. The Node.js adapter `@astrojs/node` is the first of the built-in adapters to gain support for this. What this means is that if you are using `@astrojs/node` you can new preview your SSR app by running: + + ```shell + npm run preview + ``` + + ## Adapter API + + We will be updating the other first party Astro adapters to support preview over time. Adapters can opt-in to this feature by providing the `previewEntrypoint` via the `setAdapter` function in `astro:config:done` hook. The Node.js adapter's code looks like this: + + ```diff + export default function() { + return { + name: '@astrojs/node', + hooks: { + 'astro:config:done': ({ setAdapter, config }) => { + setAdapter({ + name: '@astrojs/node', + serverEntrypoint: '@astrojs/node/server.js', + + previewEntrypoint: '@astrojs/node/preview.js', + exports: ['handler'], + }); + + // more here + } + } + }; + } + ``` + + The `previewEntrypoint` is a module in the adapter's package that is a Node.js script. This script is run when `astro preview` is run and is charged with starting up the built server. See the Node.js implementation in `@astrojs/node` to see how that is implemented. + +- [#5056](https://github.com/withastro/astro/pull/5056) [`e55af8a23`](https://github.com/withastro/astro/commit/e55af8a23233b6335f45b7a04b9d026990fb616c) Thanks [@matthewp](https://github.com/matthewp)! - # New build configuration + + The ability to customize SSR build configuration more granularly is now available in Astro. You can now customize the output folder for `server` (the server code for SSR), `client` (your client-side JavaScript and assets), and `serverEntry` (the name of the entrypoint server module). Here are the defaults: + + ```js + import { defineConfig } from 'astro/config'; + + export default defineConfig({ + output: 'server', + build: { + server: './dist/server/', + client: './dist/client/', + serverEntry: 'entry.mjs', + }, + }); + ``` + + These new configuration options are only supported in SSR mode and are ignored when building to SSG (a static site). + + ## Integration hook change + + The integration hook `astro:build:start` includes a param `buildConfig` which includes all of these same options. You can continue to use this param in Astro 1.x, but it is deprecated in favor of the new `build.config` options. All of the built-in adapters have been updated to the new format. If you have an integration that depends on this param we suggest upgrading to do this instead: + + ```js + export default function myIntegration() { + return { + name: 'my-integration', + hooks: { + 'astro:config:setup': ({ updateConfig }) => { + updateConfig({ + build: { + server: '...', + }, + }); + }, + }, + }; + } + ``` + ## 1.1.0 ### Minor Changes diff --git a/packages/integrations/node/package.json b/packages/integrations/node/package.json index 77a027cd95e2..92857ffa09bd 100644 --- a/packages/integrations/node/package.json +++ b/packages/integrations/node/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/node", "description": "Deploy your site to a Node.js server", - "version": "1.1.0", + "version": "2.0.0", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/packages/integrations/solid/CHANGELOG.md b/packages/integrations/solid/CHANGELOG.md index 123c84b2939c..575298726dbf 100644 --- a/packages/integrations/solid/CHANGELOG.md +++ b/packages/integrations/solid/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/solid-js +## 1.2.0 + +### Minor Changes + +- [#5059](https://github.com/withastro/astro/pull/5059) [`f7fcdfe62`](https://github.com/withastro/astro/commit/f7fcdfe6210b3cf08cad92c49b64adf169b9e744) Thanks [@bluwy](https://github.com/bluwy)! - Auto ssr.noExternal solidjs dependencies + ## 1.1.1 ### Patch Changes diff --git a/packages/integrations/solid/package.json b/packages/integrations/solid/package.json index edb58cbae1f0..b9bff301ecc9 100644 --- a/packages/integrations/solid/package.json +++ b/packages/integrations/solid/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/solid-js", - "version": "1.1.1", + "version": "1.2.0", "description": "Use Solid components within Astro", "type": "module", "types": "./dist/index.d.ts", diff --git a/packages/integrations/svelte/CHANGELOG.md b/packages/integrations/svelte/CHANGELOG.md index 60f1056d4452..216816067c11 100644 --- a/packages/integrations/svelte/CHANGELOG.md +++ b/packages/integrations/svelte/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/svelte +## 1.0.2 + +### Patch Changes + +- [#5045](https://github.com/withastro/astro/pull/5045) [`0f2a88ba5`](https://github.com/withastro/astro/commit/0f2a88ba5c19318854be12cc81609f2dbc5012f7) Thanks [@matthewp](https://github.com/matthewp)! - Allow class to be passed into Svelte islands + ## 1.0.1 ### Patch Changes diff --git a/packages/integrations/svelte/package.json b/packages/integrations/svelte/package.json index bed9faa2d3b3..a4ad25e54b8d 100644 --- a/packages/integrations/svelte/package.json +++ b/packages/integrations/svelte/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/svelte", - "version": "1.0.1", + "version": "1.0.2", "description": "Use Svelte components within Astro", "type": "module", "types": "./dist/index.d.ts", diff --git a/packages/integrations/tailwind/CHANGELOG.md b/packages/integrations/tailwind/CHANGELOG.md index e43b6365ae9a..35c944506f59 100644 --- a/packages/integrations/tailwind/CHANGELOG.md +++ b/packages/integrations/tailwind/CHANGELOG.md @@ -1,5 +1,13 @@ # @astrojs/tailwind +## 2.1.0 + +### Minor Changes + +- [#4947](https://github.com/withastro/astro/pull/4947) [`a5e3ecc80`](https://github.com/withastro/astro/commit/a5e3ecc8039c1e115ce5597362e18cd35d04e40b) Thanks [@JuanM04](https://github.com/JuanM04)! - ## HMR on config file changes + + New in this release is the ability for config changes to automatically reflect via HMR. Now when you edit your `tsconfig.json` or `tailwind.config.js` configs, the changes will reload automatically without the need to restart your dev server. + ## 2.0.2 ### Patch Changes diff --git a/packages/integrations/tailwind/package.json b/packages/integrations/tailwind/package.json index 46833acd3747..22ec6482c895 100644 --- a/packages/integrations/tailwind/package.json +++ b/packages/integrations/tailwind/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/tailwind", "description": "Tailwind + Astro Integrations", - "version": "2.0.2", + "version": "2.1.0", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/packages/integrations/vercel/CHANGELOG.md b/packages/integrations/vercel/CHANGELOG.md index 5722af5a5976..0a950e72a6e9 100644 --- a/packages/integrations/vercel/CHANGELOG.md +++ b/packages/integrations/vercel/CHANGELOG.md @@ -1,5 +1,49 @@ # @astrojs/vercel +## 2.2.0 + +### Minor Changes + +- [#5056](https://github.com/withastro/astro/pull/5056) [`e55af8a23`](https://github.com/withastro/astro/commit/e55af8a23233b6335f45b7a04b9d026990fb616c) Thanks [@matthewp](https://github.com/matthewp)! - # New build configuration + + The ability to customize SSR build configuration more granularly is now available in Astro. You can now customize the output folder for `server` (the server code for SSR), `client` (your client-side JavaScript and assets), and `serverEntry` (the name of the entrypoint server module). Here are the defaults: + + ```js + import { defineConfig } from 'astro/config'; + + export default defineConfig({ + output: 'server', + build: { + server: './dist/server/', + client: './dist/client/', + serverEntry: 'entry.mjs', + }, + }); + ``` + + These new configuration options are only supported in SSR mode and are ignored when building to SSG (a static site). + + ## Integration hook change + + The integration hook `astro:build:start` includes a param `buildConfig` which includes all of these same options. You can continue to use this param in Astro 1.x, but it is deprecated in favor of the new `build.config` options. All of the built-in adapters have been updated to the new format. If you have an integration that depends on this param we suggest upgrading to do this instead: + + ```js + export default function myIntegration() { + return { + name: 'my-integration', + hooks: { + 'astro:config:setup': ({ updateConfig }) => { + updateConfig({ + build: { + server: '...', + }, + }); + }, + }, + }; + } + ``` + ## 2.1.1 ### Patch Changes diff --git a/packages/integrations/vercel/package.json b/packages/integrations/vercel/package.json index df1315635cfb..b0c7bc469fbf 100644 --- a/packages/integrations/vercel/package.json +++ b/packages/integrations/vercel/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/vercel", "description": "Deploy your site to Vercel", - "version": "2.1.1", + "version": "2.2.0", "type": "module", "author": "withastro", "license": "MIT", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3eefe9d298d5..eed9380abd11 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -61,7 +61,7 @@ importers: examples/basics: specifiers: - astro: ^1.4.7 + astro: ^1.5.0 dependencies: astro: link:../../packages/astro @@ -70,7 +70,7 @@ importers: '@astrojs/mdx': ^0.11.4 '@astrojs/rss': ^1.0.2 '@astrojs/sitemap': ^1.0.0 - astro: ^1.4.7 + astro: ^1.5.0 dependencies: '@astrojs/mdx': link:../../packages/integrations/mdx '@astrojs/rss': link:../../packages/astro-rss @@ -79,14 +79,14 @@ importers: examples/component: specifiers: - astro: ^1.4.7 + astro: ^1.5.0 devDependencies: astro: link:../../packages/astro examples/deno: specifiers: - '@astrojs/deno': ^1.1.0 - astro: ^1.4.7 + '@astrojs/deno': ^1.2.0 + astro: ^1.5.0 dependencies: astro: link:../../packages/astro devDependencies: @@ -102,7 +102,7 @@ importers: '@types/node': ^18.0.0 '@types/react': ^17.0.45 '@types/react-dom': ^18.0.0 - astro: ^1.4.7 + astro: ^1.5.0 preact: ^10.7.3 react: ^18.1.0 react-dom: ^18.1.0 @@ -125,7 +125,7 @@ importers: '@astrojs/alpinejs': ^0.1.2 '@types/alpinejs': ^3.7.0 alpinejs: ^3.10.2 - astro: ^1.4.7 + astro: ^1.5.0 dependencies: '@astrojs/alpinejs': link:../../packages/integrations/alpinejs '@types/alpinejs': 3.7.0 @@ -136,7 +136,7 @@ importers: specifiers: '@astrojs/lit': ^1.0.0 '@webcomponents/template-shadowroot': ^0.1.0 - astro: ^1.4.7 + astro: ^1.5.0 lit: ^2.2.5 dependencies: '@astrojs/lit': link:../../packages/integrations/lit @@ -148,10 +148,10 @@ importers: specifiers: '@astrojs/preact': ^1.2.0 '@astrojs/react': ^1.2.0 - '@astrojs/solid-js': ^1.1.1 - '@astrojs/svelte': ^1.0.1 + '@astrojs/solid-js': ^1.2.0 + '@astrojs/svelte': ^1.0.2 '@astrojs/vue': ^1.1.0 - astro: ^1.4.7 + astro: ^1.5.0 preact: ^10.7.3 react: ^18.1.0 react-dom: ^18.1.0 @@ -176,7 +176,7 @@ importers: specifiers: '@astrojs/preact': ^1.2.0 '@preact/signals': ^1.1.0 - astro: ^1.4.7 + astro: ^1.5.0 preact: ^10.7.3 dependencies: '@astrojs/preact': link:../../packages/integrations/preact @@ -189,7 +189,7 @@ importers: '@astrojs/react': ^1.2.0 '@types/react': ^18.0.10 '@types/react-dom': ^18.0.5 - astro: ^1.4.7 + astro: ^1.5.0 react: ^18.1.0 react-dom: ^18.1.0 dependencies: @@ -202,8 +202,8 @@ importers: examples/framework-solid: specifiers: - '@astrojs/solid-js': ^1.1.1 - astro: ^1.4.7 + '@astrojs/solid-js': ^1.2.0 + astro: ^1.5.0 solid-js: ^1.4.3 dependencies: '@astrojs/solid-js': link:../../packages/integrations/solid @@ -212,8 +212,8 @@ importers: examples/framework-svelte: specifiers: - '@astrojs/svelte': ^1.0.1 - astro: ^1.4.7 + '@astrojs/svelte': ^1.0.2 + astro: ^1.5.0 svelte: ^3.48.0 dependencies: '@astrojs/svelte': link:../../packages/integrations/svelte @@ -223,7 +223,7 @@ importers: examples/framework-vue: specifiers: '@astrojs/vue': ^1.1.0 - astro: ^1.4.7 + astro: ^1.5.0 vue: ^3.2.37 dependencies: '@astrojs/vue': link:../../packages/integrations/vue @@ -232,33 +232,33 @@ importers: examples/integration: specifiers: - astro: ^1.4.7 + astro: ^1.5.0 devDependencies: astro: link:../../packages/astro examples/minimal: specifiers: - astro: ^1.4.7 + astro: ^1.5.0 dependencies: astro: link:../../packages/astro examples/non-html-pages: specifiers: - astro: ^1.4.7 + astro: ^1.5.0 dependencies: astro: link:../../packages/astro examples/portfolio: specifiers: - astro: ^1.4.7 + astro: ^1.5.0 dependencies: astro: link:../../packages/astro examples/ssr: specifiers: - '@astrojs/node': ^1.1.0 - '@astrojs/svelte': ^1.0.1 - astro: ^1.4.7 + '@astrojs/node': ^2.0.0 + '@astrojs/svelte': ^1.0.2 + astro: ^1.5.0 concurrently: ^7.2.1 lightcookie: ^1.0.25 svelte: ^3.48.0 @@ -277,7 +277,7 @@ importers: examples/with-markdown-plugins: specifiers: '@astrojs/markdown-remark': ^1.1.3 - astro: ^1.4.7 + astro: ^1.5.0 hast-util-select: 5.0.1 rehype-autolink-headings: ^6.1.1 rehype-slug: ^5.0.1 @@ -294,7 +294,7 @@ importers: examples/with-markdown-shiki: specifiers: - astro: ^1.4.7 + astro: ^1.5.0 dependencies: astro: link:../../packages/astro @@ -302,7 +302,7 @@ importers: specifiers: '@astrojs/mdx': ^0.11.4 '@astrojs/preact': ^1.2.0 - astro: ^1.4.7 + astro: ^1.5.0 preact: ^10.6.5 dependencies: '@astrojs/mdx': link:../../packages/integrations/mdx @@ -314,7 +314,7 @@ importers: specifiers: '@astrojs/preact': ^1.2.0 '@nanostores/preact': ^0.1.3 - astro: ^1.4.7 + astro: ^1.5.0 nanostores: ^0.5.12 preact: ^10.7.3 dependencies: @@ -326,9 +326,9 @@ importers: examples/with-tailwindcss: specifiers: - '@astrojs/tailwind': ^2.0.2 + '@astrojs/tailwind': ^2.1.0 '@types/canvas-confetti': ^1.4.3 - astro: ^1.4.7 + astro: ^1.5.0 autoprefixer: ^10.4.7 canvas-confetti: ^1.5.1 postcss: ^8.4.14 @@ -344,7 +344,7 @@ importers: examples/with-vite-plugin-pwa: specifiers: - astro: ^1.4.7 + astro: ^1.5.0 vite-plugin-pwa: 0.11.11 workbox-window: ^6.5.3 dependencies: @@ -354,7 +354,7 @@ importers: examples/with-vitest: specifiers: - astro: ^1.4.7 + astro: ^1.5.0 vitest: ^0.20.3 dependencies: astro: link:../../packages/astro @@ -2164,7 +2164,7 @@ importers: '@astrojs/node': ^1.1.0 astro: workspace:* dependencies: - '@astrojs/node': link:../../../../integrations/node + '@astrojs/node': 1.1.0 astro: link:../../.. packages/astro/test/fixtures/ssr-api-route-custom-404: @@ -3789,6 +3789,19 @@ packages: vfile-message: 3.1.2 dev: false + /@astrojs/node/1.1.0: + resolution: {integrity: sha512-4KkCEFYtmTUSvU49UZSJD/VQfD/oKzf0ld8COjFW1pxfquBgvevLxRVpYLRanZB20L3c8/xyyQpDq7zMSMqQrg==} + dependencies: + '@astrojs/webapi': 1.1.0 + dev: false + + /@astrojs/webapi/1.1.0: + resolution: {integrity: sha512-yLSksFKv9kRbI3WWPuRvbBjS+J5ZNmZHacJ6Io8XQleKIHHHcw7RoNcrLK0s+9iwVPhqMYIzja6HJuvnO93oFw==} + dependencies: + global-agent: 3.0.0 + node-fetch: 3.2.10 + dev: false + /@babel/code-frame/7.18.6: resolution: {integrity: sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==} engines: {node: '>=6.9.0'} From 0e67720f66ef054351a2fcab72184e6ec206d9da Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Thu, 13 Oct 2022 12:08:55 -0400 Subject: [PATCH 2/2] Update packages/integrations/node/CHANGELOG.md Co-authored-by: Sarah Rainsberger --- packages/integrations/node/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/integrations/node/CHANGELOG.md b/packages/integrations/node/CHANGELOG.md index f6e6a46f9a6e..8b6ceffb2af6 100644 --- a/packages/integrations/node/CHANGELOG.md +++ b/packages/integrations/node/CHANGELOG.md @@ -56,7 +56,7 @@ ## Adapter API - We will be updating the other first party Astro adapters to support preview over time. Adapters can opt-in to this feature by providing the `previewEntrypoint` via the `setAdapter` function in `astro:config:done` hook. The Node.js adapter's code looks like this: + We will be updating the other first party Astro adapters to support preview over time. Adapters can opt in to this feature by providing the `previewEntrypoint` via the `setAdapter` function in `astro:config:done` hook. The Node.js adapter's code looks like this: ```diff export default function() {