Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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/curly-crews-hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sveltejs/adapter-vercel": patch
---

style(adapter-vercel): updated `@default` annotation for runtime
Comment thread
GauBen marked this conversation as resolved.
Outdated
4 changes: 2 additions & 2 deletions packages/adapter-vercel/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ export default function plugin(config?: Config): Adapter;
export interface ServerlessConfig {
/**
* Whether to use [Edge Functions](https://vercel.com/docs/concepts/functions/edge-functions) (`'edge'`) or [Serverless Functions](https://vercel.com/docs/concepts/functions/serverless-functions) (`'nodejs18.x'`, `'nodejs20.x'` etc).
* @default 'nodejs18.x'
* @default Same as the build environment
*/
runtime?: `nodejs${number}.x`;
runtime?: 'nodejs18.x' | 'nodejs20.x';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd like to keep this as the type because Vercel may deprecate old versions after some time and/or introduce new ones, and we don't want people to upgrade to newer versions of the adapter just for silencing type errors / don't want to make a major version bump just because we gotta remove a type

Suggested change
runtime?: 'nodejs18.x' | 'nodejs20.x';
runtime?: `nodejs${number}.x`;

/**
* To which regions to deploy the app. A list of regions.
* More info: https://vercel.com/docs/concepts/edge-network/regions
Expand Down