-
Notifications
You must be signed in to change notification settings - Fork 9
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
Update acorn
and increase default ecmaVersion
#16
base: main
Are you sure you want to change the base?
Conversation
`acorn` has been updated to v8.5, and `acorn-walk` has been updated to v8.2. These versions include many new bug fixes and features, including the features currently being added by this package using plugins. These features are supported by `acorn` only when `ecmaVersion` is set to "2022", so the default `ecmaVersion` has been set to `2022`. Since the plugins are no longer needed, they have been removed, along with all related build steps and documentation.
@@ -17,7 +17,7 @@ test('parses object spread syntax', function (t) { | |||
|
|||
test('does not change main acorn module', function (t) { | |||
t.throws(function () { | |||
baseAcorn.parse('var a = 10n') | |||
baseAcorn.parse('#!/usr/bin/env node\nconsole.log("ok")', { ecmaVersion: 2021 }) |
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.
This was updated to use a hashbang as an example of something the main acorn module would not support by default.
acorn
requires that ecmaVersion
is set (as of v8), so that had to be included.
@@ -27,6 +27,5 @@ build/Release | |||
node_modules | |||
package-lock.json | |||
|
|||
lib/* |
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.
It didn't seem necessary to ignore this directory, since it's not used anymore. It was only used for the plugins.
This is a pretty substantial change, since arguably bringing these plugins in was the main purpose of this package. If they're not needed anymore, why use this package at all, v.s. using It is unfortunate that the default |
@goto-bus-stop Is this library not maintained anymore? I volunteer to maintain it, since it's a core dependency in https://github.com/staltz/noderify |
acorn
has been updated to v8.5, andacorn-walk
has been updated to v8.2. These versions include many new bug fixes and features, including the features currently being added by this package using plugins. These features are supported byacorn
only whenecmaVersion
is set to "2022", so the defaultecmaVersion
has been set to2022
.Since the plugins are no longer needed, they have been removed, along with all related build steps and documentation.