babel-plugin-closure-elimination
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -32,3 +32,3 @@ 'use strict'; | ||
// direct references that we need to track to hoist this to the highest scope we can | ||
if (path.isReferenced()) { | ||
if (path.isReferenced() || path.parent.type == 'AssignmentExpression') { | ||
var bindingInfo = scope.getBinding(node.name); | ||
@@ -35,0 +35,0 @@ |
{ | ||
"name": "babel-plugin-closure-elimination", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Removes closures from your JavaScript in the name of performance.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -18,3 +18,3 @@ /** | ||
// direct references that we need to track to hoist this to the highest scope we can | ||
if (path.isReferenced()) { | ||
if (path.isReferenced() || path.parent.type == 'AssignmentExpression') { | ||
const bindingInfo = scope.getBinding(node.name); | ||
@@ -21,0 +21,0 @@ |
@@ -133,3 +133,6 @@ import Plugin from '../src'; | ||
eliminate("create-class", 1); | ||
eliminate("assign-expression", 3, [ 3, 2, "yo", 2, 1 ]); | ||
eliminate("assign-expression-and-referenced", 0, [ 1, [ 1, 1 ], [ 123 ] ]); | ||
eliminate("possible-scope-hoisting", 0/*TODO bar may be hoisted at 1 level*/, [1]); | ||
}); | ||
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
193587
3623
1