Repository: ember-cli/ember-cli
Pull request #9324 (2020-09-08 18:34:24)

Migrate to ember-cli-terser
Migrate to `ember-cli-terser` (replacing `ember-cli-uglify`).

Fixes https://github.com/ember-cli/ember-cli/issues/9290

kellyselden: Is there anything noteworthy in this change other than it fixing the ie11 bug?

Patch:
diff --git a/blueprints/addon/files/.travis.yml b/blueprints/addon/files/.travis.yml
index 4f9511e4b..eb3470fd1 100644
--- a/blueprints/addon/files/.travis.yml
+++ b/blueprints/addon/files/.travis.yml
@@ -51,6 +51,7 @@ jobs:
 
     # we recommend new addons test the current and previous LTS
     # as well as latest stable release (bonus points to beta/canary)
+    - env: EMBER_TRY_SCENARIO=ember-lts-3.12
     - env: EMBER_TRY_SCENARIO=ember-lts-3.16
     - env: EMBER_TRY_SCENARIO=ember-lts-3.20
     - env: EMBER_TRY_SCENARIO=ember-release
diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json
index 622bb32f2..7e464a214 100644
--- a/blueprints/app/files/package.json
+++ b/blueprints/app/files/package.json
@@ -36,7 +36,7 @@
     "ember-cli-htmlbars": "^5.3.1",
     "ember-cli-inject-live-reload": "^2.0.2",
     "ember-cli-sri": "^2.1.1",
-    "ember-cli-uglify": "^3.0.0",
+    "ember-cli-terser": "^4.0.0",
     "ember-data": "~3.21.0",
     "ember-export-application-global": "^2.0.1",
     "ember-fetch": "^8.0.2",
diff --git a/lib/broccoli/ember-app.js b/lib/broccoli/ember-app.js
index 420f288ad..886b0cb08 100644
--- a/lib/broccoli/ember-app.js
+++ b/lib/broccoli/ember-app.js
@@ -289,6 +289,7 @@ class EmberApp {
         enabled: this.isProduction,
         options: { processImport: false },
       },
+      // TODO: remove this with a deprecation (nothing in the default app/addon setup consumes it)
       minifyJS: {
         enabled: this.isProduction,
         options: {


Test patch:
diff --git a/tests/fixtures/addon/defaults/.travis.yml b/tests/fixtures/addon/defaults/.travis.yml
index 156fd25fa..d62be9b09 100644
--- a/tests/fixtures/addon/defaults/.travis.yml
+++ b/tests/fixtures/addon/defaults/.travis.yml
@@ -47,6 +47,7 @@ jobs:
 
     # we recommend new addons test the current and previous LTS
     # as well as latest stable release (bonus points to beta/canary)
+    - env: EMBER_TRY_SCENARIO=ember-lts-3.12
     - env: EMBER_TRY_SCENARIO=ember-lts-3.16
     - env: EMBER_TRY_SCENARIO=ember-lts-3.20
     - env: EMBER_TRY_SCENARIO=ember-release
diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json
index f474d724f..b1b8f8b30 100644
--- a/tests/fixtures/addon/defaults/package.json
+++ b/tests/fixtures/addon/defaults/package.json
@@ -37,7 +37,7 @@
     "ember-cli-dependency-checker": "^3.2.0",
     "ember-cli-inject-live-reload": "^2.0.2",
     "ember-cli-sri": "^2.1.1",
-    "ember-cli-uglify": "^3.0.0",
+    "ember-cli-terser": "^4.0.0",
     "ember-disable-prototype-extensions": "^1.1.3",
     "ember-export-application-global": "^2.0.1",
     "ember-load-initializers": "^2.1.1",
diff --git a/tests/fixtures/addon/yarn/.travis.yml b/tests/fixtures/addon/yarn/.travis.yml
index 3a7ed03cd..092bec4a8 100644
--- a/tests/fixtures/addon/yarn/.travis.yml
+++ b/tests/fixtures/addon/yarn/.travis.yml
@@ -46,6 +46,7 @@ jobs:
 
     # we recommend new addons test the current and previous LTS
     # as well as latest stable release (bonus points to beta/canary)
+    - env: EMBER_TRY_SCENARIO=ember-lts-3.12
     - env: EMBER_TRY_SCENARIO=ember-lts-3.16
     - env: EMBER_TRY_SCENARIO=ember-lts-3.20
     - env: EMBER_TRY_SCENARIO=ember-release
diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json
index a1f66044a..6e27fc402 100644
--- a/tests/fixtures/addon/yarn/package.json
+++ b/tests/fixtures/addon/yarn/package.json
@@ -37,7 +37,7 @@
     "ember-cli-dependency-checker": "^3.2.0",
     "ember-cli-inject-live-reload": "^2.0.2",
     "ember-cli-sri": "^2.1.1",
-    "ember-cli-uglify": "^3.0.0",
+    "ember-cli-terser": "^4.0.0",
     "ember-disable-prototype-extensions": "^1.1.3",
     "ember-export-application-global": "^2.0.1",
     "ember-load-initializers": "^2.1.1",
diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json
index 611e70e20..719ec82c4 100644
--- a/tests/fixtures/app/defaults/package.json
+++ b/tests/fixtures/app/defaults/package.json
@@ -33,7 +33,7 @@
     "ember-cli-htmlbars": "^5.3.1",
     "ember-cli-inject-live-reload": "^2.0.2",
     "ember-cli-sri": "^2.1.1",
-    "ember-cli-uglify": "^3.0.0",
+    "ember-cli-terser": "^4.0.0",
     "ember-data": "~3.21.0",
     "ember-export-application-global": "^2.0.1",
     "ember-fetch": "^8.0.2",
diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json
index 75f41601f..83412d7f0 100644
--- a/tests/fixtures/app/embroider-no-welcome/package.json
+++ b/tests/fixtures/app/embroider-no-welcome/package.json
@@ -36,7 +36,7 @@
     "ember-cli-htmlbars": "^5.3.1",
     "ember-cli-inject-live-reload": "^2.0.2",
     "ember-cli-sri": "^2.1.1",
-    "ember-cli-uglify": "^3.0.0",
+    "ember-cli-terser": "^4.0.0",
     "ember-data": "~3.21.0",
     "ember-export-application-global": "^2.0.1",
     "ember-fetch": "^8.0.2",
diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json
index 1791c539b..bc0abcca9 100644
--- a/tests/fixtures/app/embroider/package.json
+++ b/tests/fixtures/app/embroider/package.json
@@ -36,7 +36,7 @@
     "ember-cli-htmlbars": "^5.3.1",
     "ember-cli-inject-live-reload": "^2.0.2",
     "ember-cli-sri": "^2.1.1",
-    "ember-cli-uglify": "^3.0.0",
+    "ember-cli-terser": "^4.0.0",
     "ember-data": "~3.21.0",
     "ember-export-application-global": "^2.0.1",
     "ember-fetch": "^8.0.2",
diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json
index 17fa98e5f..c40d6a50e 100644
--- a/tests/fixtures/app/npm/package.json
+++ b/tests/fixtures/app/npm/package.json
@@ -33,7 +33,7 @@
     "ember-cli-htmlbars": "^5.3.1",
     "ember-cli-inject-live-reload": "^2.0.2",
     "ember-cli-sri": "^2.1.1",
-    "ember-cli-uglify": "^3.0.0",
+    "ember-cli-terser": "^4.0.0",
     "ember-data": "~3.21.0",
     "ember-export-application-global": "^2.0.1",
     "ember-fetch": "^8.0.2",
diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json
index 611e70e20..719ec82c4 100644
--- a/tests/fixtures/app/yarn/package.json
+++ b/tests/fixtures/app/yarn/package.json
@@ -33,7 +33,7 @@
     "ember-cli-htmlbars": "^5.3.1",
     "ember-cli-inject-live-reload": "^2.0.2",
     "ember-cli-sri": "^2.1.1",
-    "ember-cli-uglify": "^3.0.0",
+    "ember-cli-terser": "^4.0.0",
     "ember-data": "~3.21.0",
     "ember-export-application-global": "^2.0.1",
     "ember-fetch": "^8.0.2",