Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(vercel): deprecate speedInsights #9598

Merged
merged 2 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/lemon-garlics-pretend.md
Original file line number Diff line number Diff line change
@@ -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.
8 changes: 7 additions & 1 deletion packages/integrations/vercel/src/serverless/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment on lines +80 to +82
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the duplicated links intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are. To me, it didn't seem obvious that the first one would be clickable so I added the link itself to be safe.

*/
speedInsights?: VercelSpeedInsightsConfig;

/** Force files to be bundled with your function. This is helpful when you notice missing files. */
Expand Down
7 changes: 7 additions & 0 deletions packages/integrations/vercel/src/static/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down