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.2.4 to 2.2.5

29

lib/output.js

@@ -378,2 +378,12 @@ /***********************************************************************

var comments = start.comments_before;
// XXX: ugly fix for https://github.com/mishoo/UglifyJS2/issues/112
// if this node is `return` or `throw`, we cannot allow comments before
// the returned or thrown value.
if (self instanceof AST_Exit &&
self.value && self.value.start.comments_before.length > 0) {
comments = (comments || []).concat(self.value.start.comments_before);
self.value.start.comments_before = [];
}
if (c.test) {

@@ -503,3 +513,3 @@ comments = comments.filter(function(comment){

if (no_constructor_parens(this, output)
&& (p instanceof AST_Dot // (new Date).getTime()
&& (p instanceof AST_PropAccess // (new Date).getTime(), (new Date)["getTime"]()
|| p instanceof AST_Call && p.expression === this)) // (new foo)(bar)

@@ -509,2 +519,14 @@ return true;

PARENS(AST_Number, function(output){
var p = output.parent();
if (this.getValue() < 0 && p instanceof AST_PropAccess && p.expression === this)
return true;
});
PARENS(AST_NaN, function(output){
var p = output.parent();
if (p instanceof AST_PropAccess && p.expression === this)
return true;
});
function assign_and_conditional_paren_rules(output) {

@@ -938,3 +960,3 @@ var p = output.parent();

expr.print(output);
if (expr instanceof AST_Number) {
if (expr instanceof AST_Number && expr.getValue() >= 0) {
if (!/[xa-f.]/i.test(output.last())) {

@@ -1066,2 +1088,5 @@ output.print(".");

output.print(str);
var p = output.parent();
if (p instanceof AST_Binary && /^in/.test(p.operator) && p.left === self)
output.print(" ");
});

@@ -1068,0 +1093,0 @@

2

lib/scope.js

@@ -144,3 +144,3 @@ /***********************************************************************

def.constant = node instanceof AST_SymbolConst;
def = tw.parent();
def.init = tw.parent().value;
}

@@ -147,0 +147,0 @@ else if (node instanceof AST_SymbolCatch) {

@@ -6,3 +6,3 @@ {

"main": "tools/node.js",
"version": "2.2.4",
"version": "2.2.5",
"engines": { "node" : ">=0.4.0" },

@@ -9,0 +9,0 @@ "maintainers": [{

Sorry, the diff of this file is not supported yet

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