Skip to content

Commit

Permalink
breaking: require SvelteKit 2 for all adapters (#11316)
Browse files Browse the repository at this point in the history
Bumping all the adapters to require SvelteKit 2, because a) esbuild changes and we want to be careful b) easier to do minors using new capabilities c) adapter-auto is more robust in installing correct versions then
  • Loading branch information
dummdidumm authored Dec 14, 2023
1 parent c8a637d commit 74b9a85
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 16 deletions.
7 changes: 7 additions & 0 deletions .changeset/hip-spoons-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@sveltejs/adapter-cloudflare-workers": major
"@sveltejs/adapter-cloudflare": major
"@sveltejs/adapter-netlify": major
---

breaking: require SvelteKit 2
5 changes: 5 additions & 0 deletions .changeset/silly-frogs-love.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@sveltejs/adapter-auto": major
---

breaking: require SvelteKit 2
6 changes: 3 additions & 3 deletions packages/adapter-auto/adapters.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ export const adapters = [
name: 'Vercel',
test: () => !!process.env.VERCEL,
module: '@sveltejs/adapter-vercel',
version: '2'
version: '4'
},
{
name: 'Cloudflare Pages',
test: () => !!process.env.CF_PAGES,
module: '@sveltejs/adapter-cloudflare',
version: '2'
version: '3'
},
{
name: 'Netlify',
test: () => !!process.env.NETLIFY,
module: '@sveltejs/adapter-netlify',
version: '2'
version: '3'
},
{
name: 'Azure Static Web Apps',
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-auto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@
"import-meta-resolve": "^4.0.0"
},
"peerDependencies": {
"@sveltejs/kit": "^1.0.0 || ^2.0.0"
"@sveltejs/kit": "^2.0.0"
}
}
3 changes: 2 additions & 1 deletion packages/adapter-cloudflare-workers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@
"esbuild": "^0.19.9"
},
"devDependencies": {
"@sveltejs/kit": "workspace:^",
"@cloudflare/kv-asset-handler": "^0.3.0",
"@types/node": "^18.19.3",
"typescript": "^5.3.3"
},
"peerDependencies": {
"@sveltejs/kit": "^1.0.0 || ^2.0.0"
"@sveltejs/kit": "^2.0.0"
}
}
3 changes: 2 additions & 1 deletion packages/adapter-cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@
"worktop": "0.8.0-next.15"
},
"devDependencies": {
"@sveltejs/kit": "workspace:^",
"@types/node": "^18.19.3",
"@types/ws": "^8.5.10",
"typescript": "^5.3.3"
},
"peerDependencies": {
"@sveltejs/kit": "^1.0.0 || ^2.0.0"
"@sveltejs/kit": "^2.0.0"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-netlify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@
"vitest": "^1.0.4"
},
"peerDependencies": {
"@sveltejs/kit": "^1.5.0 || ^2.0.0"
"@sveltejs/kit": "^2.0.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"devDependencies": {
"@fontsource/fira-mono": "^4.5.10",
"@neoconfetti/svelte": "^1.0.0",
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"svelte": "^4.2.7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"preview": "vite preview"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"svelte": "^4.2.7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"svelte": "^4.0.0"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/package": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
Expand Down
6 changes: 6 additions & 0 deletions packages/migrate/migrations/sveltekit-2/migrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ export function update_pkg_json_content(content) {
// All other bumps are done as part of the Svelte 4 migration
['@sveltejs/kit', '^2.0.0'],
['@sveltejs/adapter-static', '^3.0.0'],
['@sveltejs/adapter-node', '^2.0.0'],
['@sveltejs/adapter-vercel', '^4.0.0'],
['@sveltejs/adapter-netlify', '^3.0.0'],
['@sveltejs/adapter-cloudflare', '^3.0.0'],
['@sveltejs/adapter-cloudflare-workers', '^2.0.0'],
['@sveltejs/adapter-auto', '^3.0.0'],
['vite', '^5.0.0'],
['vitest', '^1.0.0'],
['typescript', '^5.0.0'], // should already be done by Svelte 4 migration, but who knows
Expand Down
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 74b9a85

Please sign in to comment.