babel-preset-current-node-syntax
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "babel-preset-current-node-syntax", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "A Babel preset that enables parsing of proposals supported by the current Node.js version.", | ||
@@ -12,16 +12,23 @@ "main": "src/index.js", | ||
"dependencies": { | ||
"@babel/plugin-syntax-async-generators": "^7.8.4", | ||
"@babel/plugin-syntax-bigint": "^7.8.3", | ||
"@babel/plugin-syntax-class-properties": "^7.8.3", | ||
"@babel/plugin-syntax-json-strings": "^7.8.3", | ||
"@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", | ||
"@babel/plugin-syntax-numeric-separator": "^7.8.3" | ||
"@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", | ||
"@babel/plugin-syntax-numeric-separator": "^7.8.3", | ||
"@babel/plugin-syntax-object-rest-spread": "^7.8.3", | ||
"@babel/plugin-syntax-optional-catch-binding": "^7.8.3", | ||
"@babel/plugin-syntax-optional-chaining": "^7.8.3" | ||
}, | ||
"peerDependencies": { | ||
"@babel/core": "^7.9.0" | ||
"@babel/core": "^7.0.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "7.9.0" | ||
"@babel/core": "7.0.0" | ||
}, | ||
"resolutions": { | ||
"@babel/core/@babel/parser": "7.9.0" | ||
"@babel/parser": "7.0.0" | ||
}, | ||
"license": "MIT" | ||
} |
@@ -27,5 +27,5 @@ # `babel-preset-current-node-syntax` | ||
The `test/fixtures` folder contain a bunch of files which should be parsed | ||
starting from the node version in the filename, and throw in older versions. | ||
All the tests are run using `@babel/parser@7.9.0`, which is the first version | ||
supported by this preset. | ||
The `test/fixtures.json` file contains a bunch of syntax tests, alongside with | ||
the minimum supported node version for each of them. Babel should throw on | ||
older versions, without support for that given syntax. | ||
All the tests are run using `@babel/parser@7.0.0`. |
const tests = { | ||
// ECMAScript 2018 | ||
"object-rest-spread": ["({ ...{} })", "({ ...x } = {})"], // Babel 7.2.0 | ||
"async-generators": ["async function* f() {}"], // Babel 7.2.0 | ||
// ECMAScript 2019 | ||
"optional-catch-binding": ["try {} catch {}"], // Babel 7.2.0 | ||
"json-strings": ["'\\u2028'"], // Babel 7.2.0 | ||
// ECMAScript 2020 | ||
"bigint": ["1n"], // Babel 7.8.0 | ||
"optional-chaining": ["a?.b"], // Babel 7.9.0 | ||
"nullish-coalescing-operator": ["a ?? b"], // Babel 7.9.0 | ||
// Stage 3 | ||
"numeric-separator": ["1_2"], | ||
@@ -28,2 +42,2 @@ "class-properties": [ | ||
module.exports = { plugins }; | ||
module.exports = () => ({ plugins }); |
4180
36
11
4
+ Added@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3
+ Added@babel/plugin-syntax-async-generators@7.8.4(transitive)
+ Added@babel/plugin-syntax-bigint@7.8.3(transitive)
+ Added@babel/plugin-syntax-json-strings@7.8.3(transitive)
+ Added@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(transitive)
+ Added@babel/plugin-syntax-object-rest-spread@7.8.3(transitive)
+ Added@babel/plugin-syntax-optional-catch-binding@7.8.3(transitive)
+ Added@babel/plugin-syntax-optional-chaining@7.8.3(transitive)