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: ignore generic type arguments while creating AST #15659

Merged
merged 2 commits into from
Apr 1, 2025

Conversation

dummdidumm
Copy link
Member

@dummdidumm dummdidumm commented Apr 1, 2025

bumps esrap and fixes two resulting errors:

  • because esrap now uses a more compliant TSESTree AST, it has typeArguments instead of typeParameters in some places - those were not deleted while stripping types, which caused an error.
  • because esrap now correctly braces function expressions that are a direct child of a function expression, this uncovered a wrong AST creation within server rendering

bumps esrap and fixes a resulting error: because esrap now uses a more compliant TSESTree AST, it has `typeArguments` instead of `typeParameters` in some places - those were not deleted while stripping types, which caused an error.
Copy link

changeset-bot bot commented Apr 1, 2025

🦋 Changeset detected

Latest commit: d14ab95

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

This PR includes changesets to release 1 package
Name Type
svelte 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

Copy link
Contributor

github-actions bot commented Apr 1, 2025

Playground

pnpm add https://pkg.pr.new/svelte@15659

@dummdidumm
Copy link
Member Author

Self-merging because everyone downloading the newest version of esrap right now might run into one of these

@dummdidumm dummdidumm merged commit 959f593 into main Apr 1, 2025
13 checks passed
@dummdidumm dummdidumm deleted the esrap-ts-ast-strip-fix branch April 1, 2025 12:16
@github-actions github-actions bot mentioned this pull request Apr 1, 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.

1 participant