Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@babel/plugin-transform-parameters

Package Overview
Dependencies
Maintainers
6
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-transform-parameters - npm Package Compare versions

Comparing version 7.0.0-beta.38 to 7.0.0-beta.39

6

lib/params.js

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

body.push(buildLooseDefaultParam({
ASSIGNMENT_IDENTIFIER: left.node,
ASSIGNMENT_IDENTIFIER: _core.types.cloneNode(left.node),
DEFAULT_VALUE: right.node,

@@ -73,3 +73,3 @@ UNDEFINED: undefinedNode

DEFAULT_VALUE: right.node,
PARAMETER_NAME: paramName,
PARAMETER_NAME: _core.types.cloneNode(paramName),
UNDEFINED: undefinedNode

@@ -110,3 +110,3 @@ }));

body.push(_defNode2);
param.replaceWith(uid);
param.replaceWith(_core.types.cloneNode(uid));
}

@@ -113,0 +113,0 @@

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

} else {
index = _core.types.binaryExpression("+", path.parent.property, offsetLiteral);
index = _core.types.binaryExpression("+", path.parent.property, _core.types.cloneNode(offsetLiteral));
}

@@ -136,3 +136,3 @@

INDEX: index,
REF: temp
REF: _core.types.cloneNode(temp)
}));

@@ -197,13 +197,15 @@ } else {

var clonedArgsId = _core.types.cloneNode(argsId);
switch (cause) {
case "indexGetter":
optimiseIndexGetter(_path, argsId, state.offset);
optimiseIndexGetter(_path, clonedArgsId, state.offset);
break;
case "lengthGetter":
optimiseLengthGetter(_path, argsId, state.offset);
optimiseLengthGetter(_path, clonedArgsId, state.offset);
break;
default:
_path.replaceWith(argsId);
_path.replaceWith(clonedArgsId);

@@ -225,8 +227,10 @@ }

var len = scope.generateUidIdentifier("len");
var arrKey = key;
var arrLen = len;
var arrKey, arrLen;
if (node.params.length) {
arrKey = _core.types.binaryExpression("-", key, start);
arrLen = _core.types.conditionalExpression(_core.types.binaryExpression(">", len, start), _core.types.binaryExpression("-", len, start), _core.types.numericLiteral(0));
arrKey = _core.types.binaryExpression("-", _core.types.cloneNode(key), _core.types.cloneNode(start));
arrLen = _core.types.conditionalExpression(_core.types.binaryExpression(">", _core.types.cloneNode(len), _core.types.cloneNode(start)), _core.types.binaryExpression("-", _core.types.cloneNode(len), _core.types.cloneNode(start)), _core.types.numericLiteral(0));
} else {
arrKey = _core.types.identifier(key.name);
arrLen = _core.types.identifier(len.name);
}

@@ -233,0 +237,0 @@

{
"name": "@babel/plugin-transform-parameters",
"version": "7.0.0-beta.38",
"version": "7.0.0-beta.39",
"description": "Compile ES2015 default and rest parameters to ES5",

@@ -9,4 +9,4 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-parameters",

"dependencies": {
"@babel/helper-call-delegate": "7.0.0-beta.38",
"@babel/helper-get-function-arity": "7.0.0-beta.38"
"@babel/helper-call-delegate": "7.0.0-beta.39",
"@babel/helper-get-function-arity": "7.0.0-beta.39"
},

@@ -17,8 +17,8 @@ "keywords": [

"peerDependencies": {
"@babel/core": "7.0.0-beta.38"
"@babel/core": "7.0.0-beta.39"
},
"devDependencies": {
"@babel/core": "7.0.0-beta.38",
"@babel/helper-plugin-test-runner": "7.0.0-beta.38"
"@babel/core": "7.0.0-beta.39",
"@babel/helper-plugin-test-runner": "7.0.0-beta.39"
}
}
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