Socket
Socket
Sign inDemoInstall

@babel/plugin-proposal-optional-chaining

Package Overview
Dependencies
Maintainers
5
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-proposal-optional-chaining - npm Package Compare versions

Comparing version 7.0.0-beta.47 to 7.0.0-beta.48

28

lib/index.js

@@ -11,3 +11,3 @@ "use strict";

_helperPluginUtils = function _helperPluginUtils() {
_helperPluginUtils = function () {
return data;

@@ -22,3 +22,3 @@ };

_pluginSyntaxOptionalChaining = function _pluginSyntaxOptionalChaining() {
_pluginSyntaxOptionalChaining = function () {
return data;

@@ -33,3 +33,3 @@ };

_core = function _core() {
_core = function () {
return data;

@@ -45,7 +45,10 @@ };

api.assertVersion(7);
const _options$loose = options.loose,
loose = _options$loose === void 0 ? false : _options$loose;
const {
loose = false
} = options;
function optional(path, replacementPath) {
const scope = path.scope;
const {
scope
} = path;
const optionals = [];

@@ -55,4 +58,5 @@ let objectPath = path;

while (objectPath.isOptionalMemberExpression() || objectPath.isOptionalCallExpression()) {
const _objectPath = objectPath,
node = _objectPath.node;
const {
node
} = objectPath;

@@ -100,3 +104,5 @@ if (node.optional) {

} else {
const object = chain.object;
const {
object
} = chain;
let context = scope.maybeGenerateMemoised(object);

@@ -122,3 +128,5 @@

return path.find(path => {
const parentPath = path.parentPath;
const {
parentPath
} = path;

@@ -125,0 +133,0 @@ if (path.key == "object" && parentPath.isOptionalMemberExpression()) {

{
"name": "@babel/plugin-proposal-optional-chaining",
"version": "7.0.0-beta.47",
"version": "7.0.0-beta.48",
"description": "Transform optional chaining operators into a series of nil checks",

@@ -12,13 +12,13 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-optional-chaining",

"dependencies": {
"@babel/helper-plugin-utils": "7.0.0-beta.47",
"@babel/plugin-syntax-optional-chaining": "7.0.0-beta.47"
"@babel/helper-plugin-utils": "7.0.0-beta.48",
"@babel/plugin-syntax-optional-chaining": "7.0.0-beta.48"
},
"peerDependencies": {
"@babel/core": "7.0.0-beta.47"
"@babel/core": "7.0.0-beta.48"
},
"devDependencies": {
"@babel/core": "7.0.0-beta.47",
"@babel/helper-plugin-test-runner": "7.0.0-beta.47",
"@babel/plugin-transform-block-scoping": "7.0.0-beta.47"
"@babel/core": "7.0.0-beta.48",
"@babel/helper-plugin-test-runner": "7.0.0-beta.48",
"@babel/plugin-transform-block-scoping": "7.0.0-beta.48"
}
}
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc