Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

regenerator-transform

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

regenerator-transform - npm Package Compare versions

Comparing version 0.13.1 to 0.13.2

15

lib/emit.js

@@ -896,4 +896,17 @@ "use strict";

case "AssignmentExpression":
return finish(t.assignmentExpression(expr.operator, self.explodeExpression(path.get("left")), self.explodeExpression(path.get("right"))));
var lhs = self.explodeExpression(path.get("left"));
var temp = self.emitAssign(self.makeTempVar(), lhs); // For example,
//
// x += yield y
//
// becomes
//
// context.t0 = x
// x = context.t0 += yield y
//
// so that the left-hand side expression is read before the yield.
// Fixes https://github.com/facebook/regenerator/issues/345.
return finish(t.assignmentExpression("=", t.cloneDeep(lhs), t.assignmentExpression(expr.operator, t.cloneDeep(temp), self.explodeExpression(path.get("right")))));
case "UpdateExpression":

@@ -900,0 +913,0 @@ return finish(t.updateExpression(expr.operator, self.explodeExpression(path.get("argument")), expr.prefix));

2

package.json

@@ -5,3 +5,3 @@ {

"description": "Explode async and generator functions into a state machine.",
"version": "0.13.1",
"version": "0.13.2",
"main": "lib/index.js",

@@ -8,0 +8,0 @@ "keywords": [

@@ -1172,6 +1172,25 @@ /**

case "AssignmentExpression":
const lhs = self.explodeExpression(path.get("left"));
const temp = self.emitAssign(self.makeTempVar(), lhs);
// For example,
//
// x += yield y
//
// becomes
//
// context.t0 = x
// x = context.t0 += yield y
//
// so that the left-hand side expression is read before the yield.
// Fixes https://github.com/facebook/regenerator/issues/345.
return finish(t.assignmentExpression(
expr.operator,
self.explodeExpression(path.get("left")),
self.explodeExpression(path.get("right"))
"=",
t.cloneDeep(lhs),
t.assignmentExpression(
expr.operator,
t.cloneDeep(temp),
self.explodeExpression(path.get("right"))
)
));

@@ -1178,0 +1197,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc