You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@babel/plugin-transform-destructuring

Package Overview
Dependencies
Maintainers
4
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-transform-destructuring - npm Package Compare versions

Comparing version

to
7.28.0

10

lib/index.js

@@ -461,5 +461,5 @@ 'use strict';

function variableDeclarationHasPattern(node) {
function variableDeclarationHasDestructuringPattern(node) {
for (const declar of node.declarations) {
if (core.types.isPattern(declar.id)) {
if (core.types.isPattern(declar.id) && declar.id.type !== "VoidPattern") {
return true;

@@ -485,3 +485,3 @@ }

if (!declaration.isVariableDeclaration()) return;
if (!variableDeclarationHasPattern(declaration.node)) return;
if (!variableDeclarationHasDestructuringPattern(declaration.node)) return;
{

@@ -515,3 +515,3 @@ var _path$splitExportDecl;

const pattern = left.declarations[0].id;
if (!core.types.isPattern(pattern)) return;
if (!core.types.isPattern(pattern) || pattern.type === "VoidPattern") return;
const key = scope.generateUidIdentifier("ref");

@@ -568,3 +568,3 @@ node.left = core.types.variableDeclaration(left.kind, [core.types.variableDeclarator(key, null)]);

if (!parent || !path.container) return;
if (!variableDeclarationHasPattern(node)) return;
if (!variableDeclarationHasDestructuringPattern(node)) return;
convertVariableDeclaration(path, name => state.addHelper(name), arrayLikeIsIterable, iterableIsArray, objectRestNoSymbols, useBuiltIns);

@@ -571,0 +571,0 @@ }

{
"name": "@babel/plugin-transform-destructuring",
"version": "7.27.7",
"version": "7.28.0",
"description": "Compile ES2015 destructuring to ES5",

@@ -21,3 +21,3 @@ "repository": {

"@babel/helper-plugin-utils": "^7.27.1",
"@babel/traverse": "^7.27.7"
"@babel/traverse": "^7.28.0"
},

@@ -28,3 +28,3 @@ "peerDependencies": {

"devDependencies": {
"@babel/core": "^7.27.7",
"@babel/core": "^7.28.0",
"@babel/helper-plugin-test-runner": "^7.27.1"

@@ -31,0 +31,0 @@ },

Sorry, the diff of this file is not supported yet