-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat(es/transforms): Add renamer_keep_contexts
#10907
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
Conversation
🦋 Changeset detectedLatest commit: ee80f5c The changes in this PR will be included in the next version bump. 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 |
CodSpeed Performance ReportMerging #10907 will not alter performanceComparing Summary
|
f8b79e7
to
0a260ab
Compare
renamer_keep_contexts
3416769
to
9703599
Compare
0a260ab
to
00d8d09
Compare
00d8d09
to
f98cad2
Compare
renamer_keep_contexts
renamer_keep_contexts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I need to configure a binary size CI action before merging this PR.
I'll copy one from rspack later this week
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I need to configure a binary size CI action before merging this PR.
I'll copy one from rspack later this week
In case you have a local patch of SWC for turbopack, can you profile the binary size of turbopack with this patch? |
I can't measure a difference: swc/main 4eab8e8:
my fix f98cad2 but without any code change on Turbopack side:
my fix f98cad2 and using renamer_keep_contexts:
|
Also, there is no overhead at all unless you're actually using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you write some descriptions as comments? (in the source code)_
)?); | ||
|
||
let expected = " | ||
const bar$1 = (patch1$7)=>patch1$7 + 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get why this is $7
.
Description:
When using
renamer
outside ofhygiene
(i.e. you want to continue using the AST), you want correct context contexts in some cases.BREAKING CHANGE:
Related issue (if exists):