@nx/angular 22.7.0-pr.35019.f500fd7 → 22.7.0-rc.0

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": "22.7.0-pr.35019.f500fd7",
3
+ "version": "22.7.0-rc.0",
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, Playwright 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- Single Component Application Modules (SCAMs) \n\n- NgRx helpers. \n\n- Utilities for automatic workspace refactoring.",
6
6
  "repository": {
@@ -62,20 +62,20 @@
62
62
  "migrations": "./migrations.json"
63
63
  },
64
64
  "dependencies": {
65
- "@nx/devkit": "22.7.0-pr.35019.f500fd7",
66
- "@nx/eslint": "22.7.0-pr.35019.f500fd7",
67
- "@nx/js": "22.7.0-pr.35019.f500fd7",
68
- "@nx/module-federation": "22.7.0-pr.35019.f500fd7",
69
- "@nx/rspack": "22.7.0-pr.35019.f500fd7",
70
- "@nx/web": "22.7.0-pr.35019.f500fd7",
71
- "@nx/webpack": "22.7.0-pr.35019.f500fd7",
72
- "@nx/workspace": "22.7.0-pr.35019.f500fd7",
65
+ "@nx/devkit": "22.7.0-rc.0",
66
+ "@nx/eslint": "22.7.0-rc.0",
67
+ "@nx/js": "22.7.0-rc.0",
68
+ "@nx/module-federation": "22.7.0-rc.0",
69
+ "@nx/rspack": "22.7.0-rc.0",
70
+ "@nx/web": "22.7.0-rc.0",
71
+ "@nx/webpack": "22.7.0-rc.0",
72
+ "@nx/workspace": "22.7.0-rc.0",
73
73
  "@phenomnomnominal/tsquery": "~6.1.4",
74
74
  "@typescript-eslint/type-utils": "^8.0.0",
75
75
  "enquirer": "~2.3.6",
76
76
  "magic-string": "~0.30.2",
77
77
  "picocolors": "^1.1.0",
78
- "picomatch": "4.0.2",
78
+ "picomatch": "4.0.4",
79
79
  "semver": "^7.6.3",
80
80
  "tslib": "^2.3.0",
81
81
  "webpack-merge": "^5.8.0"
@@ -7,73 +7,7 @@ type EslintExtensionSchema = {
7
7
  /**
8
8
  * @deprecated Use tools from `@nx/eslint/src/generators/utils/eslint-file` instead. It will be removed in Nx v22.
9
9
  */
10
- export declare const extendAngularEslintJson: (json: Linter.Config, options: EslintExtensionSchema) => {
11
- overrides: ({
12
- files: string[];
13
- extends: string[];
14
- rules: {
15
- '@angular-eslint/directive-selector': (string | {
16
- type: string;
17
- prefix: string;
18
- style: string;
19
- })[];
20
- '@angular-eslint/component-selector': (string | {
21
- type: string;
22
- prefix: string;
23
- style: string;
24
- })[];
25
- };
26
- excludedFiles?: string | string[] | undefined;
27
- $schema?: string | undefined;
28
- env?: {
29
- [name: string]: boolean;
30
- } | undefined;
31
- globals?: {
32
- [name: string]: boolean | "off" | "readonly" | "readable" | "writable" | "writeable";
33
- } | undefined;
34
- noInlineConfig?: boolean | undefined;
35
- overrides?: Linter.ConfigOverride<Linter.RulesRecord>[];
36
- parser?: string | undefined;
37
- parserOptions?: Linter.ParserOptions | undefined;
38
- plugins?: string[] | undefined;
39
- processor?: string | undefined;
40
- reportUnusedDisableDirectives?: boolean | undefined;
41
- settings?: {
42
- [name: string]: any;
43
- } | undefined;
44
- } | {
45
- files: string[];
46
- extends: string[];
47
- /**
48
- * Having an empty rules object present makes it more obvious to the user where they would
49
- * extend things from if they needed to
50
- */
51
- rules: {
52
- '@angular-eslint/directive-selector'?: undefined;
53
- '@angular-eslint/component-selector'?: undefined;
54
- };
55
- })[];
56
- ignorePatterns?: string | string[] | undefined;
57
- root?: boolean | undefined;
58
- $schema?: string | undefined;
59
- env?: {
60
- [name: string]: boolean;
61
- } | undefined;
62
- extends?: string | string[] | undefined;
63
- globals?: {
64
- [name: string]: boolean | "off" | "readonly" | "readable" | "writable" | "writeable";
65
- } | undefined;
66
- noInlineConfig?: boolean | undefined;
67
- parser?: string | undefined;
68
- parserOptions?: Linter.ParserOptions | undefined;
69
- plugins?: string[] | undefined;
70
- processor?: string | undefined;
71
- reportUnusedDisableDirectives?: boolean | undefined;
72
- settings?: {
73
- [name: string]: any;
74
- } | undefined;
75
- rules?: Partial<Linter.RulesRecord>;
76
- };
10
+ export declare const extendAngularEslintJson: (json: Linter.LegacyConfig, options: EslintExtensionSchema) => Linter.LegacyConfig;
77
11
  /**
78
12
  * @deprecated Use {@link extendAngularEslintJson} instead. It will be removed in Nx v22.
79
13
  */
@@ -1 +1 @@
1
- {"version":3,"file":"create-eslint-configuration.d.ts","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/add-linting/lib/create-eslint-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAG3D,KAAK,qBAAqB,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAClC,MAAM,MAAM,CAAC,MAAM,EACnB,SAAS,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAiC1B;;;WAGG;;;;;;;;;;;;;;;;;;;;;;;;;;CASR,CAAC;AAEF;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,yBAAyB,GACjC,IAAI,CAqEN"}
1
+ {"version":3,"file":"create-eslint-configuration.d.ts","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/add-linting/lib/create-eslint-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAG3D,KAAK,qBAAqB,GAAG;IAC3B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAClC,MAAM,MAAM,CAAC,YAAY,EACzB,SAAS,qBAAqB,KAC7B,MAAM,CAAC,YA4CT,CAAC;AAEF;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,yBAAyB,GACjC,IAAI,CAqEN"}
@@ -8,7 +8,7 @@ function addPathMapping(tree, options) {
8
8
  const c = json.compilerOptions;
9
9
  c.paths = c.paths || {};
10
10
  c.paths[options.secondaryEntryPoint] = [
11
- `${options.libraryProject.root}/${options.name}/src/index.ts`,
11
+ `./${options.libraryProject.root}/${options.name}/src/index.ts`,
12
12
  ];
13
13
  return json;
14
14
  });
@@ -1 +1 @@
1
- {"version":3,"file":"update-tsconfig-included-files.d.ts","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/library-secondary-entry-point/lib/update-tsconfig-included-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AAE5D,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,0BAA0B,GAClC,IAAI,CA8BN"}
1
+ {"version":3,"file":"update-tsconfig-included-files.d.ts","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/library-secondary-entry-point/lib/update-tsconfig-included-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AAE5D,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,0BAA0B,GAClC,IAAI,CAwCN"}
@@ -13,12 +13,25 @@ function updateTsConfigIncludedFiles(tree, options) {
13
13
  // ignore if the library has a custom tsconfig setup
14
14
  return;
15
15
  }
16
+ const entryPointPrefix = `${options.name}/`;
16
17
  (0, devkit_1.updateJson)(tree, tsConfigPath, (json) => {
17
18
  if (json.include?.length) {
18
- json.include = json.include.map((path) => path.replace(/^(?:\.\/)?src\//, ''));
19
+ const newIncludes = [];
20
+ for (const pattern of json.include) {
21
+ if (pattern.includes('*')) {
22
+ newIncludes.push(`${entryPointPrefix}${pattern}`);
23
+ }
24
+ }
25
+ json.include = [...json.include, ...newIncludes];
19
26
  }
20
27
  if (json.exclude?.length) {
21
- json.exclude = json.exclude.map((path) => path.replace(/^(?:\.\/)?src\//, ''));
28
+ const newExcludes = [];
29
+ for (const pattern of json.exclude) {
30
+ if (pattern.includes('*')) {
31
+ newExcludes.push(`${entryPointPrefix}${pattern}`);
32
+ }
33
+ }
34
+ json.exclude = [...json.exclude, ...newExcludes];
22
35
  }
23
36
  return json;
24
37
  });
@@ -1 +1 @@
1
- {"version":3,"file":"angular-eslint-lint.migrator.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/angular/src/generators/ng-add/migrators/builders/angular-eslint-lint.migrator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EAEpB,IAAI,EACL,MAAM,YAAY,CAAC;AAUpB,OAAO,KAAK,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,qBAAa,yBAA0B,SAAQ,eAAe;IAC5D,OAAO,CAAC,mBAAmB,CAAS;IACpC,OAAO,CAAC,mBAAmB,CAAS;gBAGlC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,oBAAoB,EAC7B,aAAa,EAAE,oBAAoB,EACnC,MAAM,EAAE,MAAM;IAYP,OAAO,IAAI,IAAI;YA8BV,yBAAyB;IA8DvC,OAAO,CAAC,kBAAkB;IA2C1B,OAAO,CAAC,kCAAkC;CAiB3C"}
1
+ {"version":3,"file":"angular-eslint-lint.migrator.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/angular/src/generators/ng-add/migrators/builders/angular-eslint-lint.migrator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EAEpB,IAAI,EACL,MAAM,YAAY,CAAC;AAQpB,OAAO,KAAK,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,qBAAa,yBAA0B,SAAQ,eAAe;IAC5D,OAAO,CAAC,mBAAmB,CAAS;IACpC,OAAO,CAAC,mBAAmB,CAAS;gBAGlC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,oBAAoB,EAC7B,aAAa,EAAE,oBAAoB,EACnC,MAAM,EAAE,MAAM;IAYP,OAAO,IAAI,IAAI;YA8BV,yBAAyB;IAuDvC,OAAO,CAAC,kBAAkB;IA2C1B,OAAO,CAAC,kCAAkC;CAiB3C"}
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AngularEslintLintMigrator = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const eslint_1 = require("@nx/eslint");
6
5
  const path_1 = require("path");
7
6
  const builder_migrator_1 = require("./builder.migrator");
8
7
  class AngularEslintLintMigrator extends builder_migrator_1.BuilderMigrator {
@@ -61,12 +60,6 @@ class AngularEslintLintMigrator extends builder_migrator_1.BuilderMigrator {
61
60
  this.logger.warn(`The lint file pattern "${pattern}" specified in the "${targetName}" target is not contained in the project root or source root. The pattern will not be updated.`);
62
61
  return pattern;
63
62
  });
64
- if (existEsLintConfigPath) {
65
- const eslintConfig = (0, devkit_1.readJson)(this.tree, this.newEsLintConfigPath);
66
- if ((0, eslint_1.hasRulesRequiringTypeChecking)(eslintConfig)) {
67
- target.options.hasTypeAwareRules = true;
68
- }
69
- }
70
63
  (0, devkit_1.updateProjectConfiguration)(this.tree, this.project.name, {
71
64
  ...this.projectConfig,
72
65
  });
@@ -1 +1 @@
1
- {"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ng-add/utilities/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAuB,IAAI,EAAE,MAAM,YAAY,CAAC;AAqB5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAG1D,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAgBlD;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,EACzB,cAAc,EAAE,MAAM,GAAG,SAAS,GACjC,IAAI,CAwDN;AA6BD,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAO9D;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAanD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CA6BlD;AAED,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,IAAI,EACV,oBAAoB,EAAE,GAAG,GAAG,SAAS,EACrC,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,IAAI,CAAC,CA6Cf;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAiBtD;AAED,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAUpE;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAStD;AAED,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,eAAe,EAAE,GAC3B,0BAA0B,CA8B5B;AAED,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CA2BlE;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAKlD;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAO9D"}
1
+ {"version":3,"file":"workspace.d.ts","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/ng-add/utilities/workspace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAuB,IAAI,EAAE,MAAM,YAAY,CAAC;AAqB5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAG1D,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAgBlD;AAED,wBAAgB,YAAY,CAC1B,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,EACzB,cAAc,EAAE,MAAM,GAAG,SAAS,GACjC,IAAI,CAwDN;AA6BD,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAO9D;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAYnD;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CA6BlD;AAED,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,IAAI,EACV,oBAAoB,EAAE,GAAG,GAAG,SAAS,EACrC,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,IAAI,CAAC,CA6Cf;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAiBtD;AAED,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAUpE;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAStD;AAED,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,eAAe,EAAE,GAC3B,0BAA0B,CA8B5B;AAED,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CA2BlE;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAKlD;AAED,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAO9D"}
@@ -123,7 +123,6 @@ function updateWorkspaceConfigDefaults(tree) {
123
123
  function updateRootTsConfig(tree) {
124
124
  const tsconfig = (0, devkit_1.readJson)(tree, (0, js_1.getRootTsConfigPathInTree)(tree));
125
125
  tsconfig.compilerOptions.paths ??= {};
126
- tsconfig.compilerOptions.baseUrl = '.';
127
126
  tsconfig.compilerOptions.rootDir = '.';
128
127
  tsconfig.exclude = Array.from(new Set([...(tsconfig.exclude ?? []), 'node_modules', 'tmp']));
129
128
  (0, devkit_1.writeJson)(tree, 'tsconfig.base.json', tsconfig);
@@ -1 +1 @@
1
- {"version":3,"file":"add-vitest.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/utils/add-vitest.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,IAAI,EAKV,MAAM,YAAY,CAAC;AAUpB,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;IACzB,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,IAAI,CAAC,CA2Cf;AAED,wBAAsB,eAAe,CACnC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,IAAI,CAAC,CAmCf"}
1
+ {"version":3,"file":"add-vitest.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/generators/utils/add-vitest.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,IAAI,EAKV,MAAM,YAAY,CAAC;AAUpB,MAAM,MAAM,uBAAuB,GAAG;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;IACzB,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,IAAI,CAAC,CA8Cf;AAED,wBAAsB,eAAe,CACnC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,IAAI,CAAC,CAsCf"}
@@ -66,6 +66,9 @@ async function addVitestAngular(tree, options) {
66
66
  pkgVersions.angularDevkitVersion;
67
67
  (0, devkit_1.addDependenciesToPackageJson)(tree, {}, {
68
68
  '@angular/build': angularDevkitVersion,
69
+ // @angular/build uses rolldown which injects @oxc-project/runtime
70
+ // helpers at transform time but doesn't declare it as a dependency
71
+ '@oxc-project/runtime': versions_1.oxcProjectRuntimeVersion,
69
72
  jsdom: pkgVersions.jsdomVersion,
70
73
  vitest: pkgVersions.vitestVersion,
71
74
  }, undefined, true);
@@ -78,6 +81,9 @@ async function addVitestAnalog(tree, options) {
78
81
  (0, version_utils_1.versions)(tree).angularDevkitVersion;
79
82
  const devDependencies = {
80
83
  '@angular/build': angularDevkitVersion,
84
+ // @angular/build uses rolldown which injects @oxc-project/runtime
85
+ // helpers at transform time but doesn't declare it as a dependency
86
+ '@oxc-project/runtime': versions_1.oxcProjectRuntimeVersion,
81
87
  };
82
88
  // Add compatible vitest/jsdom versions BEFORE calling configurationGenerator
83
89
  // so that @nx/vitest respects existing versions
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/angular/src/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,aAAa,EAQnB,MAAM,YAAY,CAAC;AAYpB,MAAM,WAAW,oBAAoB;IACnC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAOD,KAAK,0BAA0B,GAAG;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACrC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AACF,MAAM,MAAM,2BAA2B,GAAG;IACxC,WAAW,EAAE,aAAa,GAAG,SAAS,CAAC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC;CACtD,CAAC;AAkDF,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,oBAAoB,CAqB7D,CAAC"}
1
+ {"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../../../packages/angular/src/plugins/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,aAAa,EAQnB,MAAM,YAAY,CAAC;AAYpB,MAAM,WAAW,oBAAoB;IACnC,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAOD,KAAK,0BAA0B,GAAG;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACrC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AACF,MAAM,MAAM,2BAA2B,GAAG;IACxC,WAAW,EAAE,aAAa,GAAG,SAAS,CAAC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC;CACtD,CAAC;AAgDF,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,oBAAoB,CAwB7D,CAAC"}
@@ -46,7 +46,6 @@ const knownExecutors = {
46
46
  '@angular/build:unit-test',
47
47
  ]),
48
48
  };
49
- const pmc = (0, devkit_1.getPackageManagerCommand)();
50
49
  function readProjectsCache(cachePath) {
51
50
  return (0, node_fs_1.existsSync)(cachePath) ? (0, devkit_1.readJsonFile)(cachePath) : {};
52
51
  }
@@ -59,15 +58,16 @@ exports.createNodesV2 = [
59
58
  const optionsHash = (0, devkit_internals_1.hashObject)(options);
60
59
  const cachePath = (0, node_path_1.join)(cache_directory_1.workspaceDataDirectory, `angular-${optionsHash}.hash`);
61
60
  const projectsCache = readProjectsCache(cachePath);
61
+ const pmc = (0, devkit_1.getPackageManagerCommand)((0, devkit_1.detectPackageManager)(context.workspaceRoot));
62
62
  try {
63
- return await (0, devkit_1.createNodesFromFiles)((configFile, options, context) => createNodesInternal(configFile, options, context, projectsCache), configFiles, options, context);
63
+ return await (0, devkit_1.createNodesFromFiles)((configFile, options, context) => createNodesInternal(configFile, options, context, projectsCache, pmc), configFiles, options, context);
64
64
  }
65
65
  finally {
66
66
  writeProjectsToCache(cachePath, projectsCache);
67
67
  }
68
68
  },
69
69
  ];
70
- async function createNodesInternal(configFilePath, options, context, projectsCache) {
70
+ async function createNodesInternal(configFilePath, options, context, projectsCache, pmc) {
71
71
  const angularWorkspaceRoot = (0, node_path_1.dirname)(configFilePath);
72
72
  // Do not create a project if package.json isn't there
73
73
  const siblingFiles = (0, node_fs_1.readdirSync)((0, node_path_1.join)(context.workspaceRoot, angularWorkspaceRoot));
@@ -75,10 +75,10 @@ async function createNodesInternal(configFilePath, options, context, projectsCac
75
75
  return {};
76
76
  }
77
77
  const hash = await (0, calculate_hash_for_create_nodes_1.calculateHashForCreateNodes)(angularWorkspaceRoot, options, context, [(0, js_1.getLockFileName)((0, devkit_1.detectPackageManager)(context.workspaceRoot))]);
78
- projectsCache[hash] ??= await buildAngularProjects(configFilePath, options, angularWorkspaceRoot, context);
78
+ projectsCache[hash] ??= await buildAngularProjects(configFilePath, options, angularWorkspaceRoot, context, pmc);
79
79
  return { projects: projectsCache[hash] };
80
80
  }
81
- async function buildAngularProjects(configFilePath, options, angularWorkspaceRoot, context) {
81
+ async function buildAngularProjects(configFilePath, options, angularWorkspaceRoot, context, pmc) {
82
82
  const projects = {};
83
83
  const absoluteConfigFilePath = (0, node_path_1.join)(context.workspaceRoot, configFilePath);
84
84
  const angularJson = (0, devkit_1.readJsonFile)(absoluteConfigFilePath);
@@ -1,3 +1,3 @@
1
- export declare function loadVite(): Promise<typeof import('vite')>;
1
+ export declare function loadVite(): Promise<any>;
2
2
  export declare function findVitestBaseConfig(searchDirs: string[]): Promise<string | false>;
3
3
  //# sourceMappingURL=vitest.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vitest.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/plugins/utils/vitest.ts"],"names":[],"mappings":"AAaA,wBAAgB,QAAQ,IAAI,OAAO,CAAC,cAAc,MAAM,CAAC,CAAC,CAEzD;AAED,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,MAAM,EAAE,GACnB,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,CAiBzB"}
1
+ {"version":3,"file":"vitest.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/plugins/utils/vitest.ts"],"names":[],"mappings":"AAgBA,wBAAgB,QAAQ,IAAI,OAAO,CAAC,GAAG,CAAC,CAEvC;AAED,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,MAAM,EAAE,GACnB,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,CAiBzB"}
@@ -13,6 +13,9 @@ const VITEST_CONFIG_FILES = [
13
13
  'vitest-base.config.mjs',
14
14
  'vitest-base.config.cjs',
15
15
  ];
16
+ // TODO(jack): Remove this cast when @nx/angular switches to moduleResolution:
17
+ // "nodenext". Vite 8 ships ESM-only type declarations (.d.mts) not resolvable
18
+ // under moduleResolution: "node".
16
19
  function loadVite() {
17
20
  return Function('return import("vite")')();
18
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"backward-compatible-versions.d.ts","sourceRoot":"","sources":["../../../../../packages/angular/src/utils/backward-compatible-versions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,YAAY,CAAC;AAE7C,eAAO,MAAM,iBAAiB,uBAAwB,CAAC;AACvD,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,MAAM,MAAM,mBAAmB,GAAG,OAAO,CACvC,MAAM,OAAO,cAAc,EAC3B,WAAW,CACZ,CAAC;AACF,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;IACxC,EAAE,EAAE,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;IACxC,EAAE,EAAE,MAAM,CAAC,mBAAmB,GAAG,sBAAsB,EAAE,MAAM,CAAC,CAAC;CAClE,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC;AAEjE,eAAO,MAAM,0BAA0B,EAAE,UAiExC,CAAC"}
1
+ {"version":3,"file":"backward-compatible-versions.d.ts","sourceRoot":"","sources":["../../../../../packages/angular/src/utils/backward-compatible-versions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,YAAY,CAAC;AAE7C,eAAO,MAAM,iBAAiB,uBAAwB,CAAC;AACvD,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,MAAM,MAAM,mBAAmB,GAAG,OAAO,CACvC,MAAM,OAAO,cAAc,EAC3B,WAAW,CACZ,CAAC;AACF,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;IACxC,EAAE,EAAE,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;IACxC,EAAE,EAAE,MAAM,CAAC,mBAAmB,GAAG,sBAAsB,EAAE,MAAM,CAAC,CAAC;CAClE,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC;AAEjE,eAAO,MAAM,0BAA0B,EAAE,UAmExC,CAAC"}
@@ -36,6 +36,7 @@ exports.backwardCompatibleVersions = {
36
36
  webpackMergeVersion: '^5.8.0',
37
37
  vitestVersion: '^3.1.1',
38
38
  jsdomVersion: '~22.1.0',
39
+ oxcProjectRuntimeVersion: '^0.115.0',
39
40
  },
40
41
  19: {
41
42
  angularVersion: '~19.2.0',
@@ -68,5 +69,6 @@ exports.backwardCompatibleVersions = {
68
69
  webpackMergeVersion: '^5.8.0',
69
70
  vitestVersion: '^3.1.1',
70
71
  jsdomVersion: '~22.1.0',
72
+ oxcProjectRuntimeVersion: '^0.115.0',
71
73
  },
72
74
  };
@@ -27,5 +27,6 @@ export declare const typesNodeVersion = "20.19.9";
27
27
  export declare const jasmineMarblesVersion = "^0.9.2";
28
28
  export declare const vitestVersion = "^4.0.8";
29
29
  export declare const jsdomVersion = "^27.1.0";
30
+ export declare const oxcProjectRuntimeVersion = "^0.115.0";
30
31
  export declare const jsoncEslintParserVersion = "^2.1.0";
31
32
  //# sourceMappingURL=versions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../../../../packages/angular/src/utils/versions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,KAAwC,CAAC;AAE/D,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAC9C,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAC1C,eAAO,MAAM,WAAW,YAAY,CAAC;AACrC,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,aAAa,YAAY,CAAC;AACvC,eAAO,MAAM,YAAY,WAAW,CAAC;AAErC,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,gBAAgB,WAAW,CAAC;AACzC,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAC9C,eAAO,MAAM,kBAAkB,WAAW,CAAC;AAC3C,eAAO,MAAM,2BAA2B,YAAY,CAAC;AACrD,eAAO,MAAM,+BAA+B,WAAW,CAAC;AACxD,eAAO,MAAM,mBAAmB,WAAW,CAAC;AAE5C,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAC9C,eAAO,MAAM,uBAAuB,YAAY,CAAC;AACjD,eAAO,MAAM,eAAe,WAAW,CAAC;AACxC,eAAO,MAAM,cAAc,WAAW,CAAC;AACvC,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAC3C,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAC7C,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC,eAAO,MAAM,WAAW,WAAW,CAAC;AAEpC,eAAO,MAAM,wBAAwB,YAAY,CAAC;AAClD,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAC1C,eAAO,MAAM,qBAAqB,WAAW,CAAC;AAE9C,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC,eAAO,MAAM,YAAY,YAAY,CAAC;AAEtC,eAAO,MAAM,wBAAwB,WAAW,CAAC"}
1
+ {"version":3,"file":"versions.d.ts","sourceRoot":"","sources":["../../../../../packages/angular/src/utils/versions.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,KAAwC,CAAC;AAE/D,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAC9C,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAC1C,eAAO,MAAM,WAAW,YAAY,CAAC;AACrC,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,aAAa,YAAY,CAAC;AACvC,eAAO,MAAM,YAAY,WAAW,CAAC;AAErC,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,gBAAgB,WAAW,CAAC;AACzC,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,mBAAmB,aAAa,CAAC;AAC9C,eAAO,MAAM,kBAAkB,WAAW,CAAC;AAC3C,eAAO,MAAM,2BAA2B,YAAY,CAAC;AACrD,eAAO,MAAM,+BAA+B,WAAW,CAAC;AACxD,eAAO,MAAM,mBAAmB,WAAW,CAAC;AAE5C,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAC9C,eAAO,MAAM,uBAAuB,YAAY,CAAC;AACjD,eAAO,MAAM,eAAe,WAAW,CAAC;AACxC,eAAO,MAAM,cAAc,WAAW,CAAC;AACvC,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAC3C,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAC7C,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC,eAAO,MAAM,WAAW,WAAW,CAAC;AAEpC,eAAO,MAAM,wBAAwB,YAAY,CAAC;AAClD,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAC1C,eAAO,MAAM,qBAAqB,WAAW,CAAC;AAE9C,eAAO,MAAM,aAAa,WAAW,CAAC;AACtC,eAAO,MAAM,YAAY,YAAY,CAAC;AAGtC,eAAO,MAAM,wBAAwB,aAAa,CAAC;AAEnD,eAAO,MAAM,wBAAwB,WAAW,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.jsoncEslintParserVersion = exports.jsdomVersion = exports.vitestVersion = exports.jasmineMarblesVersion = exports.typesNodeVersion = exports.jestPresetAngularVersion = exports.lessVersion = exports.tsNodeVersion = exports.autoprefixerVersion = exports.postcssUrlVersion = exports.postcssVersion = exports.tailwindVersion = exports.typescriptEslintVersion = exports.angularEslintVersion = exports.webpackMergeVersion = exports.moduleFederationEnhancedVersion = exports.moduleFederationNodeVersion = exports.browserSyncVersion = exports.typesExpressVersion = exports.expressVersion = exports.typesCorsVersion = exports.corsVersion = exports.tsLibVersion = exports.zoneJsVersion = exports.rxjsVersion = exports.ngrxVersion = exports.ngPackagrVersion = exports.angularDevkitVersion = exports.angularVersion = exports.nxVersion = void 0;
3
+ exports.jsoncEslintParserVersion = exports.oxcProjectRuntimeVersion = exports.jsdomVersion = exports.vitestVersion = exports.jasmineMarblesVersion = exports.typesNodeVersion = exports.jestPresetAngularVersion = exports.lessVersion = exports.tsNodeVersion = exports.autoprefixerVersion = exports.postcssUrlVersion = exports.postcssVersion = exports.tailwindVersion = exports.typescriptEslintVersion = exports.angularEslintVersion = exports.webpackMergeVersion = exports.moduleFederationEnhancedVersion = exports.moduleFederationNodeVersion = exports.browserSyncVersion = exports.typesExpressVersion = exports.expressVersion = exports.typesCorsVersion = exports.corsVersion = exports.tsLibVersion = exports.zoneJsVersion = exports.rxjsVersion = exports.ngrxVersion = exports.ngPackagrVersion = exports.angularDevkitVersion = exports.angularVersion = exports.nxVersion = void 0;
4
4
  exports.nxVersion = require('../../package.json').version;
5
5
  exports.angularVersion = '~21.2.0';
6
6
  exports.angularDevkitVersion = '~21.2.0';
@@ -30,4 +30,7 @@ exports.typesNodeVersion = '20.19.9';
30
30
  exports.jasmineMarblesVersion = '^0.9.2';
31
31
  exports.vitestVersion = '^4.0.8';
32
32
  exports.jsdomVersion = '^27.1.0';
33
+ // @angular/build uses rolldown which injects @oxc-project/runtime helpers
34
+ // at transform time but doesn't declare it as a dependency
35
+ exports.oxcProjectRuntimeVersion = '^0.115.0';
33
36
  exports.jsoncEslintParserVersion = '^2.1.0';
@@ -1,6 +0,0 @@
1
- {
2
- "$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
3
- "lib": {
4
- "entryFile": "index.ts"
5
- }
6
- }
package/ng-package.json DELETED
@@ -1,21 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
- "lib": {
4
- "entryFile": "index.ts"
5
- },
6
- "dest": "../../dist/packages/angular",
7
- "deleteDestPath": false,
8
- "allowedNonPeerDependencies": [
9
- "nx",
10
- "@nx/",
11
- "@phenomnomnominal/tsquery",
12
- "@typescript-eslint/",
13
- "enquirer",
14
- "magic-string",
15
- "picocolors",
16
- "picomatch",
17
- "semver",
18
- "webpack-merge"
19
- ],
20
- "keepLifecycleScripts": true
21
- }
package/project.json DELETED
@@ -1,75 +0,0 @@
1
- {
2
- "name": "angular",
3
- "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
- "sourceRoot": "packages/angular",
5
- "projectType": "library",
6
- "targets": {
7
- "build-ng": {
8
- "dependsOn": ["build-base", "typecheck", "legacy-post-build"],
9
- "executor": "@nx/angular:package",
10
- "options": {
11
- "project": "packages/angular/ng-package.json",
12
- "tsConfig": "packages/angular/tsconfig.lib.runtime.json"
13
- },
14
- "outputs": ["{workspaceRoot}/dist/packages/angular"]
15
- },
16
- "legacy-post-build": {
17
- "executor": "@nx/workspace-plugin:legacy-post-build",
18
- "options": {
19
- "tsConfig": "./tsconfig.lib.json",
20
- "addPackageJsonFields": false,
21
- "assets": [
22
- {
23
- "input": "packages/angular",
24
- "glob": "**/files/**",
25
- "output": "/"
26
- },
27
- {
28
- "input": "packages/angular",
29
- "glob": "**/creator-files/**",
30
- "output": "/"
31
- },
32
- {
33
- "input": "packages/angular",
34
- "glob": "**/files/**/.gitkeep",
35
- "output": "/"
36
- },
37
- {
38
- "input": "packages/angular",
39
- "glob": "**/*.json",
40
- "ignore": ["**/tsconfig*.json", "project.json", ".eslintrc.json"],
41
- "output": "/"
42
- },
43
- {
44
- "input": "packages/angular",
45
- "glob": "**/*.js",
46
- "ignore": ["**/jest.config.js"],
47
- "output": "/"
48
- },
49
- {
50
- "input": "packages/angular",
51
- "glob": "**/*.d.ts",
52
- "output": "/"
53
- },
54
- {
55
- "input": "",
56
- "glob": "LICENSE",
57
- "output": "/"
58
- }
59
- ]
60
- }
61
- },
62
- "build": {
63
- "dependsOn": [
64
- "^build",
65
- "build-ng",
66
- "legacy-post-build",
67
- "typecheck",
68
- "build-base"
69
- ],
70
- "outputs": ["{workspaceRoot}/dist/packages/angular/README.md"],
71
- "command": "node ./scripts/copy-readme.js angular"
72
- }
73
- },
74
- "implicitDependencies": ["vite"]
75
- }