Skip to content

Commit

Permalink
Merge pull request #453 from gruntjs/update-uglify
Browse files Browse the repository at this point in the history
Update uglify
  • Loading branch information
XhmikosR committed Mar 1, 2017
2 parents 463d4d3 + 48247f6 commit a34af0d
Show file tree
Hide file tree
Showing 41 changed files with 53 additions and 48 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
@@ -1,3 +1,7 @@
v2.2.0:
date: 2017-03-01
changes:
- Update uglify-js to v2.8.3.
v2.1.0:
date: 2017-02-08
changes:
Expand Down
4 changes: 2 additions & 2 deletions Gruntfile.js
Expand Up @@ -385,13 +385,13 @@ module.exports = function(grunt) {
},
beautify_Object: {
files: {
'tmp/beautify.js': ['test/fixtures/src/localization.js', 'test/fixtures/src/simple.js']
'tmp/beautify.js': ['test/fixtures/src/simple.js']
},
options: {
beautify: {
ascii_only: true,
indent_start: 2,
max_line_len: 40
max_line_len: 55
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions README.md
@@ -1,4 +1,4 @@
# grunt-contrib-uglify v2.1.0 [![Build Status: Linux](https://travis-ci.org/gruntjs/grunt-contrib-uglify.svg?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-uglify) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/ybtf5vbvtenii561/branch/master?svg=true)](https://ci.appveyor.com/project/gruntjs/grunt-contrib-uglify/branch/master)
# grunt-contrib-uglify v2.2.0 [![Build Status: Linux](https://travis-ci.org/gruntjs/grunt-contrib-uglify.svg?branch=master)](https://travis-ci.org/gruntjs/grunt-contrib-uglify) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/ybtf5vbvtenii561/branch/master?svg=true)](https://ci.appveyor.com/project/gruntjs/grunt-contrib-uglify/branch/master)

> Minify JavaScript files with UglifyJS
Expand Down Expand Up @@ -549,6 +549,7 @@ grunt.initConfig({

## Release History

* 2017-03-01   v2.2.0   Update uglify-js to v2.8.3.
* 2017-02-08   v2.1.0   Show size changes in output. Switch to `object.assign`.
* 2016-07-19   v2.0.0   Update uglify-js to v2.7.0. `screwIE8` is enabled by default.
* 2016-07-19   v1.0.2   Update grunt to ^1.0.0. Fix `beautify` when passed as an object. Fix docs about `report` values.
Expand Down Expand Up @@ -589,4 +590,4 @@ grunt.initConfig({

Task submitted by ["Cowboy" Ben Alman](http://benalman.com)

*This file was generated on Tue Feb 28 2017 15:58:04.*
*This file was generated on Wed Mar 01 2017 09:37:05.*
4 changes: 2 additions & 2 deletions package.json
@@ -1,7 +1,7 @@
{
"name": "grunt-contrib-uglify",
"description": "Minify JavaScript files with UglifyJS",
"version": "2.1.0",
"version": "2.2.0",
"author": {
"name": "Grunt Team",
"url": "http://gruntjs.com/"
Expand All @@ -19,7 +19,7 @@
"chalk": "^1.0.0",
"maxmin": "^1.1.0",
"object.assign": "^4.0.4",
"uglify-js": "~2.7.0",
"uglify-js": "~2.8.3",
"uri-path": "^1.0.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion tasks/lib/uglify.js
Expand Up @@ -98,7 +98,7 @@ exports.init = function(grunt) {
options.compress.screw_ie8 = false;
}
var compressor = UglifyJS.Compressor(options.compress);
topLevel = topLevel.transform(compressor);
topLevel = compressor.compress(topLevel);

// Need to figure out scope again after source being altered
if (options.expression === false) {
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/expected/beautify.js
@@ -1,2 +1,2 @@
function longFunctionC(a,b){return longNameA+longNameB+a+b;
}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);
function longFunctionC(a,b){return 3+a+b}
var longNameA=1,longNameB=2,result=longFunctionC(3,4);
2 changes: 1 addition & 1 deletion test/fixtures/expected/compress.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/fixtures/expected/compress_explicit.js
@@ -1 +1 @@
function longFunctionC(a,b){return longNameA+longNameB+a+b}var longNameA=1,longNameB=2,result=longFunctionC(3,4);
function longFunctionC(a,b){return 3+a+b}var longNameA=1,longNameB=2,result=longFunctionC(3,4);
2 changes: 1 addition & 1 deletion test/fixtures/expected/compress_mangle.js
@@ -1 +1 @@
function longFunctionC(a,b){return longNameA+longNameB+a+b}var longNameA=1,longNameB=2,result=longFunctionC(3,4);
function longFunctionC(a,b){return 3+a+b}var longNameA=1,longNameB=2,result=longFunctionC(3,4);
2 changes: 1 addition & 1 deletion test/fixtures/expected/compress_mangle_banner.js
@@ -1,2 +1,2 @@
// banner without sourcemap
function longFunctionC(a,b){return longNameA+longNameB+a+b}var longNameA=1,longNameB=2,result=longFunctionC(3,4);
function longFunctionC(a,b){return 3+a+b}var longNameA=1,longNameB=2,result=longFunctionC(3,4);
2 changes: 1 addition & 1 deletion test/fixtures/expected/compress_mangle_beautify.js
@@ -1,5 +1,5 @@
function longFunctionC(a, b) {
return longNameA + longNameB + a + b;
return 3 + a + b;
}

var longNameA = 1, longNameB = 2, result = longFunctionC(3, 4);
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/expected/compress_mangle_except.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/fixtures/expected/exportAll.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/fixtures/expected/mangle.js
@@ -1 +1 @@
function longFunctionC(a,b){return longNameA+longNameB+a+b}var longNameA=1,longNameB=2,result=longFunctionC(3,4);
function longFunctionC(a,b){return 3+a+b}var longNameA=1,longNameB=2,result=longFunctionC(3,4);
2 changes: 1 addition & 1 deletion test/fixtures/expected/mangleprops_withNameCacheFile2.js
@@ -1 +1 @@
var d=10;a.a(d);
var d=10;a.a(10);
10 changes: 5 additions & 5 deletions test/fixtures/expected/maxLineLen.js
@@ -1,5 +1,5 @@
void function(){var cubes,list,math,number,opposite,race,square;number=42,opposite=!0,opposite&&(number=-42),
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);
}},race=function(winner,runners){return runners=2<=arguments.length?[].slice.call(arguments,1):[],print(winner,runners);
},"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$],
accum$.push(math.cube(num));return accum$}.call(this,[])}.call(this);
(function(){var list,math,opposite,square;opposite=!0,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)}},
"undefined"!=typeof elvis&&null!=elvis&&alert("I knew it!"),function(accum$){
for(var num,i$=0,length$=list.length;i$<length$;++i$)num=list[i$],accum$.push(math.cube(num))
;return accum$}.call(this,[])}).call(this);
2 changes: 1 addition & 1 deletion test/fixtures/expected/multifile.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/fixtures/expected/quotes_double.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/fixtures/expected/quotes_original.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/fixtures/expected/quotes_single.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/fixtures/expected/source_map_custom_name
@@ -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"}
{"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"}
2 changes: 1 addition & 1 deletion test/fixtures/expected/sourcemap_basic.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/fixtures/expected/sourcemap_basic.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/fixtures/expected/sourcemap_customDir.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/fixtures/expected/sourcemap_customName.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/fixtures/expected/sourcemap_customRoot.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/fixtures/expected/sourcemap_customRoot.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/fixtures/expected/sourcemap_customUrl.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/fixtures/expected/sourcemap_functionName.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/fixtures/expected/sourcemap_functionName.js.fn.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/fixtures/expected/sourcemap_sources.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/fixtures/expected/sourcemapin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/fixtures/expected/sourcemapin.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/fixtures/expected/sourcemapin_sources.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a34af0d

Please sign in to comment.