Skip to content

Commit a34af0d

Browse files
authored
Merge pull request #453 from gruntjs/update-uglify
Update uglify
2 parents 463d4d3 + 48247f6 commit a34af0d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+53
-48
lines changed

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
v2.2.0:
2+
date: 2017-03-01
3+
changes:
4+
- Update uglify-js to v2.8.3.
15
v2.1.0:
26
date: 2017-02-08
37
changes:

Gruntfile.js

Lines changed: 2 additions & 2 deletions
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
}

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 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)
1+
# 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)
22

33
> Minify JavaScript files with UglifyJS
44
@@ -549,6 +549,7 @@ grunt.initConfig({
549549

550550
## Release History
551551

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

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

592-
*This file was generated on Tue Feb 28 2017 15:58:04.*
593+
*This file was generated on Wed Mar 01 2017 09:37:05.*

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "grunt-contrib-uglify",
33
"description": "Minify JavaScript files with UglifyJS",
4-
"version": "2.1.0",
4+
"version": "2.2.0",
55
"author": {
66
"name": "Grunt Team",
77
"url": "http://gruntjs.com/"
@@ -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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
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);
Lines changed: 1 addition & 1 deletion
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);
Lines changed: 1 addition & 1 deletion
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);

0 commit comments

Comments
 (0)