Socket
Socket
Sign inDemoInstall

@babel/plugin-proposal-nullish-coalescing-operator

Package Overview
Dependencies
78
Maintainers
4
Versions
59
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.0.0-beta.31 to 7.0.0-beta.32

15

lib/index.js

@@ -8,8 +8,9 @@ "use strict";

var _core = require("@babel/core");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _default(_ref, _ref2) {
var t = _ref.types;
var _ref2$loose = _ref2.loose,
loose = _ref2$loose === void 0 ? false : _ref2$loose;
function _default(api, _ref) {
var _ref$loose = _ref.loose,
loose = _ref$loose === void 0 ? false : _ref$loose;
return {

@@ -30,4 +31,6 @@ inherits: _pluginSyntaxNullishCoalescingOperator.default,

});
var assignment = t.assignmentExpression("=", t.clone(ref), node.left);
path.replaceWith(t.conditionalExpression(loose ? t.binaryExpression("!=", assignment, t.nullLiteral()) : t.logicalExpression("&&", t.binaryExpression("!==", assignment, t.nullLiteral()), t.binaryExpression("!==", t.clone(ref), scope.buildUndefinedNode())), t.clone(ref), node.right));
var assignment = _core.types.assignmentExpression("=", _core.types.clone(ref), node.left);
path.replaceWith(_core.types.conditionalExpression(loose ? _core.types.binaryExpression("!=", assignment, _core.types.nullLiteral()) : _core.types.logicalExpression("&&", _core.types.binaryExpression("!==", assignment, _core.types.nullLiteral()), _core.types.binaryExpression("!==", _core.types.clone(ref), scope.buildUndefinedNode())), _core.types.clone(ref), node.right));
}

@@ -34,0 +37,0 @@ }

10

package.json
{
"name": "@babel/plugin-proposal-nullish-coalescing-operator",
"version": "7.0.0-beta.31",
"version": "7.0.0-beta.32",
"description": "Remove nullish coalescing operator",

@@ -12,11 +12,11 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-nullish-coalescing-opearator",

"dependencies": {
"@babel/plugin-syntax-nullish-coalescing-operator": "7.0.0-beta.31"
"@babel/plugin-syntax-nullish-coalescing-operator": "7.0.0-beta.32"
},
"peerDependencies": {
"@babel/core": "7.0.0-beta.31"
"@babel/core": "7.0.0-beta.32"
},
"devDependencies": {
"@babel/core": "7.0.0-beta.31",
"@babel/helper-plugin-test-runner": "7.0.0-beta.31"
"@babel/core": "7.0.0-beta.32",
"@babel/helper-plugin-test-runner": "7.0.0-beta.32"
}
}
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