Repository: ember-cli/ember-cli
Pull request #10331 (2023-08-02 12:13:15)

[ENHANCEMENT] Exclude `@ember/string` from `addon` blueprint
`ember-resolver` v11 dropped its peer dependency on `@ember/string`, and addons don't have `ember-data` installed by default. This means `@ember/string` can be safely excluded from the `addon` blueprint as it remains unused.


Patch:
diff --git a/blueprints/addon/index.js b/blueprints/addon/index.js
index af51c4d79..416f86f8b 100644
--- a/blueprints/addon/index.js
+++ b/blueprints/addon/index.js
@@ -71,6 +71,9 @@ module.exports = {
     delete contents.devDependencies['@types/ember-data__store'];
     delete contents.devDependencies['ember-fetch'];
 
+    // `@ember/string` is a peer dependency of `ember-data`.
+    delete contents.devDependencies['@ember/string'];
+
     // Per RFC #811, addons should not have this dependency.
     // @see https://github.com/emberjs/rfcs/blob/master/text/0811-element-modifiers.md#detailed-design
     delete contents.devDependencies['ember-modifier'];
diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json
index 52572a916..815a0b382 100644
--- a/blueprints/app/files/package.json
+++ b/blueprints/app/files/package.json
@@ -87,7 +87,7 @@
     "ember-modifier": "^4.1.0",
     "ember-page-title": "^7.0.0",
     "ember-qunit": "^7.0.0",
-    "ember-resolver": "^10.1.1",
+    "ember-resolver": "^11.0.0",
     "ember-source": "~5.2.0-beta.3",
     "ember-template-lint": "^5.11.0<% if (welcome) { %>",
     "ember-welcome-page": "^7.0.2<% } %>",


Test patch:
diff --git a/tests/fixtures/addon/defaults/package.json b/tests/fixtures/addon/defaults/package.json
index 65808920f..a69e81dc1 100644
--- a/tests/fixtures/addon/defaults/package.json
+++ b/tests/fixtures/addon/defaults/package.json
@@ -35,7 +35,6 @@
     "@babel/eslint-parser": "^7.22.6",
     "@babel/plugin-proposal-decorators": "^7.22.6",
     "@ember/optional-features": "^2.0.0",
-    "@ember/string": "^3.1.1",
     "@ember/test-helpers": "^3.2.0",
     "@embroider/test-setup": "^3.0.1",
     "@glimmer/component": "^1.1.2",
@@ -52,7 +51,7 @@
     "ember-load-initializers": "^2.1.2",
     "ember-page-title": "^7.0.0",
     "ember-qunit": "^7.0.0",
-    "ember-resolver": "^10.1.1",
+    "ember-resolver": "^11.0.0",
     "ember-source": "~5.2.0-beta.3",
     "ember-source-channel-url": "^3.0.0",
     "ember-template-lint": "^5.11.0",
diff --git a/tests/fixtures/addon/pnpm/package.json b/tests/fixtures/addon/pnpm/package.json
index 7c668db9d..ed95e2a2c 100644
--- a/tests/fixtures/addon/pnpm/package.json
+++ b/tests/fixtures/addon/pnpm/package.json
@@ -35,7 +35,6 @@
     "@babel/eslint-parser": "^7.22.6",
     "@babel/plugin-proposal-decorators": "^7.22.6",
     "@ember/optional-features": "^2.0.0",
-    "@ember/string": "^3.1.1",
     "@ember/test-helpers": "^3.2.0",
     "@embroider/test-setup": "^3.0.1",
     "@glimmer/component": "^1.1.2",
@@ -52,7 +51,7 @@
     "ember-load-initializers": "^2.1.2",
     "ember-page-title": "^7.0.0",
     "ember-qunit": "^7.0.0",
-    "ember-resolver": "^10.1.1",
+    "ember-resolver": "^11.0.0",
     "ember-source": "~5.2.0-beta.3",
     "ember-source-channel-url": "^3.0.0",
     "ember-template-lint": "^5.11.0",
diff --git a/tests/fixtures/addon/typescript/package.json b/tests/fixtures/addon/typescript/package.json
index e0f7c04eb..64fd6cdf8 100644
--- a/tests/fixtures/addon/typescript/package.json
+++ b/tests/fixtures/addon/typescript/package.json
@@ -51,7 +51,6 @@
   },
   "devDependencies": {
     "@ember/optional-features": "^2.0.0",
-    "@ember/string": "^3.1.1",
     "@ember/test-helpers": "^3.2.0",
     "@embroider/test-setup": "^3.0.1",
     "@glimmer/component": "^1.1.2",
@@ -96,7 +95,7 @@
     "ember-load-initializers": "^2.1.2",
     "ember-page-title": "^7.0.0",
     "ember-qunit": "^7.0.0",
-    "ember-resolver": "^10.1.1",
+    "ember-resolver": "^11.0.0",
     "ember-source": "~5.2.0-beta.3",
     "ember-source-channel-url": "^3.0.0",
     "ember-template-lint": "^5.11.0",
diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json
index 7c668db9d..ed95e2a2c 100644
--- a/tests/fixtures/addon/yarn/package.json
+++ b/tests/fixtures/addon/yarn/package.json
@@ -35,7 +35,6 @@
     "@babel/eslint-parser": "^7.22.6",
     "@babel/plugin-proposal-decorators": "^7.22.6",
     "@ember/optional-features": "^2.0.0",
-    "@ember/string": "^3.1.1",
     "@ember/test-helpers": "^3.2.0",
     "@embroider/test-setup": "^3.0.1",
     "@glimmer/component": "^1.1.2",
@@ -52,7 +51,7 @@
     "ember-load-initializers": "^2.1.2",
     "ember-page-title": "^7.0.0",
     "ember-qunit": "^7.0.0",
-    "ember-resolver": "^10.1.1",
+    "ember-resolver": "^11.0.0",
     "ember-source": "~5.2.0-beta.3",
     "ember-source-channel-url": "^3.0.0",
     "ember-template-lint": "^5.11.0",
diff --git a/tests/fixtures/app/defaults/package.json b/tests/fixtures/app/defaults/package.json
index dbad9f226..b5dfd6c05 100644
--- a/tests/fixtures/app/defaults/package.json
+++ b/tests/fixtures/app/defaults/package.json
@@ -50,7 +50,7 @@
     "ember-modifier": "^4.1.0",
     "ember-page-title": "^7.0.0",
     "ember-qunit": "^7.0.0",
-    "ember-resolver": "^10.1.1",
+    "ember-resolver": "^11.0.0",
     "ember-source": "~5.2.0-beta.3",
     "ember-template-lint": "^5.11.0",
     "ember-welcome-page": "^7.0.2",
diff --git a/tests/fixtures/app/embroider-no-welcome/package.json b/tests/fixtures/app/embroider-no-welcome/package.json
index b3e24ccf2..a3b6b6395 100644
--- a/tests/fixtures/app/embroider-no-welcome/package.json
+++ b/tests/fixtures/app/embroider-no-welcome/package.json
@@ -51,7 +51,7 @@
     "ember-modifier": "^4.1.0",
     "ember-page-title": "^7.0.0",
     "ember-qunit": "^7.0.0",
-    "ember-resolver": "^10.1.1",
+    "ember-resolver": "^11.0.0",
     "ember-source": "~5.2.0-beta.3",
     "ember-template-lint": "^5.11.0",
     "eslint": "^8.44.0",
diff --git a/tests/fixtures/app/embroider-pnpm/package.json b/tests/fixtures/app/embroider-pnpm/package.json
index ec1fc6355..a5bf421bc 100644
--- a/tests/fixtures/app/embroider-pnpm/package.json
+++ b/tests/fixtures/app/embroider-pnpm/package.json
@@ -51,7 +51,7 @@
     "ember-modifier": "^4.1.0",
     "ember-page-title": "^7.0.0",
     "ember-qunit": "^7.0.0",
-    "ember-resolver": "^10.1.1",
+    "ember-resolver": "^11.0.0",
     "ember-source": "~5.2.0-beta.3",
     "ember-template-lint": "^5.11.0",
     "ember-welcome-page": "^7.0.2",
diff --git a/tests/fixtures/app/embroider-yarn/package.json b/tests/fixtures/app/embroider-yarn/package.json
index ec1fc6355..a5bf421bc 100644
--- a/tests/fixtures/app/embroider-yarn/package.json
+++ b/tests/fixtures/app/embroider-yarn/package.json
@@ -51,7 +51,7 @@
     "ember-modifier": "^4.1.0",
     "ember-page-title": "^7.0.0",
     "ember-qunit": "^7.0.0",
-    "ember-resolver": "^10.1.1",
+    "ember-resolver": "^11.0.0",
     "ember-source": "~5.2.0-beta.3",
     "ember-template-lint": "^5.11.0",
     "ember-welcome-page": "^7.0.2",
diff --git a/tests/fixtures/app/embroider/package.json b/tests/fixtures/app/embroider/package.json
index ec1fc6355..a5bf421bc 100644
--- a/tests/fixtures/app/embroider/package.json
+++ b/tests/fixtures/app/embroider/package.json
@@ -51,7 +51,7 @@
     "ember-modifier": "^4.1.0",
     "ember-page-title": "^7.0.0",
     "ember-qunit": "^7.0.0",
-    "ember-resolver": "^10.1.1",
+    "ember-resolver": "^11.0.0",
     "ember-source": "~5.2.0-beta.3",
     "ember-template-lint": "^5.11.0",
     "ember-welcome-page": "^7.0.2",
diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json
index 4a0d18a09..0c2c84a71 100644
--- a/tests/fixtures/app/npm/package.json
+++ b/tests/fixtures/app/npm/package.json
@@ -50,7 +50,7 @@
     "ember-modifier": "^4.1.0",
     "ember-page-title": "^7.0.0",
     "ember-qunit": "^7.0.0",
-    "ember-resolver": "^10.1.1",
+    "ember-resolver": "^11.0.0",
     "ember-source": "~5.2.0-beta.3",
     "ember-template-lint": "^5.11.0",
     "eslint": "^8.44.0",
diff --git a/tests/fixtures/app/pnpm/package.json b/tests/fixtures/app/pnpm/package.json
index dbad9f226..b5dfd6c05 100644
--- a/tests/fixtures/app/pnpm/package.json
+++ b/tests/fixtures/app/pnpm/package.json
@@ -50,7 +50,7 @@
     "ember-modifier": "^4.1.0",
     "ember-page-title": "^7.0.0",
     "ember-qunit": "^7.0.0",
-    "ember-resolver": "^10.1.1",
+    "ember-resolver": "^11.0.0",
     "ember-source": "~5.2.0-beta.3",
     "ember-template-lint": "^5.11.0",
     "ember-welcome-page": "^7.0.2",
diff --git a/tests/fixtures/app/typescript-embroider/package.json b/tests/fixtures/app/typescript-embroider/package.json
index 68f823900..25f37e1e4 100644
--- a/tests/fixtures/app/typescript-embroider/package.json
+++ b/tests/fixtures/app/typescript-embroider/package.json
@@ -83,7 +83,7 @@
     "ember-modifier": "^4.1.0",
     "ember-page-title": "^7.0.0",
     "ember-qunit": "^7.0.0",
-    "ember-resolver": "^10.1.1",
+    "ember-resolver": "^11.0.0",
     "ember-source": "~5.2.0-beta.3",
     "ember-template-lint": "^5.11.0",
     "ember-welcome-page": "^7.0.2",
diff --git a/tests/fixtures/app/typescript/package.json b/tests/fixtures/app/typescript/package.json
index e757ee050..c79e4f291 100644
--- a/tests/fixtures/app/typescript/package.json
+++ b/tests/fixtures/app/typescript/package.json
@@ -82,7 +82,7 @@
     "ember-modifier": "^4.1.0",
     "ember-page-title": "^7.0.0",
     "ember-qunit": "^7.0.0",
-    "ember-resolver": "^10.1.1",
+    "ember-resolver": "^11.0.0",
     "ember-source": "~5.2.0-beta.3",
     "ember-template-lint": "^5.11.0",
     "ember-welcome-page": "^7.0.2",
diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json
index dbad9f226..b5dfd6c05 100644
--- a/tests/fixtures/app/yarn/package.json
+++ b/tests/fixtures/app/yarn/package.json
@@ -50,7 +50,7 @@
     "ember-modifier": "^4.1.0",
     "ember-page-title": "^7.0.0",
     "ember-qunit": "^7.0.0",
-    "ember-resolver": "^10.1.1",
+    "ember-resolver": "^11.0.0",
     "ember-source": "~5.2.0-beta.3",
     "ember-template-lint": "^5.11.0",
     "ember-welcome-page": "^7.0.2",