Skip to content

Commit

Permalink
Upgrade terser
Browse files Browse the repository at this point in the history
Breaking changes in terser-webpack-plugin mostly don't affect our build - [CHANGELOG](https://github.com/webpack-contrib/terser-webpack-plugin/blob/master/CHANGELOG.md#200-2019-09-05)
- Already on Node >=8.9
- Already have `cache` and `parallel` turned on
- We may need to unset `sourceMap` so that it follows whatever is set in `devtool`
- Need to set `extractComments` to prevent producing license/comment files

Unfortunately, `terser-webpack-plugin` is not deduped because `webpack@4` depends on `terser-webpack-plugin@1`
  • Loading branch information
micburks authored and fusionjs-sync-bot[bot] committed Jan 8, 2020
1 parent 7507b84 commit a962cc8
Show file tree
Hide file tree
Showing 35 changed files with 506 additions and 331 deletions.
28 changes: 14 additions & 14 deletions create-fusion-app/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2593,17 +2593,17 @@ micromatch@^3.1.10, micromatch@^3.1.4:
snapdragon "^0.8.1"
to-regex "^3.0.2"

mime-db@1.40.0:
version "1.40.0"
resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32"
integrity sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==
mime-db@1.42.0:
version "1.42.0"
resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.42.0.tgz#3e252907b4c7adb906597b4b65636272cf9e7bac"
integrity sha512-UbfJCR4UAVRNgMpfImz05smAXK7+c+ZntjaA26ANtkXLlOe947Aag5zdIcKQULAiF9Cq4WxBi9jUs5zkA84bYQ==

mime-types@^2.1.12, mime-types@~2.1.19:
version "2.1.24"
resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz#b6f8d0b3e951efb77dedeca194cff6d16f676f81"
integrity sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==
version "2.1.25"
resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.25.tgz#39772d46621f93e2a80a856c53b86a62156a6437"
integrity sha512-5KhStqB5xpTAeGqKBAMgwaYMnQik7teQN4IAzC7npDv6kzeU6prfkR67bc87J1kWMPGkoaZSq1npmexMgkmEVg==
dependencies:
mime-db "1.40.0"
mime-db "1.42.0"

mime@^2.0.3:
version "2.4.4"
Expand Down Expand Up @@ -2907,9 +2907,9 @@ p-limit@^1.1.0:
p-try "^1.0.0"

p-limit@^2.0.0:
version "2.2.1"
resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz#aa07a788cc3151c939b5131f63570f0dd2009537"
integrity sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==
version "2.2.2"
resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz#61279b67721f5287aa1c13a9a7fbbc48c9291b1e"
integrity sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==
dependencies:
p-try "^2.0.0"

Expand Down Expand Up @@ -3205,9 +3205,9 @@ read-pkg@^3.0.0:
path-type "^3.0.0"

readable-stream@^2.2.2:
version "2.3.6"
resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf"
integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==
version "2.3.7"
resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==
dependencies:
core-util-is "~1.0.0"
inherits "~2.0.3"
Expand Down
22 changes: 11 additions & 11 deletions create-fusion-plugin/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2510,17 +2510,17 @@ micromatch@^3.1.10, micromatch@^3.1.4:
snapdragon "^0.8.1"
to-regex "^3.0.2"

mime-db@1.40.0:
version "1.40.0"
resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32"
integrity sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==
mime-db@1.42.0:
version "1.42.0"
resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.42.0.tgz#3e252907b4c7adb906597b4b65636272cf9e7bac"
integrity sha512-UbfJCR4UAVRNgMpfImz05smAXK7+c+ZntjaA26ANtkXLlOe947Aag5zdIcKQULAiF9Cq4WxBi9jUs5zkA84bYQ==

mime-types@^2.1.12, mime-types@~2.1.19:
version "2.1.24"
resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz#b6f8d0b3e951efb77dedeca194cff6d16f676f81"
integrity sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==
version "2.1.25"
resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.25.tgz#39772d46621f93e2a80a856c53b86a62156a6437"
integrity sha512-5KhStqB5xpTAeGqKBAMgwaYMnQik7teQN4IAzC7npDv6kzeU6prfkR67bc87J1kWMPGkoaZSq1npmexMgkmEVg==
dependencies:
mime-db "1.40.0"
mime-db "1.42.0"

mimic-fn@^1.0.0:
version "1.2.0"
Expand Down Expand Up @@ -2811,9 +2811,9 @@ p-limit@^1.1.0:
p-try "^1.0.0"

p-limit@^2.0.0:
version "2.2.1"
resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz#aa07a788cc3151c939b5131f63570f0dd2009537"
integrity sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==
version "2.2.2"
resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz#61279b67721f5287aa1c13a9a7fbbc48c9291b1e"
integrity sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==
dependencies:
p-try "^2.0.0"

Expand Down
1 change: 1 addition & 0 deletions fusion-cli/build/get-webpack-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,7 @@ function getWebpackConfig(opts /*: WebpackConfigOpts */) {
sourceMap: true, // default from webpack (see https://github.com/webpack/webpack/blob/aab3554cad2ebc5d5e9645e74fb61842e266da34/lib/WebpackOptionsDefaulter.js#L290-L297)
cache: true, // default from webpack
parallel: true, // default from webpack
extractComments: false,
terserOptions: {
compress: {
// typeofs: true (default) transforms typeof foo == "undefined" into foo === void 0.
Expand Down
2 changes: 1 addition & 1 deletion fusion-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"rimraf": "^2.6.2",
"sade": "^1.6.0",
"source-map-support": "^0.5.9",
"terser-webpack-plugin": "^1.1.0",
"terser-webpack-plugin": "^2.3.1",
"webpack": "4.41.2",
"webpack-sources": "^1.4.3",
"webpack-hot-middleware": "^2.24.3",
Expand Down
Loading

0 comments on commit a962cc8

Please sign in to comment.