babel-plugin-transform-es2015-computed-properties
Advanced tools
Comparing version 7.0.0-alpha.19 to 7.0.0-alpha.20
@@ -60,8 +60,8 @@ "use strict"; | ||
var prop = _ref3; | ||
var _prop = _ref3; | ||
if (prop.kind === "get" || prop.kind === "set") { | ||
pushMutatorDefine(info, prop); | ||
if (_prop.kind === "get" || _prop.kind === "set") { | ||
pushMutatorDefine(info, _prop); | ||
} else { | ||
pushAssign(info.objId, prop, info.body); | ||
pushAssign(info.objId, _prop, info.body); | ||
} | ||
@@ -89,16 +89,16 @@ } | ||
var prop = _ref4; | ||
var key = t.toComputedKey(prop); | ||
var _prop2 = _ref4; | ||
var key = t.toComputedKey(_prop2); | ||
if (prop.kind === "get" || prop.kind === "set") { | ||
pushMutatorDefine(info, prop); | ||
if (_prop2.kind === "get" || _prop2.kind === "set") { | ||
pushMutatorDefine(info, _prop2); | ||
} else if (t.isStringLiteral(key, { | ||
value: "__proto__" | ||
})) { | ||
pushAssign(objId, prop, body); | ||
pushAssign(objId, _prop2, body); | ||
} else { | ||
if (computedProps.length === 1) { | ||
return t.callExpression(state.addHelper("defineProperty"), [info.initPropExpression, key, getValue(prop)]); | ||
return t.callExpression(state.addHelper("defineProperty"), [info.initPropExpression, key, getValue(_prop2)]); | ||
} else { | ||
body.push(t.expressionStatement(t.callExpression(state.addHelper("defineProperty"), [objId, key, getValue(prop)]))); | ||
body.push(t.expressionStatement(t.callExpression(state.addHelper("defineProperty"), [objId, key, getValue(_prop2)]))); | ||
} | ||
@@ -142,5 +142,5 @@ } | ||
var _prop = _ref5; | ||
var _prop4 = _ref5; | ||
if (_prop.computed) { | ||
if (_prop4.computed) { | ||
foundComputed = true; | ||
@@ -150,5 +150,5 @@ } | ||
if (foundComputed) { | ||
computedProps.push(_prop); | ||
computedProps.push(_prop4); | ||
} else { | ||
initProps.push(_prop); | ||
initProps.push(_prop4); | ||
} | ||
@@ -155,0 +155,0 @@ } |
{ | ||
"name": "babel-plugin-transform-es2015-computed-properties", | ||
"version": "7.0.0-alpha.19", | ||
"version": "7.0.0-alpha.20", | ||
"description": "Compile ES2015 computed properties to ES5", | ||
@@ -12,7 +12,7 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-computed-properties", | ||
"dependencies": { | ||
"babel-template": "7.0.0-alpha.19" | ||
"babel-template": "7.0.0-alpha.20" | ||
}, | ||
"devDependencies": { | ||
"babel-helper-plugin-test-runner": "7.0.0-alpha.19" | ||
"babel-helper-plugin-test-runner": "7.0.0-alpha.20" | ||
} | ||
} |
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
8377
+ Addedbabel-code-frame@7.0.0-alpha.20(transitive)
+ Addedbabel-helper-function-name@7.0.0-alpha.20(transitive)
+ Addedbabel-helper-get-function-arity@7.0.0-alpha.20(transitive)
+ Addedbabel-messages@7.0.0-alpha.20(transitive)
+ Addedbabel-template@7.0.0-alpha.20(transitive)
+ Addedbabel-traverse@7.0.0-alpha.20(transitive)
+ Addedbabel-types@7.0.0-alpha.20(transitive)
+ Addedbabylon@7.0.0-beta.22(transitive)
- Removedbabel-code-frame@7.0.0-alpha.19(transitive)
- Removedbabel-helper-function-name@7.0.0-alpha.19(transitive)
- Removedbabel-helper-get-function-arity@7.0.0-alpha.19(transitive)
- Removedbabel-messages@7.0.0-alpha.19(transitive)
- Removedbabel-template@7.0.0-alpha.19(transitive)
- Removedbabel-traverse@7.0.0-alpha.19(transitive)
- Removedbabel-types@7.0.0-alpha.19(transitive)
- Removedbabylon@7.0.0-beta.18(transitive)