diff options
Diffstat (limited to 'packages')
31 files changed, 206 insertions, 36 deletions
diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index 5c93709a4..1a9256585 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,80 @@ # astro +## 5.0.0-alpha.0 + +### Major Changes + +- [#10742](https://github.com/withastro/astro/pull/10742) [`b6fbdaa`](https://github.com/withastro/astro/commit/b6fbdaa94a9ecec706a99e1938fbf5cd028c72e0) Thanks [@ematipico](https://github.com/ematipico)! - The lowest version of Node supported by Astro is now Node v18.17.1 and higher. + +- [#11715](https://github.com/withastro/astro/pull/11715) [`d74617c`](https://github.com/withastro/astro/commit/d74617cbd3278feba05909ec83db2d73d57a153e) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Refactor the exported types from the `astro` module. There should normally be no breaking changes, but if you relied on some previously deprecated types, these might now have been fully removed. + + In most cases, updating your code to move away from previously deprecated APIs in previous versions of Astro should be enough to fix any issues. + +- [#11660](https://github.com/withastro/astro/pull/11660) [`e90f559`](https://github.com/withastro/astro/commit/e90f5593d23043579611452a84b9e18ad2407ef9) Thanks [@bluwy](https://github.com/bluwy)! - Fixes attribute rendering for non-[boolean HTML attributes](https://developer.mozilla.org/en-US/docs/Glossary/Boolean/HTML) with boolean values to match proper attribute handling in browsers. + + Previously, non-boolean attributes may not have included their values when rendered to HTML. In Astro v5.0, the values are now explicitly rendered as `="true"` or `="false"` + + In the following `.astro` examples, only `allowfullscreen` is a boolean attribute: + + ```astro + <!-- src/pages/index.astro --><!-- `allowfullscreen` is a boolean attribute --> + <p allowfullscreen={true}></p> + <p allowfullscreen={false}></p> + + <!-- `inherit` is *not* a boolean attribute --> + <p inherit={true}></p> + <p inherit={false}></p> + + <!-- `data-*` attributes are not boolean attributes --> + <p data-light={true}></p> + <p data-light={false}></p> + ``` + + Astro v5.0 now preserves the full data attribute with its value when rendering the HTML of non-boolean attributes: + + ```diff + <p allowfullscreen></p> + <p></p> + + <p inherit="true"></p> + - <p inherit></p> + + <p inherit="false"></p> + + - <p data-light></p> + + <p data-light="true"></p> + - <p></p> + + <p data-light="false"></p> + ``` + + If you rely on attribute values, for example to locate elements or to conditionally render, update your code to match the new non-boolean attribute values: + + ```diff + - el.getAttribute('inherit') === '' + + el.getAttribute('inherit') === 'false' + + - el.hasAttribute('data-light') + + el.dataset.light === 'true' + ``` + +- [#11714](https://github.com/withastro/astro/pull/11714) [`8a53517`](https://github.com/withastro/astro/commit/8a5351737d6a14fc55f1dafad8f3b04079e81af6) Thanks [@matthewp](https://github.com/matthewp)! - Remove support for functionPerRoute + + This change removes support for the `functionPerRoute` option both in Astro and `@astrojs/vercel`. + + This option made it so that each route got built as separate entrypoints so that they could be loaded as separate functions. The hope was that by doing this it would decrease the size of each function. However in practice routes use most of the same code, and increases in function size limitations made the potential upsides less important. + + Additionally there are downsides to functionPerRoute, such as hitting limits on the number of functions per project. The feature also never worked with some Astro features like i18n domains and request rewriting. + + Given this, the feature has been removed from Astro. + +### Patch Changes + +- [#11745](https://github.com/withastro/astro/pull/11745) [`89bab1e`](https://github.com/withastro/astro/commit/89bab1e70786123fbe933a9d7a1b80c9334dcc5f) Thanks [@bluwy](https://github.com/bluwy)! - Prints prerender dynamic value usage warning only if it's used + +- [#11730](https://github.com/withastro/astro/pull/11730) [`2df49a6`](https://github.com/withastro/astro/commit/2df49a6fb4f6d92fe45f7429430abe63defeacd6) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Simplifies path operations of `astro sync` + +- Updated dependencies [[`83a2a64`](https://github.com/withastro/astro/commit/83a2a648418ad30f4eb781d1c1b5f2d8a8ac846e)]: + - @astrojs/markdown-remark@6.0.0-alpha.0 + ## 4.14.2 ### Patch Changes diff --git a/packages/astro/components/Picture.astro b/packages/astro/components/Picture.astro index 6686faf15..73459db04 100644 --- a/packages/astro/components/Picture.astro +++ b/packages/astro/components/Picture.astro @@ -1,9 +1,9 @@ --- import { type LocalImageProps, type RemoteImageProps, getImage } from 'astro:assets'; import * as mime from 'mrmime'; -import type { GetImageResult, ImageOutputFormat } from '../dist/types/public/index.js'; import { isESMImportedImage, resolveSrc } from '../dist/assets/utils/imageKind'; import { AstroError, AstroErrorData } from '../dist/core/errors/index.js'; +import type { GetImageResult, ImageOutputFormat } from '../dist/types/public/index.js'; import type { HTMLAttributes } from '../types'; type Props = (LocalImageProps | RemoteImageProps) & { diff --git a/packages/astro/package.json b/packages/astro/package.json index 263d9389e..e55274daf 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "4.14.2", + "version": "5.0.0-alpha.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/astro/src/cli/db/index.ts b/packages/astro/src/cli/db/index.ts index 7aaea302c..0dda4f30b 100644 --- a/packages/astro/src/cli/db/index.ts +++ b/packages/astro/src/cli/db/index.ts @@ -1,7 +1,7 @@ import type { Arguments } from 'yargs-parser'; -import type { AstroConfig } from '../../types/public/config.js'; import { resolveConfig } from '../../core/config/config.js'; import { apply as applyPolyfill } from '../../core/polyfill.js'; +import type { AstroConfig } from '../../types/public/config.js'; import { createLoggerFromFlags, flagsToAstroInlineConfig } from '../flags.js'; import { getPackage } from '../install-package.js'; diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index 8bf881095..e58f56100 100644 --- a/packages/astro/src/core/build/generate.ts +++ b/packages/astro/src/core/build/generate.ts @@ -99,7 +99,7 @@ export async function generatePages(options: StaticBuildOptions, internals: Buil } const ssrEntryPage = await pipeline.retrieveSsrEntry(pageData.route, filePath); - + const ssrEntry = ssrEntryPage as SinglePageBuiltModule; await generatePage(pageData, ssrEntry, builtPaths, pipeline); } diff --git a/packages/astro/src/core/build/pipeline.ts b/packages/astro/src/core/build/pipeline.ts index 86a97071a..ae00da5a0 100644 --- a/packages/astro/src/core/build/pipeline.ts +++ b/packages/astro/src/core/build/pipeline.ts @@ -199,9 +199,7 @@ export class BuildPipeline extends Pipeline { for (const [virtualModulePageName, filePath] of this.internals.entrySpecifierToBundleMap) { // virtual pages are emitted with the 'plugin-pages' prefix - if ( - virtualModulePageName.includes(ASTRO_PAGE_RESOLVED_MODULE_ID) - ) { + if (virtualModulePageName.includes(ASTRO_PAGE_RESOLVED_MODULE_ID)) { let pageDatas: PageBuildData[] = []; pageDatas.push( ...getPagesFromVirtualModulePageName( diff --git a/packages/astro/src/core/build/plugins/plugin-ssr.ts b/packages/astro/src/core/build/plugins/plugin-ssr.ts index 180bd158e..992dc6561 100644 --- a/packages/astro/src/core/build/plugins/plugin-ssr.ts +++ b/packages/astro/src/core/build/plugins/plugin-ssr.ts @@ -1,3 +1,4 @@ +import type { Plugin as VitePlugin } from 'vite'; import type { AstroSettings } from '../../../types/astro.js'; import type { AstroAdapter } from '../../../types/public/integrations.js'; import { routeIsRedirect } from '../../redirects/index.js'; @@ -12,7 +13,6 @@ import { MIDDLEWARE_MODULE_ID } from './plugin-middleware.js'; import { ASTRO_PAGE_MODULE_ID } from './plugin-pages.js'; import { RENDERERS_MODULE_ID } from './plugin-renderers.js'; import { getVirtualModulePageName } from './util.js'; -import type { Plugin as VitePlugin } from 'vite'; export const SSR_VIRTUAL_MODULE_ID = '@astrojs-ssr-virtual-entry'; export const RESOLVED_SSR_VIRTUAL_MODULE_ID = '\0' + SSR_VIRTUAL_MODULE_ID; @@ -137,7 +137,7 @@ export function pluginSSR( hooks: { 'build:before': () => { const adapter = options.settings.adapter!; - const ssrPlugin = ssr && vitePluginSSR(internals, adapter, options) + const ssrPlugin = ssr && vitePluginSSR(internals, adapter, options); const vitePlugin = [vitePluginAdapter(adapter)]; if (ssrPlugin) { vitePlugin.unshift(ssrPlugin); diff --git a/packages/astro/src/types/public/config.ts b/packages/astro/src/types/public/config.ts index 178b9edf7..70f13e9a5 100644 --- a/packages/astro/src/types/public/config.ts +++ b/packages/astro/src/types/public/config.ts @@ -1,10 +1,10 @@ +import type { OutgoingHttpHeaders } from 'node:http'; import type { RehypePlugins, RemarkPlugins, RemarkRehype, ShikiConfig, } from '@astrojs/markdown-remark'; -import type { OutgoingHttpHeaders } from 'node:http'; import type { UserConfig as OriginalViteUserConfig, SSROptions as ViteSSROptions } from 'vite'; import type { RemotePattern } from '../../assets/utils/remotePattern.js'; import type { AssetsPrefix } from '../../core/app/types.js'; diff --git a/packages/astro/test/astro-attrs.test.js b/packages/astro/test/astro-attrs.test.js index a981a5b15..287298c93 100644 --- a/packages/astro/test/astro-attrs.test.js +++ b/packages/astro/test/astro-attrs.test.js @@ -44,11 +44,11 @@ describe('Attributes', async () => { assert.ok(!/allowfullscreen=/.test(html), 'boolean attributes should not have values'); assert.ok( !/id="data-attr-string-falsy"\s+data-foobar=/.test(html), - "data attributes should not have values if it's an empty string" + "data attributes should not have values if it's an empty string", ); assert.ok( !/id="normal-attr-string-falsy"\s+data-foobar=/.test(html), - "normal attributes should not have values if it's an empty string" + "normal attributes should not have values if it's an empty string", ); // cheerio will unescape the values, so checking that the url rendered unescaped to begin with has to be done manually diff --git a/packages/astro/test/astro-component-code.test.js b/packages/astro/test/astro-component-code.test.js index bc8b5f172..b6f08ac57 100644 --- a/packages/astro/test/astro-component-code.test.js +++ b/packages/astro/test/astro-component-code.test.js @@ -94,7 +94,7 @@ describe('<Code>', () => { 'color:var(--astro-code-foreground)', 'color:var(--astro-code-token-string-expression)', 'color:var(--astro-code-foreground)', - ] + ], ); }); diff --git a/packages/astro/test/types/call-action.ts b/packages/astro/test/types/call-action.ts index 8cadd1fb0..6d4019d38 100644 --- a/packages/astro/test/types/call-action.ts +++ b/packages/astro/test/types/call-action.ts @@ -1,7 +1,7 @@ import { describe, it } from 'node:test'; import { expectTypeOf } from 'expect-type'; -import type { APIContext } from '../../dist/types/public/context.js'; import { type ActionReturnType, defineAction } from '../../dist/actions/runtime/virtual/server.js'; +import type { APIContext } from '../../dist/types/public/context.js'; import { z } from '../../zod.mjs'; describe('Astro.callAction', () => { diff --git a/packages/create-astro/CHANGELOG.md b/packages/create-astro/CHANGELOG.md index 19ae5f93f..e658c7850 100644 --- a/packages/create-astro/CHANGELOG.md +++ b/packages/create-astro/CHANGELOG.md @@ -1,5 +1,11 @@ # create-astro +## 4.8.4-alpha.0 + +### Patch Changes + +- [#11766](https://github.com/withastro/astro/pull/11766) [`d12dcbf`](https://github.com/withastro/astro/commit/d12dcbff606dd8330075ba77d73ed3cbc79d7421) Thanks [@bluwy](https://github.com/bluwy)! - Fixes initial git commit when initializing git + ## 4.8.3 ### Patch Changes diff --git a/packages/create-astro/package.json b/packages/create-astro/package.json index e22a738fa..2d2b79d79 100644 --- a/packages/create-astro/package.json +++ b/packages/create-astro/package.json @@ -1,6 +1,6 @@ { "name": "create-astro", - "version": "4.8.3", + "version": "4.8.4-alpha.0", "type": "module", "author": "withastro", "license": "MIT", diff --git a/packages/integrations/markdoc/CHANGELOG.md b/packages/integrations/markdoc/CHANGELOG.md index 0884b81ba..a968e5911 100644 --- a/packages/integrations/markdoc/CHANGELOG.md +++ b/packages/integrations/markdoc/CHANGELOG.md @@ -1,5 +1,13 @@ # @astrojs/markdoc +## 1.0.0-alpha.0 + +### Patch Changes + +- Updated dependencies [[`b6fbdaa`](https://github.com/withastro/astro/commit/b6fbdaa94a9ecec706a99e1938fbf5cd028c72e0), [`89bab1e`](https://github.com/withastro/astro/commit/89bab1e70786123fbe933a9d7a1b80c9334dcc5f), [`d74617c`](https://github.com/withastro/astro/commit/d74617cbd3278feba05909ec83db2d73d57a153e), [`83a2a64`](https://github.com/withastro/astro/commit/83a2a648418ad30f4eb781d1c1b5f2d8a8ac846e), [`e90f559`](https://github.com/withastro/astro/commit/e90f5593d23043579611452a84b9e18ad2407ef9), [`2df49a6`](https://github.com/withastro/astro/commit/2df49a6fb4f6d92fe45f7429430abe63defeacd6), [`8a53517`](https://github.com/withastro/astro/commit/8a5351737d6a14fc55f1dafad8f3b04079e81af6)]: + - astro@5.0.0-alpha.0 + - @astrojs/markdown-remark@6.0.0-alpha.0 + ## 0.11.3 ### Patch Changes diff --git a/packages/integrations/markdoc/package.json b/packages/integrations/markdoc/package.json index 2314f81b9..71cce6fd0 100644 --- a/packages/integrations/markdoc/package.json +++ b/packages/integrations/markdoc/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/markdoc", "description": "Add support for Markdoc in your Astro site", - "version": "0.11.3", + "version": "1.0.0-alpha.0", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", @@ -72,7 +72,7 @@ "htmlparser2": "^9.1.0" }, "peerDependencies": { - "astro": "^3.0.0 || ^4.0.0" + "astro": "^5.0.0-alpha.0" }, "devDependencies": { "@types/markdown-it": "^14.1.2", diff --git a/packages/integrations/mdx/CHANGELOG.md b/packages/integrations/mdx/CHANGELOG.md index ff85f8485..10c30fbf9 100644 --- a/packages/integrations/mdx/CHANGELOG.md +++ b/packages/integrations/mdx/CHANGELOG.md @@ -1,5 +1,15 @@ # @astrojs/mdx +## 4.0.0-alpha.0 + +### Patch Changes + +- [#11717](https://github.com/withastro/astro/pull/11717) [`423614e`](https://github.com/withastro/astro/commit/423614ebb6ddb76cc8d11f3e3b6ae111a4a82662) Thanks [@bluwy](https://github.com/bluwy)! - Fixes stack trace location when failed to parse an MDX file with frontmatter + +- Updated dependencies [[`b6fbdaa`](https://github.com/withastro/astro/commit/b6fbdaa94a9ecec706a99e1938fbf5cd028c72e0), [`89bab1e`](https://github.com/withastro/astro/commit/89bab1e70786123fbe933a9d7a1b80c9334dcc5f), [`d74617c`](https://github.com/withastro/astro/commit/d74617cbd3278feba05909ec83db2d73d57a153e), [`83a2a64`](https://github.com/withastro/astro/commit/83a2a648418ad30f4eb781d1c1b5f2d8a8ac846e), [`e90f559`](https://github.com/withastro/astro/commit/e90f5593d23043579611452a84b9e18ad2407ef9), [`2df49a6`](https://github.com/withastro/astro/commit/2df49a6fb4f6d92fe45f7429430abe63defeacd6), [`8a53517`](https://github.com/withastro/astro/commit/8a5351737d6a14fc55f1dafad8f3b04079e81af6)]: + - astro@5.0.0-alpha.0 + - @astrojs/markdown-remark@6.0.0-alpha.0 + ## 3.1.3 ### Patch Changes diff --git a/packages/integrations/mdx/package.json b/packages/integrations/mdx/package.json index 773b3bf62..a07777b6a 100644 --- a/packages/integrations/mdx/package.json +++ b/packages/integrations/mdx/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/mdx", "description": "Add support for MDX pages in your Astro site", - "version": "3.1.3", + "version": "4.0.0-alpha.0", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", @@ -49,7 +49,7 @@ "vfile": "^6.0.2" }, "peerDependencies": { - "astro": "^4.8.0" + "astro": "^5.0.0-alpha.0" }, "devDependencies": { "@types/estree": "^1.0.5", diff --git a/packages/integrations/node/CHANGELOG.md b/packages/integrations/node/CHANGELOG.md index 738cfc367..15ee56a01 100644 --- a/packages/integrations/node/CHANGELOG.md +++ b/packages/integrations/node/CHANGELOG.md @@ -1,5 +1,12 @@ # @astrojs/node +## 9.0.0-alpha.0 + +### Patch Changes + +- Updated dependencies [[`b6fbdaa`](https://github.com/withastro/astro/commit/b6fbdaa94a9ecec706a99e1938fbf5cd028c72e0), [`89bab1e`](https://github.com/withastro/astro/commit/89bab1e70786123fbe933a9d7a1b80c9334dcc5f), [`d74617c`](https://github.com/withastro/astro/commit/d74617cbd3278feba05909ec83db2d73d57a153e), [`e90f559`](https://github.com/withastro/astro/commit/e90f5593d23043579611452a84b9e18ad2407ef9), [`2df49a6`](https://github.com/withastro/astro/commit/2df49a6fb4f6d92fe45f7429430abe63defeacd6), [`8a53517`](https://github.com/withastro/astro/commit/8a5351737d6a14fc55f1dafad8f3b04079e81af6)]: + - astro@5.0.0-alpha.0 + ## 8.3.3 ### Patch Changes diff --git a/packages/integrations/node/package.json b/packages/integrations/node/package.json index a87f26133..0df2ba55a 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": "8.3.3", + "version": "9.0.0-alpha.0", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", @@ -37,7 +37,7 @@ "server-destroy": "^1.0.1" }, "peerDependencies": { - "astro": "^4.2.0" + "astro": "^5.0.0-alpha.0" }, "devDependencies": { "@types/node": "^18.17.8", diff --git a/packages/integrations/svelte/CHANGELOG.md b/packages/integrations/svelte/CHANGELOG.md index 44c3295eb..a498778af 100644 --- a/packages/integrations/svelte/CHANGELOG.md +++ b/packages/integrations/svelte/CHANGELOG.md @@ -1,5 +1,12 @@ # @astrojs/svelte +## 6.0.0-alpha.0 + +### Patch Changes + +- Updated dependencies [[`b6fbdaa`](https://github.com/withastro/astro/commit/b6fbdaa94a9ecec706a99e1938fbf5cd028c72e0), [`89bab1e`](https://github.com/withastro/astro/commit/89bab1e70786123fbe933a9d7a1b80c9334dcc5f), [`d74617c`](https://github.com/withastro/astro/commit/d74617cbd3278feba05909ec83db2d73d57a153e), [`e90f559`](https://github.com/withastro/astro/commit/e90f5593d23043579611452a84b9e18ad2407ef9), [`2df49a6`](https://github.com/withastro/astro/commit/2df49a6fb4f6d92fe45f7429430abe63defeacd6), [`8a53517`](https://github.com/withastro/astro/commit/8a5351737d6a14fc55f1dafad8f3b04079e81af6)]: + - astro@5.0.0-alpha.0 + ## 5.7.0 ### Minor Changes diff --git a/packages/integrations/svelte/package.json b/packages/integrations/svelte/package.json index 5354279cb..0c0ccdba8 100644 --- a/packages/integrations/svelte/package.json +++ b/packages/integrations/svelte/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/svelte", - "version": "5.7.0", + "version": "6.0.0-alpha.0", "description": "Use Svelte components within Astro", "type": "module", "types": "./dist/index.d.ts", @@ -60,7 +60,7 @@ "vite": "^5.4.1" }, "peerDependencies": { - "astro": "^4.0.0", + "astro": "^5.0.0-alpha.0", "svelte": "^4.0.0 || ^5.0.0-next.190", "typescript": "^5.3.3" }, diff --git a/packages/integrations/tailwind/CHANGELOG.md b/packages/integrations/tailwind/CHANGELOG.md index f796b1083..cc632bfc2 100644 --- a/packages/integrations/tailwind/CHANGELOG.md +++ b/packages/integrations/tailwind/CHANGELOG.md @@ -1,5 +1,12 @@ # @astrojs/tailwind +## 6.0.0-alpha.0 + +### Patch Changes + +- Updated dependencies [[`b6fbdaa`](https://github.com/withastro/astro/commit/b6fbdaa94a9ecec706a99e1938fbf5cd028c72e0), [`89bab1e`](https://github.com/withastro/astro/commit/89bab1e70786123fbe933a9d7a1b80c9334dcc5f), [`d74617c`](https://github.com/withastro/astro/commit/d74617cbd3278feba05909ec83db2d73d57a153e), [`e90f559`](https://github.com/withastro/astro/commit/e90f5593d23043579611452a84b9e18ad2407ef9), [`2df49a6`](https://github.com/withastro/astro/commit/2df49a6fb4f6d92fe45f7429430abe63defeacd6), [`8a53517`](https://github.com/withastro/astro/commit/8a5351737d6a14fc55f1dafad8f3b04079e81af6)]: + - astro@5.0.0-alpha.0 + ## 5.1.0 ### Minor Changes diff --git a/packages/integrations/tailwind/package.json b/packages/integrations/tailwind/package.json index 6001780a1..236134069 100644 --- a/packages/integrations/tailwind/package.json +++ b/packages/integrations/tailwind/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/tailwind", "description": "Use Tailwind CSS to style your Astro site", - "version": "5.1.0", + "version": "6.0.0-alpha.0", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", @@ -44,7 +44,7 @@ "vite": "^5.4.1" }, "peerDependencies": { - "astro": "^3.0.0 || ^4.0.0", + "astro": "^5.0.0-alpha.0", "tailwindcss": "^3.0.24" }, "publishConfig": { diff --git a/packages/integrations/vercel/CHANGELOG.md b/packages/integrations/vercel/CHANGELOG.md index 2fda03d95..f05d7e730 100644 --- a/packages/integrations/vercel/CHANGELOG.md +++ b/packages/integrations/vercel/CHANGELOG.md @@ -1,5 +1,43 @@ # @astrojs/vercel +## 8.0.0-alpha.0 + +### Major Changes + +- [#11714](https://github.com/withastro/astro/pull/11714) [`8a53517`](https://github.com/withastro/astro/commit/8a5351737d6a14fc55f1dafad8f3b04079e81af6) Thanks [@matthewp](https://github.com/matthewp)! - Remove support for functionPerRoute + + This change removes support for the `functionPerRoute` option both in Astro and `@astrojs/vercel`. + + This option made it so that each route got built as separate entrypoints so that they could be loaded as separate functions. The hope was that by doing this it would decrease the size of each function. However in practice routes use most of the same code, and increases in function size limitations made the potential upsides less important. + + Additionally there are downsides to functionPerRoute, such as hitting limits on the number of functions per project. The feature also never worked with some Astro features like i18n domains and request rewriting. + + Given this, the feature has been removed from Astro. + +### Minor Changes + +- [#11728](https://github.com/withastro/astro/pull/11728) [`5ea02b1`](https://github.com/withastro/astro/commit/5ea02b12fdb9b8ca45b1229bb9d04bc3d1270e0f) Thanks [@matthewp](https://github.com/matthewp)! - Deprecates the `functionPerRoute` option + + This option is now deprecated, and will be removed entirely in Astro v5.0. We suggest removing this option from your configuration as soon as you are able to: + + ```diff + import { defineConfig } from 'astro/config'; + import vercel from '@astrojs/vercel/serverless'; + + export default defineConfig({ + // ... + output: 'server', + adapter: vercel({ + - functionPerRoute: true, + }), + }); + ``` + +### Patch Changes + +- Updated dependencies [[`b6fbdaa`](https://github.com/withastro/astro/commit/b6fbdaa94a9ecec706a99e1938fbf5cd028c72e0), [`89bab1e`](https://github.com/withastro/astro/commit/89bab1e70786123fbe933a9d7a1b80c9334dcc5f), [`d74617c`](https://github.com/withastro/astro/commit/d74617cbd3278feba05909ec83db2d73d57a153e), [`e90f559`](https://github.com/withastro/astro/commit/e90f5593d23043579611452a84b9e18ad2407ef9), [`2df49a6`](https://github.com/withastro/astro/commit/2df49a6fb4f6d92fe45f7429430abe63defeacd6), [`8a53517`](https://github.com/withastro/astro/commit/8a5351737d6a14fc55f1dafad8f3b04079e81af6)]: + - astro@5.0.0-alpha.0 + ## 7.7.2 ### Patch Changes diff --git a/packages/integrations/vercel/package.json b/packages/integrations/vercel/package.json index 70fe485b2..d28fc46e9 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": "7.7.2", + "version": "8.0.0-alpha.0", "type": "module", "author": "withastro", "license": "MIT", @@ -60,7 +60,7 @@ "web-vitals": "^3.5.2" }, "peerDependencies": { - "astro": "^4.2.0" + "astro": "^5.0.0-alpha.0" }, "devDependencies": { "astro": "workspace:*", diff --git a/packages/integrations/vercel/src/serverless/adapter.ts b/packages/integrations/vercel/src/serverless/adapter.ts index 29e4fc7b0..cd14e25b3 100644 --- a/packages/integrations/vercel/src/serverless/adapter.ts +++ b/packages/integrations/vercel/src/serverless/adapter.ts @@ -272,9 +272,7 @@ export default function vercelServerless({ }); }, 'astro:config:done': ({ setAdapter, config }) => { - setAdapter( - getAdapter({ edgeMiddleware, middlewareSecret, skewProtection }), - ); + setAdapter(getAdapter({ edgeMiddleware, middlewareSecret, skewProtection })); _config = config; _buildTempFolder = config.build.server; diff --git a/packages/integrations/vercel/test/serverless-with-dynamic-routes.test.js b/packages/integrations/vercel/test/serverless-with-dynamic-routes.test.js index 1ffe80ae0..7eac7e875 100644 --- a/packages/integrations/vercel/test/serverless-with-dynamic-routes.test.js +++ b/packages/integrations/vercel/test/serverless-with-dynamic-routes.test.js @@ -17,8 +17,6 @@ describe('Serverless with dynamic routes', () => { it('build successful', async () => { assert.ok(await fixture.readFile('../.vercel/output/static/index.html')); - assert.ok( - await fixture.readFile('../.vercel/output/functions/_render.func/.vc-config.json'), - ); + assert.ok(await fixture.readFile('../.vercel/output/functions/_render.func/.vc-config.json')); }); }); diff --git a/packages/integrations/vue/CHANGELOG.md b/packages/integrations/vue/CHANGELOG.md index fd9c71e04..88ff9204e 100644 --- a/packages/integrations/vue/CHANGELOG.md +++ b/packages/integrations/vue/CHANGELOG.md @@ -1,5 +1,12 @@ # @astrojs/vue +## 5.0.0-alpha.0 + +### Patch Changes + +- Updated dependencies [[`b6fbdaa`](https://github.com/withastro/astro/commit/b6fbdaa94a9ecec706a99e1938fbf5cd028c72e0), [`89bab1e`](https://github.com/withastro/astro/commit/89bab1e70786123fbe933a9d7a1b80c9334dcc5f), [`d74617c`](https://github.com/withastro/astro/commit/d74617cbd3278feba05909ec83db2d73d57a153e), [`e90f559`](https://github.com/withastro/astro/commit/e90f5593d23043579611452a84b9e18ad2407ef9), [`2df49a6`](https://github.com/withastro/astro/commit/2df49a6fb4f6d92fe45f7429430abe63defeacd6), [`8a53517`](https://github.com/withastro/astro/commit/8a5351737d6a14fc55f1dafad8f3b04079e81af6)]: + - astro@5.0.0-alpha.0 + ## 4.5.0 ### Minor Changes diff --git a/packages/integrations/vue/package.json b/packages/integrations/vue/package.json index ae7467ac2..d66c36aad 100644 --- a/packages/integrations/vue/package.json +++ b/packages/integrations/vue/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/vue", - "version": "4.5.0", + "version": "5.0.0-alpha.0", "description": "Use Vue components within Astro", "type": "module", "types": "./dist/index.d.ts", @@ -58,7 +58,7 @@ "vue": "^3.4.38" }, "peerDependencies": { - "astro": "^4.0.0", + "astro": "^5.0.0-alpha.0", "vue": "^3.2.30" }, "engines": { diff --git a/packages/markdown/remark/CHANGELOG.md b/packages/markdown/remark/CHANGELOG.md index 73bab0b25..0f0ef4bb8 100644 --- a/packages/markdown/remark/CHANGELOG.md +++ b/packages/markdown/remark/CHANGELOG.md @@ -1,5 +1,16 @@ # @astrojs/markdown-remark +## 6.0.0-alpha.0 + +### Major Changes + +- [#11661](https://github.com/withastro/astro/pull/11661) [`83a2a64`](https://github.com/withastro/astro/commit/83a2a648418ad30f4eb781d1c1b5f2d8a8ac846e) Thanks [@bluwy](https://github.com/bluwy)! - Renames the following CSS variables theme color token names to better align with the Shiki v1 defaults: + + - `--astro-code-color-text` => `--astro-code-foreground` + - `--astro-code-color-background` => `--astro-code-background` + + You can perform a global find and replace in your project to migrate to the new token names. + ## 5.2.0 ### Minor Changes diff --git a/packages/markdown/remark/package.json b/packages/markdown/remark/package.json index 87cba7d1f..e8f8304ee 100644 --- a/packages/markdown/remark/package.json +++ b/packages/markdown/remark/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/markdown-remark", - "version": "5.2.0", + "version": "6.0.0-alpha.0", "type": "module", "author": "withastro", "license": "MIT", |