Skip to content

Commit 0f638cf

Browse files
committed
Update uglify-js to v2.8.3.
1 parent 463d4d3 commit 0f638cf

39 files changed

+45
-45
lines changed

Gruntfile.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -385,13 +385,13 @@ module.exports = function(grunt) {
385385
},
386386
beautify_Object: {
387387
files: {
388-
'tmp/beautify.js': ['test/fixtures/src/localization.js', 'test/fixtures/src/simple.js']
388+
'tmp/beautify.js': ['test/fixtures/src/simple.js']
389389
},
390390
options: {
391391
beautify: {
392392
ascii_only: true,
393393
indent_start: 2,
394-
max_line_len: 40
394+
max_line_len: 55
395395
}
396396
}
397397
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"chalk": "^1.0.0",
2020
"maxmin": "^1.1.0",
2121
"object.assign": "^4.0.4",
22-
"uglify-js": "~2.7.0",
22+
"uglify-js": "~2.8.3",
2323
"uri-path": "^1.0.0"
2424
},
2525
"devDependencies": {

tasks/lib/uglify.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ exports.init = function(grunt) {
9898
options.compress.screw_ie8 = false;
9999
}
100100
var compressor = UglifyJS.Compressor(options.compress);
101-
topLevel = topLevel.transform(compressor);
101+
topLevel = compressor.compress(topLevel);
102102

103103
// Need to figure out scope again after source being altered
104104
if (options.expression === false) {

test/fixtures/expected/beautify.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
function longFunctionC(a,b){return longNameA+longNameB+a+b;
2-
}var set=["This is a random set of ch\u03b1racters and strings.","\u8fd9\u662f\u4e00\u7ec4\u968f\u673a\u5b57\u7b26\u548c\u5b57\u7b26\u4e32\u3002","\u042d\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0438 \u0441\u0442\u0440\u043e\u043a","\u0426\xe9 \u0432\u0438\u043f\u0430\u0434\u043a\u043e\u0432\u0438\u0439 \u043d\u0430\u0431\u0456\u0440 \u0441\u0438\u043c\u0432\u043e\u043b\u0456\u0432 \u0442\u0430 \u0440\u044f\u0434\u043a\u0456\u0432"],answer=set[Math.floor(Math.random()*set.length)],longNameA=1,longNameB=2,result=longFunctionC(3,4);
1+
function longFunctionC(a,b){return 3+a+b}
2+
var longNameA=1,longNameB=2,result=longFunctionC(3,4);

test/fixtures/expected/compress.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
function longFunctionC(a,b){return longNameA+longNameB+a+b}var longNameA=1,longNameB=2,result=longFunctionC(3,4);
1+
function longFunctionC(a,b){return 3+a+b}var longNameA=1,longNameB=2,result=longFunctionC(3,4);
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
function longFunctionC(a,b){return longNameA+longNameB+a+b}var longNameA=1,longNameB=2,result=longFunctionC(3,4);
1+
function longFunctionC(a,b){return 3+a+b}var longNameA=1,longNameB=2,result=longFunctionC(3,4);
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// banner without sourcemap
2-
function longFunctionC(a,b){return longNameA+longNameB+a+b}var longNameA=1,longNameB=2,result=longFunctionC(3,4);
2+
function longFunctionC(a,b){return 3+a+b}var longNameA=1,longNameB=2,result=longFunctionC(3,4);

test/fixtures/expected/compress_mangle_beautify.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function longFunctionC(a, b) {
2-
return longNameA + longNameB + a + b;
2+
return 3 + a + b;
33
}
44

55
var longNameA = 1, longNameB = 2, result = longFunctionC(3, 4);

test/fixtures/expected/compress_mangle_except.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/fixtures/expected/deep/directory/location/source_map.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/fixtures/expected/exportAll.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/fixtures/expected/mangle.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
function longFunctionC(a,b){return longNameA+longNameB+a+b}var longNameA=1,longNameB=2,result=longFunctionC(3,4);
1+
function longFunctionC(a,b){return 3+a+b}var longNameA=1,longNameB=2,result=longFunctionC(3,4);
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
var d=10;a.a(d);
1+
var d=10;a.a(10);

test/fixtures/expected/maxLineLen.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
void function(){var cubes,list,math,number,opposite,race,square;number=42,opposite=!0,opposite&&(number=-42),
2-
square=function(x){return x*x},list=[1,2,3,4,5],math={root:Math.sqrt,square:square,cube:function(x){return x*square(x);
3-
}},race=function(winner,runners){return runners=2<=arguments.length?[].slice.call(arguments,1):[],print(winner,runners);
4-
},"undefined"!=typeof elvis&&null!=elvis&&alert("I knew it!"),cubes=function(accum$){for(var num,i$=0,length$=list.length;i$<length$;++i$)num=list[i$],
5-
accum$.push(math.cube(num));return accum$}.call(this,[])}.call(this);
1+
(function(){var list,math,opposite,square;opposite=!0,square=function(x){return x*x},
2+
list=[1,2,3,4,5],math={root:Math.sqrt,square:square,cube:function(x){return x*square(x)}},
3+
"undefined"!=typeof elvis&&null!=elvis&&alert("I knew it!"),function(accum$){
4+
for(var num,i$=0,length$=list.length;i$<length$;++i$)num=list[i$],accum$.push(math.cube(num))
5+
;return accum$}.call(this,[])}).call(this);

test/fixtures/expected/multifile.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/fixtures/expected/quotes_double.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/fixtures/expected/quotes_original.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/fixtures/expected/quotes_single.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"version":3,"sources":["../test/fixtures/src/simple.js"],"names":["longFunctionC","argumentC","argumentD","longNameA","longNameB","result"],"mappings":"AAOA,QAASA,eAAcC,EAAUC,GAC/B,MAAOC,WAAYC,UAAYH,EAAYC,EAL7C,GAAIC,WAAY,EAEZC,UAAY,EAMZC,OAASL,cAAc,EAAE","file":"sourcemap_customName.js"}
1+
{"version":3,"sources":["../test/fixtures/src/simple.js"],"names":["longFunctionC","argumentC","argumentD","longNameA","longNameB","result"],"mappings":"AAOA,QAASA,eAAcC,EAAUC,GAC/B,MAAOC,GAAwBF,EAAYC,EAL7C,GAAIC,WAAY,EAEZC,UAAY,EAMZC,OAASL,cAAc,EAAE","file":"sourcemap_customName.js"}

test/fixtures/expected/sourcemap_basic.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/fixtures/expected/sourcemap_basic.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/fixtures/expected/sourcemap_customDir.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/fixtures/expected/sourcemap_customName.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/fixtures/expected/sourcemap_customRoot.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/fixtures/expected/sourcemap_customRoot.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/fixtures/expected/sourcemap_customUrl.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/fixtures/expected/sourcemap_functionName.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/fixtures/expected/sourcemap_functionName.js.fn.map

+1-1
Original file line numberDiff line numberDiff line change

test/fixtures/expected/sourcemap_sources.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/fixtures/expected/sourcemapin.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/fixtures/expected/sourcemapin.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/fixtures/expected/sourcemapin_sources.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)