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

uglify-js

Package Overview
Dependencies
Maintainers
3
Versions
288
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uglify-js - npm Package Compare versions

Comparing version 2.8.18 to 2.8.19

45

lib/output.js

@@ -595,2 +595,11 @@ /***********************************************************************

PARENS([ AST_Infinity, AST_NaN ], function(output){
var p = output.parent();
return p instanceof AST_PropAccess && p.expression === this
|| p instanceof AST_Call && p.expression === this
|| p instanceof AST_Unary && p.operator != "+" && p.operator != "-"
|| p instanceof AST_Binary && p.right === this
&& (p.operator == "/" || p.operator == "%");
});
PARENS(AST_Seq, function(output){

@@ -964,20 +973,20 @@ var p = output.parent();

output.space();
if (self.body.length > 0) output.with_block(function(){
self.body.forEach(function(stmt, i){
if (i) output.newline();
var last = self.body.length - 1;
if (last < 0) output.print("{}");
else output.with_block(function(){
self.body.forEach(function(branch, i){
output.indent(true);
stmt.print(output);
branch.print(output);
if (i < last && branch.body.length > 0)
output.newline();
});
});
else output.print("{}");
});
AST_SwitchBranch.DEFMETHOD("_do_print_body", function(output){
if (this.body.length > 0) {
output.newline();
this.body.forEach(function(stmt){
output.indent();
stmt.print(output);
output.newline();
this.body.forEach(function(stmt){
output.indent();
stmt.print(output);
output.newline();
});
}
});
});

@@ -1259,6 +1268,14 @@ DEFPRINT(AST_Default, function(self, output){

DEFPRINT(AST_Infinity, function(self, output){
output.print("Infinity");
output.print("1");
output.space();
output.print("/");
output.space();
output.print("0");
});
DEFPRINT(AST_NaN, function(self, output){
output.print("NaN");
output.print("0");
output.space();
output.print("/");
output.space();
output.print("0");
});

@@ -1265,0 +1282,0 @@ DEFPRINT(AST_This, function(self, output){

@@ -82,5 +82,3 @@ /***********************************************************************

var def;
if (options.screw_ie8
&& sym instanceof AST_SymbolCatch
&& (def = s.parent_scope.find_variable(sym))) {
if (this.defun && (def = this.defun.variables.get(this.name))) {
this.mangled_name = def.mangled_name || def.name;

@@ -175,3 +173,3 @@ } else

else if (node instanceof AST_SymbolCatch) {
scope.def_variable(node);
scope.def_variable(node).defun = defun;
}

@@ -232,3 +230,3 @@ else if (node instanceof AST_LabelRef) {

var refs = node.thedef.references;
var scope = node.thedef.scope.parent_scope;
var scope = node.thedef.defun;
var def = scope.find_variable(name) || self.globals.get(name) || scope.def_variable(node);

@@ -235,0 +233,0 @@ refs.forEach(function(ref) {

@@ -7,3 +7,3 @@ {

"license": "BSD-2-Clause",
"version": "2.8.18",
"version": "2.8.19",
"engines": {

@@ -10,0 +10,0 @@ "node": ">=0.8.0"

Sorry, the diff of this file is too big to display

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