@nx/angular 21.4.0-canary.20250815-18ba315 → 21.5.0-beta.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/migrations.json CHANGED
@@ -352,6 +352,11 @@
352
352
  },
353
353
  "description": "Update the @angular/cli package version to ~20.1.0.",
354
354
  "factory": "./src/migrations/update-21-3-0/update-angular-cli"
355
+ },
356
+ "set-tsconfig-option": {
357
+ "version": "21.5.0-beta.0",
358
+ "description": "Set the 'tsConfig' option to build and test targets to help with Angular migration issues.",
359
+ "factory": "./src/migrations/update-21-5-0/set-tsconfig-option"
355
360
  }
356
361
  },
357
362
  "packageJsonUpdates": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/angular",
3
- "version": "21.4.0-canary.20250815-18ba315",
3
+ "version": "21.5.0-beta.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": {
@@ -58,14 +58,14 @@
58
58
  "migrations": "./migrations.json"
59
59
  },
60
60
  "dependencies": {
61
- "@nx/devkit": "21.4.0-canary.20250815-18ba315",
62
- "@nx/eslint": "21.4.0-canary.20250815-18ba315",
63
- "@nx/js": "21.4.0-canary.20250815-18ba315",
64
- "@nx/module-federation": "21.4.0-canary.20250815-18ba315",
65
- "@nx/rspack": "21.4.0-canary.20250815-18ba315",
66
- "@nx/web": "21.4.0-canary.20250815-18ba315",
67
- "@nx/webpack": "21.4.0-canary.20250815-18ba315",
68
- "@nx/workspace": "21.4.0-canary.20250815-18ba315",
61
+ "@nx/devkit": "21.5.0-beta.0",
62
+ "@nx/eslint": "21.5.0-beta.0",
63
+ "@nx/js": "21.5.0-beta.0",
64
+ "@nx/module-federation": "21.5.0-beta.0",
65
+ "@nx/rspack": "21.5.0-beta.0",
66
+ "@nx/web": "21.5.0-beta.0",
67
+ "@nx/webpack": "21.5.0-beta.0",
68
+ "@nx/workspace": "21.5.0-beta.0",
69
69
  "@phenomnomnominal/tsquery": "~5.0.1",
70
70
  "@typescript-eslint/type-utils": "^8.0.0",
71
71
  "enquirer": "~2.3.6",
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=set-tsconfig-option.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set-tsconfig-option.spec.d.ts","sourceRoot":"","sources":["../../../../../../../packages/angular/src/migrations/update-21-5-0/set-tsconfig-option.spec.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"module-federation-ssr-dev-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAU,MAAM,YAAY,CAAC;AAoB1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,wBAAuB,oCAAoC,CACzD,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,eAAe,+FA2HzB;AAED,eAAe,oCAAoC,CAAC"}
1
+ {"version":3,"file":"module-federation-ssr-dev-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAU,MAAM,YAAY,CAAC;AAoB1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,wBAAuB,oCAAoC,CACzD,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,eAAe,+FA4HzB;AAED,eAAe,oCAAoC,CAAC"}
@@ -93,7 +93,7 @@ async function* moduleFederationSsrDevServerExecutor(schema, context) {
93
93
  return;
94
94
  }
95
95
  try {
96
- const portsToWaitFor = staticRemotesIter
96
+ const portsToWaitFor = staticRemotesIter && options.staticRemotesPort
97
97
  ? [options.staticRemotesPort, ...remotes.remotePorts]
98
98
  : [...remotes.remotePorts];
99
99
  await Promise.all(portsToWaitFor.map((port) => (0, wait_for_port_open_1.waitForPortOpen)(port, {
@@ -1 +1 @@
1
- {"version":3,"file":"add-project.d.ts","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/library/lib/add-project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AASvC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,wBAAsB,UAAU,CAC9B,IAAI,EAAE,IAAI,EACV,cAAc,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,wCAiDnD"}
1
+ {"version":3,"file":"add-project.d.ts","sourceRoot":"","sources":["../../../../../../../packages/angular/src/generators/library/lib/add-project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AASvC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,wBAAsB,UAAU,CAC9B,IAAI,EAAE,IAAI,EACV,cAAc,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,wCAgDnD"}
@@ -25,14 +25,13 @@ async function addProject(tree, libraryOptions) {
25
25
  outputs: ['{workspaceRoot}/dist/{projectRoot}'],
26
26
  options: {
27
27
  project: `${libraryOptions.projectRoot}/ng-package.json`,
28
+ tsConfig: `${libraryOptions.projectRoot}/tsconfig.lib.json`,
28
29
  },
29
30
  configurations: {
30
31
  production: {
31
32
  tsConfig: `${libraryOptions.projectRoot}/tsconfig.lib.prod.json`,
32
33
  },
33
- development: {
34
- tsConfig: `${libraryOptions.projectRoot}/tsconfig.lib.json`,
35
- },
34
+ development: {},
36
35
  },
37
36
  defaultConfiguration: 'production',
38
37
  };
@@ -0,0 +1,3 @@
1
+ import { type Tree } from '@nx/devkit';
2
+ export default function (tree: Tree): Promise<void>;
3
+ //# sourceMappingURL=set-tsconfig-option.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set-tsconfig-option.d.ts","sourceRoot":"","sources":["../../../../../../packages/angular/src/migrations/update-21-5-0/set-tsconfig-option.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAUpB,yBAA+B,IAAI,EAAE,IAAI,iBAoBxC"}
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = default_1;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const targets_1 = require("../../utils/targets");
6
+ const projects_1 = require("../utils/projects");
7
+ const buildExecutors = new Set([
8
+ '@nx/angular:ng-packagr-lite',
9
+ '@nx/angular:package',
10
+ ]);
11
+ const testExecutors = new Set(['@nx/jest:jest']);
12
+ async function default_1(tree) {
13
+ const projects = await (0, projects_1.getProjectsFilteredByDependencies)([
14
+ 'npm:@angular/core',
15
+ ]);
16
+ for (const project of projects) {
17
+ try {
18
+ // we're only updating static project configurations, not inferred ones
19
+ const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, project.name);
20
+ for (const target of relevantTargets(projectConfig)) {
21
+ updateTarget(tree, projectConfig, target);
22
+ }
23
+ (0, devkit_1.updateProjectConfiguration)(tree, project.name, projectConfig);
24
+ }
25
+ catch {
26
+ // ignore, it can happen if the project is fully inferred and there's no
27
+ // `project.json` file or `nx` entry in `package.json`
28
+ }
29
+ }
30
+ await (0, devkit_1.formatFiles)(tree);
31
+ }
32
+ function updateTarget(tree, projectConfig, target) {
33
+ if (buildExecutors.has(target.executor)) {
34
+ if (target.configurations?.['development']?.tsConfig) {
35
+ // only set the option if the target has the expected tsConfig option in
36
+ // the development configuration
37
+ target.options ??= {};
38
+ target.options.tsConfig = target.configurations['development'].tsConfig;
39
+ // remove tsConfig from development configuration after moving it to options
40
+ delete target.configurations['development'].tsConfig;
41
+ }
42
+ }
43
+ else if (testExecutors.has(target.executor)) {
44
+ const expectedTsconfigPath = (0, devkit_1.joinPathFragments)(projectConfig.root, 'tsconfig.spec.json');
45
+ if (tree.exists(expectedTsconfigPath)) {
46
+ // we keep it simple and only set the option if the expected tsconfig
47
+ // file exists
48
+ target.options ??= {};
49
+ target.options.tsConfig = expectedTsconfigPath;
50
+ }
51
+ }
52
+ }
53
+ function* relevantTargets(project) {
54
+ for (const [, target] of (0, targets_1.allProjectTargets)(project)) {
55
+ if (!buildExecutors.has(target.executor) &&
56
+ !testExecutors.has(target.executor)) {
57
+ continue;
58
+ }
59
+ if (!target.options?.['tsConfig']) {
60
+ yield target;
61
+ }
62
+ }
63
+ }
@@ -28,7 +28,7 @@ exports.backwardCompatibleVersions = {
28
28
  tsNodeVersion: '10.9.1',
29
29
  lessVersion: '^4.3.0',
30
30
  jestPresetAngularVersion: '~14.1.0',
31
- typesNodeVersion: '18.16.9',
31
+ typesNodeVersion: '20.19.9',
32
32
  jasmineMarblesVersion: '^0.9.2',
33
33
  jsoncEslintParserVersion: '^2.1.0',
34
34
  webpackMergeVersion: '^5.8.0',
@@ -59,7 +59,7 @@ exports.backwardCompatibleVersions = {
59
59
  tsNodeVersion: '10.9.1',
60
60
  lessVersion: '^4.3.0',
61
61
  jestPresetAngularVersion: '~14.4.0',
62
- typesNodeVersion: '18.16.9',
62
+ typesNodeVersion: '20.19.9',
63
63
  jasmineMarblesVersion: '^0.9.2',
64
64
  jsoncEslintParserVersion: '^2.1.0',
65
65
  webpackMergeVersion: '^5.8.0',
@@ -25,7 +25,7 @@ export declare const autoprefixerVersion = "^10.4.0";
25
25
  export declare const tsNodeVersion = "10.9.1";
26
26
  export declare const lessVersion = "^4.3.0";
27
27
  export declare const jestPresetAngularVersion = "~15.0.0";
28
- export declare const typesNodeVersion = "18.16.9";
28
+ export declare const typesNodeVersion = "20.19.9";
29
29
  export declare const jasmineMarblesVersion = "^0.9.2";
30
30
  export declare const jsoncEslintParserVersion = "^2.1.0";
31
31
  //# sourceMappingURL=versions.d.ts.map
@@ -28,6 +28,6 @@ exports.autoprefixerVersion = '^10.4.0';
28
28
  exports.tsNodeVersion = '10.9.1';
29
29
  exports.lessVersion = '^4.3.0';
30
30
  exports.jestPresetAngularVersion = '~15.0.0';
31
- exports.typesNodeVersion = '18.16.9';
31
+ exports.typesNodeVersion = '20.19.9';
32
32
  exports.jasmineMarblesVersion = '^0.9.2';
33
33
  exports.jsoncEslintParserVersion = '^2.1.0';