Skip to content

Commit

Permalink
fix: migrate svelte and vite-plugin-svelte to latest (#12838)
Browse files Browse the repository at this point in the history
  • Loading branch information
paoloricciuti authored Oct 19, 2024
1 parent 206e96d commit 92d85a8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/eighty-starfishes-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte-migrate': patch
---

fix: migrate `svelte` and `vite-plugin-svelte` to latest
3 changes: 1 addition & 2 deletions packages/migrate/migrations/svelte-5/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ export async function migrate() {
({ migrate } = await import_from_cwd('svelte/compiler'));
if (!migrate) throw new Error('found Svelte 4');
} catch {
// TODO replace with svelte@5 once it's released
execSync('npm install svelte@next --no-save', {
execSync('npm install svelte@^5.0.0 --no-save', {
stdio: 'inherit',
cwd: dirname(fileURLToPath(import.meta.url))
});
Expand Down
4 changes: 2 additions & 2 deletions packages/migrate/migrations/svelte-5/migrate.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ export function update_pkg_json() {
*/
export function update_pkg_json_content(content) {
return update_pkg(content, [
['svelte', '^5.0.0-next.0'],
['svelte', '^5.0.0'],
['svelte-check', '^4.0.0'],
['svelte-preprocess', '^6.0.0'],
['@sveltejs/enhanced-img', '^0.3.6'],
['@sveltejs/kit', '^2.5.27'],
['@sveltejs/vite-plugin-svelte', '^4.0.0-next.0'],
['@sveltejs/vite-plugin-svelte', '^4.0.0'],
[
'svelte-loader',
'^3.2.3',
Expand Down
2 changes: 1 addition & 1 deletion packages/migrate/migrations/svelte-5/migrate.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ test('Update package.json', () => {
"name": "svelte-app",
"version": "1.0.0",
"devDependencies": {
"svelte": "^5.0.0-next.0",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"svelte-preprocess": "^6.0.0",
"svelte-eslint-parser": "^0.42.0"
Expand Down

0 comments on commit 92d85a8

Please sign in to comment.