Socket
Socket
Sign inDemoInstall

babel-preset-current-node-syntax

Package Overview
Dependencies
66
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.4 to 1.0.0

12

package.json
{
"name": "babel-preset-current-node-syntax",
"version": "0.1.4",
"version": "1.0.0",
"description": "A Babel preset that enables parsing of proposals supported by the current Node.js version.",

@@ -28,3 +28,4 @@ "main": "src/index.js",

"@babel/plugin-syntax-optional-catch-binding": "^7.8.3",
"@babel/plugin-syntax-optional-chaining": "^7.8.3"
"@babel/plugin-syntax-optional-chaining": "^7.8.3",
"@babel/plugin-syntax-top-level-await": "^7.8.3"
},

@@ -35,8 +36,7 @@ "peerDependencies": {

"devDependencies": {
"@babel/core": "7.0.0"
"@babel/core": "7.0.0",
"@babel/parser-7.0.0": "npm:@babel/parser@7.0.0",
"@babel/parser-7.9.0": "npm:@babel/parser@7.9.0"
},
"resolutions": {
"@babel/parser": "7.0.0"
},
"license": "MIT"
}

@@ -48,6 +48,11 @@ const tests = {

const minor = parseInt(process.versions.node.match(/^\d+\.(\d+)/)[1], 10);
if (major > 10 || (major === 10 && minor > 4)) {
if (major > 10 || (major === 10 && minor >= 4)) {
plugins.push(require.resolve("@babel/plugin-syntax-import-meta"));
}
// Same for top level await - it is only supported in modules. It is supported
// from 14.3.0
if (major > 14 || (major === 14 && minor >= 3)) {
plugins.push(require.resolve("@babel/plugin-syntax-top-level-await"));
}
module.exports = () => ({ plugins });
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc