Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.4k
assert,repl: enable ecmaVersion 2021 in acorn parser#35827
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
This adds support for the new logical assignment operators.
targos commented Oct 27, 2020
nodejs-github-bot commented Oct 27, 2020
Trott left a comment • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
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.
Should we add an assert or repl test using the logical assignment operators in a way that would break without the acorn update? (Non-blocking question.)
targos commented Oct 27, 2020
I'm not sure that's worth the effort. |
BridgeAR left a comment
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 suggest to use latest instead to prevent future updates. This is a recent feature added to acorn (https://github.com/acornjs/acorn/tree/master/acorn#interface).
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
richardlau commented Oct 27, 2020
Is that not going to cause maintenance issues when the code ends up in release lines? |
BridgeAR commented Oct 27, 2020
I am not certain I fully understand the comment. AFAIK the suggestion should minimize the maintenance need due to always providing the latest features acorn supports. Thus, there should be no need for a PR like this one after upgrading acorn. |
richardlau commented Oct 27, 2020
I mean that, say, we cut Node.js 16 with it set to |
BridgeAR commented Oct 27, 2020
That should not be an issue: it would fail execution in the REPL and assert would not be able to execute the code in the first place if it would not be supported. But it's actually very unlikely to even get to that: we'd have to update acorn without noticing it already supporting features that Node.js does not and that has never happened before as far as I can tell. Acorn only supports features that are stable and we'd have to lack behind on updating V8 quite a lot for it to happen. |
richardlau commented Oct 27, 2020
¯\_(ツ)_/¯ I'm going off #35791 (comment) which implied that this PR shouldn't be backported to Node.js 14. |
Co-authored-by: Ruben Bridgewater <[email protected]>
targos commented Oct 28, 2020
@BridgeAR convinced me that it should not be an issue if Acorn supports more syntax than V8. |
nodejs-github-bot commented Oct 28, 2020
nodejs-github-bot commented Oct 30, 2020
nodejs-github-bot commented Oct 30, 2020
Landed in 87a6b60...0ddd69e |
This adds support for the new logical assignment operators. PR-URL: #35827 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Anto Aravinth <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
This adds support for the new logical assignment operators. PR-URL: #35827 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Anto Aravinth <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
This adds support for the new logical assignment operators. PR-URL: #35827 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Anto Aravinth <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
This adds support for the new logical assignment operators. PR-URL: #35827 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Anto Aravinth <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
This adds support for the new logical assignment operators. PR-URL: #35827 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Anto Aravinth <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
This adds support for the new logical assignment operators.