diff --git a/gulpfile.js b/gulpfile.js index e18622bde..d8c889ed8 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -17,7 +17,7 @@ const sass = require('gulp-sass') const autoprefixer = require('gulp-autoprefixer') const gulpStylelint = require('gulp-stylelint') const stylefmt = require('gulp-stylefmt') -const uglify = require('gulp-uglify-es').default +const terser = require('gulp-terser-js') const pify = require('pify') const rtlcss = require('gulp-rtlcss') const rename = require('gulp-rename') @@ -585,7 +585,7 @@ function bundleTask (opts) { // Minification if (opts.minifyBuild) { buildStream = buildStream - .pipe(uglify({ + .pipe(terser({ mangle: { reserved: [ 'MetamaskInpageProvider' ], }, diff --git a/package.json b/package.json index 8b7f1edc3..35b774fa8 100644 --- a/package.json +++ b/package.json @@ -225,7 +225,7 @@ "gulp-sourcemaps": "^2.6.0", "gulp-stylefmt": "^1.1.0", "gulp-stylelint": "^7.0.0", - "gulp-uglify-es": "^1.0.4", + "gulp-terser-js": "^5.0.0", "gulp-util": "^3.0.7", "gulp-watch": "^5.0.1", "gulp-zip": "^4.0.0", diff --git a/yarn.lock b/yarn.lock index cb8274842..ffb6954c1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5799,7 +5799,7 @@ commander@2.9.0: dependencies: graceful-readlink ">= 1.0.0" -commander@^2.16.0, commander@^2.19.0: +commander@^2.16.0, commander@^2.19.0, commander@^2.20.0: version "2.20.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== @@ -11145,15 +11145,15 @@ gulp-stylelint@^7.0.0: strip-ansi "^4.0.0" through2 "^2.0.3" -gulp-uglify-es@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/gulp-uglify-es/-/gulp-uglify-es-1.0.4.tgz#59ee0d5ea98c1e09c6eaa58c8b018a6ad33f48d4" - integrity sha512-UMRufZsBmQizCYpftutaiVoLswpbzFEfY90EJLU4YlTgculeHnanb794s88TMd5tpCZVC638sAX6JrLVYTP/Wg== +gulp-terser-js@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/gulp-terser-js/-/gulp-terser-js-5.0.0.tgz#b570bb14e9c836aab78d633411073af0df8ca514" + integrity sha512-X5bduLqvRdX1RwUJmdm1J+HZu85gfIKkmDK95J6AAfXd4W/oYANt82gmIMZfhUGEmLm6e6xtKGsfTW6c0BRWnQ== dependencies: - o-stream "^0.2.2" + object-assign "^4.1.1" plugin-error "^1.0.1" - terser "^3.7.5" - vinyl "^2.1.0" + terser "^4.1.4" + through2 "^3.0.1" vinyl-sourcemaps-apply "^0.2.1" gulp-util@^3.0.7, gulp-util@^3.0.8, gulp-util@~3.0.0: @@ -15585,11 +15585,6 @@ nyc@^13.0.0: yargs "11.1.0" yargs-parser "^9.0.2" -o-stream@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/o-stream/-/o-stream-0.2.2.tgz#7fe03af870b8f9537af33b312b381b3034ab410f" - integrity sha512-V3j76KU3g/Gyl8rpdi2z72rn5zguMvTCQgAXfBe3pxEefKqXmOUOD7mvx/mNjykdxGqDVfpSoo8r+WdrkWg/1Q== - oauth-sign@~0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" @@ -18044,6 +18039,15 @@ readable-stream@1.1, readable-stream@1.1.x, "readable-stream@>=1.1.13-1 <1.2.0-0 isarray "0.0.1" string_decoder "~0.10.x" +"readable-stream@2 || 3": + version "3.4.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.4.0.tgz#a51c26754658e0a3c21dbf59163bd45ba6f447fc" + integrity sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + "readable-stream@>=1.0.33-1 <1.1.0-0", readable-stream@~1.0.15, readable-stream@~1.0.17: version "1.0.34" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" @@ -20059,6 +20063,14 @@ source-map-support@^0.4.15: dependencies: source-map "^0.5.6" +source-map-support@~0.5.12: + version "0.5.13" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" + integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + source-map-url@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3" @@ -21176,15 +21188,6 @@ terser-webpack-plugin@^1.1.0, terser-webpack-plugin@^1.2.4: webpack-sources "^1.3.0" worker-farm "^1.7.0" -terser@^3.7.5: - version "3.17.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-3.17.0.tgz#f88ffbeda0deb5637f9d24b0da66f4e15ab10cb2" - integrity sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ== - dependencies: - commander "^2.19.0" - source-map "~0.6.1" - source-map-support "~0.5.10" - terser@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/terser/-/terser-4.0.0.tgz#ef356f6f359a963e2cc675517f21c1c382877374" @@ -21194,6 +21197,15 @@ terser@^4.0.0: source-map "~0.6.1" source-map-support "~0.5.10" +terser@^4.1.4: + version "4.3.1" + resolved "https://registry.yarnpkg.com/terser/-/terser-4.3.1.tgz#09820bcb3398299c4b48d9a86aefc65127d0ed65" + integrity sha512-pnzH6dnFEsR2aa2SJaKb1uSCl3QmIsJ8dEkj0Fky+2AwMMcC9doMqLOQIH6wVTEKaVfKVvLSk5qxPBEZT9mywg== + dependencies: + commander "^2.20.0" + source-map "~0.6.1" + source-map-support "~0.5.12" + test-exclude@^4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.2.tgz#8b67aa8408f84afc225b06669e25c510f8582820" @@ -21339,6 +21351,13 @@ through2@^2.0.5: readable-stream "~2.3.6" xtend "~4.0.1" +through2@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.1.tgz#39276e713c3302edf9e388dd9c812dd3b825bd5a" + integrity sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww== + dependencies: + readable-stream "2 || 3" + through2@~0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/through2/-/through2-0.2.3.tgz#eb3284da4ea311b6cc8ace3653748a52abf25a3f" @@ -22091,7 +22110,7 @@ utf8@^3.0.0: resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== -util-deprecate@^1.0.2, util-deprecate@~1.0.1: +util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=