diff options
Diffstat (limited to 'packages/integrations/vercel')
-rw-r--r-- | packages/integrations/vercel/CHANGELOG.md | 17 | ||||
-rw-r--r-- | packages/integrations/vercel/package.json | 14 | ||||
-rw-r--r-- | packages/integrations/vercel/src/serverless/adapter.ts | 18 | ||||
-rw-r--r-- | packages/integrations/vercel/src/serverless/entrypoint.ts | 2 | ||||
-rw-r--r-- | packages/integrations/vercel/src/static/adapter.ts | 19 |
5 files changed, 32 insertions, 38 deletions
diff --git a/packages/integrations/vercel/CHANGELOG.md b/packages/integrations/vercel/CHANGELOG.md index 26d265393..1cb378ee3 100644 --- a/packages/integrations/vercel/CHANGELOG.md +++ b/packages/integrations/vercel/CHANGELOG.md @@ -1,5 +1,22 @@ # @astrojs/vercel +## 6.0.0-beta.1 + +### Major Changes + +- [#9199](https://github.com/withastro/astro/pull/9199) [`49aa215a0`](https://github.com/withastro/astro/commit/49aa215a01ee1c4805316c85bb0aea6cfbc25a31) Thanks [@lilnasy](https://github.com/lilnasy)! - The internals of the integration have been updated to support Astro 4.0. Make sure to upgrade your Astro version as Astro 3.0 is no longer supported. + +## 6.0.0-beta.0 + +### Major Changes + +- [#9184](https://github.com/withastro/astro/pull/9184) [`a145ac07e`](https://github.com/withastro/astro/commit/a145ac07e75927e13af62e28d13bc8217a362b8e) Thanks [@bluwy](https://github.com/bluwy)! - Removes deprecated `analytics` option. Use the `webAnalytics` option instead. + +### Patch Changes + +- Updated dependencies [[`abf601233`](https://github.com/withastro/astro/commit/abf601233f8188d118a8cb063c777478d8d9f1a3), [`6201bbe96`](https://github.com/withastro/astro/commit/6201bbe96c2a083fb201e4a43a9bd88499821a3e), [`cdabf6ef0`](https://github.com/withastro/astro/commit/cdabf6ef02be7220fd2b6bdcef924ceca089381e), [`1c48ed286`](https://github.com/withastro/astro/commit/1c48ed286538ab9e354eca4e4dcd7c6385c96721), [`37697a2c5`](https://github.com/withastro/astro/commit/37697a2c5511572dc29c0a4ea46f90c2f62be8e6), [`bd0c2e9ae`](https://github.com/withastro/astro/commit/bd0c2e9ae3389a9d3085050c1e8134ae98dff299), [`0fe3a7ed5`](https://github.com/withastro/astro/commit/0fe3a7ed5d7bb1a9fce1623e84ba14104b51223c), [`710be505c`](https://github.com/withastro/astro/commit/710be505c9ddf416e77a75343d8cae9c497d72c6), [`153a5abb9`](https://github.com/withastro/astro/commit/153a5abb905042ac68b712514dc9ec387d3e6b17)]: + - astro@4.0.0-beta.0 + ## 5.2.0 ### Minor Changes diff --git a/packages/integrations/vercel/package.json b/packages/integrations/vercel/package.json index dc9433c5a..8e770376c 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": "5.2.0", + "version": "6.0.0-beta.1", "type": "module", "author": "withastro", "license": "MIT", @@ -54,18 +54,18 @@ "dependencies": { "@astrojs/internal-helpers": "workspace:*", "@vercel/analytics": "^1.0.2", - "@vercel/nft": "^0.23.1", - "esbuild": "^0.19.2", - "fast-glob": "^3.3.1", + "@vercel/nft": "^0.24.3", + "esbuild": "^0.19.6", + "fast-glob": "^3.3.2", "set-cookie-parser": "^2.6.0", "web-vitals": "^3.4.0" }, "peerDependencies": { - "astro": "^3.0.0" + "astro": "^4.0.0-beta.0" }, "devDependencies": { - "@types/set-cookie-parser": "^2.4.3", - "@vercel/edge": "^1.0.0", + "@types/set-cookie-parser": "^2.4.6", + "@vercel/edge": "^1.1.1", "astro": "workspace:*", "astro-scripts": "workspace:*", "chai": "^4.3.7", diff --git a/packages/integrations/vercel/src/serverless/adapter.ts b/packages/integrations/vercel/src/serverless/adapter.ts index 621849688..ef2552cc1 100644 --- a/packages/integrations/vercel/src/serverless/adapter.ts +++ b/packages/integrations/vercel/src/serverless/adapter.ts @@ -71,11 +71,6 @@ function getAdapter({ } export interface VercelServerlessConfig { - /** - * @deprecated - */ - analytics?: boolean; - /** Configuration for [Vercel Web Analytics](https://vercel.com/docs/concepts/analytics). */ webAnalytics?: VercelWebAnalyticsConfig; @@ -108,7 +103,6 @@ export interface VercelServerlessConfig { } export default function vercelServerless({ - analytics, webAnalytics, speedInsights, includeFiles, @@ -151,13 +145,7 @@ export default function vercelServerless({ ); } - if (webAnalytics?.enabled || analytics) { - if (analytics) { - logger.warn( - `The \`analytics\` property is deprecated. Please use the new \`webAnalytics\` and \`speedInsights\` properties instead.` - ); - } - + if (webAnalytics?.enabled) { injectScript( 'head-inline', await getInjectableWebAnalyticsContent({ @@ -165,7 +153,7 @@ export default function vercelServerless({ }) ); } - if (command === 'build' && (speedInsights?.enabled || analytics)) { + if (command === 'build' && speedInsights?.enabled) { injectScript('page', 'import "@astrojs/vercel/speed-insights"'); } const outDir = getVercelOutput(config.root); @@ -178,7 +166,7 @@ export default function vercelServerless({ redirects: false, }, vite: { - ...getSpeedInsightsViteConfig(speedInsights?.enabled || analytics), + ...getSpeedInsightsViteConfig(speedInsights?.enabled), ssr: { external: ['@vercel/nft'], }, diff --git a/packages/integrations/vercel/src/serverless/entrypoint.ts b/packages/integrations/vercel/src/serverless/entrypoint.ts index 7b548dc37..513c34640 100644 --- a/packages/integrations/vercel/src/serverless/entrypoint.ts +++ b/packages/integrations/vercel/src/serverless/entrypoint.ts @@ -29,7 +29,7 @@ export const createExports = (manifest: SSRManifest) => { locals = JSON.parse(localsAsString); } } - await setResponse(app, res, await app.render(request, routeData, locals)); + await setResponse(app, res, await app.render(request, { routeData, locals })); }; return { default: handler }; diff --git a/packages/integrations/vercel/src/static/adapter.ts b/packages/integrations/vercel/src/static/adapter.ts index df2995c37..80b42b95d 100644 --- a/packages/integrations/vercel/src/static/adapter.ts +++ b/packages/integrations/vercel/src/static/adapter.ts @@ -41,10 +41,6 @@ function getAdapter(): AstroAdapter { } export interface VercelStaticConfig { - /** - * @deprecated - */ - analytics?: boolean; webAnalytics?: VercelWebAnalyticsConfig; speedInsights?: VercelSpeedInsightsConfig; imageService?: boolean; @@ -53,7 +49,6 @@ export interface VercelStaticConfig { } export default function vercelStatic({ - analytics, webAnalytics, speedInsights, imageService, @@ -65,14 +60,8 @@ export default function vercelStatic({ return { name: '@astrojs/vercel', hooks: { - 'astro:config:setup': async ({ command, config, injectScript, updateConfig, logger }) => { - if (webAnalytics?.enabled || analytics) { - if (analytics) { - logger.warn( - `The \`analytics\` property is deprecated. Please use the new \`webAnalytics\` and \`speedInsights\` properties instead.` - ); - } - + 'astro:config:setup': async ({ command, config, injectScript, updateConfig }) => { + if (webAnalytics?.enabled) { injectScript( 'head-inline', await getInjectableWebAnalyticsContent({ @@ -80,7 +69,7 @@ export default function vercelStatic({ }) ); } - if (command === 'build' && (speedInsights?.enabled || analytics)) { + if (command === 'build' && speedInsights?.enabled) { injectScript('page', 'import "@astrojs/vercel/speed-insights"'); } const outDir = new URL('./static/', getVercelOutput(config.root)); @@ -91,7 +80,7 @@ export default function vercelStatic({ redirects: false, }, vite: { - ...getSpeedInsightsViteConfig(speedInsights?.enabled || analytics), + ...getSpeedInsightsViteConfig(speedInsights?.enabled), }, ...getAstroImageConfig( imageService, |