From e66d12535abaa819b254a3737c212d64b649bed1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nacho=20Garc=C3=ADa?= Date: Tue, 1 Mar 2022 17:04:51 +0100 Subject: [PATCH 1/2] Update uglify-js to v3.15.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nacho GarcĂ­a --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index a7ca5734..815f7a88 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3700,9 +3700,9 @@ "dev": true }, "uglify-js": { - "version": "3.13.3", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.3.tgz", - "integrity": "sha512-otIc7O9LyxpUcQoXzj2hL4LPWKklO6LJWoJUzNa8A17Xgi4fOeDC8FBDOLHnC/Slo1CQgsZMcM6as0M76BZaig==" + "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 f1e6b0b0..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.3", + "uglify-js": "^3.15.2", "uri-path": "^1.0.0" }, "devDependencies": { From fd9df94a4422408ac2a1bf5a019d7fec1d9ec2f3 Mon Sep 17 00:00:00 2001 From: alexlamsl Date: Wed, 2 Mar 2022 09:22:49 +0800 Subject: [PATCH 2/2] update tests --- test/fixtures/expected/compress_mangle_banner.js | 1 - test/fixtures/expected/maxLineLen.js | 9 +++++---- test/fixtures/expected/sourcemapin.js | 3 +-- test/fixtures/expected/sourcemapin.js.map | 2 +- test/fixtures/expected/sourcemapin_customUrl.js | 2 +- test/fixtures/expected/sourcemapin_customUrl.js.map | 2 +- test/fixtures/expected/sourcemapin_sources.js | 2 +- test/fixtures/expected/sourcemapin_sources.js.map | 2 +- 8 files changed, 11 insertions(+), 12 deletions(-) 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