-
-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix builtins plugins from leaking vars #472
Conversation
const { start: nodeStart } = firstPath.parent; | ||
const { end: nodeEnd } = lastPath.parent; | ||
|
||
program.traverse({ |
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.
the same can be achieved by getFunctionParent
recursively till program
. program.traverse
inside a loop will be costly.
[Update] Running mangler on exit fixes #425. |
Still leaks when there is no top level IIFE and functions are at same level. Trying out some stuffs. |
b7a3ddf
to
0eae9a9
Compare
0eae9a9
to
68ece87
Compare
Codecov Report
@@ Coverage Diff @@
## master #472 +/- ##
==========================================
+ Coverage 82.38% 82.49% +0.11%
==========================================
Files 35 35
Lines 2611 2634 +23
Branches 923 930 +7
==========================================
+ Hits 2151 2173 +22
- Misses 280 281 +1
Partials 180 180
Continue to review full report at Codecov.
|
Works now for functions at same level. |
fix #461
Even after fixing this, the mangler doesn't rename the identifier properly. Related - #425