-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
fix: updated @default
annotation for runtime
#12717
Conversation
🦋 Changeset detectedLatest commit: c797e19 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@default
annotation for runtime@default
annotation for runtime
Co-authored-by: Tee Ming <chewteeming01@gmail.com>
The Vercel documentation mentions v20 as the default.
Can you explain further what this means and how you came to this conclusion? |
The runtime is picked here kit/packages/adapter-vercel/index.js Line 219 in b74d796
It may default to node 20 if unspecified, but svelte-kit will always write a value to .vc-config.json kit/packages/adapter-vercel/index.js Line 638 in b74d796
|
I guess that would work:
|
cc: @dummdidumm any thoughts on this or preferences from Vercel? |
packages/adapter-vercel/index.d.ts
Outdated
*/ | ||
runtime?: `nodejs${number}.x`; | ||
runtime?: 'nodejs18.x' | 'nodejs20.x'; |
There was a problem hiding this comment.
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
runtime?: 'nodejs18.x' | 'nodejs20.x'; | |
runtime?: `nodejs${number}.x`; |
The default is not node18 as advertised but guessed at build time with the
get_default_runtime
functionPlease don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.Edits