Skip to content
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: migrate svelte and vite-plugin-svelte to latest #12838

Merged
Merged
Show file tree
Hide file tree
Changes from all 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/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 @@ -62,8 +62,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 @@ -92,7 +92,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"
},
Expand Down
Loading