-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Bump Acorn JS version to ES2018 #11435
Conversation
Sounds good; we at Acorn are thinking of bumping the |
Co-authored-by: Ingvar Stepanyan <[email protected]>
Thanks! I didn't know I think |
It says so in the comment you quoted, but maybe we didn't make it clear enough that versions in parentheses are aliases :) |
FWIW core Acorn doesn't implement any features that haven't been finalised yet (< stage 4), so you should be safe either way; upgrading sounds like a good idea though, especially since the latest version has stable |
Heh, I should read the full text of things I quote I guess 😄 |
On the subject of acorn, what is are blockers on us upstreaming out local patches and switching to the npm version? Would be nice to avoid the local copy. |
I believe they just didn't want one of our patches, acornjs/acorn#793 It might be possible to do something non-invasive that achieves the same result, but I don't know. |
Yeah the error object thrown by Acorn contains location in the source it was thrown at, so you don't really need a patch, only a wrapper to try-catch it and format it in whichever way you prefer. It should be easy enough, but I'm happy to help if you run into any issues. |
I've love to see this happen... I'll open bug and hopefully one of us can get around to it: #11439 |
The acorn code says
We set the version to 6 (2015) when we added Acorn, probably to
keep it as close as possible to the old pre-Acorn parser. But the
default in our version is 9 (2018) so we may as well switch to that,
and that fixes #11431 (8 - 2017 - would have been enough for
that specific bug).