@babel/plugin-proposal-partial-application
Advanced tools
Comparing version 7.16.7 to 7.17.12
@@ -81,9 +81,13 @@ "use strict"; | ||
if (node.callee.type === "MemberExpression") { | ||
const receiverLVal = path.scope.generateUidIdentifierBasedOnNode(node.callee.object); | ||
const { | ||
object: receiver, | ||
property | ||
} = node.callee; | ||
const receiverLVal = path.scope.generateUidIdentifierBasedOnNode(receiver); | ||
scope.push({ | ||
id: receiverLVal | ||
}); | ||
sequenceParts.push(_core.types.assignmentExpression("=", _core.types.cloneNode(receiverLVal), node.callee.object), _core.types.assignmentExpression("=", _core.types.cloneNode(functionLVal), _core.types.memberExpression(_core.types.cloneNode(receiverLVal), node.callee.property)), ...argsInitializers, _core.types.functionExpression(_core.types.cloneNode(node.callee.property), placeholdersParams, _core.types.blockStatement([_core.types.returnStatement(_core.types.callExpression(_core.types.memberExpression(_core.types.cloneNode(functionLVal), _core.types.identifier("call")), [_core.types.cloneNode(receiverLVal), ...args]))], []), false, false)); | ||
sequenceParts.push(_core.types.assignmentExpression("=", _core.types.cloneNode(receiverLVal), receiver), _core.types.assignmentExpression("=", _core.types.cloneNode(functionLVal), _core.types.memberExpression(_core.types.cloneNode(receiverLVal), property)), ...argsInitializers, _core.types.functionExpression(_core.types.isIdentifier(property) ? _core.types.cloneNode(property) : path.scope.generateUidIdentifierBasedOnNode(property), placeholdersParams, _core.types.blockStatement([_core.types.returnStatement(_core.types.callExpression(_core.types.memberExpression(_core.types.cloneNode(functionLVal), _core.types.identifier("call")), [_core.types.cloneNode(receiverLVal), ...args]))], []), false, false)); | ||
} else { | ||
sequenceParts.push(_core.types.assignmentExpression("=", _core.types.cloneNode(functionLVal), node.callee), ...argsInitializers, _core.types.functionExpression(_core.types.cloneNode(node.callee), placeholdersParams, _core.types.blockStatement([_core.types.returnStatement(_core.types.callExpression(_core.types.cloneNode(functionLVal), args))], []), false, false)); | ||
sequenceParts.push(_core.types.assignmentExpression("=", _core.types.cloneNode(functionLVal), node.callee), ...argsInitializers, _core.types.functionExpression(_core.types.isIdentifier(node.callee) ? _core.types.cloneNode(node.callee) : path.scope.generateUidIdentifierBasedOnNode(node.callee), placeholdersParams, _core.types.blockStatement([_core.types.returnStatement(_core.types.callExpression(_core.types.cloneNode(functionLVal), args))], []), false, false)); | ||
} | ||
@@ -90,0 +94,0 @@ |
{ | ||
"name": "@babel/plugin-proposal-partial-application", | ||
"version": "7.16.7", | ||
"version": "7.17.12", | ||
"description": "Introduces a new ? token in an argument list which allows for partially applying an argument list to a call expression", | ||
@@ -20,3 +20,3 @@ "repository": { | ||
"dependencies": { | ||
"@babel/helper-plugin-utils": "^7.16.7", | ||
"@babel/helper-plugin-utils": "^7.17.12", | ||
"@babel/plugin-syntax-partial-application": "^7.16.7" | ||
@@ -28,3 +28,3 @@ }, | ||
"devDependencies": { | ||
"@babel/core": "^7.16.7", | ||
"@babel/core": "^7.17.12", | ||
"@babel/helper-plugin-test-runner": "^7.16.7" | ||
@@ -31,0 +31,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6724
86