Skip to content

Commit cb3c817

Browse files
committed
remove unnecessary plugins
1 parent 33f356b commit cb3c817

File tree

8 files changed

+4
-190
lines changed

8 files changed

+4
-190
lines changed

README.md

+1-8
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,13 @@ var acorn = require('acorn-node')
2929

3030
The API is the same as [acorn](https://github.com/acornjs/acorn), but the following syntax features are enabled by default:
3131

32-
- Bigint syntax `10n`
3332
- Numeric separators syntax `10_000`
3433
- Public and private class instance fields
3534
- Public and private class static fields
36-
- Dynamic `import()`
37-
- The `import.meta` property
38-
- `export * as ns from` syntax
3935

4036
And the following options have different defaults from acorn, to match Node modules:
4137

42-
- `ecmaVersion: 2019`
38+
- `ecmaVersion: 2020`
4339
- `allowHashBang: true`
4440
- `allowReturnOutsideFunction: true`
4541

@@ -56,9 +52,6 @@ The files in the repo root and the ./test folder are licensed as [Apache-2.0](LI
5652

5753
The files in lib/ are generated from other packages:
5854

59-
- lib/bigint: [acorn-bigint](https://github.com/acornjs/acorn-bigint]), MIT
6055
- lib/class-private-elements: [acorn-class-private-elements](https://github.com/acornjs/acorn-class-private-elements), MIT
61-
- lib/export-ns-from: [acorn-export-ns-from](https://github.com/acornjs/acorn-export-ns-from), MIT
62-
- lib/import-meta: [acorn-import-meta](https://github.com/acornjs/acorn-import-meta), MIT
6356
- lib/numeric-separator: [acorn-numeric-separator](https://github.com/acornjs/acorn-numeric-separator]), MIT
6457
- lib/static-class-features: [acorn-static-class-features](https://github.com/acornjs/acorn-static-class-features), MIT

build.js

-3
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ function privateClassElements (str) {
2222
return str.replace('acorn-private-class-elements', '../private-class-elements')
2323
}
2424

25-
compile('acorn-bigint', './lib/bigint/index.js')
2625
compile('acorn-numeric-separator', './lib/numeric-separator/index.js')
27-
compile('acorn-import-meta', './lib/import-meta/index.js')
28-
compile('acorn-export-ns-from', './lib/export-ns-from/index.js')
2926
compile('acorn-class-fields', './lib/class-fields/index.js', privateClassElements)
3027
compile('acorn-static-class-features', './lib/static-class-features/index.js', privateClassElements)
3128
compile('acorn-private-class-elements', './lib/private-class-elements/index.js', function (str) {

index.js

-3
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,11 @@ var xtend = require('xtend')
33
var setPrototypeOf = require('setprototypeof')
44

55
var CJSParser = acorn.Parser
6-
.extend(require('./lib/bigint'))
76
.extend(require('./lib/class-fields'))
87
.extend(require('./lib/static-class-features'))
98
.extend(require('./lib/numeric-separator'))
109
.extend(defaultOptionsPlugin)
1110
var ESModulesParser = CJSParser
12-
.extend(require('./lib/export-ns-from'))
13-
.extend(require('./lib/import-meta'))
1411

1512
function mapOptions (opts) {
1613
if (!opts) opts = {}

lib/bigint/index.js

-71
This file was deleted.

lib/export-ns-from/index.js

-40
This file was deleted.

lib/import-meta/index.js

-59
This file was deleted.

package.json

+2-5
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,13 @@
77
"url": "https://github.com/browserify/acorn-node/issues"
88
},
99
"dependencies": {
10-
"acorn": "^7.0.0",
11-
"acorn-walk": "^7.0.0",
10+
"acorn": "^7.3.1",
11+
"acorn-walk": "^7.2.0",
1212
"setprototypeof": "^1.2.0",
1313
"xtend": "^4.0.2"
1414
},
1515
"devDependencies": {
16-
"acorn-bigint": "^0.4.0",
1716
"acorn-class-fields": "^0.3.1",
18-
"acorn-export-ns-from": "^0.2.0",
19-
"acorn-import-meta": "^1.0.0",
2017
"acorn-numeric-separator": "^0.3.0",
2118
"acorn-private-class-elements": "^0.2.5",
2219
"acorn-static-class-features": "^0.2.0",

test/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ test('supports import.meta with sourceType: module', function (t) {
8686
})
8787
t.throws(function () {
8888
acorn.parse('console.log(import.m\\u0065ta.ul)', { sourceType: 'module' })
89-
}, /must not contain escape sequences/)
89+
}, /must not contain escaped characters/)
9090
t.end()
9191
})
9292

0 commit comments

Comments
 (0)