@nx/angular 23.0.0-beta.21 → 23.0.0-beta.23

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.
Files changed (51) hide show
  1. package/generators.json +6 -5
  2. package/migrations.json +62 -31
  3. package/package.json +8 -8
  4. package/src/generators/federate-module/federate-module.d.ts.map +1 -1
  5. package/src/generators/federate-module/federate-module.js +0 -2
  6. package/src/generators/host/host.d.ts.map +1 -1
  7. package/src/generators/host/host.js +0 -2
  8. package/src/generators/init/init.js +1 -1
  9. package/src/generators/remote/remote.d.ts.map +1 -1
  10. package/src/generators/remote/remote.js +0 -2
  11. package/src/generators/setup-mf/setup-mf.d.ts.map +1 -1
  12. package/src/generators/setup-mf/setup-mf.js +0 -2
  13. package/src/migrations/update-20-2-0/add-localize-polyfill-to-targets.md +44 -0
  14. package/src/migrations/update-20-2-0/disable-angular-eslint-prefer-standalone.md +475 -0
  15. package/src/migrations/update-20-2-0/migrate-mf-imports-to-new-package.md +19 -0
  16. package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.md +25 -0
  17. package/src/migrations/update-20-2-0/remove-angular-eslint-rules.md +37 -0
  18. package/src/migrations/update-20-2-0/remove-tailwind-config-from-ng-packagr-executors.md +69 -0
  19. package/src/migrations/update-20-2-0/update-angular-cli.md +49 -0
  20. package/src/migrations/update-20-2-0/update-angular-ssr-imports-to-use-node-entry-point.md +27 -0
  21. package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.md +23 -0
  22. package/src/migrations/update-20-4-0/update-angular-cli.md +49 -0
  23. package/src/migrations/update-20-5-0/update-angular-cli.md +23 -0
  24. package/src/migrations/update-21-0-0/change-data-persistence-operators-imports-to-ngrx-router-store-data-persistence.md +113 -0
  25. package/src/migrations/update-21-0-0/set-continuous-option.md +90 -0
  26. package/src/migrations/update-21-2-0/migrate-provide-server-rendering-import.md +56 -0
  27. package/src/migrations/update-21-2-0/replace-provide-server-routing.md +107 -0
  28. package/src/migrations/update-21-2-0/set-generator-defaults-for-previous-style-guide.md +164 -0
  29. package/src/migrations/update-21-2-0/update-angular-cli.md +23 -0
  30. package/src/migrations/update-21-2-0/update-module-resolution.md +53 -0
  31. package/src/migrations/update-21-3-0/update-angular-cli.md +23 -0
  32. package/src/migrations/update-21-5-0/remove-default-karma-configuration-files.md +122 -0
  33. package/src/migrations/update-21-5-0/set-tsconfig-option.md +114 -0
  34. package/src/migrations/update-21-5-0/update-angular-cli.md +23 -0
  35. package/src/migrations/update-21-6-1/update-angular-cli.md +23 -0
  36. package/src/migrations/update-22-3-0/set-isolated-modules.md +76 -0
  37. package/src/migrations/update-22-3-0/update-jest-preset-angular-setup.md +21 -0
  38. package/src/migrations/update-22-3-0/update-module-resolution.md +81 -0
  39. package/src/migrations/update-22-3-0/update-ssr-webpack-config.md +71 -0
  40. package/src/migrations/update-22-3-0/update-typescript-lib.md +103 -0
  41. package/src/migrations/update-22-3-0/update-unit-test-runner-option.md +33 -0
  42. package/src/migrations/update-23-0-0/migrate-ngrx-generator-defaults.md +46 -0
  43. package/src/migrations/update-23-0-0/migrate-with-mf-import-to-new-package.md +27 -0
  44. package/src/plugins/plugin.d.ts +6 -2
  45. package/src/plugins/plugin.d.ts.map +1 -1
  46. package/src/plugins/plugin.js +6 -2
  47. package/src/utils/module-federation-deprecation.d.ts +0 -8
  48. package/src/utils/module-federation-deprecation.d.ts.map +1 -1
  49. package/src/utils/module-federation-deprecation.js +1 -21
  50. package/src/utils/versions.d.ts +1 -1
  51. package/src/utils/versions.js +1 -1
@@ -0,0 +1,23 @@
1
+ #### Sample Code Changes
2
+
3
+ Update the `@angular/cli` package version in the `package.json` file at the workspace root to **~20.1.0**.
4
+
5
+ ##### Before
6
+
7
+ ```json title="package.json"
8
+ {
9
+ "devDependencies": {
10
+ "@angular/cli": "~20.0.0"
11
+ }
12
+ }
13
+ ```
14
+
15
+ ##### After
16
+
17
+ ```json title="package.json" {3}
18
+ {
19
+ "devDependencies": {
20
+ "@angular/cli": "~20.1.0"
21
+ }
22
+ }
23
+ ```
@@ -0,0 +1,122 @@
1
+ #### Remove the Default Karma Configuration Files
2
+
3
+ Removes Karma configuration files that match the default configuration generated by Angular CLI to reduce boilerplate code in the workspace. The migration also removes the `karmaConfig` option from project targets when the configuration file is removed.
4
+
5
+ #### Examples
6
+
7
+ The migration will remove `karma.conf.js` files that contain only default settings and update the project configuration:
8
+
9
+ ##### Before
10
+
11
+ ```javascript title="apps/my-app/karma.conf.js"
12
+ // Karma configuration file, see link for more information
13
+ // https://karma-runner.github.io/1.0/config/configuration-file.html
14
+
15
+ module.exports = function (config) {
16
+ config.set({
17
+ basePath: '',
18
+ frameworks: ['jasmine', '@angular-devkit/build-angular'],
19
+ plugins: [
20
+ require('karma-jasmine'),
21
+ require('karma-chrome-launcher'),
22
+ require('karma-jasmine-html-reporter'),
23
+ require('karma-coverage'),
24
+ require('@angular-devkit/build-angular/plugins/karma'),
25
+ ],
26
+ client: {
27
+ jasmine: {
28
+ // you can add configuration options for Jasmine here
29
+ // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
30
+ // for example, you can disable the random execution with `random: false`
31
+ // or set a specific seed with `seed: 4321`
32
+ },
33
+ },
34
+ jasmineHtmlReporter: {
35
+ suppressAll: true, // removes the duplicated traces
36
+ },
37
+ coverageReporter: {
38
+ dir: require('path').join(__dirname, '../../coverage/my-app'),
39
+ subdir: '.',
40
+ reporters: [{ type: 'html' }, { type: 'text-summary' }],
41
+ },
42
+ reporters: ['progress', 'kjhtml'],
43
+ browsers: ['Chrome'],
44
+ restartOnFileChange: true,
45
+ });
46
+ };
47
+ ```
48
+
49
+ ```json title="apps/my-app/project.json" {7}
50
+ {
51
+ "name": "my-app",
52
+ "targets": {
53
+ "test": {
54
+ "executor": "@angular-devkit/build-angular:karma",
55
+ "options": {
56
+ "karmaConfig": "apps/my-app/karma.conf.js",
57
+ "polyfills": ["zone.js", "zone.js/testing"]
58
+ }
59
+ }
60
+ }
61
+ }
62
+ ```
63
+
64
+ ##### After
65
+
66
+ File `apps/my-app/karma.conf.js` is removed.
67
+
68
+ ```json title="apps/my-app/project.json"
69
+ {
70
+ "name": "my-app",
71
+ "targets": {
72
+ "test": {
73
+ "executor": "@angular-devkit/build-angular:karma",
74
+ "options": {
75
+ "polyfills": ["zone.js", "zone.js/testing"]
76
+ }
77
+ }
78
+ }
79
+ }
80
+ ```
81
+
82
+ If the Karma configuration contains customizations, the migration will preserve the file and configuration:
83
+
84
+ ##### Before
85
+
86
+ ```javascript title="apps/custom-app/karma.conf.js"
87
+ module.exports = function (config) {
88
+ config.set({
89
+ basePath: '',
90
+ frameworks: ['jasmine', '@angular-devkit/build-angular'],
91
+ plugins: [
92
+ require('karma-jasmine'),
93
+ require('karma-chrome-launcher'),
94
+ require('karma-jasmine-html-reporter'),
95
+ require('karma-coverage'),
96
+ require('@angular-devkit/build-angular/plugins/karma'),
97
+ ],
98
+ browsers: ['ChromeHeadless'], // Custom browser configuration
99
+ restartOnFileChange: true,
100
+ });
101
+ };
102
+ ```
103
+
104
+ ##### After
105
+
106
+ ```javascript title="apps/custom-app/karma.conf.js"
107
+ module.exports = function (config) {
108
+ config.set({
109
+ basePath: '',
110
+ frameworks: ['jasmine', '@angular-devkit/build-angular'],
111
+ plugins: [
112
+ require('karma-jasmine'),
113
+ require('karma-chrome-launcher'),
114
+ require('karma-jasmine-html-reporter'),
115
+ require('karma-coverage'),
116
+ require('@angular-devkit/build-angular/plugins/karma'),
117
+ ],
118
+ browsers: ['ChromeHeadless'], // Custom browser configuration
119
+ restartOnFileChange: true,
120
+ });
121
+ };
122
+ ```
@@ -0,0 +1,114 @@
1
+ #### Set `tsConfig` option for build and test targets
2
+
3
+ - Set the `tsConfig` option in the target options for library build executors. It moves the value from the target `development` configuration and it doesn't set it if the option is already set.
4
+ - Set `tsconfig.spec.json` as the `tsConfig` option in the target options for the `@nx/jest:jest` executor. It only does it if the file exists and the options is not already set.
5
+
6
+ #### Examples
7
+
8
+ The migration will move the `tsConfig` option for library build executors (`@nx/angular:ng-packagr-lite` and `@nx/angular:package`) from the `development` configuration to the target options if it's not already set:
9
+
10
+ ##### Before
11
+
12
+ ```json title="libs/lib1/project.json" {7}
13
+ {
14
+ "targets": {
15
+ "build": {
16
+ "executor": "@nx/angular:ng-packagr-lite",
17
+ "configurations": {
18
+ "development": {
19
+ "tsConfig": "libs/lib1/tsconfig.lib.dev.json"
20
+ }
21
+ }
22
+ }
23
+ }
24
+ }
25
+ ```
26
+
27
+ ##### After
28
+
29
+ ```json title="libs/lib1/project.json" {6,9}
30
+ {
31
+ "targets": {
32
+ "build": {
33
+ "executor": "@nx/angular:ng-packagr-lite",
34
+ "options": {
35
+ "tsConfig": "libs/lib1/tsconfig.lib.dev.json"
36
+ },
37
+ "configurations": {
38
+ "development": {}
39
+ }
40
+ }
41
+ }
42
+ }
43
+ ```
44
+
45
+ The migration will set the `tsConfig` option for the `@nx/jest:jest` executor when the `tsconfig.spec.json` file exists and the option is not already set:
46
+
47
+ ##### Before
48
+
49
+ ```json title="apps/app1/project.json"
50
+ {
51
+ "targets": {
52
+ "test": {
53
+ "executor": "@nx/jest:jest"
54
+ }
55
+ }
56
+ }
57
+ ```
58
+
59
+ ##### After
60
+
61
+ ```json title="apps/app1/project.json" {6}
62
+ {
63
+ "targets": {
64
+ "test": {
65
+ "executor": "@nx/jest:jest",
66
+ "options": {
67
+ "tsConfig": "apps/app1/tsconfig.spec.json"
68
+ }
69
+ }
70
+ }
71
+ }
72
+ ```
73
+
74
+ If the `tsConfig` option is already set in the target options, the migration will not modify the configuration:
75
+
76
+ ##### Before
77
+
78
+ ```json title="libs/lib1/project.json" {6,10}
79
+ {
80
+ "targets": {
81
+ "build": {
82
+ "executor": "@nx/angular:ng-packagr-lite",
83
+ "options": {
84
+ "tsConfig": "libs/lib1/tsconfig.lib.json"
85
+ },
86
+ "configurations": {
87
+ "development": {
88
+ "tsConfig": "libs/lib1/tsconfig.lib.dev.json"
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
94
+ ```
95
+
96
+ ##### After
97
+
98
+ ```json title="libs/lib1/project.json" {6,10}
99
+ {
100
+ "targets": {
101
+ "build": {
102
+ "executor": "@nx/angular:ng-packagr-lite",
103
+ "options": {
104
+ "tsConfig": "libs/lib1/tsconfig.lib.json"
105
+ },
106
+ "configurations": {
107
+ "development": {
108
+ "tsConfig": "libs/lib1/tsconfig.lib.dev.json"
109
+ }
110
+ }
111
+ }
112
+ }
113
+ }
114
+ ```
@@ -0,0 +1,23 @@
1
+ #### Sample Code Changes
2
+
3
+ Update the `@angular/cli` package version in the `package.json` file at the workspace root to **~20.2.0**.
4
+
5
+ ##### Before
6
+
7
+ ```json title="package.json"
8
+ {
9
+ "devDependencies": {
10
+ "@angular/cli": "~20.1.0"
11
+ }
12
+ }
13
+ ```
14
+
15
+ ##### After
16
+
17
+ ```json title="package.json" {3}
18
+ {
19
+ "devDependencies": {
20
+ "@angular/cli": "~20.2.0"
21
+ }
22
+ }
23
+ ```
@@ -0,0 +1,23 @@
1
+ #### Sample Code Changes
2
+
3
+ Update the `@angular/cli` package version in the `package.json` file at the workspace root to **~20.3.0**.
4
+
5
+ ##### Before
6
+
7
+ ```json title="package.json"
8
+ {
9
+ "devDependencies": {
10
+ "@angular/cli": "~20.2.0"
11
+ }
12
+ }
13
+ ```
14
+
15
+ ##### After
16
+
17
+ ```json title="package.json" {3}
18
+ {
19
+ "devDependencies": {
20
+ "@angular/cli": "~20.3.0"
21
+ }
22
+ }
23
+ ```
@@ -0,0 +1,76 @@
1
+ #### Set `isolatedModules` to `true` in TypeScript test configurations
2
+
3
+ Sets the TypeScript `isolatedModules` compiler option to `true` in `tsconfig.spec.json` files for Angular projects using the Jest test runner.
4
+
5
+ #### Examples
6
+
7
+ The migration updates TypeScript test configuration files in Angular projects using the Jest test runner to set the `isolatedModules` compiler option:
8
+
9
+ ##### Before
10
+
11
+ ```jsonc {3-5}
12
+ // apps/my-app/tsconfig.spec.json
13
+ {
14
+ "compilerOptions": {
15
+ "outDir": "./out-tsc/spec",
16
+ },
17
+ }
18
+ ```
19
+
20
+ ##### After
21
+
22
+ ```jsonc {4-5}
23
+ // apps/my-app/tsconfig.spec.json
24
+ {
25
+ "compilerOptions": {
26
+ "outDir": "./out-tsc/spec",
27
+ "isolatedModules": true,
28
+ },
29
+ }
30
+ ```
31
+
32
+ If the value is already set to `true` or inherited from an extended tsconfig file, the migration will not modify the configuration:
33
+
34
+ ##### Before
35
+
36
+ ```jsonc {4}
37
+ // tsconfig.json
38
+ {
39
+ "compilerOptions": {
40
+ "isolatedModules": true,
41
+ },
42
+ }
43
+ ```
44
+
45
+ ```jsonc {4-6}
46
+ // apps/my-app/tsconfig.spec.json
47
+ {
48
+ "extends": "../../tsconfig.json",
49
+ "compilerOptions": {
50
+ "outDir": "./out-tsc/spec",
51
+ },
52
+ }
53
+ ```
54
+
55
+ ##### After
56
+
57
+ ```jsonc {4}
58
+ // tsconfig.json
59
+ {
60
+ "compilerOptions": {
61
+ "isolatedModules": true,
62
+ },
63
+ }
64
+ ```
65
+
66
+ ```jsonc {4-6}
67
+ // apps/my-app/tsconfig.spec.json
68
+ {
69
+ "extends": "../../tsconfig.json",
70
+ "compilerOptions": {
71
+ "outDir": "./out-tsc/spec",
72
+ },
73
+ }
74
+ ```
75
+
76
+ The migration only processes TypeScript test configuration files (`tsconfig.spec.json` or custom test tsconfig files referenced by `@nx/jest:jest` tasks) in Angular projects.
@@ -0,0 +1,21 @@
1
+ #### Update Jest Preset Angular Setup
2
+
3
+ Replaces the removed `jest-preset-angular/setup-jest` import with the new `setupZoneTestEnv` function from `jest-preset-angular/setup-env/zone`.
4
+
5
+ Starting with `jest-preset-angular` v15, the `setup-jest` files have been removed and replaced with explicit setup functions. The old `setup-jest` import only supported zone-based testing (zoneless support was added in v14.3.0 with the new `setupZonelessTestEnv` function), so all projects using the removed import are migrated to use `setupZoneTestEnv`.
6
+
7
+ #### Examples
8
+
9
+ ##### Before
10
+
11
+ ```ts title="apps/my-app/src/test-setup.ts"
12
+ import 'jest-preset-angular/setup-jest';
13
+ ```
14
+
15
+ ##### After
16
+
17
+ ```ts title="apps/my-app/src/test-setup.ts"
18
+ import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone';
19
+
20
+ setupZoneTestEnv();
21
+ ```
@@ -0,0 +1,81 @@
1
+ #### Update `module` to `preserve` and `moduleResolution` to `bundler` in TypeScript configurations
2
+
3
+ Updates the TypeScript `module` and `moduleResolution` compiler options to `'preserve'` and `'bundler'` respectively for Angular projects. These settings are required for Angular's build system to work correctly with modern module resolution algorithms used by bundlers like Webpack, Vite, and esbuild.
4
+
5
+ #### Examples
6
+
7
+ The migration updates TypeScript configuration files in Angular projects to set both compiler options:
8
+
9
+ ##### Before
10
+
11
+ ```jsonc {4-5}
12
+ // apps/my-app/tsconfig.app.json
13
+ {
14
+ "compilerOptions": {
15
+ "module": "es2020",
16
+ "moduleResolution": "node",
17
+ },
18
+ }
19
+ ```
20
+
21
+ ##### After
22
+
23
+ ```jsonc {4-5}
24
+ // apps/my-app/tsconfig.app.json
25
+ {
26
+ "compilerOptions": {
27
+ "module": "preserve",
28
+ "moduleResolution": "bundler",
29
+ },
30
+ }
31
+ ```
32
+
33
+ If both values are already set correctly and inherited from an extended tsconfig file, the migration will not modify the configuration:
34
+
35
+ ##### Before
36
+
37
+ ```jsonc {5-6}
38
+ // apps/my-app/tsconfig.json
39
+ {
40
+ "extends": "../../tsconfig.base.json",
41
+ "compilerOptions": {
42
+ "module": "preserve",
43
+ "moduleResolution": "bundler",
44
+ },
45
+ }
46
+ ```
47
+
48
+ ```jsonc {4-6}
49
+ // apps/my-app/tsconfig.app.json
50
+ {
51
+ "extends": "./tsconfig.json",
52
+ "compilerOptions": {
53
+ "types": [],
54
+ },
55
+ }
56
+ ```
57
+
58
+ ##### After
59
+
60
+ ```jsonc {5-6}
61
+ // apps/my-app/tsconfig.json
62
+ {
63
+ "extends": "../../tsconfig.base.json",
64
+ "compilerOptions": {
65
+ "module": "preserve",
66
+ "moduleResolution": "bundler",
67
+ },
68
+ }
69
+ ```
70
+
71
+ ```jsonc {4-6}
72
+ // apps/my-app/tsconfig.app.json
73
+ {
74
+ "extends": "./tsconfig.json",
75
+ "compilerOptions": {
76
+ "types": [],
77
+ },
78
+ }
79
+ ```
80
+
81
+ The migration only processes TypeScript configuration files that are referenced by Angular project build targets, ensuring that only Angular-specific configurations are updated.
@@ -0,0 +1,71 @@
1
+ #### Updates Webpack-Based SSR Configuration
2
+
3
+ Updates the TypeScript configuration and import syntax for webpack-based server-side rendering (SSR) projects. This migration sets `module: "preserve"` and `moduleResolution: "bundler"` in `tsconfig.server.json` to align with Angular's build requirements, and updates server file imports from namespace imports (`import * as express`) to default imports (`import express`) to work correctly with the new module format.
4
+
5
+ #### Examples
6
+
7
+ For webpack-based SSR projects (using `@nx/angular:webpack-server` or `@angular-devkit/build-angular:server`), the migration updates the `tsconfig.server.json` file:
8
+
9
+ ##### Before
10
+
11
+ ```jsonc {7-8}
12
+ // apps/my-app/tsconfig.server.json
13
+ {
14
+ "extends": "./tsconfig.json",
15
+ "compilerOptions": {
16
+ "outDir": "../../dist/out-tsc",
17
+ "target": "es2022",
18
+ "module": "commonjs",
19
+ "moduleResolution": "node",
20
+ "types": ["node"],
21
+ },
22
+ "files": ["src/main.server.ts", "src/server.ts"],
23
+ }
24
+ ```
25
+
26
+ ##### After
27
+
28
+ ```jsonc {7-8}
29
+ // apps/my-app/tsconfig.server.json
30
+ {
31
+ "extends": "./tsconfig.json",
32
+ "compilerOptions": {
33
+ "outDir": "../../dist/out-tsc",
34
+ "target": "es2022",
35
+ "module": "preserve",
36
+ "moduleResolution": "bundler",
37
+ "types": ["node"],
38
+ },
39
+ "files": ["src/main.server.ts", "src/server.ts"],
40
+ }
41
+ ```
42
+
43
+ The migration also updates import statements in the `server.ts` file to use default imports instead of namespace imports:
44
+
45
+ ##### Before
46
+
47
+ ```ts {2-4}
48
+ // apps/my-app/src/server.ts
49
+ import * as express from 'express';
50
+ import * as compression from 'compression';
51
+ import * as cors from 'cors';
52
+
53
+ const app = express();
54
+ app.use(compression());
55
+ app.use(cors());
56
+ ```
57
+
58
+ ##### After
59
+
60
+ ```ts {2-4}
61
+ // apps/my-app/src/server.ts
62
+ import express from 'express';
63
+ import compression from 'compression';
64
+ import cors from 'cors';
65
+
66
+ const app = express();
67
+ app.use(compression());
68
+ app.use(cors());
69
+ ```
70
+
71
+ Projects that already have the correct TypeScript configuration or projects without a `tsconfig.server.json` file are not modified by this migration.
@@ -0,0 +1,103 @@
1
+ #### Update TypeScript `lib` compiler option to ES2022
2
+
3
+ Updates the TypeScript `lib` compiler option in Angular projects to ensure compatibility with Angular v21+, which requires ES2022 as the minimum ECMAScript version. The migration upgrades any ES versions older than ES2022 (such as ES2015, ES2020, etc.) to ES2022 while preserving other library entries like `'dom'`, `'webworker'`, etc.
4
+
5
+ #### Examples
6
+
7
+ The migration processes TypeScript configuration files referenced by Angular project build targets and updates the `lib` compiler option when outdated ES versions are detected:
8
+
9
+ ##### Before
10
+
11
+ ```jsonc {4}
12
+ // apps/my-app/tsconfig.app.json
13
+ {
14
+ "compilerOptions": {
15
+ "lib": ["es2020", "dom"],
16
+ },
17
+ }
18
+ ```
19
+
20
+ ##### After
21
+
22
+ ```jsonc {4}
23
+ // apps/my-app/tsconfig.app.json
24
+ {
25
+ "compilerOptions": {
26
+ "lib": ["dom", "es2022"],
27
+ },
28
+ }
29
+ ```
30
+
31
+ When the `lib` array contains only an ES version older than ES2022 without additional entries, it is upgraded:
32
+
33
+ ##### Before
34
+
35
+ ```jsonc {4}
36
+ // apps/my-app/tsconfig.app.json
37
+ {
38
+ "compilerOptions": {
39
+ "lib": ["es2020"],
40
+ },
41
+ }
42
+ ```
43
+
44
+ ##### After
45
+
46
+ ```jsonc {4}
47
+ // apps/my-app/tsconfig.app.json
48
+ {
49
+ "compilerOptions": {
50
+ "lib": ["es2022"],
51
+ },
52
+ }
53
+ ```
54
+
55
+ If the configuration already uses ES2022 or higher (e.g., `'es2023'`, `'esnext'`), no changes are made:
56
+
57
+ ##### Before
58
+
59
+ ```jsonc {4}
60
+ // apps/my-app/tsconfig.app.json
61
+ {
62
+ "compilerOptions": {
63
+ "lib": ["es2022", "dom"],
64
+ },
65
+ }
66
+ ```
67
+
68
+ ##### After
69
+
70
+ ```jsonc {4}
71
+ // apps/my-app/tsconfig.app.json
72
+ {
73
+ "compilerOptions": {
74
+ "lib": ["es2022", "dom"],
75
+ },
76
+ }
77
+ ```
78
+
79
+ When the `lib` array contains multiple library entries, only the ES version is upgraded while all other entries are preserved:
80
+
81
+ ##### Before
82
+
83
+ ```jsonc {4}
84
+ // apps/my-app/tsconfig.app.json
85
+ {
86
+ "compilerOptions": {
87
+ "lib": ["es2020", "dom", "webworker"],
88
+ },
89
+ }
90
+ ```
91
+
92
+ ##### After
93
+
94
+ ```jsonc {4}
95
+ // apps/my-app/tsconfig.app.json
96
+ {
97
+ "compilerOptions": {
98
+ "lib": ["dom", "webworker", "es2022"],
99
+ },
100
+ }
101
+ ```
102
+
103
+ The migration only processes TypeScript configuration files that are referenced by Angular project build targets, ensuring that only Angular-specific configurations are updated.
@@ -0,0 +1,33 @@
1
+ #### Update `vitest` unit test runner option to `vitest-analog` in generator defaults
2
+
3
+ Updates the `unitTestRunner` generator default from `vitest` to `vitest-analog` in `nx.json`. The `vitest` option has been split into two explicit options: `vitest-angular` (uses `@angular/build:unit-test`) and `vitest-analog` (uses AnalogJS-based setup).
4
+
5
+ #### Examples
6
+
7
+ The migration updates generator defaults in `nx.json`:
8
+
9
+ ##### Before
10
+
11
+ ```jsonc {5}
12
+ // nx.json
13
+ {
14
+ "generators": {
15
+ "@nx/angular:application": {
16
+ "unitTestRunner": "vitest",
17
+ },
18
+ },
19
+ }
20
+ ```
21
+
22
+ ##### After
23
+
24
+ ```jsonc {5}
25
+ // nx.json
26
+ {
27
+ "generators": {
28
+ "@nx/angular:application": {
29
+ "unitTestRunner": "vitest-analog",
30
+ },
31
+ },
32
+ }
33
+ ```