diff options
Diffstat (limited to 'packages/integrations')
23 files changed, 147 insertions, 44 deletions
diff --git a/packages/integrations/cloudflare/CHANGELOG.md b/packages/integrations/cloudflare/CHANGELOG.md index 2411aca36..74c6f8c43 100644 --- a/packages/integrations/cloudflare/CHANGELOG.md +++ b/packages/integrations/cloudflare/CHANGELOG.md @@ -1,5 +1,17 @@ # @astrojs/cloudflare +## 7.0.0-beta.1 + +### Minor Changes + +- [#7846](https://github.com/withastro/astro/pull/7846) [`ea30a9d4f`](https://github.com/withastro/astro/commit/ea30a9d4f2d7a12345869e971f3051cf803dbe74) Thanks [@schummar](https://github.com/schummar)! - More efficient \_routes.json + +### Patch Changes + +- Updated dependencies [[`65c354969`](https://github.com/withastro/astro/commit/65c354969e6fe0ef6d622e8f4c545e2f717ce8c6), [`3c3100851`](https://github.com/withastro/astro/commit/3c31008519ce68b5b1b1cb23b71fbe0a2d506882), [`34cb20021`](https://github.com/withastro/astro/commit/34cb2002161ba88df6bcb72fecfd12ed867c134b), [`7bd1b86f8`](https://github.com/withastro/astro/commit/7bd1b86f85c06fdde0a1ed9146d01bac69990671), [`519a1c4e8`](https://github.com/withastro/astro/commit/519a1c4e8407c7abcb8d879b67a9f4b960652cae), [`70f34f5a3`](https://github.com/withastro/astro/commit/70f34f5a355f42526ee9e5355f3de8e510002ea2), [`0f637c71e`](https://github.com/withastro/astro/commit/0f637c71e511cb4c51712128d217a26c8eee4d40), [`866ed4098`](https://github.com/withastro/astro/commit/866ed4098edffb052239cdb26e076cf8db61b1d9), [`5b1e39ef6`](https://github.com/withastro/astro/commit/5b1e39ef6ec6dcebea96584f95d9530bd9aa715d)]: + - astro@3.0.0-beta.1 + - @astrojs/underscore-redirects@0.3.0-beta.0 + ## 7.0.0-beta.0 ### Major Changes diff --git a/packages/integrations/cloudflare/package.json b/packages/integrations/cloudflare/package.json index c4f4ac54c..09e34df36 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 Workers/Pages", - "version": "7.0.0-beta.0", + "version": "7.0.0-beta.1", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", @@ -45,7 +45,7 @@ "tiny-glob": "^0.2.9" }, "peerDependencies": { - "astro": "workspace:^3.0.0-beta.0" + "astro": "workspace:^3.0.0-beta.1" }, "devDependencies": { "astro": "workspace:*", diff --git a/packages/integrations/deno/package.json b/packages/integrations/deno/package.json index 8079cbac5..9472e9475 100644 --- a/packages/integrations/deno/package.json +++ b/packages/integrations/deno/package.json @@ -36,7 +36,7 @@ "esbuild": "^0.15.18" }, "peerDependencies": { - "astro": "workspace:^3.0.0-beta.0" + "astro": "workspace:^3.0.0-beta.1" }, "devDependencies": { "astro": "workspace:*", diff --git a/packages/integrations/markdoc/package.json b/packages/integrations/markdoc/package.json index 5426686af..1a9736f30 100644 --- a/packages/integrations/markdoc/package.json +++ b/packages/integrations/markdoc/package.json @@ -75,7 +75,7 @@ "zod": "^3.17.3" }, "peerDependencies": { - "astro": "workspace:^3.0.0-beta.0" + "astro": "workspace:^3.0.0-beta.1" }, "devDependencies": { "@astrojs/markdown-remark": "workspace:*", diff --git a/packages/integrations/mdx/package.json b/packages/integrations/mdx/package.json index f5ed6fad8..e231c479b 100644 --- a/packages/integrations/mdx/package.json +++ b/packages/integrations/mdx/package.json @@ -54,7 +54,7 @@ "vfile": "^5.3.7" }, "peerDependencies": { - "astro": "workspace:^3.0.0-beta.0" + "astro": "workspace:^3.0.0-beta.1" }, "devDependencies": { "@types/chai": "^4.3.5", diff --git a/packages/integrations/mdx/src/index.ts b/packages/integrations/mdx/src/index.ts index 4cce23921..e9cba005e 100644 --- a/packages/integrations/mdx/src/index.ts +++ b/packages/integrations/mdx/src/index.ts @@ -38,8 +38,14 @@ export default function mdx(partialMdxOptions: Partial<MdxOptions> = {}): AstroI name: '@astrojs/mdx', hooks: { 'astro:config:setup': async (params) => { - const { updateConfig, config, addPageExtension, addContentEntryType, command, addRenderer } = - params as SetupHookParams; + const { + updateConfig, + config, + addPageExtension, + addContentEntryType, + command, + addRenderer, + } = params as SetupHookParams; addRenderer(astroJSXRenderer); addPageExtension('.mdx'); diff --git a/packages/integrations/netlify/CHANGELOG.md b/packages/integrations/netlify/CHANGELOG.md index 108964c49..a3ec39ce2 100644 --- a/packages/integrations/netlify/CHANGELOG.md +++ b/packages/integrations/netlify/CHANGELOG.md @@ -1,5 +1,35 @@ # @astrojs/netlify +## 3.0.0-beta.1 + +### Major Changes + +- [#8029](https://github.com/withastro/astro/pull/8029) [`2ee418e06`](https://github.com/withastro/astro/commit/2ee418e06ab1f7855dee0078afbad0b06de3b183) Thanks [@matthewp](https://github.com/matthewp)! - Remove the Netlify Edge adapter + + `@astrojs/netlify/functions` now supports Edge middleware, so a separate adapter for Edge itself (deploying your entire app to the edge) is no longer necessary. Please update your Astro config to reflect this change: + + ```diff + // astro.config.mjs + import { defineConfig } from 'astro/config'; + - import netlify from '@astrojs/netlify/edge'; + + import netlify from '@astrojs/netlify/functions'; + + export default defineConfig({ + output: 'server', + adapter: netlify({ + + edgeMiddleware: true + }), + }); + ``` + + This adapter had several known limitations and compatibility issues that prevented many people from using it in production. To reduce maintenance costs and because we have a better story with Serveless + Edge Middleware, we are removing the Edge adapter. + +### Patch Changes + +- Updated dependencies [[`65c354969`](https://github.com/withastro/astro/commit/65c354969e6fe0ef6d622e8f4c545e2f717ce8c6), [`3c3100851`](https://github.com/withastro/astro/commit/3c31008519ce68b5b1b1cb23b71fbe0a2d506882), [`34cb20021`](https://github.com/withastro/astro/commit/34cb2002161ba88df6bcb72fecfd12ed867c134b), [`7bd1b86f8`](https://github.com/withastro/astro/commit/7bd1b86f85c06fdde0a1ed9146d01bac69990671), [`519a1c4e8`](https://github.com/withastro/astro/commit/519a1c4e8407c7abcb8d879b67a9f4b960652cae), [`70f34f5a3`](https://github.com/withastro/astro/commit/70f34f5a355f42526ee9e5355f3de8e510002ea2), [`0f637c71e`](https://github.com/withastro/astro/commit/0f637c71e511cb4c51712128d217a26c8eee4d40), [`866ed4098`](https://github.com/withastro/astro/commit/866ed4098edffb052239cdb26e076cf8db61b1d9), [`5b1e39ef6`](https://github.com/withastro/astro/commit/5b1e39ef6ec6dcebea96584f95d9530bd9aa715d)]: + - astro@3.0.0-beta.1 + - @astrojs/underscore-redirects@0.3.0-beta.0 + ## 3.0.0-beta.0 ### Major Changes diff --git a/packages/integrations/netlify/package.json b/packages/integrations/netlify/package.json index 1214dc6f7..bf0a062c1 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": "3.0.0-beta.0", + "version": "3.0.0-beta.1", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", @@ -43,7 +43,7 @@ "esbuild": "^0.18.16" }, "peerDependencies": { - "astro": "workspace:^3.0.0-beta.0" + "astro": "workspace:^3.0.0-beta.1" }, "devDependencies": { "@netlify/edge-functions": "^2.0.0", diff --git a/packages/integrations/node/package.json b/packages/integrations/node/package.json index c01abae80..239e5c087 100644 --- a/packages/integrations/node/package.json +++ b/packages/integrations/node/package.json @@ -37,7 +37,7 @@ "server-destroy": "^1.0.1" }, "peerDependencies": { - "astro": "workspace:^3.0.0-beta.0" + "astro": "workspace:^3.0.0-beta.1" }, "devDependencies": { "@types/node": "^18.16.18", diff --git a/packages/integrations/preact/CHANGELOG.md b/packages/integrations/preact/CHANGELOG.md index 184d1914e..bd27174ad 100644 --- a/packages/integrations/preact/CHANGELOG.md +++ b/packages/integrations/preact/CHANGELOG.md @@ -1,5 +1,13 @@ # @astrojs/preact +## 3.0.0-beta.1 + +### Major Changes + +- [#7924](https://github.com/withastro/astro/pull/7924) [`519a1c4e8`](https://github.com/withastro/astro/commit/519a1c4e8407c7abcb8d879b67a9f4b960652cae) Thanks [@matthewp](https://github.com/matthewp)! - New `include` and `exclude` config options + + The Preact integration now has new `include` and `exclude` config options. Use these if you want to use Preact alongside another JSX framework; include specifies files to be compiled for Preact and `exclude` does the opposite. + ## 3.0.0-beta.0 ### Major Changes diff --git a/packages/integrations/preact/package.json b/packages/integrations/preact/package.json index 5fefa53eb..90d54ec25 100644 --- a/packages/integrations/preact/package.json +++ b/packages/integrations/preact/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/preact", "description": "Use Preact components within Astro", - "version": "3.0.0-beta.0", + "version": "3.0.0-beta.1", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/packages/integrations/preact/src/index.ts b/packages/integrations/preact/src/index.ts index 153b9e1c3..9551f97eb 100644 --- a/packages/integrations/preact/src/index.ts +++ b/packages/integrations/preact/src/index.ts @@ -1,5 +1,5 @@ import type { AstroIntegration, AstroRenderer, ViteUserConfig } from 'astro'; -import preact, {type PreactPluginOptions as VitePreactPluginOptions} from '@preact/preset-vite'; +import preact, { type PreactPluginOptions as VitePreactPluginOptions } from '@preact/preset-vite'; import { fileURLToPath } from 'node:url'; const babelCwd = new URL('../', import.meta.url); @@ -12,9 +12,9 @@ function getRenderer(development: boolean): AstroRenderer { }; } -export type Options =Pick<VitePreactPluginOptions, 'include' | 'exclude'> & { compat?: boolean }; +export type Options = Pick<VitePreactPluginOptions, 'include' | 'exclude'> & { compat?: boolean }; -export default function ({include, exclude, compat}: Options = {}): AstroIntegration { +export default function ({ include, exclude, compat }: Options = {}): AstroIntegration { return { name: '@astrojs/preact', hooks: { @@ -23,8 +23,8 @@ export default function ({include, exclude, compat}: Options = {}): AstroIntegra include, exclude, babel: { - cwd: fileURLToPath(babelCwd) - } + cwd: fileURLToPath(babelCwd), + }, }); const viteConfig: ViteUserConfig = { @@ -35,8 +35,8 @@ export default function ({include, exclude, compat}: Options = {}): AstroIntegra }; // If not compat, delete the plugin that does it - if(!compat) { - const pIndex = preactPlugin.findIndex(p => p.name == 'preact:config'); + if (!compat) { + const pIndex = preactPlugin.findIndex((p) => p.name == 'preact:config'); if (pIndex >= 0) { preactPlugin.splice(pIndex, 1); } @@ -44,12 +44,10 @@ export default function ({include, exclude, compat}: Options = {}): AstroIntegra viteConfig.optimizeDeps!.include!.push( 'preact/compat', 'preact/test-utils', - 'preact/compat/jsx-runtime', + 'preact/compat/jsx-runtime' ); viteConfig.resolve = { - alias: [ - { find: 'react/jsx-runtime', replacement: 'preact/jsx-runtime' }, - ], + alias: [{ find: 'react/jsx-runtime', replacement: 'preact/jsx-runtime' }], dedupe: ['preact/compat', 'preact'], }; // noExternal React entrypoints to be bundled, resolved, and aliased by Vite diff --git a/packages/integrations/react/CHANGELOG.md b/packages/integrations/react/CHANGELOG.md index 9b5173098..c95bd40fa 100644 --- a/packages/integrations/react/CHANGELOG.md +++ b/packages/integrations/react/CHANGELOG.md @@ -1,5 +1,15 @@ # @astrojs/react +## 3.0.0-beta.1 + +### Major Changes + +- [#7924](https://github.com/withastro/astro/pull/7924) [`519a1c4e8`](https://github.com/withastro/astro/commit/519a1c4e8407c7abcb8d879b67a9f4b960652cae) Thanks [@matthewp](https://github.com/matthewp)! - Support for React Refresh + + The React integration now fully supports React Refresh and is backed by `@vitejs/plugin-react`. + + Also included in this change are new `include` and `exclude` config options. Use these if you want to use React alongside another JSX framework; include specifies files to be compiled for React and `exclude` does the opposite. + ## 3.0.0-beta.0 ### Major Changes diff --git a/packages/integrations/react/package.json b/packages/integrations/react/package.json index 28dbf0891..889d11564 100644 --- a/packages/integrations/react/package.json +++ b/packages/integrations/react/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/react", "description": "Use React components within Astro", - "version": "3.0.0-beta.0", + "version": "3.0.0-beta.1", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/packages/integrations/react/src/index.ts b/packages/integrations/react/src/index.ts index da008a670..f5332e2ed 100644 --- a/packages/integrations/react/src/index.ts +++ b/packages/integrations/react/src/index.ts @@ -1,9 +1,8 @@ import type { AstroIntegration } from 'astro'; import { version as ReactVersion } from 'react-dom'; -import react, {type Options as ViteReactPluginOptions} from '@vitejs/plugin-react'; +import react, { type Options as ViteReactPluginOptions } from '@vitejs/plugin-react'; import { appendForwardSlash } from '@astrojs/internal-helpers/path'; - const FAST_REFRESH_PREAMBLE = react.preambleCode; function getRenderer() { @@ -18,7 +17,7 @@ function getRenderer() { }; } -function getViteConfiguration({include, exclude}: Options = {}) { +function getViteConfiguration({ include, exclude }: Options = {}) { return { optimizeDeps: { include: [ @@ -36,7 +35,7 @@ function getViteConfiguration({include, exclude}: Options = {}) { : '@astrojs/react/server-v17.js', ], }, - plugins: [react({include, exclude})], + plugins: [react({ include, exclude })], resolve: { dedupe: ['react', 'react-dom', 'react-dom/server'], }, @@ -56,16 +55,22 @@ function getViteConfiguration({include, exclude}: Options = {}) { }; } -export type Options =Pick<ViteReactPluginOptions, 'include' | 'exclude'>; -export default function ({include, exclude}: Pick<ViteReactPluginOptions, 'include' | 'exclude'> = {}): AstroIntegration { +export type Options = Pick<ViteReactPluginOptions, 'include' | 'exclude'>; +export default function ({ + include, + exclude, +}: Pick<ViteReactPluginOptions, 'include' | 'exclude'> = {}): AstroIntegration { return { name: '@astrojs/react', hooks: { 'astro:config:setup': ({ config, command, addRenderer, updateConfig, injectScript }) => { addRenderer(getRenderer()); - updateConfig({ vite: getViteConfiguration({include, exclude}) }); + updateConfig({ vite: getViteConfiguration({ include, exclude }) }); if (command === 'dev') { - const preamble = FAST_REFRESH_PREAMBLE.replace(`__BASE__`, appendForwardSlash(config.base)) + const preamble = FAST_REFRESH_PREAMBLE.replace( + `__BASE__`, + appendForwardSlash(config.base) + ); injectScript('before-hydration', preamble); } }, diff --git a/packages/integrations/solid/CHANGELOG.md b/packages/integrations/solid/CHANGELOG.md index 197286f76..6b1e4b012 100644 --- a/packages/integrations/solid/CHANGELOG.md +++ b/packages/integrations/solid/CHANGELOG.md @@ -1,5 +1,13 @@ # @astrojs/solid-js +## 3.0.0-beta.1 + +### Major Changes + +- [#7924](https://github.com/withastro/astro/pull/7924) [`519a1c4e8`](https://github.com/withastro/astro/commit/519a1c4e8407c7abcb8d879b67a9f4b960652cae) Thanks [@matthewp](https://github.com/matthewp)! - New `include` and `exclude` config options + + The Solid integration now has new `include` and `exclude` config options. Use these if you want to use Solid alongside another JSX framework; include specifies files to be compiled for Solid and `exclude` does the opposite. + ## 3.0.0-beta.0 ### Major Changes diff --git a/packages/integrations/solid/package.json b/packages/integrations/solid/package.json index 580545f44..5dc00a86e 100644 --- a/packages/integrations/solid/package.json +++ b/packages/integrations/solid/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/solid-js", - "version": "3.0.0-beta.0", + "version": "3.0.0-beta.1", "description": "Use Solid components within Astro", "type": "module", "types": "./dist/index.d.ts", diff --git a/packages/integrations/solid/src/index.ts b/packages/integrations/solid/src/index.ts index 1385ffc21..127d9ddb6 100644 --- a/packages/integrations/solid/src/index.ts +++ b/packages/integrations/solid/src/index.ts @@ -1,10 +1,7 @@ import type { AstroIntegration, AstroRenderer } from 'astro'; import solid, { type Options as ViteSolidPluginOptions } from 'vite-plugin-solid'; -async function getViteConfiguration( - isDev: boolean, - { include, exclude }: Options = {}, -) { +async function getViteConfiguration(isDev: boolean, { include, exclude }: Options = {}) { // https://github.com/solidjs/vite-plugin-solid // We inject the dev mode only if the user explicitly wants it or if we are in dev (serve) mode const nestedDeps = ['solid-js', 'solid-js/web', 'solid-js/store', 'solid-js/html', 'solid-js/h']; @@ -28,11 +25,11 @@ async function getViteConfiguration( esbuild: { // To support using alongside other JSX frameworks, still let // esbuild compile stuff. Solid goes first anyways. - include: /\.(m?ts|[jt]sx)$/ + include: /\.(m?ts|[jt]sx)$/, }, - } + }; }, - } + }, ], ssr: { external: ['babel-preset-solid'], diff --git a/packages/integrations/svelte/package.json b/packages/integrations/svelte/package.json index 7b03b9413..425cd12b5 100644 --- a/packages/integrations/svelte/package.json +++ b/packages/integrations/svelte/package.json @@ -48,7 +48,7 @@ "vite": "^4.4.6" }, "peerDependencies": { - "astro": "workspace:^3.0.0-beta.0", + "astro": "workspace:^3.0.0-beta.1", "svelte": "^3.55.0 || ^4.0.0" }, "engines": { diff --git a/packages/integrations/tailwind/package.json b/packages/integrations/tailwind/package.json index 7e678bb80..11bf76a52 100644 --- a/packages/integrations/tailwind/package.json +++ b/packages/integrations/tailwind/package.json @@ -43,7 +43,7 @@ "vite": "^4.4.6" }, "peerDependencies": { - "astro": "workspace:^3.0.0-beta.0", + "astro": "workspace:^3.0.0-beta.1", "tailwindcss": "^3.0.24" } } diff --git a/packages/integrations/vercel/CHANGELOG.md b/packages/integrations/vercel/CHANGELOG.md index ebc411bcd..70a1ba43e 100644 --- a/packages/integrations/vercel/CHANGELOG.md +++ b/packages/integrations/vercel/CHANGELOG.md @@ -1,5 +1,34 @@ # @astrojs/vercel +## 4.0.0-beta.1 + +### Major Changes + +- [#8015](https://github.com/withastro/astro/pull/8015) [`9cc4e48e6`](https://github.com/withastro/astro/commit/9cc4e48e6a858d3a12e6373a5e287b32d24a1c5a) Thanks [@matthewp](https://github.com/matthewp)! - Remove the Vercel Edge adapter + + `@astrojs/vercel/serverless` now supports Edge middleware, so a separate adapter for Edge itself (deploying your entire app to the edge) is no longer necessary. Please update your Astro config to reflect this change: + + ```diff + // astro.config.mjs + import { defineConfig } from 'astro/config'; + - import vercel from '@astrojs/vercel/edge'; + + import vercel from '@astrojs/vercel/serverless'; + + export default defineConfig({ + output: 'server', + adapter: vercel({ + + edgeMiddleware: true + }), + }); + ``` + + This adapter had several known limitations and compatibility issues that prevented many people from using it in production. To reduce maintenance costs and because we have a better story with Serveless + Edge Middleware, we are removing the Edge adapter. + +### Patch Changes + +- Updated dependencies [[`65c354969`](https://github.com/withastro/astro/commit/65c354969e6fe0ef6d622e8f4c545e2f717ce8c6), [`3c3100851`](https://github.com/withastro/astro/commit/3c31008519ce68b5b1b1cb23b71fbe0a2d506882), [`34cb20021`](https://github.com/withastro/astro/commit/34cb2002161ba88df6bcb72fecfd12ed867c134b), [`7bd1b86f8`](https://github.com/withastro/astro/commit/7bd1b86f85c06fdde0a1ed9146d01bac69990671), [`519a1c4e8`](https://github.com/withastro/astro/commit/519a1c4e8407c7abcb8d879b67a9f4b960652cae), [`70f34f5a3`](https://github.com/withastro/astro/commit/70f34f5a355f42526ee9e5355f3de8e510002ea2), [`0f637c71e`](https://github.com/withastro/astro/commit/0f637c71e511cb4c51712128d217a26c8eee4d40), [`866ed4098`](https://github.com/withastro/astro/commit/866ed4098edffb052239cdb26e076cf8db61b1d9), [`5b1e39ef6`](https://github.com/withastro/astro/commit/5b1e39ef6ec6dcebea96584f95d9530bd9aa715d)]: + - astro@3.0.0-beta.1 + ## 4.0.0-beta.0 ### Major Changes diff --git a/packages/integrations/vercel/package.json b/packages/integrations/vercel/package.json index 3c13c8a98..46d8366ad 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": "4.0.0-beta.0", + "version": "4.0.0-beta.1", "type": "module", "author": "withastro", "license": "MIT", @@ -60,7 +60,7 @@ "web-vitals": "^3.3.2" }, "peerDependencies": { - "astro": "workspace:^3.0.0-beta.0" + "astro": "workspace:^3.0.0-beta.1" }, "devDependencies": { "@types/set-cookie-parser": "^2.4.2", diff --git a/packages/integrations/vue/package.json b/packages/integrations/vue/package.json index 716d4a743..b010028dd 100644 --- a/packages/integrations/vue/package.json +++ b/packages/integrations/vue/package.json @@ -56,7 +56,7 @@ "vue": "^3.3.4" }, "peerDependencies": { - "astro": "workspace:^3.0.0-beta.0", + "astro": "workspace:^3.0.0-beta.1", "vue": "^3.2.30" }, "engines": { |