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
add Dynamic Imports and BigInt as ES2020 #198
Conversation
There's already #179 for BigInts (but I don't care which one is merged). I'm still in favor of not having |
Because that was adding the spec into experimental directory, I have written this to move both syntaxes to es2020.md. I prefer having |
@mysticatea In a bunch of places, you've mistyped |
I'm leaning toward, we should change the representation of dynamic imports: #197. |
What should I do to advance this PR? |
@RReverser @ariya would you take a look this PR? |
What should I do to advance this PR? |
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 reasonable to me overall.
Are ther any more steps needed/revisions before this PR can be merged? Adding this in case this slipped |
I am typing here as ESlint depends on this to get dynamic imports happening! |
any news? |
@adrianheine Still would like your input on your PR vs this one. |
I don't think we can land this as is. Unless I'm mistaken, both Webpack and Acorn have adopted the current experimental design for dynamic import. Seems it's too late and not worth the effort to undo the change. Just my 2 cents here. |
I know Acorn's release was a mistake. I think they will make a major release after this PR merged. (acornjs/acorn#834 (comment)) |
@mysticatea and what about Webpack? This would need to get merged and released before Webpack 5 was released. |
The AST was experimental. I believe we should fix it before getting stable, rather than leaving the pain for the future.
I hope this PR to be merged as soon as possible. I have been waiting for the decide of ESTree team since a month ago. I'm just waiting. |
ok, so: Approvals needed: People to inform: |
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.
Not that my approval matters as an inactive member, but just figured one more couldn't hurt.
friendly ping @adrianheine |
We have over a month (40 days) since the last commit. Is there any chance to be merged? |
@RReverser I think we should merge this one and also credit @adrianheine in the commit message. The two pull requests are fundamentally the same thing (with respect to BigInt), no? Alternatively, we could land the dynamic import stuff (since we have wide agreement here), and slice off BigInt until Adrian replies. Either way it's time to move this forward :-) |
@RReverser once you're settled in at your new gig, perhaps you can merge this PR, or are we still waiting on anyone? |
We have over two months since the last commit. Is there any chance to be merged? |
Thanks @RReverser! @mysticatea do have any PRs open against Acorn acknowledging this change? |
Thank you for merged! Yes, I have acornjs/acorn#844 |
FYI, I've also pinged @sokra about the change so hopefully it can land in Acorn before Webpack 5. |
* Add support for dynamic Import expressions. See https://tc39.github.io/proposal-dynamic-import/ * Added skipped failing tests for dynamic import. Tests depend on espree supporting dynamic import * Update dynamic import test with literal parse tree instead of depending on espree having dynamic import support * Align with estree/estree#198
* feat: support dynamic import * Add a couple of tests * Align with estree/estree#198 * Update escodegen.js Co-Authored-By: Michael Ficarra <github@michael.ficarra.me> * Remove outdated "State 3" from comment * Add test of a SequenceExpression as a dynamic import source #395 (comment) * Properly parenthesize when used with a higher precedence operator #395 (comment)
Just for record keeping: |
* feat: support dynamic import * Add a couple of tests * Align with estree/estree#198 * Update escodegen.js Co-Authored-By: Michael Ficarra <github@michael.ficarra.me> * Remove outdated "State 3" from comment * Add test of a SequenceExpression as a dynamic import source estools#395 (comment) * Properly parenthesize when used with a higher precedence operator estools#395 (comment)
Dynamic Imports and BigInt syntaxes have arrived at Stage 4. This PR adds those syntaxes as ES2020.
Literal
as separated fromBigIntLiteral
because of consistent. Literal hasRegExp
value andRegExpLiteral
extends onlyregex
property.I represented Dynamic Imports asI changed the AST of Dynamic Imports because of Revisit Dynamic Imports #197. I believe that theCallExpression
as same as the current experimental spec. However, I think that another way such asImportExpression
is better: Revisit Dynamic Imports #197. Thoughts?Import
node way will confuse us in the future.Fixes #197, fixes #169, closes #179.