Repository: ember-cli/ember-cli
Pull request #10189 (2023-02-18 16:25:08)

[ENHANCEMENT] Add v4.8 LTS to `addon` blueprint - Remove v3.28 LTS and `ember-classic` scenario

kategengler: I think the peerDep on ember-source in the blueprint should remain pretty loose, other than that, it lgtm.
ef4: Given how ember-cli-update works, I think I agree with @kategengler that it's better to be looser here.

Ideally, we could put the stricter value here for newly-generated addons without accidentally causing upgrading addons to break their users unnecessarily. But that would require changes to ember-cli-update so that this peer dep (and the embrer-try config) get a different update strategy.
bertdeblock: Thanks both! Updated the PR accordingly.

Patch:
diff --git a/blueprints/addon/additional-package.json b/blueprints/addon/additional-package.json
index 844ba3672..d9c7efabf 100644
--- a/blueprints/addon/additional-package.json
+++ b/blueprints/addon/additional-package.json
@@ -11,7 +11,7 @@
     "ember-try": "^2.0.0"
   },
   "peerDependencies": {
-    "ember-source": "^3.28.0 || ^4.0.0"
+    "ember-source": "^4.0.0"
   },
   "ember-addon": {
     "configPath": "tests/dummy/config"
diff --git a/blueprints/addon/files/.github/workflows/ci.yml b/blueprints/addon/files/.github/workflows/ci.yml
index 1aa10961c..af8ce85e5 100644
--- a/blueprints/addon/files/.github/workflows/ci.yml
+++ b/blueprints/addon/files/.github/workflows/ci.yml
@@ -57,12 +57,11 @@ jobs:
       fail-fast: false
       matrix:
         try-scenario:
-          - ember-lts-3.28
           - ember-lts-4.4
+          - ember-lts-4.8
           - ember-release
           - ember-beta
           - ember-canary
-          - ember-classic
           - embroider-safe
           - embroider-optimized
 
diff --git a/blueprints/addon/files/.travis.yml b/blueprints/addon/files/.travis.yml
index 3ebb1f289..a53d8e8b4 100644
--- a/blueprints/addon/files/.travis.yml
+++ b/blueprints/addon/files/.travis.yml
@@ -51,12 +51,11 @@ 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.28
     - env: EMBER_TRY_SCENARIO=ember-lts-4.4
+    - env: EMBER_TRY_SCENARIO=ember-lts-4.8
     - env: EMBER_TRY_SCENARIO=ember-release
     - env: EMBER_TRY_SCENARIO=ember-beta
     - env: EMBER_TRY_SCENARIO=ember-canary
-    - env: EMBER_TRY_SCENARIO=ember-classic
     - env: EMBER_TRY_SCENARIO=embroider-safe
     - env: EMBER_TRY_SCENARIO=embroider-optimized
 <% if (yarn) { %>
diff --git a/blueprints/addon/files/README.md b/blueprints/addon/files/README.md
index 934007bb8..e02b6f268 100644
--- a/blueprints/addon/files/README.md
+++ b/blueprints/addon/files/README.md
@@ -5,8 +5,8 @@
 
 ## Compatibility
 
-* Ember.js v3.28 or above
-* Ember CLI v3.28 or above
+* Ember.js v4.4 or above
+* Ember CLI v4.4 or above
 * Node.js v14 or above
 
 
diff --git a/blueprints/addon/files/addon-config/ember-try.js b/blueprints/addon/files/addon-config/ember-try.js
index 72fa5f915..6026f5f61 100644
--- a/blueprints/addon/files/addon-config/ember-try.js
+++ b/blueprints/addon/files/addon-config/ember-try.js
@@ -8,18 +8,18 @@ module.exports = async function () {
     <% if (yarn) { %>useYarn: true,
     <% } %>scenarios: [
       {
-        name: 'ember-lts-3.28',
+        name: 'ember-lts-4.4',
         npm: {
           devDependencies: {
-            'ember-source': '~3.28.0',
+            'ember-source': '~4.4.0',
           },
         },
       },
       {
-        name: 'ember-lts-4.4',
+        name: 'ember-lts-4.8',
         npm: {
           devDependencies: {
-            'ember-source': '~4.4.0',
+            'ember-source': '~4.8.0',
           },
         },
       },
@@ -47,24 +47,6 @@ module.exports = async function () {
           },
         },
       },
-      {
-        name: 'ember-classic',
-        env: {
-          EMBER_OPTIONAL_FEATURES: JSON.stringify({
-            'application-template-wrapper': true,
-            'default-async-observers': false,
-            'template-only-glimmer-components': false,
-          }),
-        },
-        npm: {
-          devDependencies: {
-            'ember-source': '~3.28.0',
-          },
-          ember: {
-            edition: 'classic',
-          },
-        },
-      },
       embroiderSafe(),
       embroiderOptimized(),
     ],


Test patch:
diff --git a/tests/fixtures/addon/defaults-travis/.travis.yml b/tests/fixtures/addon/defaults-travis/.travis.yml
index 83e8f0081..787dc23d6 100644
--- a/tests/fixtures/addon/defaults-travis/.travis.yml
+++ b/tests/fixtures/addon/defaults-travis/.travis.yml
@@ -47,12 +47,11 @@ 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.28
     - env: EMBER_TRY_SCENARIO=ember-lts-4.4
+    - env: EMBER_TRY_SCENARIO=ember-lts-4.8
     - env: EMBER_TRY_SCENARIO=ember-release
     - env: EMBER_TRY_SCENARIO=ember-beta
     - env: EMBER_TRY_SCENARIO=ember-canary
-    - env: EMBER_TRY_SCENARIO=ember-classic
     - env: EMBER_TRY_SCENARIO=embroider-safe
     - env: EMBER_TRY_SCENARIO=embroider-optimized
 
diff --git a/tests/fixtures/addon/defaults-travis/README.md b/tests/fixtures/addon/defaults-travis/README.md
index 9b6abbc43..8a04cc36a 100644
--- a/tests/fixtures/addon/defaults-travis/README.md
+++ b/tests/fixtures/addon/defaults-travis/README.md
@@ -7,8 +7,8 @@ foo
 Compatibility
 ------------------------------------------------------------------------------
 
-* Ember.js v3.28 or above
-* Ember CLI v3.28 or above
+* Ember.js v4.4 or above
+* Ember CLI v4.4 or above
 * Node.js v14 or above
 
 
diff --git a/tests/fixtures/addon/defaults-travis/tests/dummy/config/ember-try.js b/tests/fixtures/addon/defaults-travis/tests/dummy/config/ember-try.js
index 814d53e40..27ec66aa1 100644
--- a/tests/fixtures/addon/defaults-travis/tests/dummy/config/ember-try.js
+++ b/tests/fixtures/addon/defaults-travis/tests/dummy/config/ember-try.js
@@ -7,18 +7,18 @@ module.exports = async function () {
   return {
     scenarios: [
       {
-        name: 'ember-lts-3.28',
+        name: 'ember-lts-4.4',
         npm: {
           devDependencies: {
-            'ember-source': '~3.28.0',
+            'ember-source': '~4.4.0',
           },
         },
       },
       {
-        name: 'ember-lts-4.4',
+        name: 'ember-lts-4.8',
         npm: {
           devDependencies: {
-            'ember-source': '~4.4.0',
+            'ember-source': '~4.8.0',
           },
         },
       },
@@ -46,21 +46,6 @@ module.exports = async function () {
           },
         },
       },
-      {
-        name: 'ember-classic',
-        env: {
-          EMBER_OPTIONAL_FEATURES: JSON.stringify({
-            'application-template-wrapper': true,
-            'default-async-observers': false,
-            'template-only-glimmer-components': false,
-          }),
-        },
-        npm: {
-          ember: {
-            edition: 'classic',
-          },
-        },
-      },
       embroiderSafe(),
       embroiderOptimized(),
     ],
diff --git a/tests/fixtures/addon/defaults/.github/workflows/ci.yml b/tests/fixtures/addon/defaults/.github/workflows/ci.yml
index 23b472f82..c52a532a7 100644
--- a/tests/fixtures/addon/defaults/.github/workflows/ci.yml
+++ b/tests/fixtures/addon/defaults/.github/workflows/ci.yml
@@ -57,12 +57,11 @@ jobs:
       fail-fast: false
       matrix:
         try-scenario:
-          - ember-lts-3.28
           - ember-lts-4.4
+          - ember-lts-4.8
           - ember-release
           - ember-beta
           - ember-canary
-          - ember-classic
           - embroider-safe
           - embroider-optimized
 
diff --git a/tests/fixtures/addon/defaults/README.md b/tests/fixtures/addon/defaults/README.md
index 7db9893d2..1c60ec734 100644
--- a/tests/fixtures/addon/defaults/README.md
+++ b/tests/fixtures/addon/defaults/README.md
@@ -5,8 +5,8 @@
 
 ## Compatibility
 
-* Ember.js v3.28 or above
-* Ember CLI v3.28 or above
+* Ember.js v4.4 or above
+* Ember CLI v4.4 or above
 * Node.js v14 or above
 
 
diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json
index 2c8fffd23..40fae3f36 100644
--- a/tests/fixtures/addon/defaults/package.json
+++ b/tests/fixtures/addon/defaults/package.json
@@ -73,7 +73,7 @@
     "webpack": "^5.75.0"
   },
   "peerDependencies": {
-    "ember-source": "^3.28.0 || ^4.0.0"
+    "ember-source": "^4.0.0"
   },
   "engines": {
     "node": "14.* || 16.* || >= 18"
diff --git a/tests/fixtures/addon/defaults/tests/dummy/config/ember-try.js b/tests/fixtures/addon/defaults/tests/dummy/config/ember-try.js
index 4746d2b9a..27ec66aa1 100644
--- a/tests/fixtures/addon/defaults/tests/dummy/config/ember-try.js
+++ b/tests/fixtures/addon/defaults/tests/dummy/config/ember-try.js
@@ -7,18 +7,18 @@ module.exports = async function () {
   return {
     scenarios: [
       {
-        name: 'ember-lts-3.28',
+        name: 'ember-lts-4.4',
         npm: {
           devDependencies: {
-            'ember-source': '~3.28.0',
+            'ember-source': '~4.4.0',
           },
         },
       },
       {
-        name: 'ember-lts-4.4',
+        name: 'ember-lts-4.8',
         npm: {
           devDependencies: {
-            'ember-source': '~4.4.0',
+            'ember-source': '~4.8.0',
           },
         },
       },
@@ -46,24 +46,6 @@ module.exports = async function () {
           },
         },
       },
-      {
-        name: 'ember-classic',
-        env: {
-          EMBER_OPTIONAL_FEATURES: JSON.stringify({
-            'application-template-wrapper': true,
-            'default-async-observers': false,
-            'template-only-glimmer-components': false,
-          }),
-        },
-        npm: {
-          devDependencies: {
-            'ember-source': '~3.28.0',
-          },
-          ember: {
-            edition: 'classic',
-          },
-        },
-      },
       embroiderSafe(),
       embroiderOptimized(),
     ],
diff --git a/tests/fixtures/addon/yarn/.github/workflows/ci.yml b/tests/fixtures/addon/yarn/.github/workflows/ci.yml
index d0c880666..2ce9c33b4 100644
--- a/tests/fixtures/addon/yarn/.github/workflows/ci.yml
+++ b/tests/fixtures/addon/yarn/.github/workflows/ci.yml
@@ -57,12 +57,11 @@ jobs:
       fail-fast: false
       matrix:
         try-scenario:
-          - ember-lts-3.28
           - ember-lts-4.4
+          - ember-lts-4.8
           - ember-release
           - ember-beta
           - ember-canary
-          - ember-classic
           - embroider-safe
           - embroider-optimized
 
diff --git a/tests/fixtures/addon/yarn/.travis.yml b/tests/fixtures/addon/yarn/.travis.yml
index 24a503934..2e14c68b3 100644
--- a/tests/fixtures/addon/yarn/.travis.yml
+++ b/tests/fixtures/addon/yarn/.travis.yml
@@ -46,12 +46,11 @@ 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.28
     - env: EMBER_TRY_SCENARIO=ember-lts-4.4
+    - env: EMBER_TRY_SCENARIO=ember-lts-4.8
     - env: EMBER_TRY_SCENARIO=ember-release
     - env: EMBER_TRY_SCENARIO=ember-beta
     - env: EMBER_TRY_SCENARIO=ember-canary
-    - env: EMBER_TRY_SCENARIO=ember-classic
     - env: EMBER_TRY_SCENARIO=embroider-safe
     - env: EMBER_TRY_SCENARIO=embroider-optimized
 
diff --git a/tests/fixtures/addon/yarn/README.md b/tests/fixtures/addon/yarn/README.md
index 7db9893d2..1c60ec734 100644
--- a/tests/fixtures/addon/yarn/README.md
+++ b/tests/fixtures/addon/yarn/README.md
@@ -5,8 +5,8 @@
 
 ## Compatibility
 
-* Ember.js v3.28 or above
-* Ember CLI v3.28 or above
+* Ember.js v4.4 or above
+* Ember CLI v4.4 or above
 * Node.js v14 or above
 
 
diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json
index 12da37fec..bf3d20106 100644
--- a/tests/fixtures/addon/yarn/package.json
+++ b/tests/fixtures/addon/yarn/package.json
@@ -74,7 +74,7 @@
     "webpack": "^5.75.0"
   },
   "peerDependencies": {
-    "ember-source": "^3.28.0 || ^4.0.0"
+    "ember-source": "^4.0.0"
   },
   "engines": {
     "node": "14.* || 16.* || >= 18"
diff --git a/tests/fixtures/addon/yarn/tests/dummy/config/ember-try.js b/tests/fixtures/addon/yarn/tests/dummy/config/ember-try.js
index 3e6b3b312..646303c14 100644
--- a/tests/fixtures/addon/yarn/tests/dummy/config/ember-try.js
+++ b/tests/fixtures/addon/yarn/tests/dummy/config/ember-try.js
@@ -8,18 +8,18 @@ module.exports = async function () {
     useYarn: true,
     scenarios: [
       {
-        name: 'ember-lts-3.28',
+        name: 'ember-lts-4.4',
         npm: {
           devDependencies: {
-            'ember-source': '~3.28.0',
+            'ember-source': '~4.4.0',
           },
         },
       },
       {
-        name: 'ember-lts-4.4',
+        name: 'ember-lts-4.8',
         npm: {
           devDependencies: {
-            'ember-source': '~4.4.0',
+            'ember-source': '~4.8.0',
           },
         },
       },
@@ -47,24 +47,6 @@ module.exports = async function () {
           },
         },
       },
-      {
-        name: 'ember-classic',
-        env: {
-          EMBER_OPTIONAL_FEATURES: JSON.stringify({
-            'application-template-wrapper': true,
-            'default-async-observers': false,
-            'template-only-glimmer-components': false,
-          }),
-        },
-        npm: {
-          devDependencies: {
-            'ember-source': '~3.28.0',
-          },
-          ember: {
-            edition: 'classic',
-          },
-        },
-      },
       embroiderSafe(),
       embroiderOptimized(),
     ],
diff --git a/tests/unit/blueprints/addon-test.js b/tests/unit/blueprints/addon-test.js
index c8fdf0c1c..139e295c4 100644
--- a/tests/unit/blueprints/addon-test.js
+++ b/tests/unit/blueprints/addon-test.js
@@ -183,7 +183,7 @@ describe('blueprint - addon', function () {
         let json = JSON.parse(output);
 
         expect(json.peerDependencies).to.deep.equal({
-          'ember-source': '^3.28.0 || ^4.0.0',
+          'ember-source': '^4.0.0',
           'foo-bar': '^1.0.0',
         });
       });