Socket
Socket
Sign inDemoInstall

babel-preset-current-node-syntax

Package Overview
Dependencies
65
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.2 to 0.1.3

11

package.json
{
"name": "babel-preset-current-node-syntax",
"version": "0.1.2",
"version": "0.1.3",
"description": "A Babel preset that enables parsing of proposals supported by the current Node.js version.",
"main": "src/index.js",
"repository": "https://github.com/nicolo-ribaudo/babel-preset-current-node-syntax",
"repository": {
"type": "git",
"url": "https://github.com/nicolo-ribaudo/babel-preset-current-node-syntax.git"
},
"author": {

@@ -11,2 +14,5 @@ "name": "Nicolò Ribaudo",

},
"scripts": {
"test": "node ./test/index.js"
},
"dependencies": {

@@ -16,2 +22,3 @@ "@babel/plugin-syntax-async-generators": "^7.8.4",

"@babel/plugin-syntax-class-properties": "^7.8.3",
"@babel/plugin-syntax-import-meta": "^7.8.3",
"@babel/plugin-syntax-json-strings": "^7.8.3",

@@ -18,0 +25,0 @@ "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3",

@@ -14,2 +14,3 @@ const tests = {

"nullish-coalescing-operator": ["a ?? b"], // Babel 7.9.0
// import.meta is handled manually

@@ -43,2 +44,11 @@ // Stage 3

// import.meta is only allowed in modules, and modules can only be evaluated
// synchronously. For this reason, we cannot detect import.meta support at
// runtime. It is supported starting from 10.4, so we can check the version.
const major = parseInt(process.versions.node, 10);
const minor = parseInt(process.versions.node.match(/^\d+\.(\d+)/)[1], 10);
if (major > 10 || (major === 10 && minor > 4)) {
plugins.push(require.resolve("@babel/plugin-syntax-import-meta"));
}
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