diff options
author | 2024-08-19 11:37:39 -0700 | |
---|---|---|
committer | 2024-08-19 14:37:39 -0400 | |
commit | f239242d90dc7045e21bfa4d9a4d2619389abef6 (patch) | |
tree | 84d3ce8e3e2a6f7ef97d5b6aae6810bde3d417fc /packages/integrations/vercel | |
parent | 40183620d8315c342ffbb46ddcd1b003f4b303ed (diff) | |
download | astro-f239242d90dc7045e21bfa4d9a4d2619389abef6.tar.gz astro-f239242d90dc7045e21bfa4d9a4d2619389abef6.tar.zst astro-f239242d90dc7045e21bfa4d9a4d2619389abef6.zip |
[ci] release (alpha) (#11627)create-astro@4.8.4-alpha.0astro@5.0.0-alpha.0@astrojs/vue@5.0.0-alpha.0@astrojs/vercel@8.0.0-alpha.0@astrojs/tailwind@6.0.0-alpha.0@astrojs/svelte@6.0.0-alpha.0@astrojs/node@9.0.0-alpha.0@astrojs/mdx@4.0.0-alpha.0@astrojs/markdown-remark@6.0.0-alpha.0@astrojs/markdoc@1.0.0-alpha.0
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'packages/integrations/vercel')
4 files changed, 42 insertions, 8 deletions
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')); }); }); |