Skip to content

Commit 69fc7d5

Browse files
committed
Use acorn's builtin numeric separator support
1 parent 01d41fd commit 69fc7d5

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The API is the same as [acorn](https://github.com/acornjs/acorn), but the follow
3535

3636
And the following options have different defaults from acorn, to match Node modules:
3737

38-
- `ecmaVersion: 2020`
38+
- `ecmaVersion: 2021`
3939
- `allowHashBang: true`
4040
- `allowReturnOutsideFunction: true`
4141

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"url": "https://github.com/browserify/acorn-node/issues"
88
},
99
"dependencies": {
10-
"acorn": "^7.3.1",
10+
"acorn": "^7.4.0",
1111
"acorn-walk": "^7.2.0",
1212
"setprototypeof": "^1.2.0",
1313
"xtend": "^4.0.2"
@@ -17,7 +17,6 @@
1717
"@babel/core": "^7.10.1",
1818
"@babel/preset-env": "^7.10.1",
1919
"acorn-class-fields": "^0.3.4",
20-
"acorn-numeric-separator": "^0.3.2",
2120
"acorn-private-class-elements": "^0.2.5",
2221
"acorn-static-class-features": "^0.2.2",
2322
"mkdirp": "^0.5.5",
@@ -42,7 +41,6 @@
4241
"lint": "standard",
4342
"test": "node test",
4443
"prepare": "npm run build && node test",
45-
"build:acorn-numeric-separator": "babel node_modules/acorn-numeric-separator --out-dir lib/acorn-numeric-separator",
4644
"build:acorn-class-fields": "babel node_modules/acorn-class-fields --out-dir lib/acorn-class-fields",
4745
"build:acorn-static-class-features": "babel node_modules/acorn-static-class-features --out-dir lib/acorn-static-class-features",
4846
"build:acorn-private-class-elements": "babel node_modules/acorn-private-class-elements --out-dir lib/acorn-private-class-elements",

src/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@ var CJSParser = acorn.Parser
44
// Required paths should be relative to the package root, because Babel outputs this file there.
55
.extend(require('./lib/acorn-class-fields'))
66
.extend(require('./lib/acorn-static-class-features'))
7-
.extend(require('./lib/acorn-numeric-separator'))
87
.extend(defaultOptionsPlugin)
98
var ESModulesParser = CJSParser
109

1110
function mapOptions (opts) {
1211
if (!opts) opts = {}
1312
return {
14-
ecmaVersion: 2020,
13+
ecmaVersion: 2021,
1514
allowHashBang: true,
1615
allowReturnOutsideFunction: true,
1716
...opts

0 commit comments

Comments
 (0)