Socket
Socket
Sign inDemoInstall

@babel/plugin-transform-for-of

Package Overview
Dependencies
59
Maintainers
4
Versions
80
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 8.0.0-alpha.4 to 8.0.0-alpha.5

8

lib/index.js
import { declare } from '@babel/helper-plugin-utils';
import { template, types } from '@babel/core';
import { skipTransparentExprWrapperNodes } from '@babel/helper-skip-transparent-expression-wrappers';

@@ -59,3 +60,3 @@ template.statement(`

var index = declare((api, options) => {
api.assertVersion(7);
api.assertVersion("8.0.0-alpha.5");
{

@@ -90,3 +91,2 @@ const {

left,
right,
await: isAwait

@@ -97,4 +97,8 @@ } = path.node;

}
const right = skipTransparentExprWrapperNodes(path.node.right);
const i = scope.generateUidIdentifier("i");
let array = scope.maybeGenerateMemoised(right, true);
if (!array && types.isIdentifier(right) && path.get("body").scope.hasOwnBinding(right.name)) {
array = scope.generateUidIdentifier("arr");
}
const inits = [types.variableDeclarator(i, types.numericLiteral(0))];

@@ -101,0 +105,0 @@ if (array) {

{
"name": "@babel/plugin-transform-for-of",
"version": "8.0.0-alpha.4",
"version": "8.0.0-alpha.5",
"description": "Compile ES2015 for...of to ES5",

@@ -20,10 +20,11 @@ "repository": {

"dependencies": {
"@babel/helper-plugin-utils": "^8.0.0-alpha.4"
"@babel/helper-plugin-utils": "^8.0.0-alpha.5",
"@babel/helper-skip-transparent-expression-wrappers": "^8.0.0-alpha.5"
},
"peerDependencies": {
"@babel/core": "^8.0.0-alpha.4"
"@babel/core": "^8.0.0-alpha.5"
},
"devDependencies": {
"@babel/core": "^8.0.0-alpha.4",
"@babel/helper-plugin-test-runner": "^8.0.0-alpha.4"
"@babel/core": "^8.0.0-alpha.5",
"@babel/helper-plugin-test-runner": "^8.0.0-alpha.5"
},

@@ -30,0 +31,0 @@ "engines": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc