From bd8fa7acd23ba6e7afa2c435807bd5fd6b24f505 Mon Sep 17 00:00:00 2001 From: Arsh <69170106+lilnasy@users.noreply.github.com> Date: Thu, 4 Jan 2024 16:37:13 +0000 Subject: [PATCH] chore(vercel): deprecate `speedInsights` (#9598) * deprecate speedInsights config * add changeset --- .changeset/lemon-garlics-pretend.md | 5 +++++ packages/integrations/vercel/src/serverless/adapter.ts | 8 +++++++- packages/integrations/vercel/src/static/adapter.ts | 7 +++++++ 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .changeset/lemon-garlics-pretend.md diff --git a/.changeset/lemon-garlics-pretend.md b/.changeset/lemon-garlics-pretend.md new file mode 100644 index 000000000000..d2d7b91b6ca3 --- /dev/null +++ b/.changeset/lemon-garlics-pretend.md @@ -0,0 +1,5 @@ +--- +"@astrojs/vercel": patch +--- + +Marks the `speedInsights` configuration as deprecated. Vercel has migrated features of the Speed Insights API into a framework-agnostic library with `@vercel/speed-insights`. See [Vercel Speed Insights Quickstart](https://vercel.com/docs/speed-insights/quickstart) for instructions on how to use the library instead. diff --git a/packages/integrations/vercel/src/serverless/adapter.ts b/packages/integrations/vercel/src/serverless/adapter.ts index 185ae5d92bc6..6b4fe0e3d4c7 100644 --- a/packages/integrations/vercel/src/serverless/adapter.ts +++ b/packages/integrations/vercel/src/serverless/adapter.ts @@ -74,7 +74,13 @@ export interface VercelServerlessConfig { /** Configuration for [Vercel Web Analytics](https://vercel.com/docs/concepts/analytics). */ webAnalytics?: VercelWebAnalyticsConfig; - /** Configuration for [Vercel Speed Insights](https://vercel.com/docs/concepts/speed-insights). */ + /** + * @deprecated This option lets you configure the legacy speed insights API which is now deprecated by Vercel. + * + * See [Vercel Speed Insights Quickstart](https://vercel.com/docs/speed-insights/quickstart) for instructions on how to use the library instead. + * + * https://vercel.com/docs/speed-insights/quickstart + */ speedInsights?: VercelSpeedInsightsConfig; /** Force files to be bundled with your function. This is helpful when you notice missing files. */ diff --git a/packages/integrations/vercel/src/static/adapter.ts b/packages/integrations/vercel/src/static/adapter.ts index cbd7cb51ad93..0c6158cf6233 100644 --- a/packages/integrations/vercel/src/static/adapter.ts +++ b/packages/integrations/vercel/src/static/adapter.ts @@ -42,6 +42,13 @@ function getAdapter(): AstroAdapter { export interface VercelStaticConfig { webAnalytics?: VercelWebAnalyticsConfig; + /** + * @deprecated This option lets you configure the legacy speed insights API which is now deprecated by Vercel. + * + * See [Vercel Speed Insights Quickstart](https://vercel.com/docs/speed-insights/quickstart) for instructions on how to use the library instead. + * + * https://vercel.com/docs/speed-insights/quickstart + */ speedInsights?: VercelSpeedInsightsConfig; imageService?: boolean; imagesConfig?: VercelImageConfig;