Repository: ember-cli/ember-cli (js)

Issue:
For v6, don't error if you're in an ember-cli project when trying to generate a new project
This has been an issue forever, but to change it would be a breaking-change.

If I want to use a specific ember-cli, I may want to declare the version in my package.json.
But, in a monorepo, if I cd to a directory and try to generate a project, ember-cli errors trying to tell me I'm already in an ember-cli project (which isn't correct).

```
<root>/
  package.json # defines ember-cli
  packages/
    # I want to make a new package here (or app)

```

Pull request description:
[ENHANCEMENT] Allow creating apps and addons everywhere
Closes #10557.

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 39698639b..b83d182f9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,15 +1,14 @@
 # ember-cli Changelog
 
-## v6.0.0
+## v6.0.0-beta.0
 
 #### Blueprint Changes
 
-- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v5.12.0...v6.0.0)
-- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v5.12.0...v6.0.0)
+- [`ember new` diff](https://github.com/ember-cli/ember-new-output/compare/v5.12.0...v6.0.0-beta.0)
+- [`ember addon` diff](https://github.com/ember-cli/ember-addon-output/compare/v5.12.0...v6.0.0-beta.0)
 
 #### Changelog
 
-- [#10559](https://github.com/ember-cli/ember-cli/pull/10559) [ENHANCEMENT] Make deprecations throw when the `until` for `ember-cli` has passed [@kategengler](https://github.com/kategengler)
 - [#10453](https://github.com/ember-cli/ember-cli/pull/10453) [ENHANCEMENT] Allow specifying no CI provider [@deanylev](https://github.com/deanylev)
 - [#10505](https://github.com/ember-cli/ember-cli/pull/10505) use our fork of remove-types with config: false [@mansona](https://github.com/mansona)
 - [#10506](https://github.com/ember-cli/ember-cli/pull/10506) [ENHANCEMENT] Use the official types in the blueprints [@Windvis](https://github.com/Windvis)
diff --git a/lib/commands/new.js b/lib/commands/new.js
index 1447b6eee..6f97b1946 100644
--- a/lib/commands/new.js
+++ b/lib/commands/new.js
@@ -11,7 +11,7 @@ const mergeBlueprintOptions = require('../utilities/merge-blueprint-options');
 module.exports = Command.extend({
   name: 'new',
   description: `Creates a new directory and runs ${chalk.green('ember init')} in it.`,
-  works: 'outsideProject',
+  works: 'everywhere',
 
   availableOptions: [
     { name: 'dry-run', type: Boolean, default: false, aliases: ['d'] },
diff --git a/package.json b/package.json
index 9d7af5ba6..08833e4c4 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "ember-cli",
-  "version": "6.0.0",
+  "version": "6.0.0-beta.0",
   "description": "Command line tool for developing ambitious ember.js apps",
   "keywords": [
     "app",


Test patch:
diff --git a/tests/acceptance/new-test.js b/tests/acceptance/new-test.js
index d54aedf83..c9c709683 100644
--- a/tests/acceptance/new-test.js
+++ b/tests/acceptance/new-test.js
@@ -9,7 +9,6 @@ const tmp = require('ember-cli-internal-test-helpers/lib/helpers/tmp');
 let root = process.cwd();
 const util = require('util');
 const EOL = require('os').EOL;
-const chalk = require('chalk');
 const hasGlobalYarn = require('../helpers/has-global-yarn');
 
 const { isExperimentEnabled } = require('../../lib/experiments');
@@ -201,16 +200,12 @@ describe('Acceptance: ember new', function () {
     expect(error.message).to.equal("Directory 'bar' already exists.");
   });
 
-  it('Cannot run ember new, inside of ember-cli project', async function () {
+  it('successfully runs `ember new` inside of an existing ember-cli project', async function () {
     await ember(['new', 'foo', '--skip-npm', '--skip-git']);
-
-    let error = await expect(ember(['new', 'foo', '--skip-npm', '--skip-git'])).to.be.rejected;
-
-    expect(dir('foo')).to.not.exist;
-    expect(error.name).to.equal('SilentError');
-    expect(error.message).to.equal(`You cannot use the ${chalk.green('new')} command inside an ember-cli project.`);
-
     confirmBlueprintedForDir('blueprints/app');
+
+    await ember(['new', 'bar', '--skip-npm', '--skip-git']);
+    confirmBlueprintedForDir('blueprints/app', 'bar');
   });
 
   it('ember new with blueprint uses the specified blueprint directory with a relative path', async function () {
diff --git a/tests/fixtures/help/help.js b/tests/fixtures/help/help.js
index 0a47a2d22..aca3cef04 100644
--- a/tests/fixtures/help/help.js
+++ b/tests/fixtures/help/help.js
@@ -15,7 +15,7 @@ module.exports = {
       name: 'addon',
       description: 'Generates a new folder structure for building an addon, complete with test harness.',
       aliases: [],
-      works: 'outsideProject',
+      works: 'everywhere',
       availableOptions: [
         {
           name: 'dry-run',
@@ -520,7 +520,7 @@ module.exports = {
       name: 'new',
       description: processHelpString('Creates a new directory and runs \u001b[32member init\u001b[39m in it.'),
       aliases: [],
-      works: 'outsideProject',
+      works: 'everywhere',
       availableOptions: [
         {
           name: 'dry-run',
diff --git a/tests/fixtures/help/with-addon-blueprints.js b/tests/fixtures/help/with-addon-blueprints.js
index 9930f0fa3..a343edc69 100644
--- a/tests/fixtures/help/with-addon-blueprints.js
+++ b/tests/fixtures/help/with-addon-blueprints.js
@@ -15,7 +15,7 @@ module.exports = {
       name: 'addon',
       description: 'Generates a new folder structure for building an addon, complete with test harness.',
       aliases: [],
-      works: 'outsideProject',
+      works: 'everywhere',
       availableOptions: [
         {
           name: 'dry-run',
@@ -552,7 +552,7 @@ module.exports = {
       name: 'new',
       description: processHelpString('Creates a new directory and runs \u001b[32member init\u001b[39m in it.'),
       aliases: [],
-      works: 'outsideProject',
+      works: 'everywhere',
       availableOptions: [
         {
           name: 'dry-run',
diff --git a/tests/fixtures/help/with-addon-commands.js b/tests/fixtures/help/with-addon-commands.js
index 9a307d041..6b87ae551 100644
--- a/tests/fixtures/help/with-addon-commands.js
+++ b/tests/fixtures/help/with-addon-commands.js
@@ -15,7 +15,7 @@ module.exports = {
       name: 'addon',
       description: 'Generates a new folder structure for building an addon, complete with test harness.',
       aliases: [],
-      works: 'outsideProject',
+      works: 'everywhere',
       availableOptions: [
         {
           name: 'dry-run',
@@ -520,7 +520,7 @@ module.exports = {
       name: 'new',
       description: processHelpString('Creates a new directory and runs \u001b[32member init\u001b[39m in it.'),
       aliases: [],
-      works: 'outsideProject',
+      works: 'everywhere',
       availableOptions: [
         {
           name: 'dry-run',