@babel/plugin-proposal-object-rest-spread
Advanced tools
Comparing version 7.20.7 to 7.21.4-esm
@@ -58,3 +58,2 @@ 'use strict'; | ||
const pattern = core.types.objectPattern([property]); | ||
var ZERO_REFS = core.types.isReferenced(node, property, pattern) ? 1 : 0; | ||
@@ -123,3 +122,2 @@ } | ||
} | ||
function extractNormalizedKeys(node) { | ||
@@ -137,4 +135,3 @@ const props = node.properties; | ||
} else if (core.types.isLiteral(prop.key)) { | ||
keys.push(core.types.stringLiteral(String( | ||
prop.key.value))); | ||
keys.push(core.types.stringLiteral(String(prop.key.value))); | ||
} else { | ||
@@ -151,3 +148,2 @@ keys.push(core.types.cloneNode(prop.key)); | ||
} | ||
function replaceImpureComputedKeys(properties, scope) { | ||
@@ -176,3 +172,2 @@ const impureComputedPropertyDeclarators = []; | ||
} | ||
function createObjectRest(path, file, objRef) { | ||
@@ -251,3 +246,2 @@ const props = path.get("properties"); | ||
} | ||
let idInRest = false; | ||
@@ -297,4 +291,3 @@ const IdentifierHandler = function (path, functionScope) { | ||
} | ||
if ( | ||
shouldStoreRHSInTemporaryVariable(originalPath.node.id) && !core.types.isIdentifier(originalPath.node.init)) { | ||
if (shouldStoreRHSInTemporaryVariable(originalPath.node.id) && !core.types.isIdentifier(originalPath.node.init)) { | ||
const initRef = path.scope.generateUidIdentifierBasedOnNode(originalPath.node.init, "ref"); | ||
@@ -323,3 +316,2 @@ originalPath.insertBefore(core.types.variableDeclarator(initRef, originalPath.node.init)); | ||
}); | ||
const objectPatternPath = path.findParent(path => path.isObjectPattern()); | ||
@@ -349,3 +341,2 @@ const [impureComputedPropertyDeclarators, argument, callExpression] = createObjectRest(objectPatternPath, file, ref); | ||
} | ||
path.replaceWith(declaration.node); | ||
@@ -433,3 +424,2 @@ path.insertAfter(core.types.exportNamedDeclaration(null, specifiers)); | ||
this.file.declarations["objectSpread2"] = null; | ||
helper = file.addHelper("objectSpread"); | ||
@@ -448,3 +438,2 @@ } | ||
} | ||
if (pureGetters) { | ||
@@ -456,4 +445,3 @@ if (hadProps) { | ||
} | ||
exp = core.types.callExpression(core.types.cloneNode(helper), [exp, | ||
...(hadProps ? [core.types.objectExpression([]), obj] : [])]); | ||
exp = core.types.callExpression(core.types.cloneNode(helper), [exp, ...(hadProps ? [core.types.objectExpression([]), obj] : [])]); | ||
} | ||
@@ -460,0 +448,0 @@ for (const prop of path.node.properties) { |
{ | ||
"name": "@babel/plugin-proposal-object-rest-spread", | ||
"version": "7.20.7", | ||
"version": "7.21.4-esm", | ||
"description": "Compile object rest and spread to ES5", | ||
@@ -20,15 +20,15 @@ "repository": { | ||
"dependencies": { | ||
"@babel/compat-data": "^7.20.5", | ||
"@babel/helper-compilation-targets": "^7.20.7", | ||
"@babel/helper-plugin-utils": "^7.20.2", | ||
"@babel/compat-data": "^7.21.4-esm", | ||
"@babel/helper-compilation-targets": "^7.21.4-esm", | ||
"@babel/helper-plugin-utils": "^7.21.4-esm", | ||
"@babel/plugin-syntax-object-rest-spread": "^7.8.3", | ||
"@babel/plugin-transform-parameters": "^7.20.7" | ||
"@babel/plugin-transform-parameters": "^7.21.4-esm" | ||
}, | ||
"peerDependencies": { | ||
"@babel/core": "^7.0.0-0" | ||
"@babel/core": "^7.0.0-0 || 7.21.4-esm" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.20.7", | ||
"@babel/helper-plugin-test-runner": "^7.18.6", | ||
"@babel/parser": "^7.20.7" | ||
"@babel/core": "^7.21.4-esm", | ||
"@babel/helper-plugin-test-runner": "^7.21.4-esm", | ||
"@babel/parser": "^7.21.4-esm" | ||
}, | ||
@@ -35,0 +35,0 @@ "engines": { |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
70689
6
446
2
+ Addedelectron-to-chromium@1.4.750(transitive)
- Removedelectron-to-chromium@1.4.748(transitive)