Skip to content

Commit

Permalink
docs: add self-closing-tags migration (#349)
Browse files Browse the repository at this point in the history
  • Loading branch information
manuel3108 authored Dec 14, 2024
1 parent 80990d3 commit cf2d2bc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/tender-donkeys-attack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte-migrate': patch
---

docs: add `self-closing-tags` migration
4 changes: 4 additions & 0 deletions documentation/docs/20-commands/40-sv-migrate.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ npx sv migrate [migration]

Upgrades a Svelte 4 app to use Svelte 5, and updates individual components to use [runes](../svelte/what-are-runes) and other Svelte 5 syntax ([see migration guide](../svelte/v5-migration-guide)).

### `self-closing-tags`

Replaces all the self-closing non-void elements in your `.svelte` files. See the [pull request](https://github.com/sveltejs/kit/pull/12128) for more details.

### `svelte-4`

Upgrades a Svelte 3 app to use Svelte 4 ([see migration guide](../svelte/v4-migration-guide)).
Expand Down
15 changes: 8 additions & 7 deletions packages/migrate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ npx sv migrate [migration]

## Migrations

| Migration | From | To | Guide |
| ------------- | --------------------- | --------------------- | --------------------------------------------------------------- |
| `sveltekit-2` | SvelteKit 1.0 | SvelteKit 2.0 | [Website](https://svelte.dev/docs/kit/migrating-to-sveltekit-2) |
| `svelte-4` | Svelte 3 | Svelte 4 | [Website](https://svelte.dev/docs/svelte/v4-migration-guide) |
| `svelte-5` | Svelte 4 | Svelte 5 | |
| `package` | `@sveltejs/package@1` | `@sveltejs/package@2` | [#8922](https://github.com/sveltejs/kit/pull/8922) |
| `routes` | SvelteKit pre-1.0 | SvelteKit 1.0 | [#5774](https://github.com/sveltejs/kit/discussions/5774) |
| Migration | From | To | Guide |
| ------------------- | --------------------- | --------------------- | --------------------------------------------------------------- |
| `svelte-5` | Svelte 4 | Svelte 5 | [Website](https://svelte.dev/docs/svelte/v5-migration-guide) |
| `self-closing-tags` | Svelte 4 | Svelte 4 | [#12128](https://github.com/sveltejs/kit/pull/12128) |
| `svelte-4` | Svelte 3 | Svelte 4 | [Website](https://svelte.dev/docs/svelte/v4-migration-guide) |
| `sveltekit-2` | SvelteKit 1.0 | SvelteKit 2.0 | [Website](https://svelte.dev/docs/kit/migrating-to-sveltekit-2) |
| `package` | `@sveltejs/package@1` | `@sveltejs/package@2` | [#8922](https://github.com/sveltejs/kit/pull/8922) |
| `routes` | SvelteKit pre-1.0 | SvelteKit 1.0 | [#5774](https://github.com/sveltejs/kit/discussions/5774) |

Some migrations may annotate your codebase with tasks for completion that you can find by searching for `@migration`.

Expand Down

0 comments on commit cf2d2bc

Please sign in to comment.