Skip to content

feat: migration-task comment management#1147

Merged
manuel3108 merged 2 commits into
feat/sv-migratefrom
feat/svelte-migration-comments
Jun 26, 2026
Merged

feat: migration-task comment management#1147
manuel3108 merged 2 commits into
feat/sv-migratefrom
feat/svelte-migration-comments

Conversation

@jycouet

@jycouet jycouet commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Targets feat/sv-migrate.

  • @migration-task comments now also work in .svelte files. The Svelte printer ignores the JS Comments registry, so we insert real Comment nodes into the fragment. Fixes the environment task silently dropping these comments.
  • One addMigrationTask(message, target) API, where the target picks the placement: { comments, node } for JS/TS, { fragment, anchor? } for .svelte.
  • Split migrate/index.ts into index.ts (the defineMigration* framework) + migration-task.ts (the comment API, paired with its spec).

- @migration-task comments now work in .svelte files (insert real Comment
  nodes into the fragment, since the Svelte printer ignores the JS Comments
  registry); fixes the env task silently dropping them.
- single addMigrationTask(message, target): { comments, node } for JS/TS,
  { fragment, anchor? } for .svelte.
- split migrate/index.ts into index.ts (framework) + migration-task.ts.
@changeset-bot

changeset-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 85b9b9d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@svelte-docs-bot

Copy link
Copy Markdown

@manuel3108 manuel3108 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is perfect!

@manuel3108 manuel3108 merged commit 110b9d9 into feat/sv-migrate Jun 26, 2026
6 checks passed
@manuel3108 manuel3108 deleted the feat/svelte-migration-comments branch June 26, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants