Skip to content

fix: preserve comments when parsing JS AST#609

Merged
manuel3108 merged 3 commits into
mainfrom
fix-comments
Jun 25, 2025
Merged

fix: preserve comments when parsing JS AST#609
manuel3108 merged 3 commits into
mainfrom
fix-comments

Conversation

@teemingc
Copy link
Copy Markdown
Member

fixes #608

This PR changes the parseScript tooling to match the esrap implementation more closely. https://github.com/sveltejs/esrap/blob/4c305011b9536f60df4d0983ec50f46293b9ab8c/test/common.js#L39-L57 . It also adds a test to ensure comments are preserved.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 25, 2025

🦋 Changeset detected

Latest commit: 69b884c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
sv Patch

Not sure what this means? Click here to learn what changesets are.

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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Jun 25, 2025

Open in StackBlitz

npx https://pkg.pr.new/sveltejs/cli/sv@609
npx https://pkg.pr.new/sveltejs/cli/svelte-migrate@609

commit: 69b884c

@teemingc teemingc requested a review from manuel3108 June 25, 2025 03:35
@svelte-docs-bot
Copy link
Copy Markdown

Copy link
Copy Markdown
Member

@manuel3108 manuel3108 left a comment

Choose a reason for hiding this comment

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

Perfect, thank you!

@manuel3108 manuel3108 merged commit d08d260 into main Jun 25, 2025
7 checks passed
@manuel3108 manuel3108 deleted the fix-comments branch June 25, 2025 15:12
@github-actions github-actions Bot mentioned this pull request Jun 25, 2025
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.

Comments are missing from svelte.config.js after adding a package manager

2 participants