Skip to content

Commit

Permalink
feat: provide migration function (#11334)
Browse files Browse the repository at this point in the history
Provides a migration function, exported as `migrate` from `svelte/compiler`, which tries its best to automatically migrate towards runes, render tags (instead of slots) and event attributes (instead of event handlers)

The preview REPL was updated with a migrate button so people can try it out in the playground.

closes #9239
  • Loading branch information
dummdidumm committed Apr 26, 2024
1 parent f1986da commit cd79807
Show file tree
Hide file tree
Showing 32 changed files with 1,169 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/orange-zoos-heal.md
@@ -0,0 +1,5 @@
---
"svelte": patch
---

feat: provide migration helper
2 changes: 1 addition & 1 deletion packages/svelte/src/compiler/index.js
Expand Up @@ -190,5 +190,5 @@ export function walk() {
}

export { CompileError } from './errors.js';

export { VERSION } from '../version.js';
export { migrate } from './migrate/index.js';

0 comments on commit cd79807

Please sign in to comment.