-
-
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: pin adapter versions in adapter-auto #8874
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@sveltejs/adapter-auto': patch | ||
--- | ||
|
||
fix: pin adapter versions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,28 @@ | ||
// List of adapters to check for. `version` is used to pin the installed adapter version and should point | ||
// to the latest version of the adapter that is compatible with adapter-auto's current peerDependency version of SvelteKit. | ||
export const adapters = [ | ||
{ | ||
name: 'Vercel', | ||
test: () => !!process.env.VERCEL, | ||
module: '@sveltejs/adapter-vercel' | ||
module: '@sveltejs/adapter-vercel', | ||
version: '1' | ||
}, | ||
{ | ||
name: 'Cloudflare Pages', | ||
test: () => !!process.env.CF_PAGES, | ||
module: '@sveltejs/adapter-cloudflare' | ||
module: '@sveltejs/adapter-cloudflare', | ||
version: '2' | ||
}, | ||
{ | ||
name: 'Netlify', | ||
test: () => !!process.env.NETLIFY, | ||
module: '@sveltejs/adapter-netlify' | ||
module: '@sveltejs/adapter-netlify', | ||
version: '1' | ||
}, | ||
{ | ||
name: 'Azure Static Web Apps', | ||
test: () => process.env.GITHUB_ACTION_REPOSITORY === 'Azure/static-web-apps-deploy', | ||
module: 'svelte-adapter-azure-swa' | ||
module: 'svelte-adapter-azure-swa', | ||
version: '0.13' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @geoffrich FYI you need to bump this when you create a new major of the azure adapter There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the heads up 👍 |
||
} | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
is there some way to get these automatically populated from the workspace? it seems like it's going to be really easy to overlook bumping these, which might cause more trouble that it solves
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.
We can't automatically bump them because the mechanism can't know if the bump warrants a major release of
adapter-auto
or not.Example:
adapter-vercel
releases new major but peerDep on SvelteKit stays the same -> should be a minor release in adapter-autoadapter-vercel
releases a new major and bumps peerDep on SvelteKit -> should be a major release in adapter-autoThere 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.
Do we have the ability to specify semver ranges here of the other adapters? It might not be what's happening here, but I can imagine a situation where an adapter has a breaking change because of what options it accepts, but that change is irrelevant for people consuming it through the auto adapter because it doesn't let you specify any options anyway. Are we prepared for that sort of situation?
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 think we could just bump the adapter version here and it would be harmless, no? It's just a matter of remembering to do it
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.
Probably, yeah. I'm not sure what I was thinking about with the range. I think I had forgotten that the auto adapter doesn't itself have peer dependencies on the other adapters.