Comparing version 3.8.1 to 3.8.2
@@ -161,4 +161,3 @@ /*********************************************************************** | ||
body._walk(visitor); | ||
} | ||
else for (var i = 0, len = body.length; i < len; i++) { | ||
} else for (var i = 0, len = body.length; i < len; i++) { | ||
body[i]._walk(visitor); | ||
@@ -165,0 +164,0 @@ } |
@@ -162,14 +162,10 @@ /*********************************************************************** | ||
add(node.key); | ||
} | ||
else if (node instanceof AST_ObjectProperty) { | ||
} else if (node instanceof AST_ObjectProperty) { | ||
// setter or getter, since KeyVal is handled above | ||
add(node.key.name); | ||
} | ||
else if (node instanceof AST_Dot) { | ||
} else if (node instanceof AST_Dot) { | ||
add(node.property); | ||
} | ||
else if (node instanceof AST_Sub) { | ||
} else if (node instanceof AST_Sub) { | ||
addStrings(node.property, add); | ||
} | ||
else if (node instanceof AST_Call | ||
} else if (node instanceof AST_Call | ||
&& node.expression.print_to_string() == "Object.defineProperty") { | ||
@@ -184,14 +180,10 @@ addStrings(node.args[1], add); | ||
node.key = mangle(node.key); | ||
} | ||
else if (node instanceof AST_ObjectProperty) { | ||
} else if (node instanceof AST_ObjectProperty) { | ||
// setter or getter | ||
node.key.name = mangle(node.key.name); | ||
} | ||
else if (node instanceof AST_Dot) { | ||
} else if (node instanceof AST_Dot) { | ||
node.property = mangle(node.property); | ||
} | ||
else if (!options.keep_quoted && node instanceof AST_Sub) { | ||
} else if (!options.keep_quoted && node instanceof AST_Sub) { | ||
node.property = mangleStrings(node.property); | ||
} | ||
else if (node instanceof AST_Call | ||
} else if (node instanceof AST_Call | ||
&& node.expression.print_to_string() == "Object.defineProperty") { | ||
@@ -263,7 +255,5 @@ node.args[1] = mangleStrings(node.args[1]); | ||
node.expressions[last] = mangleStrings(node.expressions[last]); | ||
} | ||
else if (node instanceof AST_String) { | ||
} else if (node instanceof AST_String) { | ||
node.value = mangle(node.value); | ||
} | ||
else if (node instanceof AST_Conditional) { | ||
} else if (node instanceof AST_Conditional) { | ||
node.consequent = mangleStrings(node.consequent); | ||
@@ -270,0 +260,0 @@ node.alternative = mangleStrings(node.alternative); |
@@ -83,4 +83,3 @@ /*********************************************************************** | ||
this.mangled_name = cache.get(this.name); | ||
} | ||
else if (!this.mangled_name && !this.unmangleable(options)) { | ||
} else if (!this.mangled_name && !this.unmangleable(options)) { | ||
var s = this.scope; | ||
@@ -181,4 +180,3 @@ var sym = this.orig[0]; | ||
defun.def_function(node, node.name == "arguments" ? undefined : defun); | ||
} | ||
else if (node instanceof AST_SymbolDefun) { | ||
} else if (node instanceof AST_SymbolDefun) { | ||
// Careful here, the scope where this should be defined is | ||
@@ -190,15 +188,11 @@ // the parent scope. The reason is that we enter a new | ||
mark_export((node.scope = defun.parent_scope.get_defun_scope()).def_function(node, defun), 1); | ||
} | ||
else if (node instanceof AST_SymbolClass) { | ||
} else if (node instanceof AST_SymbolClass) { | ||
mark_export(defun.def_variable(node, defun), 1); | ||
} | ||
else if (node instanceof AST_SymbolImport) { | ||
} else if (node instanceof AST_SymbolImport) { | ||
scope.def_variable(node); | ||
} | ||
else if (node instanceof AST_SymbolDefClass) { | ||
} else if (node instanceof AST_SymbolDefClass) { | ||
// This deals with the name of the class being available | ||
// inside the class. | ||
mark_export((node.scope = defun.parent_scope).def_function(node, defun), 1); | ||
} | ||
else if (node instanceof AST_SymbolVar | ||
} else if (node instanceof AST_SymbolVar | ||
|| node instanceof AST_SymbolLet | ||
@@ -237,7 +231,5 @@ || node instanceof AST_SymbolConst) { | ||
} | ||
} | ||
else if (node instanceof AST_SymbolCatch) { | ||
} else if (node instanceof AST_SymbolCatch) { | ||
scope.def_variable(node).defun = defun; | ||
} | ||
else if (node instanceof AST_LabelRef) { | ||
} else if (node instanceof AST_LabelRef) { | ||
var sym = labels.get(node.name); | ||
@@ -244,0 +236,0 @@ if (!sym) throw new Error(string_template("Undefined label {name} [{line},{col}]", { |
@@ -138,4 +138,3 @@ /*********************************************************************** | ||
} | ||
} | ||
else if (val !== skip) { | ||
} else if (val !== skip) { | ||
if (val instanceof Splice) { | ||
@@ -157,4 +156,3 @@ ret.push.apply(ret, backwards ? val.v.slice().reverse() : val.v); | ||
} | ||
} | ||
else { | ||
} else { | ||
for (i in a) if (HOP(a, i)) if (doit()) break; | ||
@@ -341,4 +339,4 @@ } | ||
(p instanceof AST_Binary && p.left === node ) || | ||
(p instanceof AST_UnaryPostfix && p.expression === node )) | ||
{ | ||
(p instanceof AST_UnaryPostfix && p.expression === node ) | ||
) { | ||
node = p; | ||
@@ -345,0 +343,0 @@ } else { |
@@ -7,3 +7,3 @@ { | ||
"license": "BSD-2-Clause", | ||
"version": "3.8.1", | ||
"version": "3.8.2", | ||
"engines": { | ||
@@ -31,3 +31,3 @@ "node": ">=0.8.0" | ||
"dependencies": { | ||
"commander": "~2.16.0", | ||
"commander": "~2.17.1", | ||
"source-map": "~0.6.1", | ||
@@ -71,2 +71,9 @@ "source-map-support": "~0.5.6" | ||
"rules": { | ||
"brace-style": [ | ||
"error", | ||
"1tbs", | ||
{ | ||
"allowSingleLine": true | ||
} | ||
], | ||
"quotes": [ | ||
@@ -73,0 +80,0 @@ "error", |
@@ -10,3 +10,3 @@ terser | ||
`uglify-es` is no longer maintained and `uglify-js` does not support ES6+. | ||
`uglify-es` is [no longer maintained](https://github.com/mishoo/UglifyJS2/issues/3156#issuecomment-392943058) and `uglify-js` does not support ES6+. | ||
@@ -13,0 +13,0 @@ **`terser`** is a fork of `uglify-es` that retains API and CLI compatibility |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
2343689
32451
+ Addedcommander@2.17.1(transitive)
- Removedcommander@2.16.0(transitive)
Updatedcommander@~2.17.1