diff options
author | 2023-08-11 08:14:20 -0700 | |
---|---|---|
committer | 2023-08-11 11:14:20 -0400 | |
commit | 40efae65501fc79c281e34b5af912bf837b7105b (patch) | |
tree | 8a6b834647f9e6b2b36aceaaf47397cba8ac51e7 /packages | |
parent | 866ed4098edffb052239cdb26e076cf8db61b1d9 (diff) | |
download | astro-40efae65501fc79c281e34b5af912bf837b7105b.tar.gz astro-40efae65501fc79c281e34b5af912bf837b7105b.tar.zst astro-40efae65501fc79c281e34b5af912bf837b7105b.zip |
[ci] release (beta) (#7952)astro@3.0.0-beta.1@astrojs/vercel@4.0.0-beta.1@astrojs/telemetry@3.0.0-beta.1@astrojs/solid-js@3.0.0-beta.1@astrojs/react@3.0.0-beta.1@astrojs/preact@3.0.0-beta.1@astrojs/netlify@3.0.0-beta.1@astrojs/cloudflare@7.0.0-beta.1
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'packages')
32 files changed, 267 insertions, 56 deletions
diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index 62fa23502..72520c0e3 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,106 @@ # astro +## 3.0.0-beta.1 + +### Major Changes + +- [#7952](https://github.com/withastro/astro/pull/7952) [`3c3100851`](https://github.com/withastro/astro/commit/3c31008519ce68b5b1b1cb23b71fbe0a2d506882) Thanks [@astrobot-houston](https://github.com/astrobot-houston)! - Remove support for `Astro.__renderMarkdown` which is used by `@astrojs/markdown-component`. + + The `<Markdown />` component was deprecated in Astro v1 and is completely removed in v3. This integration must now be removed from your project. + + As an alternative, you can use community packages that provide a similar component like https://github.com/natemoo-re/astro-remote instead. + +- [#8019](https://github.com/withastro/astro/pull/8019) [`34cb20021`](https://github.com/withastro/astro/commit/34cb2002161ba88df6bcb72fecfd12ed867c134b) Thanks [@bluwy](https://github.com/bluwy)! - Remove backwards-compatible kebab-case transform for camelCase CSS variable names passed to the `style` attribute. If you were relying on the kebab-case transform in your styles, make sure to use the camelCase version to prevent missing styles. For example: + + ```astro + --- + const myValue = 'red'; + --- + + <!-- input --> + <div style={{ '--myValue': myValue }}></div> + + <!-- output (before) --> + <div style="--my-value:var(--myValue);--myValue:red"></div> + + <!-- output (after) --> + <div style="--myValue:red"></div> + ``` + + ```diff + <style> + div { + - color: var(--my-value); + + color: var(--myValue); + } + </style> + ``` + +- [#7893](https://github.com/withastro/astro/pull/7893) [`7bd1b86f8`](https://github.com/withastro/astro/commit/7bd1b86f85c06fdde0a1ed9146d01bac69990671) Thanks [@ematipico](https://github.com/ematipico)! - Implements a new scope style strategy called `"attribute"`. When enabled, styles are applied using `data-*` attributes. + + The **default** value of `scopedStyleStrategy` is `"attribute"`. + + If you want to use the previous behaviour, you have to use the `"where"` option: + + ```diff + import { defineConfig } from 'astro/config'; + + export default defineConfig({ + + scopedStyleStrategy: 'where', + }); + ``` + +- [#7924](https://github.com/withastro/astro/pull/7924) [`519a1c4e8`](https://github.com/withastro/astro/commit/519a1c4e8407c7abcb8d879b67a9f4b960652cae) Thanks [@matthewp](https://github.com/matthewp)! - Astro's JSX handling has been refactored with better support for each framework. + + Previously, Astro automatically scanned your components to determine which framework-specific transformations should be used. In practice, supporting advanced features like Fast Refresh with this approach proved difficult. + + Now, Astro determines which framework to use with `include` and `exclude` config options where you can specify files and folders on a per-framework basis. When using multiple JSX frameworks in the same project, users should manually control which files belong to each framework using the `include` and `exclude` options. + + ```js + export default defineConfig({ + // The `include` config is only needed in projects that use multiple JSX frameworks; + // if only using one no extra config is needed. + integrations: [ + preact({ + include: ['**/preact/*'], + }), + react({ + include: ['**/react/*'], + }), + solid({ + include: ['**/solid/*'], + }), + ], + }); + ``` + +- [#7878](https://github.com/withastro/astro/pull/7878) [`0f637c71e`](https://github.com/withastro/astro/commit/0f637c71e511cb4c51712128d217a26c8eee4d40) Thanks [@bluwy](https://github.com/bluwy)! - The value of `import.meta.env.BASE_URL`, which is derived from the `base` option, will no longer have a trailing slash added by default or when `trailingSlash: "ignore"` is set. The existing behavior of `base` in combination with `trailingSlash: "always"` or `trailingSlash: "never"` is unchanged. + + If your `base` already has a trailing slash, no change is needed. + + If your `base` does not have a trailing slash, add one to preserve the previous behaviour: + + ```diff + // astro.config.mjs + - base: 'my-base', + + base: 'my-base/', + ``` + +### Minor Changes + +- [#8012](https://github.com/withastro/astro/pull/8012) [`866ed4098`](https://github.com/withastro/astro/commit/866ed4098edffb052239cdb26e076cf8db61b1d9) Thanks [@ematipico](https://github.com/ematipico)! - Add a new `astro/errors` module. Developers can import `AstroUserError`, and provide a `message` and an optional `hint` + +### Patch Changes + +- [#7998](https://github.com/withastro/astro/pull/7998) [`65c354969`](https://github.com/withastro/astro/commit/65c354969e6fe0ef6d622e8f4c545e2f717ce8c6) Thanks [@bluwy](https://github.com/bluwy)! - Call `astro sync` once before calling `astro check` + +- [#7952](https://github.com/withastro/astro/pull/7952) [`70f34f5a3`](https://github.com/withastro/astro/commit/70f34f5a355f42526ee9e5355f3de8e510002ea2) Thanks [@astrobot-houston](https://github.com/astrobot-houston)! - Remove StreamingCompatibleResponse polyfill + +- [#8011](https://github.com/withastro/astro/pull/8011) [`5b1e39ef6`](https://github.com/withastro/astro/commit/5b1e39ef6ec6dcebea96584f95d9530bd9aa715d) Thanks [@bluwy](https://github.com/bluwy)! - Move hoisted script analysis optimization behind the `experimental.optimizeHoistedScript` option + +- Updated dependencies [[`b675acb2a`](https://github.com/withastro/astro/commit/b675acb2aa820448e9c0d363339a37fbac873215)]: + - @astrojs/telemetry@3.0.0-beta.1 + ## 3.0.0-beta.0 ### Major Changes diff --git a/packages/astro/e2e/errors.test.js b/packages/astro/e2e/errors.test.js index 2a5a83ace..4cb1b02fb 100644 --- a/packages/astro/e2e/errors.test.js +++ b/packages/astro/e2e/errors.test.js @@ -105,7 +105,10 @@ test.describe('Error display', () => { // Wait for page reload page.waitForNavigation(), // Edit the component file - astro.editFile('./src/components/svelte/SvelteSyntaxError.svelte', () => `<h1>No mismatch</h1>`), + astro.editFile( + './src/components/svelte/SvelteSyntaxError.svelte', + () => `<h1>No mismatch</h1>` + ), ]); expect(await page.locator('vite-error-overlay').count()).toEqual(0); diff --git a/packages/astro/package.json b/packages/astro/package.json index c52c93ea3..909cbe813 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "3.0.0-beta.0", + "version": "3.0.0-beta.1", "description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.", "type": "module", "author": "withastro", diff --git a/packages/astro/src/vite-plugin-markdown/index.ts b/packages/astro/src/vite-plugin-markdown/index.ts index aff27f7a6..be77b3caa 100644 --- a/packages/astro/src/vite-plugin-markdown/index.ts +++ b/packages/astro/src/vite-plugin-markdown/index.ts @@ -110,7 +110,9 @@ export default function markdown({ settings, logging }: AstroPluginOptions): Plu } const code = escapeViteEnvReferences(` - import { unescapeHTML, spreadAttributes, createComponent, render, renderComponent } from ${JSON.stringify(astroServerRuntimeModulePath)}; + import { unescapeHTML, spreadAttributes, createComponent, render, renderComponent } from ${JSON.stringify( + astroServerRuntimeModulePath + )}; import { AstroError, AstroErrorData } from ${JSON.stringify(astroErrorModulePath)}; ${layout ? `import Layout from ${JSON.stringify(layout)};` : ''} diff --git a/packages/astro/src/vite-plugin-mdx/index.ts b/packages/astro/src/vite-plugin-mdx/index.ts index 473c4a78e..f2b068068 100644 --- a/packages/astro/src/vite-plugin-mdx/index.ts +++ b/packages/astro/src/vite-plugin-mdx/index.ts @@ -1,9 +1,5 @@ import type { TransformResult } from 'rollup'; -import { - transformWithEsbuild, - type Plugin, - type ResolvedConfig, -} from 'vite'; +import { transformWithEsbuild, type Plugin, type ResolvedConfig } from 'vite'; import type { AstroRenderer, AstroSettings } from '../@types/astro'; import type { LogOptions } from '../core/logger/core.js'; import type { PluginMetadata } from '../vite-plugin-astro/types'; diff --git a/packages/astro/test/jsx.test.js b/packages/astro/test/jsx.test.js index 64c7a7609..b19074817 100644 --- a/packages/astro/test/jsx.test.js +++ b/packages/astro/test/jsx.test.js @@ -65,6 +65,6 @@ describe('jsx-runtime', () => { const $ = cheerio.load(html); expect($('#mdx-wrapper #hello-world')).to.have.a.lengthOf(1, 'md content rendered'); - expect($('#mdx-wrapper #react')).to.have.a.lengthOf(1, 'React component rendered') + expect($('#mdx-wrapper #react')).to.have.a.lengthOf(1, 'React component rendered'); }); }); diff --git a/packages/astro/test/preact-compat-component.test.js b/packages/astro/test/preact-compat-component.test.js index 8937e9afa..0c1991f12 100644 --- a/packages/astro/test/preact-compat-component.test.js +++ b/packages/astro/test/preact-compat-component.test.js @@ -20,9 +20,9 @@ describe('Preact compat component', () => { devServer = await fixture.startDevServer(); }); - after(async() => { + after(async () => { await devServer.stop(); - }) + }); it('Can load Counter', async () => { const res = await fixture.fetch('/'); 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": { diff --git a/packages/telemetry/CHANGELOG.md b/packages/telemetry/CHANGELOG.md index 33590cf2a..b56b1129b 100644 --- a/packages/telemetry/CHANGELOG.md +++ b/packages/telemetry/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/telemetry +## 3.0.0-beta.1 + +### Patch Changes + +- [#7952](https://github.com/withastro/astro/pull/7952) [`b675acb2a`](https://github.com/withastro/astro/commit/b675acb2aa820448e9c0d363339a37fbac873215) Thanks [@astrobot-houston](https://github.com/astrobot-houston)! - Remove undici dependency + ## 3.0.0-beta.0 ### Major Changes diff --git a/packages/telemetry/package.json b/packages/telemetry/package.json index b739e13e2..6e54d1d37 100644 --- a/packages/telemetry/package.json +++ b/packages/telemetry/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/telemetry", - "version": "3.0.0-beta.0", + "version": "3.0.0-beta.1", "type": "module", "types": "./dist/types/index.d.ts", "author": "withastro", |