@babel/plugin-proposal-object-rest-spread
Advanced tools
Comparing version 7.0.0-beta.52 to 7.0.0-beta.53
@@ -129,2 +129,13 @@ "use strict"; | ||
function removeUnusedExcludedKeys(path) { | ||
const bindings = path.getOuterBindingIdentifierPaths(); | ||
Object.keys(bindings).forEach(bindingName => { | ||
if (path.scope.getBinding(bindingName).references > 1) { | ||
return; | ||
} | ||
bindings[bindingName].parentPath.remove(); | ||
}); | ||
} | ||
function createObjectSpread(path, file, objRef) { | ||
@@ -157,3 +168,3 @@ const props = path.get("properties"); | ||
return [impureComputedPropertyDeclarators, restElement.argument, _core().types.callExpression(file.addHelper("objectWithoutProperties"), [_core().types.cloneNode(objRef), keyExpression])]; | ||
return [impureComputedPropertyDeclarators, restElement.argument, _core().types.callExpression(file.addHelper(`objectWithoutProperties${loose ? "Loose" : ""}`), [_core().types.cloneNode(objRef), keyExpression])]; | ||
} | ||
@@ -237,2 +248,6 @@ | ||
if (loose) { | ||
removeUnusedExcludedKeys(objectPatternPath); | ||
} | ||
_core().types.assertIdentifier(argument); | ||
@@ -239,0 +254,0 @@ |
{ | ||
"name": "@babel/plugin-proposal-object-rest-spread", | ||
"version": "7.0.0-beta.52", | ||
"version": "7.0.0-beta.53", | ||
"description": "Compile object rest and spread to ES5", | ||
@@ -12,4 +12,4 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-object-rest-spread", | ||
"dependencies": { | ||
"@babel/helper-plugin-utils": "7.0.0-beta.52", | ||
"@babel/plugin-syntax-object-rest-spread": "7.0.0-beta.52" | ||
"@babel/helper-plugin-utils": "7.0.0-beta.53", | ||
"@babel/plugin-syntax-object-rest-spread": "7.0.0-beta.53" | ||
}, | ||
@@ -20,5 +20,5 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@babel/core": "7.0.0-beta.52", | ||
"@babel/helper-plugin-test-runner": "7.0.0-beta.52" | ||
"@babel/core": "7.0.0-beta.53", | ||
"@babel/helper-plugin-test-runner": "7.0.0-beta.53" | ||
} | ||
} |
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
13344
292
+ Added@babel/helper-plugin-utils@7.0.0-beta.53(transitive)
+ Added@babel/plugin-syntax-object-rest-spread@7.0.0-beta.53(transitive)
- Removed@babel/helper-plugin-utils@7.0.0-beta.52(transitive)
- Removed@babel/plugin-syntax-object-rest-spread@7.0.0-beta.52(transitive)
Updated@babel/plugin-syntax-object-rest-spread@7.0.0-beta.53