diff --git a/package-lock.json b/package-lock.json index 9681d9d9..30ff8655 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3700,9 +3700,9 @@ "dev": true }, "uglify-js": { - "version": "3.13.10", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.10.tgz", - "integrity": "sha512-57H3ACYFXeo1IaZ1w02sfA71wI60MGco/IQFjOqK+WtKoprh7Go2/yvd2HPtoJILO2Or84ncLccI4xoHMTSbGg==" + "version": "3.15.2", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.15.2.tgz", + "integrity": "sha512-peeoTk3hSwYdoc9nrdiEJk+gx1ALCtTjdYuKSXMTDqq7n1W7dHPqWDdSi+BPL0ni2YMeHD7hKUSdbj3TZauY2A==" }, "unc-path-regex": { "version": "0.1.2", diff --git a/package.json b/package.json index aef72cc5..436fbd2b 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "dependencies": { "chalk": "^2.4.1", "maxmin": "^2.1.0", - "uglify-js": "^3.13.10", + "uglify-js": "^3.15.2", "uri-path": "^1.0.0" }, "devDependencies": { diff --git a/test/fixtures/expected/compress_mangle_banner.js b/test/fixtures/expected/compress_mangle_banner.js index 1cdf220c..627262c3 100644 --- a/test/fixtures/expected/compress_mangle_banner.js +++ b/test/fixtures/expected/compress_mangle_banner.js @@ -1,3 +1,2 @@ // banner without sourcemap - var longNameA=1,longNameB=2;function longFunctionC(n,o){return longNameA+longNameB+n+o}var result=longFunctionC(3,4); \ No newline at end of file diff --git a/test/fixtures/expected/maxLineLen.js b/test/fixtures/expected/maxLineLen.js index f7fccf98..d077038d 100644 --- a/test/fixtures/expected/maxLineLen.js +++ b/test/fixtures/expected/maxLineLen.js @@ -1,4 +1,5 @@ -!function(){var 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 i$=0,length$=list.length;i$ x * x\n\n# Arrays:\nlist = [1, 2, 3, 4, 5]\n\n# Objects:\nmath =\n root: Math.sqrt\n square: square\n cube: (x) -> x * square x\n\n# Splats:\nrace = (winner, runners...) ->\n print winner, runners\n\n# Existence:\nalert \"I knew it!\" if elvis?\n\n# Array comprehensions:\ncubes = (math.cube num for num in list)"],"names":["square","x","list","math","root","Math","sqrt","cube","elvis","alert","accum$","i$","length$","length"],"mappings":"gBAQCA,EAAS,SAAAC,G,OAAOA,EAAIA,GAGpBC,EAAO,CAAC,EAAG,EAAG,EAAG,EAAG,GAGpBC,EACG,CAAAC,KAAQC,KAAIC,KACbN,OAAQA,EACRO,KAAQ,SAAAN,G,OAAOA,EAAID,EAAOC,KAO1B,oBAAsBO,OAAA,MAAAA,OAAtBC,MAAM,cAGR,SAAAC,GAAS,I,IAAAC,EAAA,EAAAC,EAAyBV,EAAAW,OAAzBF,EAAAC,IAAAD,E,OAAAR,EAAII,KAAqBL,EAAAS"} \ No newline at end of file +{"version":3,"sources":["../test/fixtures/src/simple2.coffee"],"sourcesContent":["# Assignment:\nnumber = 42\nopposite = true\n\n# Conditions:\nnumber = -42 if opposite\n\n# Functions:\nsquare = (x) -> x * x\n\n# Arrays:\nlist = [1, 2, 3, 4, 5]\n\n# Objects:\nmath =\n root: Math.sqrt\n square: square\n cube: (x) -> x * square x\n\n# Splats:\nrace = (winner, runners...) ->\n print winner, runners\n\n# Existence:\nalert \"I knew it!\" if elvis?\n\n# Array comprehensions:\ncubes = (math.cube num for num in list)"],"names":["square","x","list","math","root","Math","sqrt","cube","elvis","alert","accum$","i$","length$","length"],"mappings":"sBAQCA,EAAS,SAAAC,G,OAAOA,EAAIA,GAGpBC,EAAO,CAAC,EAAG,EAAG,EAAG,EAAG,GAGpBC,EACG,CAAAC,KAAQC,KAAIC,KACbN,OAAQA,EACRO,KAAQ,SAAAN,G,OAAOA,EAAID,EAAOC,KAO1B,oBAAsBO,OAAA,MAAAA,OAAtBC,MAAM,cAGR,SAAAC,GAAS,I,IAAAC,EAAA,EAAAC,EAAyBV,EAAAW,OAAzBF,EAAAC,IAAAD,E,OAAAR,EAAII,KAAqBL,EAAAS"} \ No newline at end of file diff --git a/test/fixtures/expected/sourcemapin_sources.js b/test/fixtures/expected/sourcemapin_sources.js index 02b0908e..b08ab116 100644 --- a/test/fixtures/expected/sourcemapin_sources.js +++ b/test/fixtures/expected/sourcemapin_sources.js @@ -1,2 +1,2 @@ -!function(){var t=function(n){return n*n},r=[1,2,3,4,5],u={root:Math.sqrt,square:t,cube:function(n){return n*t(n)}};"undefined"!=typeof elvis&&null!=elvis&&alert("I knew it!"),function(n){for(var t=0,e=r.length;t x * x\n\n# Arrays:\nlist = [1, 2, 3, 4, 5]\n\n# Objects:\nmath =\n root: Math.sqrt\n square: square\n cube: (x) -> x * square x\n\n# Splats:\nrace = (winner, runners...) ->\n print winner, runners\n\n# Existence:\nalert \"I knew it!\" if elvis?\n\n# Array comprehensions:\ncubes = (math.cube num for num in list)"],"names":["square","x","list","math","root","Math","sqrt","cube","elvis","alert","accum$","i$","length$","length"],"mappings":"gBAQCA,EAAS,SAAAC,G,OAAOA,EAAIA,GAGpBC,EAAO,CAAC,EAAG,EAAG,EAAG,EAAG,GAGpBC,EACG,CAAAC,KAAQC,KAAIC,KACbN,OAAQA,EACRO,KAAQ,SAAAN,G,OAAOA,EAAID,EAAOC,KAO1B,oBAAsBO,OAAA,MAAAA,OAAtBC,MAAM,cAGR,SAAAC,GAAS,I,IAAAC,EAAA,EAAAC,EAAyBV,EAAAW,OAAzBF,EAAAC,IAAAD,E,OAAAR,EAAII,KAAqBL,EAAAS"} \ No newline at end of file +{"version":3,"file":"sourcemapin_sources.js","sources":["../test/fixtures/src/simple2.coffee"],"sourcesContent":["# Assignment:\nnumber = 42\nopposite = true\n\n# Conditions:\nnumber = -42 if opposite\n\n# Functions:\nsquare = (x) -> x * x\n\n# Arrays:\nlist = [1, 2, 3, 4, 5]\n\n# Objects:\nmath =\n root: Math.sqrt\n square: square\n cube: (x) -> x * square x\n\n# Splats:\nrace = (winner, runners...) ->\n print winner, runners\n\n# Existence:\nalert \"I knew it!\" if elvis?\n\n# Array comprehensions:\ncubes = (math.cube num for num in list)"],"names":["square","x","list","math","root","Math","sqrt","cube","elvis","alert","accum$","i$","length$","length"],"mappings":"sBAQCA,EAAS,SAAAC,G,OAAOA,EAAIA,GAGpBC,EAAO,CAAC,EAAG,EAAG,EAAG,EAAG,GAGpBC,EACG,CAAAC,KAAQC,KAAIC,KACbN,OAAQA,EACRO,KAAQ,SAAAN,G,OAAOA,EAAID,EAAOC,KAO1B,oBAAsBO,OAAA,MAAAA,OAAtBC,MAAM,cAGR,SAAAC,GAAS,I,IAAAC,EAAA,EAAAC,EAAyBV,EAAAW,OAAzBF,EAAAC,IAAAD,E,OAAAR,EAAII,KAAqBL,EAAAS"} \ No newline at end of file