@babel/plugin-proposal-object-rest-spread
Advanced tools
Comparing version 7.0.0-beta.41 to 7.0.0-beta.42
@@ -25,2 +25,6 @@ "use strict"; | ||
function getExtendsHelper(file) { | ||
return useBuiltIns ? _core.types.memberExpression(_core.types.identifier("Object"), _core.types.identifier("assign")) : file.addHelper("extends"); | ||
} | ||
function hasRestElement(path) { | ||
@@ -153,2 +157,6 @@ var foundRestElement = false; | ||
if (keys.length === 0) { | ||
return [impureComputedPropertyDeclarators, restElement.argument, _core.types.callExpression(getExtendsHelper(file), [_core.types.objectExpression([]), _core.types.cloneNode(objRef)])]; | ||
} | ||
var keyExpression; | ||
@@ -360,3 +368,3 @@ | ||
if (loose) { | ||
helper = useBuiltIns ? _core.types.memberExpression(_core.types.identifier("Object"), _core.types.identifier("assign")) : file.addHelper("extends"); | ||
helper = getExtendsHelper(file); | ||
} else { | ||
@@ -363,0 +371,0 @@ helper = file.addHelper("objectSpread"); |
{ | ||
"name": "@babel/plugin-proposal-object-rest-spread", | ||
"version": "7.0.0-beta.41", | ||
"version": "7.0.0-beta.42", | ||
"description": "Compile object rest and spread to ES5", | ||
@@ -12,12 +12,12 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-proposal-object-rest-spread", | ||
"dependencies": { | ||
"@babel/helper-plugin-utils": "7.0.0-beta.41", | ||
"@babel/plugin-syntax-object-rest-spread": "7.0.0-beta.41" | ||
"@babel/helper-plugin-utils": "7.0.0-beta.42", | ||
"@babel/plugin-syntax-object-rest-spread": "7.0.0-beta.42" | ||
}, | ||
"peerDependencies": { | ||
"@babel/core": "7.0.0-beta.41" | ||
"@babel/core": "7.0.0-beta.42" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "7.0.0-beta.41", | ||
"@babel/helper-plugin-test-runner": "7.0.0-beta.41" | ||
"@babel/core": "7.0.0-beta.42", | ||
"@babel/helper-plugin-test-runner": "7.0.0-beta.42" | ||
} | ||
} |
@@ -74,5 +74,4 @@ # @babel/plugin-proposal-object-rest-spread | ||
Enabling this option will use `Object.assign` directly instead of the Babel's `extends` helper. Keep in mind that this flag only applies when `loose: true`. | ||
Enabling this option will use `Object.assign` directly instead of the Babel's `extends` helper. | ||
##### Example | ||
@@ -79,0 +78,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
16672
301
106
+ Added@babel/code-frame@7.0.0-beta.42(transitive)
+ Added@babel/core@7.0.0-beta.42(transitive)
+ Added@babel/generator@7.0.0-beta.42(transitive)
+ Added@babel/helper-function-name@7.0.0-beta.42(transitive)
+ Added@babel/helper-get-function-arity@7.0.0-beta.42(transitive)
+ Added@babel/helper-plugin-utils@7.0.0-beta.42(transitive)
+ Added@babel/helper-split-export-declaration@7.0.0-beta.42(transitive)
+ Added@babel/helpers@7.0.0-beta.42(transitive)
+ Added@babel/highlight@7.0.0-beta.42(transitive)
+ Added@babel/plugin-syntax-object-rest-spread@7.0.0-beta.42(transitive)
+ Added@babel/template@7.0.0-beta.42(transitive)
+ Added@babel/traverse@7.0.0-beta.42(transitive)
+ Added@babel/types@7.0.0-beta.42(transitive)
+ Addedbabylon@7.0.0-beta.42(transitive)
- Removed@babel/code-frame@7.0.0-beta.41(transitive)
- Removed@babel/core@7.0.0-beta.41(transitive)
- Removed@babel/generator@7.0.0-beta.41(transitive)
- Removed@babel/helper-function-name@7.0.0-beta.41(transitive)
- Removed@babel/helper-get-function-arity@7.0.0-beta.41(transitive)
- Removed@babel/helper-plugin-utils@7.0.0-beta.41(transitive)
- Removed@babel/helper-split-export-declaration@7.0.0-beta.41(transitive)
- Removed@babel/helpers@7.0.0-beta.41(transitive)
- Removed@babel/highlight@7.0.0-beta.41(transitive)
- Removed@babel/plugin-syntax-object-rest-spread@7.0.0-beta.41(transitive)
- Removed@babel/template@7.0.0-beta.41(transitive)
- Removed@babel/traverse@7.0.0-beta.41(transitive)
- Removed@babel/types@7.0.0-beta.41(transitive)
- Removedbabylon@7.0.0-beta.41(transitive)
Updated@babel/plugin-syntax-object-rest-spread@7.0.0-beta.42