Repository: ember-cli/ember-cli (2025-08-21T09:34:07Z)

Issue:
Add a deprecation so that when someone uses `--embroider` it tells them to instead use the new blueprint
There should be a **LARGE**, impossible to miss, deprecation that tells people that are using `--embroider` to generate a new app that they should instead use `-b @ember/app-blueprint` which opts them into the Vite build.

This should automatically be shown during the ember-cli-update process too so make sure there is text to say "if you are using ember-cli-update then consider migrating to vite using ember-vite-codemod" or something like that too


Discussion:
Add message to `ember-cli` commands `init` and `new`



Patch:
diff --git a/lib/commands/init.js b/lib/commands/init.js
index 55d347c5ea..fb08ab99fe 100644
--- a/lib/commands/init.js
+++ b/lib/commands/init.js
@@ -10,6 +10,7 @@ const normalizeBlueprint = require('../utilities/normalize-blueprint-option');
 const mergeBlueprintOptions = require('../utilities/merge-blueprint-options');
 const { isPnpmProject, isYarnProject } = require('../utilities/package-managers');
 const getLangArg = require('../../lib/utilities/get-lang-arg');
+const { deprecate, DEPRECATIONS } = require('../debug');
 
 module.exports = Command.extend({
   name: 'init',
@@ -39,7 +40,12 @@ module.exports = Command.extend({
       type: String,
       description: 'Sets the base human language of the application via index.html',
     },
-    { name: 'embroider', type: Boolean, default: false, description: 'Enables the build system to use Embroider' },
+    {
+      name: 'embroider',
+      type: Boolean,
+      default: false,
+      description: 'Deprecated: Enables the build system to use Embroider',
+    },
     {
       name: 'ci-provider',
       type: ['github', 'none'],
@@ -74,6 +80,12 @@ module.exports = Command.extend({
   beforeRun: mergeBlueprintOptions,
 
   async run(commandOptions, rawArgs) {
+    deprecate(
+      "Don't use `--embroider` option. Use `-b @ember/app-blueprint` instead.",
+      !commandOptions.embroider,
+      DEPRECATIONS.EMBROIDER.options
+    );
+
     if (commandOptions.dryRun) {
       commandOptions.skipNpm = true;
     }
@@ -142,5 +154,11 @@ module.exports = Command.extend({
     this.ui.writeLine(`  ${chalk.gray('$')} ${chalk.cyan(`${commandOptions.packageManager ?? 'npm'} start`)}`);
     this.ui.writeLine('');
     this.ui.writeLine('Happy coding!');
+
+    deprecate(
+      "Don't use `--embroider` option. Use `-b @ember/app-blueprint` instead.",
+      !commandOptions.embroider,
+      DEPRECATIONS.EMBROIDER.options
+    );
   },
 });
diff --git a/lib/commands/new.js b/lib/commands/new.js
index bc8e6da786..ef7fee2a96 100644
--- a/lib/commands/new.js
+++ b/lib/commands/new.js
@@ -7,6 +7,7 @@ const SilentError = require('silent-error');
 const isValidProjectName = require('../utilities/valid-project-name');
 const normalizeBlueprint = require('../utilities/normalize-blueprint-option');
 const mergeBlueprintOptions = require('../utilities/merge-blueprint-options');
+const { deprecate, DEPRECATIONS } = require('../debug');
 
 module.exports = Command.extend({
   name: 'new',
@@ -37,7 +38,12 @@ module.exports = Command.extend({
       description: 'Sets the base human language of the application via index.html',
     },
     { name: 'lint-fix', type: Boolean, default: true },
-    { name: 'embroider', type: Boolean, default: false, description: 'Enables the build system to use Embroider' },
+    {
+      name: 'embroider',
+      type: Boolean,
+      default: false,
+      description: 'Deprecated: Enables the build system to use Embroider',
+    },
     {
       name: 'ci-provider',
       type: ['github', 'none'],
@@ -70,6 +76,12 @@ module.exports = Command.extend({
   beforeRun: mergeBlueprintOptions,
 
   async run(commandOptions, rawArgs) {
+    deprecate(
+      "Don't use `--embroider` option. Use `-b @ember/app-blueprint` instead.",
+      !commandOptions.embroider,
+      DEPRECATIONS.EMBROIDER.options
+    );
+
     let projectName = rawArgs[0],
       message;
 
@@ -141,6 +153,12 @@ module.exports = Command.extend({
 
     initCommand.project.root = process.cwd();
 
+    deprecate(
+      "Don't use `--embroider` option. Use `-b @ember/app-blueprint` instead.",
+      !commandOptions.embroider,
+      DEPRECATIONS.EMBROIDER.options
+    );
+
     return await initCommand.run(commandOptions, rawArgs);
   },
 });
diff --git a/lib/debug/deprecations.js b/lib/debug/deprecations.js
index 9bf42e45f0..59536cb77c 100644
--- a/lib/debug/deprecations.js
+++ b/lib/debug/deprecations.js
@@ -23,6 +23,15 @@ const DEPRECATIONS = {
       types: ['app-prefix', 'app-suffix', 'tests-prefix', 'tests-suffix', 'vendor-prefix', 'vendor-suffix'],
     },
   }),
+  EMBROIDER: deprecation({
+    for: 'ember-cli',
+    id: 'ember-cli.dont-use-embroider-option',
+    since: {
+      available: '6.8.0',
+    },
+    until: '7.0.0',
+    url: 'https://deprecations.emberjs.com/id/dont-use-embroider-option',
+  }),
 };
 
 module.exports = DEPRECATIONS;


Test patch:
diff --git a/tests/acceptance/new-test.js b/tests/acceptance/new-test.js
index 0c732f49bd..f37c8dabdf 100644
--- a/tests/acceptance/new-test.js
+++ b/tests/acceptance/new-test.js
@@ -11,6 +11,7 @@ const util = require('util');
 const EOL = require('os').EOL;
 const hasGlobalYarn = require('../helpers/has-global-yarn');
 const { set, get, cloneDeep } = require('lodash');
+const { DEPRECATIONS } = require('../../lib/debug');
 
 const { isExperimentEnabled } = require('@ember-tooling/blueprint-model/utilities/experiments');
 
@@ -423,6 +424,10 @@ describe('Acceptance: ember new', function () {
   }
 
   it('embroider enabled with --embroider', async function () {
+    if (DEPRECATIONS.EMBROIDER.isRemoved) {
+      this.skip();
+    }
+
     await ember(['new', 'foo', '--skip-npm', '--skip-git', '--embroider']);
 
     let pkgJson = fs.readJsonSync('package.json');
diff --git a/tests/fixtures/help/help-with-addon.txt b/tests/fixtures/help/help-with-addon.txt
index 218f66390e..e78c59b946 100644
--- a/tests/fixtures/help/help-with-addon.txt
+++ b/tests/fixtures/help/help-with-addon.txt
@@ -105,7 +105,7 @@ ember init [33m<glob-pattern>[39m [36m<options...>[39m
   [36m--name[39m [36m(String)[39m [36m(Default: "")[39m
     [90maliases: -n <value>[39m
   [36m--lang[39m [36m(String)[39m Sets the base human language of the application via index.html
-  [36m--embroider[39m [36m(Boolean)[39m [36m(Default: false)[39m Enables the build system to use Embroider
+  [36m--embroider[39m [36m(Boolean)[39m [36m(Default: false)[39m Deprecated: Enables the build system to use Embroider
   [36m--ci-provider[39m [36m(github, none)[39m [36m(Default: github)[39m Installs the optional default CI blueprint. Only Github Actions is supported at the moment.
   [36m--ember-data[39m [36m(Boolean)[39m [36m(Default: true)[39m Include ember-data dependencies and configuration
   [36m--typescript[39m [36m(Boolean)[39m [36m(Default: false)[39m Set up the app to use TypeScript
@@ -142,7 +142,7 @@ ember new [33m<app-name>[39m [36m<options...>[39m
     [90maliases: -dir <value>[39m
   [36m--lang[39m [36m(String)[39m Sets the base human language of the application via index.html
   [36m--lint-fix[39m [36m(Boolean)[39m [36m(Default: true)[39m
-  [36m--embroider[39m [36m(Boolean)[39m [36m(Default: false)[39m Enables the build system to use Embroider
+  [36m--embroider[39m [36m(Boolean)[39m [36m(Default: false)[39m Deprecated: Enables the build system to use Embroider
   [36m--ci-provider[39m [36m(github, none)[39m Installs the optional default CI blueprint. Only Github Actions is supported at the moment.
   [36m--ember-data[39m [36m(Boolean)[39m [36m(Default: true)[39m Include ember-data dependencies and configuration
   [36m--interactive[39m [36m(Boolean)[39m [36m(Default: false)[39m Create a new Ember app/addon in an interactive way.
diff --git a/tests/fixtures/help/help.js b/tests/fixtures/help/help.js
index e13f5f8e7f..8c3805d808 100644
--- a/tests/fixtures/help/help.js
+++ b/tests/fixtures/help/help.js
@@ -469,7 +469,7 @@ module.exports = {
           default: false,
           key: 'embroider',
           name: 'embroider',
-          description: 'Enables the build system to use Embroider',
+          description: 'Deprecated: Enables the build system to use Embroider',
           required: false,
         },
         {
@@ -620,7 +620,7 @@ module.exports = {
           default: false,
           key: 'embroider',
           name: 'embroider',
-          description: 'Enables the build system to use Embroider',
+          description: 'Deprecated: Enables the build system to use Embroider',
           required: false,
         },
         {
diff --git a/tests/fixtures/help/help.txt b/tests/fixtures/help/help.txt
index 1af05f66c5..4cd9460511 100644
--- a/tests/fixtures/help/help.txt
+++ b/tests/fixtures/help/help.txt
@@ -105,7 +105,7 @@ ember init [33m<glob-pattern>[39m [36m<options...>[39m
   [36m--name[39m [36m(String)[39m [36m(Default: "")[39m
     [90maliases: -n <value>[39m
   [36m--lang[39m [36m(String)[39m Sets the base human language of the application via index.html
-  [36m--embroider[39m [36m(Boolean)[39m [36m(Default: false)[39m Enables the build system to use Embroider
+  [36m--embroider[39m [36m(Boolean)[39m [36m(Default: false)[39m Deprecated: Enables the build system to use Embroider
   [36m--ci-provider[39m [36m(github, none)[39m [36m(Default: github)[39m Installs the optional default CI blueprint. Only Github Actions is supported at the moment.
   [36m--ember-data[39m [36m(Boolean)[39m [36m(Default: true)[39m Include ember-data dependencies and configuration
   [36m--typescript[39m [36m(Boolean)[39m [36m(Default: false)[39m Set up the app to use TypeScript
@@ -142,7 +142,7 @@ ember new [33m<app-name>[39m [36m<options...>[39m
     [90maliases: -dir <value>[39m
   [36m--lang[39m [36m(String)[39m Sets the base human language of the application via index.html
   [36m--lint-fix[39m [36m(Boolean)[39m [36m(Default: true)[39m
-  [36m--embroider[39m [36m(Boolean)[39m [36m(Default: false)[39m Enables the build system to use Embroider
+  [36m--embroider[39m [36m(Boolean)[39m [36m(Default: false)[39m Deprecated: Enables the build system to use Embroider
   [36m--ci-provider[39m [36m(github, none)[39m Installs the optional default CI blueprint. Only Github Actions is supported at the moment.
   [36m--ember-data[39m [36m(Boolean)[39m [36m(Default: true)[39m Include ember-data dependencies and configuration
   [36m--interactive[39m [36m(Boolean)[39m [36m(Default: false)[39m Create a new Ember app/addon in an interactive way.
diff --git a/tests/fixtures/help/with-addon-blueprints.js b/tests/fixtures/help/with-addon-blueprints.js
index 4d5d512582..b45396274c 100644
--- a/tests/fixtures/help/with-addon-blueprints.js
+++ b/tests/fixtures/help/with-addon-blueprints.js
@@ -501,7 +501,7 @@ module.exports = {
           default: false,
           key: 'embroider',
           name: 'embroider',
-          description: 'Enables the build system to use Embroider',
+          description: 'Deprecated: Enables the build system to use Embroider',
           required: false
         },
         {
@@ -652,7 +652,7 @@ module.exports = {
           default: false,
           key: 'embroider',
           name: 'embroider',
-          description: 'Enables the build system to use Embroider',
+          description: 'Deprecated: Enables the build system to use Embroider',
           required: false
         },
         {
diff --git a/tests/fixtures/help/with-addon-commands.js b/tests/fixtures/help/with-addon-commands.js
index 7ae4a761dc..c55144609f 100644
--- a/tests/fixtures/help/with-addon-commands.js
+++ b/tests/fixtures/help/with-addon-commands.js
@@ -469,7 +469,7 @@ module.exports = {
           default: false,
           key: 'embroider',
           name: 'embroider',
-          description: 'Enables the build system to use Embroider',
+          description: 'Deprecated: Enables the build system to use Embroider',
           required: false
         },
         {
@@ -620,7 +620,7 @@ module.exports = {
           default: false,
           key: 'embroider',
           name: 'embroider',
-          description: 'Enables the build system to use Embroider',
+          description: 'Deprecated: Enables the build system to use Embroider',
           required: false
         },
         {