@babel/plugin-transform-computed-properties
Advanced tools
Comparing version 7.0.0-beta.38 to 7.0.0-beta.39
@@ -25,3 +25,3 @@ "use strict"; | ||
} else { | ||
body.push(_core.types.expressionStatement(_core.types.assignmentExpression("=", _core.types.memberExpression(objId, prop.key, prop.computed || _core.types.isLiteral(prop.key)), getValue(prop)))); | ||
body.push(_core.types.expressionStatement(_core.types.assignmentExpression("=", _core.types.memberExpression(_core.types.cloneNode(objId), prop.key, prop.computed || _core.types.isLiteral(prop.key)), getValue(prop)))); | ||
} | ||
@@ -44,3 +44,3 @@ } | ||
MUTATOR_MAP_REF: getMutatorId(), | ||
KEY: key, | ||
KEY: _core.types.cloneNode(key), | ||
VALUE: getValue(prop), | ||
@@ -69,3 +69,3 @@ KIND: _core.types.identifier(prop.kind) | ||
} else { | ||
pushAssign(info.objId, _prop, info.body); | ||
pushAssign(_core.types.cloneNode(info.objId), _prop, info.body); | ||
} | ||
@@ -107,3 +107,3 @@ } | ||
} else { | ||
body.push(_core.types.expressionStatement(_core.types.callExpression(state.addHelper("defineProperty"), [objId, key, getValue(_prop2)]))); | ||
body.push(_core.types.expressionStatement(_core.types.callExpression(state.addHelper("defineProperty"), [_core.types.cloneNode(objId), key, getValue(_prop2)]))); | ||
} | ||
@@ -174,3 +174,3 @@ } | ||
return mutatorRef; | ||
return _core.types.cloneNode(mutatorRef); | ||
}; | ||
@@ -189,3 +189,3 @@ | ||
if (mutatorRef) { | ||
body.push(_core.types.expressionStatement(_core.types.callExpression(state.addHelper("defineEnumerableProperties"), [objId, mutatorRef]))); | ||
body.push(_core.types.expressionStatement(_core.types.callExpression(state.addHelper("defineEnumerableProperties"), [_core.types.cloneNode(objId), _core.types.cloneNode(mutatorRef)]))); | ||
} | ||
@@ -196,3 +196,3 @@ | ||
} else { | ||
body.push(_core.types.expressionStatement(objId)); | ||
body.push(_core.types.expressionStatement(_core.types.cloneNode(objId))); | ||
path.replaceWithMultiple(body); | ||
@@ -199,0 +199,0 @@ } |
{ | ||
"name": "@babel/plugin-transform-computed-properties", | ||
"version": "7.0.0-beta.38", | ||
"version": "7.0.0-beta.39", | ||
"description": "Compile ES2015 computed properties to ES5", | ||
@@ -12,8 +12,8 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-computed-properties", | ||
"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" | ||
} | ||
} |
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
8898