@nx/angular 17.0.0-beta.6 → 17.0.0-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/angular",
3
- "version": "17.0.0-beta.6",
3
+ "version": "17.0.0-beta.8",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for Angular contains executors, generators, and utilities for managing Angular applications and libraries within an Nx workspace. It provides: \n\n- Integration with libraries such as Storybook, Jest, ESLint, Tailwind CSS, and Cypress. \n\n- Generators to help scaffold code quickly (like: Micro Frontends, Libraries, both internal to your codebase and publishable to npm) \n\n- Upgrading AngularJS applications \n\n- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
6
6
  "repository": {
@@ -79,14 +79,14 @@
79
79
  "webpack": "^5.80.0",
80
80
  "webpack-merge": "^5.8.0",
81
81
  "enquirer": "^2.3.6",
82
- "@nx/devkit": "17.0.0-beta.6",
83
- "@nx/cypress": "17.0.0-beta.6",
84
- "@nx/jest": "17.0.0-beta.6",
85
- "@nx/js": "17.0.0-beta.6",
86
- "@nx/linter": "17.0.0-beta.6",
87
- "@nx/webpack": "17.0.0-beta.6",
88
- "@nx/workspace": "17.0.0-beta.6",
89
- "@nrwl/angular": "17.0.0-beta.6"
82
+ "@nx/devkit": "17.0.0-beta.8",
83
+ "@nx/cypress": "17.0.0-beta.8",
84
+ "@nx/jest": "17.0.0-beta.8",
85
+ "@nx/js": "17.0.0-beta.8",
86
+ "@nx/eslint": "17.0.0-beta.8",
87
+ "@nx/webpack": "17.0.0-beta.8",
88
+ "@nx/workspace": "17.0.0-beta.8",
89
+ "@nrwl/angular": "17.0.0-beta.8"
90
90
  },
91
91
  "peerDependencies": {
92
92
  "@angular-devkit/build-angular": ">= 14.0.0 < 17.0.0",
@@ -2,16 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addLintingGenerator = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const linter_1 = require("@nx/linter");
6
- const lint_project_1 = require("@nx/linter/src/generators/lint-project/lint-project");
5
+ const eslint_1 = require("@nx/eslint");
6
+ const lint_project_1 = require("@nx/eslint/src/generators/lint-project/lint-project");
7
7
  const add_angular_eslint_dependencies_1 = require("./lib/add-angular-eslint-dependencies");
8
- const eslint_file_1 = require("@nx/linter/src/generators/utils/eslint-file");
8
+ const eslint_file_1 = require("@nx/eslint/src/generators/utils/eslint-file");
9
9
  const string_utils_1 = require("@nx/devkit/src/utils/string-utils");
10
10
  async function addLintingGenerator(tree, options) {
11
11
  const tasks = [];
12
12
  const rootProject = options.projectRoot === '.' || options.projectRoot === '';
13
- const lintTask = await (0, linter_1.lintProjectGenerator)(tree, {
14
- linter: linter_1.Linter.EsLint,
13
+ const lintTask = await (0, eslint_1.lintProjectGenerator)(tree, {
14
+ linter: eslint_1.Linter.EsLint,
15
15
  project: options.projectName,
16
16
  tsConfigPaths: [
17
17
  (0, devkit_1.joinPathFragments)(options.projectRoot, 'tsconfig.app.json'),
@@ -5,7 +5,7 @@ type EslintExtensionSchema = {
5
5
  prefix: string;
6
6
  };
7
7
  /**
8
- * @deprecated Use tools from `@nx/linter/src/generators/utils/eslint-file` instead
8
+ * @deprecated Use tools from `@nx/eslint/src/generators/utils/eslint-file` instead
9
9
  */
10
10
  export declare const extendAngularEslintJson: (json: Linter.Config, options: EslintExtensionSchema) => {
11
11
  overrides: ({
@@ -4,7 +4,7 @@ exports.createEsLintConfiguration = exports.extendAngularEslintJson = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const string_utils_1 = require("@nx/devkit/src/utils/string-utils");
6
6
  /**
7
- * @deprecated Use tools from `@nx/linter/src/generators/utils/eslint-file` instead
7
+ * @deprecated Use tools from `@nx/eslint/src/generators/utils/eslint-file` instead
8
8
  */
9
9
  const extendAngularEslintJson = (json, options) => {
10
10
  const overrides = [
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addLinting = void 0;
4
- const linter_1 = require("@nx/linter");
4
+ const eslint_1 = require("@nx/eslint");
5
5
  const add_linting_1 = require("../../add-linting/add-linting");
6
6
  async function addLinting(host, options) {
7
- if (options.linter === linter_1.Linter.None) {
7
+ if (options.linter === eslint_1.Linter.None) {
8
8
  return;
9
9
  }
10
10
  await (0, add_linting_1.default)(host, {
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = void 0;
4
4
  const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
5
5
  const get_npm_scope_1 = require("@nx/js/src/utils/package-json/get-npm-scope");
6
- const linter_1 = require("@nx/linter");
6
+ const eslint_1 = require("@nx/eslint");
7
7
  const test_runners_1 = require("../../../utils/test-runners");
8
8
  const project_1 = require("../../utils/project");
9
9
  async function normalizeOptions(host, options) {
@@ -33,7 +33,7 @@ async function normalizeOptions(host, options) {
33
33
  skipFormat: false,
34
34
  unitTestRunner: test_runners_1.UnitTestRunner.Jest,
35
35
  e2eTestRunner: test_runners_1.E2eTestRunner.Cypress,
36
- linter: linter_1.Linter.EsLint,
36
+ linter: eslint_1.Linter.EsLint,
37
37
  strict: true,
38
38
  bundler: options.bundler ?? 'webpack',
39
39
  ...options,
@@ -1,6 +1,6 @@
1
1
  import { E2eTestRunner, UnitTestRunner } from '../../../utils/test-runners';
2
2
  import type { Schema } from '../schema';
3
- import { Linter } from '@nx/linter';
3
+ import { Linter } from '@nx/eslint';
4
4
  export interface NormalizedSchema extends Schema {
5
5
  linter: Linter;
6
6
  unitTestRunner: UnitTestRunner;
@@ -1,5 +1,5 @@
1
1
  import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils';
2
- import type { Linter } from '@nx/linter';
2
+ import type { Linter } from '@nx/eslint';
3
3
  import type { E2eTestRunner, UnitTestRunner } from '../../utils/test-runners';
4
4
  import type { Styles } from '../utils/types';
5
5
 
@@ -5,11 +5,11 @@ describe(<%= componentName %>.name, () => {
5
5
 
6
6
  beforeEach(() => {
7
7
  TestBed.overrideComponent(<%= componentName %>, {
8
- add: {
8
+ add: {
9
9
  imports: [],
10
10
  providers: []
11
11
  }
12
- })
12
+ })
13
13
  })
14
14
 
15
15
  it('renders', () => {
@@ -1,5 +1,5 @@
1
1
  import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils';
2
- import type { Linter } from '@nx/linter';
2
+ import type { Linter } from '@nx/eslint';
3
3
  import type { E2eTestRunner, UnitTestRunner } from '../../utils/test-runners';
4
4
  import type { Styles } from '../utils/types';
5
5
 
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.angularInitGenerator = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const jest_1 = require("@nx/jest");
6
- const linter_1 = require("@nx/linter");
6
+ const eslint_1 = require("@nx/eslint");
7
7
  const js_1 = require("@nx/js");
8
8
  const test_runners_1 = require("../../utils/test-runners");
9
9
  const version_utils_1 = require("../utils/version-utils");
@@ -56,7 +56,7 @@ exports.angularInitGenerator = angularInitGenerator;
56
56
  function normalizeOptions(options) {
57
57
  return {
58
58
  e2eTestRunner: options.e2eTestRunner ?? test_runners_1.E2eTestRunner.Cypress,
59
- linter: options.linter ?? linter_1.Linter.EsLint,
59
+ linter: options.linter ?? eslint_1.Linter.EsLint,
60
60
  skipFormat: options.skipFormat ?? false,
61
61
  skipInstall: options.skipInstall ?? false,
62
62
  skipPackageJson: options.skipPackageJson ?? false,
@@ -1,4 +1,4 @@
1
- import { Linter } from '@nx/linter';
1
+ import { Linter } from '@nx/eslint';
2
2
  import { E2eTestRunner, UnitTestRunner } from '../../utils/test-runners';
3
3
  import type { Styles } from '../utils/types';
4
4
 
@@ -4,14 +4,14 @@ exports.normalizeOptions = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
6
6
  const get_npm_scope_1 = require("@nx/js/src/utils/package-json/get-npm-scope");
7
- const linter_1 = require("@nx/linter");
7
+ const eslint_1 = require("@nx/eslint");
8
8
  const test_runners_1 = require("../../../utils/test-runners");
9
9
  const project_1 = require("../../utils/project");
10
10
  async function normalizeOptions(host, schema) {
11
11
  // Create a schema with populated default values
12
12
  const options = {
13
13
  buildable: false,
14
- linter: linter_1.Linter.EsLint,
14
+ linter: eslint_1.Linter.EsLint,
15
15
  publishable: false,
16
16
  simpleName: false,
17
17
  skipFormat: false,
@@ -44,7 +44,7 @@ async function normalizeOptions(host, schema) {
44
44
  const ngCliSchematicLibRoot = projectName;
45
45
  const allNormalizedOptions = {
46
46
  ...options,
47
- linter: options.linter ?? linter_1.Linter.EsLint,
47
+ linter: options.linter ?? eslint_1.Linter.EsLint,
48
48
  unitTestRunner: options.unitTestRunner ?? test_runners_1.UnitTestRunner.Jest,
49
49
  prefix,
50
50
  name: projectName,
@@ -1,5 +1,5 @@
1
1
  import { UnitTestRunner } from '../../../utils/test-runners';
2
- import type { Linter } from '@nx/linter';
2
+ import type { Linter } from '@nx/eslint';
3
3
  export interface NormalizedSchema {
4
4
  libraryOptions: {
5
5
  name: string;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.libraryGeneratorInternal = exports.libraryGenerator = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const jest_1 = require("@nx/jest");
6
- const linter_1 = require("@nx/linter");
6
+ const eslint_1 = require("@nx/eslint");
7
7
  const js_1 = require("@nx/js");
8
8
  const semver_1 = require("semver");
9
9
  const init_1 = require("../../generators/init/init");
@@ -126,7 +126,7 @@ function setStrictMode(host, options) {
126
126
  }
127
127
  }
128
128
  async function addLinting(host, options) {
129
- if (options.linter === linter_1.Linter.None) {
129
+ if (options.linter === eslint_1.Linter.None) {
130
130
  return;
131
131
  }
132
132
  await (0, add_linting_1.default)(host, {
@@ -1,5 +1,5 @@
1
1
  import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils';
2
- import type { Linter } from '@nx/linter';
2
+ import type { Linter } from '@nx/eslint';
3
3
  import type { UnitTestRunner } from '../../utils/test-runners';
4
4
 
5
5
  export interface Schema {
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AngularEslintLintMigrator = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const linter_1 = require("@nx/linter");
5
+ const eslint_1 = require("@nx/eslint");
6
6
  const path_1 = require("path");
7
7
  const builder_migrator_1 = require("./builder.migrator");
8
8
  class AngularEslintLintMigrator extends builder_migrator_1.BuilderMigrator {
@@ -34,7 +34,7 @@ class AngularEslintLintMigrator extends builder_migrator_1.BuilderMigrator {
34
34
  }
35
35
  }
36
36
  async updateTargetConfiguration(targetName, target) {
37
- target.executor = '@nx/linter:eslint';
37
+ target.executor = '@nx/eslint:lint';
38
38
  if (!target.options) {
39
39
  this.logger.warn(`The target "${targetName}" is not specifying any options. Skipping updating the target configuration.`);
40
40
  return;
@@ -63,7 +63,7 @@ class AngularEslintLintMigrator extends builder_migrator_1.BuilderMigrator {
63
63
  });
64
64
  if (existEsLintConfigPath) {
65
65
  const eslintConfig = (0, devkit_1.readJson)(this.tree, this.newEsLintConfigPath);
66
- if ((0, linter_1.hasRulesRequiringTypeChecking)(eslintConfig)) {
66
+ if ((0, eslint_1.hasRulesRequiringTypeChecking)(eslintConfig)) {
67
67
  target.options.hasTypeAwareRules = true;
68
68
  }
69
69
  }
@@ -5,7 +5,7 @@ const cypress_1 = require("@nx/cypress");
5
5
  const cypress_preset_1 = require("@nx/cypress/plugins/cypress-preset");
6
6
  const cypress_version_1 = require("@nx/cypress/src/utils/cypress-version");
7
7
  const devkit_1 = require("@nx/devkit");
8
- const linter_1 = require("@nx/linter");
8
+ const eslint_1 = require("@nx/eslint");
9
9
  const js_1 = require("@nx/js");
10
10
  const path_1 = require("path");
11
11
  const typescript_1 = require("typescript");
@@ -214,9 +214,9 @@ class E2eMigrator extends project_migrator_1.ProjectMigrator {
214
214
  ...this.projectConfig,
215
215
  }, true);
216
216
  if (this.isProjectUsingEsLint) {
217
- await (0, linter_1.lintProjectGenerator)(this.tree, {
217
+ await (0, eslint_1.lintProjectGenerator)(this.tree, {
218
218
  project: this.project.name,
219
- linter: linter_1.Linter.EsLint,
219
+ linter: eslint_1.Linter.EsLint,
220
220
  eslintFilePatterns: [`${this.project.newRoot}/**/*.{js,ts}`],
221
221
  unitTestRunner: this.options.unitTestRunner,
222
222
  tsConfigPaths: [
@@ -231,7 +231,7 @@ class E2eMigrator extends project_migrator_1.ProjectMigrator {
231
231
  await (0, cypress_1.cypressProjectGenerator)(this.tree, {
232
232
  name: this.project.name,
233
233
  project: this.appName,
234
- linter: this.isProjectUsingEsLint ? linter_1.Linter.EsLint : linter_1.Linter.None,
234
+ linter: this.isProjectUsingEsLint ? eslint_1.Linter.EsLint : eslint_1.Linter.None,
235
235
  standaloneConfig: true,
236
236
  skipFormat: true,
237
237
  });
@@ -1,4 +1,4 @@
1
- import { Linter } from '@nx/linter';
1
+ import { Linter } from '@nx/eslint';
2
2
  import { E2eTestRunner, UnitTestRunner } from '../../utils/test-runners';
3
3
  import type { Styles } from '../utils/types';
4
4
 
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.deleteGitKeepFilesIfNotNeeded = exports.deleteAngularJson = exports.updateVsCodeRecommendedExtensions = exports.getWorkspaceRootFileTypesInfo = exports.createRootKarmaConfig = exports.createWorkspaceFiles = exports.cleanupEsLintPackages = exports.updateRootEsLintConfig = exports.updatePackageJson = exports.updateRootTsConfig = exports.updateWorkspaceConfigDefaults = exports.createNxJson = exports.validateWorkspace = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const linter_1 = require("@nx/linter");
5
+ const eslint_1 = require("@nx/eslint");
6
6
  const js_1 = require("@nx/js");
7
7
  const default_base_1 = require("nx/src/utils/default-base");
8
8
  const versions_1 = require("@nx/js/src/utils/versions");
@@ -158,7 +158,7 @@ function updateRootEsLintConfig(tree, existingEsLintConfig, unitTestRunner) {
158
158
  */
159
159
  tree.delete('.eslintrc.json');
160
160
  }
161
- (0, linter_1.lintInitGenerator)(tree, { linter: linter_1.Linter.EsLint, unitTestRunner });
161
+ (0, eslint_1.lintInitGenerator)(tree, { linter: eslint_1.Linter.EsLint, unitTestRunner });
162
162
  if (!existingEsLintConfig) {
163
163
  // There was no eslint config in the root, so we keep the generated one as-is.
164
164
  return;
@@ -1,5 +1,5 @@
1
1
  import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils';
2
- import type { Linter } from '@nx/linter';
2
+ import type { Linter } from '@nx/eslint';
3
3
  import type { E2eTestRunner, UnitTestRunner } from '../../utils/test-runners';
4
4
  import type { Styles } from '../utils/types';
5
5
 
@@ -1,4 +1,4 @@
1
- import type { Linter } from '@nx/linter';
1
+ import type { Linter } from '@nx/eslint';
2
2
 
3
3
  export interface StorybookConfigurationOptions {
4
4
  configureStaticServe?: boolean;
@@ -28,7 +28,8 @@
28
28
  },
29
29
  "configureCypress": {
30
30
  "type": "boolean",
31
- "description": "Specifies whether to configure Cypress or not."
31
+ "description": "Specifies whether to configure Cypress or not.",
32
+ "x-deprecated": "Use interactionTests instead. This option will be removed in v18."
32
33
  },
33
34
  "generateStories": {
34
35
  "type": "boolean",
@@ -39,7 +40,8 @@
39
40
  },
40
41
  "generateCypressSpecs": {
41
42
  "type": "boolean",
42
- "description": "Specifies whether to automatically generate test files in the generated Cypress e2e app."
43
+ "description": "Specifies whether to automatically generate test files in the generated Cypress e2e app.",
44
+ "x-deprecated": "Use interactionTests instead. This option will be removed in v18."
43
45
  },
44
46
  "configureStaticServe": {
45
47
  "type": "boolean",
@@ -50,7 +52,8 @@
50
52
  },
51
53
  "cypressDirectory": {
52
54
  "type": "string",
53
- "description": "A directory where the Cypress project will be placed. Placed at the root by default."
55
+ "description": "A directory where the Cypress project will be placed. Placed at the root by default.",
56
+ "x-deprecated": "Use interactionTests instead. This option will be removed in v18."
54
57
  },
55
58
  "linter": {
56
59
  "description": "The tool to use for running lint checks.",
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createStorybookTestWorkspaceForLib = exports.generateTestLibrary = exports.generateTestRemoteApplication = exports.generateTestHostApplication = exports.generateTestApplication = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const testing_1 = require("@nx/devkit/testing");
6
- const linter_1 = require("@nx/linter");
6
+ const eslint_1 = require("@nx/eslint");
7
7
  const test_runners_1 = require("../../utils/test-runners");
8
8
  const versions_1 = require("../../utils/versions");
9
9
  const application_1 = require("../application/application");
@@ -48,7 +48,7 @@ async function createStorybookTestWorkspaceForLib(libName) {
48
48
  await (0, library_1.libraryGenerator)(tree, {
49
49
  name: libName,
50
50
  buildable: false,
51
- linter: linter_1.Linter.EsLint,
51
+ linter: eslint_1.Linter.EsLint,
52
52
  publishable: false,
53
53
  simpleName: false,
54
54
  skipFormat: false,
@@ -161,9 +161,9 @@ import { VariableSpreadDeclareButtonComponent } from './variable-spread-declare-
161
161
  import { VariableSpreadDeclareViewComponent } from './variable-spread-declare-view/variable-spread-declare-view.component';
162
162
  import { VariableSpreadDeclareAnotherviewComponent } from './variable-spread-declare-anotherview/variable-spread-declare-anotherview.component';
163
163
 
164
- const COMPONENTS = [
165
- VariableSpreadDeclareButtonComponent,
166
- VariableSpreadDeclareViewComponent
164
+ const COMPONENTS = [
165
+ VariableSpreadDeclareButtonComponent,
166
+ VariableSpreadDeclareViewComponent
167
167
  ]
168
168
 
169
169
  @NgModule({
@@ -242,7 +242,7 @@ function generateModule(tree, options) {
242
242
  const moduleFilePath = `${options.path}/${moduleNames.fileName}/${moduleNames.fileName}.module.ts`;
243
243
  tree.write(moduleFilePath, `import { NgModule } from '@angular/core';
244
244
  import { CommonModule } from '@angular/common';
245
-
245
+
246
246
  @NgModule({
247
247
  declarations: [],
248
248
  imports: [CommonModule],