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: mark some known globals or their functions as impure #4955
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
d0fe9e0
to
736ecba
Compare
Codecov Report
@@ Coverage Diff @@
## master #4955 +/- ##
=======================================
Coverage 98.99% 98.99%
=======================================
Files 222 222
Lines 8123 8123
Branches 2237 2237
=======================================
Hits 8041 8041
Misses 28 28
Partials 54 54
|
After implementing #3127, we can further improve the tree-shaking to the Map. |
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.
Looks good to me, but the test case should be modified so that it breaks with current Rollup.
wouldn't this apply to |
4c549e1
to
445c21c
Compare
445c21c
to
d5b3a73
Compare
Thanks for your review! we should apply this to what you mentioned, I marked more known globals or their methods as impure. |
d5b3a73
to
d571ee2
Compare
8e3ccf0
to
0d7ad72
Compare
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.
Thanks a lot!
This PR has been released as part of rollup@3.21.2. You can test it via |
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
resolves #4282
Description
Currently I mark Map is impure as a temporary resolution. I noticed that there are some issues related to the tree-shaking to the
iterator
, this #4282 issue is also similar.