diff --git a/docs/generated/packages/angular/generators/application.json b/docs/generated/packages/angular/generators/application.json index 63896891c6c7f..deee6493f34fe 100644 --- a/docs/generated/packages/angular/generators/application.json +++ b/docs/generated/packages/angular/generators/application.json @@ -148,7 +148,7 @@ "standalone": { "description": "Generate an application that is setup to use standalone components. _Note: This is only supported in Angular versions >= 14.1.0_", "type": "boolean", - "default": false + "x-priority": "important" }, "rootProject": { "description": "Create an application at the root of the workspace.", diff --git a/e2e/angular-core/src/angular-linting.test.ts b/e2e/angular-core/src/angular-linting.test.ts index 8d4f1034d7737..4e91baf76a568 100644 --- a/e2e/angular-core/src/angular-linting.test.ts +++ b/e2e/angular-core/src/angular-linting.test.ts @@ -14,18 +14,24 @@ describe('Angular Package', () => { it('should support eslint and pass linting on the standard generated code', async () => { const myapp = uniq('myapp'); - runCLI(`generate @nrwl/angular:app ${myapp} --linter=eslint`); + runCLI( + `generate @nrwl/angular:app ${myapp} --linter=eslint --no-interactive` + ); expect(runCLI(`lint ${myapp}`)).toContain('All files pass linting.'); const mylib = uniq('mylib'); - runCLI(`generate @nrwl/angular:lib ${mylib} --linter=eslint`); + runCLI( + `generate @nrwl/angular:lib ${mylib} --linter=eslint --no-interactive` + ); expect(runCLI(`lint ${mylib}`)).toContain('All files pass linting.'); }); it('should support eslint and successfully lint external HTML files and inline templates', async () => { const myapp = uniq('myapp'); - runCLI(`generate @nrwl/angular:app ${myapp} --linter=eslint`); + runCLI( + `generate @nrwl/angular:app ${myapp} --linter=eslint --no-interactive` + ); const templateWhichFailsBananaInBoxLintCheck = `
`; const wrappedAsInlineTemplate = ` diff --git a/e2e/angular-extensions/src/misc.test.ts b/e2e/angular-extensions/src/misc.test.ts index 6aa2599cdbf1a..e02c618b8edcc 100644 --- a/e2e/angular-extensions/src/misc.test.ts +++ b/e2e/angular-extensions/src/misc.test.ts @@ -20,7 +20,7 @@ describe('Move Angular Project', () => { app1 = uniq('app1'); app2 = uniq('app2'); newPath = `subfolder/${app2}`; - runCLI(`generate @nrwl/angular:app ${app1}`); + runCLI(`generate @nrwl/angular:app ${app1} --no-interactive`); }); afterAll(() => cleanupProject()); @@ -99,13 +99,13 @@ describe('Move Angular Project', () => { it('should work for libraries', () => { const lib1 = uniq('mylib'); const lib2 = uniq('mylib'); - runCLI(`generate @nrwl/angular:lib ${lib1}`); + runCLI(`generate @nrwl/angular:lib ${lib1} --no-interactive`); /** * Create a library which imports the module from the other lib */ - runCLI(`generate @nrwl/angular:lib ${lib2}`); + runCLI(`generate @nrwl/angular:lib ${lib2} --no-interactive`); updateFile( `libs/${lib2}/src/lib/${lib2}.module.ts`, diff --git a/packages/angular/ng-package.json b/packages/angular/ng-package.json index 1437718a040a8..bb8fbc5f547e6 100644 --- a/packages/angular/ng-package.json +++ b/packages/angular/ng-package.json @@ -22,7 +22,8 @@ "semver", "webpack", "http-server", - "magic-string" + "magic-string", + "enquirer" ], "keepLifecycleScripts": true } diff --git a/packages/angular/package.json b/packages/angular/package.json index 11bb92bf7965a..7976ee6249efb 100644 --- a/packages/angular/package.json +++ b/packages/angular/package.json @@ -54,7 +54,8 @@ "ts-node": "10.9.1", "tsconfig-paths": "^4.1.2", "webpack": "^5.75.0", - "webpack-merge": "5.7.3" + "webpack-merge": "5.7.3", + "enquirer": "^2.3.6" }, "peerDependencies": { "@angular-devkit/build-angular": ">= 14.0.0 < 16.0.0", diff --git a/packages/angular/src/generators/application/application.spec.ts b/packages/angular/src/generators/application/application.spec.ts index c2a1f2a3873b8..1cd1107b167c6 100644 --- a/packages/angular/src/generators/application/application.spec.ts +++ b/packages/angular/src/generators/application/application.spec.ts @@ -20,17 +20,23 @@ import { } from '../../utils/versions'; import { applicationGenerator } from './application'; import type { Schema } from './schema'; - +import * as enquirer from 'enquirer'; // need to mock cypress otherwise it'll use the nx installed version from package.json // which is v9 while we are testing for the new v10 version jest.mock('@nrwl/cypress/src/utils/cypress-version'); +jest.mock('enquirer'); describe('app', () => { let appTree: Tree; let mockedInstalledCypressVersion: jest.Mock< ReturnType