🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

uglify-js

Package Overview
Dependencies
Maintainers
0
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

to
1.0.1

uglify-js.js

22

lib/parse-js.js

@@ -185,3 +185,2 @@ /***********************************************************************

">>>=",
"%=",
"|=",

@@ -386,3 +385,3 @@ "^=",

if (ch == ".") {
if (!has_dot)
if (!has_dot && !has_x)
return has_dot = true;

@@ -465,2 +464,10 @@ return false;

S.newline_before = text.indexOf("\n") >= 0;
// https://github.com/mishoo/UglifyJS/issues/#issue/100
if (/^@cc_on/i.test(text)) {
warn("WARNING: at line " + S.line);
warn("*** Found \"conditional comment\": " + text);
warn("*** UglifyJS DISCARDS ALL COMMENTS. This means your code might no longer work properly in Internet Explorer.");
}
return tok;

@@ -817,3 +824,3 @@ });

case "return":
if (exigent_mode && S.in_function == 0)
if (S.in_function == 0)
croak("'return' outside of function");

@@ -871,6 +878,6 @@ return as("return",

next();
if (exigent_mode && !member(name, S.labels))
if (!member(name, S.labels))
croak("Label " + name + " without matching loop or statement");
}
else if (exigent_mode && S.in_loop == 0)
else if (S.in_loop == 0)
croak(type + " not inside a loop or switch");

@@ -1298,2 +1305,4 @@ semicolon();

var warn = function() {};
/* -----[ Exports ]----- */

@@ -1314,1 +1323,4 @@

exports.is_alphanumeric_char = is_alphanumeric_char;
exports.set_logger = function(logger) {
warn = logger;
};

@@ -1,6 +0,22 @@

{"name" : "uglify-js",
"author" : "Mihai Bazon - http://github.com/mishoo",
"version" : "0.0.5",
"main" : "index.js",
"bin" : { "uglifyjs" : "./bin/uglifyjs" }
{
"name" : "uglify-js",
"author" : {
"name" : "Mihai Bazon",
"email" : "mihai.bazon@gmail.com",
"url" : "http://mihai.bazon.net/blog"
},
"version" : "1.0.1",
"main" : "./uglify-js.js",
"bin" : {
"uglifyjs" : "./bin/uglifyjs"
},
"repository": {
"type": "git",
"url": "git@github.com:mishoo/UglifyJS.git"
}
}

@@ -286,11 +286,11 @@ #! /usr/bin/env node

// flow statements
["continue;", "1 flow statement"],
["continue label;", "2 flow statement"],
["break;", "3 flow statement"],
["break somewhere;", "4 flow statement"],
["continue /* comment */ ;", "5 flow statement"],
["continue \n;", "6 flow statement"],
["return;", "7 flow statement"],
["return 0;", "8 flow statement"],
["return 0 + \n 1;", "9 flow statement"],
["while(1){ continue; }", "1 flow statement"],
["label: while(1){ continue label; }", "2 flow statement"],
["while(1){ break; }", "3 flow statement"],
["somewhere: while(1){ break somewhere; }", "4 flow statement"],
["while(1){ continue /* comment */ ; }", "5 flow statement"],
["while(1){ continue \n; }", "6 flow statement"],
["(function(){ return; })()", "7 flow statement"],
["(function(){ return 0; })()", "8 flow statement"],
["(function(){ return 0 + \n 1; })()", "9 flow statement"],
// with

@@ -332,12 +332,15 @@ ["with (e) s;", "with statement"],

// asi
["continue \n foo;", "1 asi"],
["break \n foo;", "2 asi"],
["return\nfoo;", "3 asi"],
["foo: while(1){ continue \n foo; }", "1 asi"],
["foo: while(1){ break \n foo; }", "2 asi"],
["(function(){ return\nfoo; })()", "3 asi"],
["var x; { 1 \n 2 } 3", "4 asi"],
["ab /* hi */\ncd", "5 asi"],
["ab/*\n*/cd", "6 asi (multi line multilinecomment counts as eol)"],
["continue /* wtf \n busta */ foo;", "7 asi illegal with multi line comment"],
["foo: while(1){ continue /* wtf \n busta */ foo; }", "7 asi illegal with multi line comment"],
["function f() { s }", "8 asi"],
["function f() { return }", "9 asi"],
// use strict
// XXX: some of these should actually fail?
// no support for "use strict" yet...
['"use strict"; \'bla\'\n; foo;', "1 directive"],

@@ -344,0 +347,0 @@ ['(function() { "use strict"; \'bla\';\n foo; });', "2 directive"],

Sorry, the diff of this file is not supported yet

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 not supported yet

Sorry, the diff of this file is not supported yet