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
remove acorn-bigint and acorn-dynamic-import devDenpendencies #3058
Conversation
@lukastaegert Could you figure out why the checks failed? If I missed something intricate, just treat this PR as an issue for refactor notice. |
The PR changes how the acorn import manifests in the ESM build. There is a special plugin that scans for how the import is written to rewrite it so that the ESM build can be reused properly by ESM aware bundlers. What needs to be done is basically to replace the generated default import (which comes from a poor CommonJS translation) with a namespace import. To that end, the two constants |
@lukastaegert Thanks for your explanation! I think I can't handle it. I will just leave this as an issue, waiting for someone else to do that. |
I fixed the import plugin but it appears dynamic imports are no longer recognized with these changes. |
Ok, seems they were lying about the minimum ECMA version, it needs to be 2020 (or 11) to work, not 10. |
Codecov Report
@@ Coverage Diff @@
## master #3058 +/- ##
==========================================
- Coverage 88.73% 88.73% -0.01%
==========================================
Files 165 165
Lines 5735 5733 -2
Branches 1748 1748
==========================================
- Hits 5089 5087 -2
Misses 388 388
Partials 258 258
Continue to review full report at Codecov.
|
Oh, 11 is right. I will recorrect the changelog / doc / .d.ts of acorn. |
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Description
acorn built with bigint and dynamic import internal since 6.2.0 (while rollup depending on acorn ^6.2.1): https://github.com/acornjs/acorn/blob/master/acorn/CHANGELOG.md
(Note: don't update dependency acorn version to 7.0.0 for the moment, until most plugins compatible with that (at least waiting for acorn offcial stage3 plugins), and notice that
import()
has updated toImportExpression
in 7.0.0, which maybe need to update in rollup source.)