Skip to content

Commit 7d815c6

Browse files
Merge pull request #24396 from abpframework/feat/#24384
Angular - Version upgrade to v21
2 parents bd63ae4 + 69f8b19 commit 7d815c6

File tree

40 files changed

+287
-217
lines changed

40 files changed

+287
-217
lines changed

npm/ng-packs/apps/dev-app/project.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,7 @@
176176
},
177177
"test": {
178178
"executor": "@nx/jest:jest",
179-
"outputs": [
180-
"{workspaceRoot}/coverage/apps/dev-app"
181-
],
179+
"outputs": ["{workspaceRoot}/coverage/apps/dev-app"],
182180
"options": {
183181
"jestConfig": "apps/dev-app/jest.config.ts"
184182
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { bootstrapApplication } from '@angular/platform-browser';
1+
import { bootstrapApplication, BootstrapContext } from '@angular/platform-browser';
22
import { AppComponent } from './app/app.component';
33
import { config } from './app/app.config.server';
44

5-
const bootstrap = () => bootstrapApplication(AppComponent, config);
5+
const bootstrap = (context: BootstrapContext) => bootstrapApplication(AppComponent, config, context);
66

77
export default bootstrap;

npm/ng-packs/migrations.json

Lines changed: 98 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,118 @@
11
{
22
"migrations": [
3+
{
4+
"version": "22.0.0-beta.1",
5+
"description": "Updates release version config based on the breaking changes in Nx v22",
6+
"implementation": "./src/migrations/update-22-0-0/release-version-config-changes",
7+
"package": "nx",
8+
"name": "22-0-0-release-version-config-changes"
9+
},
10+
{
11+
"version": "22.0.0-beta.2",
12+
"description": "Consolidates releaseTag* options into nested releaseTag object structure",
13+
"implementation": "./src/migrations/update-22-0-0/consolidate-release-tag-config",
14+
"package": "nx",
15+
"name": "22-0-0-consolidate-release-tag-config"
16+
},
317
{
418
"cli": "nx",
5-
"version": "21.2.0-beta.3",
6-
"requires": { "@angular/core": ">=20.0.0" },
7-
"description": "Update the @angular/cli package version to ~20.0.0.",
8-
"factory": "./src/migrations/update-21-2-0/update-angular-cli",
19+
"version": "22.1.0-beta.5",
20+
"description": "Updates the nx wrapper.",
21+
"implementation": "./src/migrations/update-22-1-0/update-nx-wrapper",
22+
"package": "nx",
23+
"name": "22-1-0-update-nx-wrapper"
24+
},
25+
{
26+
"version": "21.5.0-beta.2",
27+
"description": "Migrate the legacy 'development' custom condition to a workspace-unique custom condition name.",
28+
"factory": "./src/migrations/update-21-5-0/migrate-development-custom-condition",
29+
"package": "@nx/js",
30+
"name": "migrate-development-custom-condition"
31+
},
32+
{
33+
"version": "22.0.0-beta.0",
34+
"description": "Remove the deprecated `external` and `externalBuildTargets` options from the `@nx/js:swc` and `@nx/js:tsc` executors.",
35+
"factory": "./src/migrations/update-22-0-0/remove-external-options-from-js-executors",
36+
"package": "@nx/js",
37+
"name": "remove-external-options-from-js-executors"
38+
},
39+
{
40+
"version": "22.1.0-rc.1",
41+
"description": "Removes redundant TypeScript project references from project's tsconfig.json files when runtime tsconfig files (e.g., tsconfig.lib.json, tsconfig.app.json) exist.",
42+
"factory": "./src/migrations/update-22-1-0/remove-redundant-ts-project-references",
43+
"package": "@nx/js",
44+
"name": "remove-redundant-ts-project-references"
45+
},
46+
{
47+
"version": "21.3.0-beta.3",
48+
"description": "Rename the CLI option `testPathPattern` to `testPathPatterns`.",
49+
"implementation": "./src/migrations/update-21-3-0/rename-test-path-pattern",
50+
"package": "@nx/jest",
51+
"name": "rename-test-path-pattern"
52+
},
53+
{
54+
"version": "22.2.0-beta.2",
55+
"description": "Convert jest.config.ts files from ESM to CJS syntax (export default -> module.exports, import -> require) for projects using CommonJS resolution to ensure correct loading under Node.js type-stripping.",
56+
"implementation": "./src/migrations/update-22-2-0/convert-jest-config-to-cjs",
57+
"package": "@nx/jest",
58+
"name": "convert-jest-config-to-cjs"
59+
},
60+
{
61+
"cli": "nx",
62+
"version": "21.3.0-beta.4",
63+
"requires": { "@angular/core": ">=20.1.0" },
64+
"description": "Update the @angular/cli package version to ~20.1.0.",
65+
"factory": "./src/migrations/update-21-3-0/update-angular-cli",
966
"package": "@nx/angular",
10-
"name": "update-angular-cli-version-20-0-0"
67+
"name": "update-angular-cli-version-20-1-0"
1168
},
1269
{
13-
"version": "21.2.0-beta.3",
14-
"requires": { "@angular/core": ">=20.0.0" },
15-
"description": "Migrate imports of `provideServerRendering` from `@angular/platform-server` to `@angular/ssr`.",
16-
"factory": "./src/migrations/update-21-2-0/migrate-provide-server-rendering-import",
70+
"version": "21.5.0-beta.0",
71+
"description": "Set the 'tsConfig' option to build and test targets to help with Angular migration issues.",
72+
"factory": "./src/migrations/update-21-5-0/set-tsconfig-option",
1773
"package": "@nx/angular",
18-
"name": "migrate-provide-server-rendering-import"
74+
"name": "set-tsconfig-option"
1975
},
2076
{
21-
"version": "21.2.0-beta.3",
22-
"requires": { "@angular/core": ">=20.0.0" },
23-
"description": "Replace `provideServerRouting` and `provideServerRoutesConfig` with `provideServerRendering` using `withRoutes`.",
24-
"factory": "./src/migrations/update-21-2-0/replace-provide-server-routing",
77+
"cli": "nx",
78+
"version": "21.5.0-beta.2",
79+
"requires": { "@angular/core": ">=20.2.0" },
80+
"description": "Update the @angular/cli package version to ~20.2.0.",
81+
"factory": "./src/migrations/update-21-5-0/update-angular-cli",
2582
"package": "@nx/angular",
26-
"name": "replace-provide-server-routing"
83+
"name": "update-angular-cli-version-20-2-0"
2784
},
2885
{
29-
"version": "21.2.0-beta.3",
30-
"requires": { "@angular/core": ">=20.0.0" },
31-
"description": "Update the generator defaults to maintain the previous style guide behavior.",
32-
"factory": "./src/migrations/update-21-2-0/set-generator-defaults-for-previous-style-guide",
86+
"version": "21.5.0-beta.2",
87+
"requires": { "@angular/core": ">=20.2.0" },
88+
"description": "Remove any Karma configuration files that only contain the default content. The default configuration is automatically available without a specific project configurationfile.",
89+
"factory": "./src/migrations/update-21-5-0/remove-default-karma-configuration-files",
3390
"package": "@nx/angular",
34-
"name": "set-generator-defaults-for-previous-style-guide"
91+
"name": "remove-default-karma-configuration-files"
3592
},
3693
{
37-
"version": "21.2.0-beta.3",
38-
"requires": { "@angular/core": ">=20.0.0" },
39-
"description": "Update 'moduleResolution' to 'bundler' in TypeScript configurations. You can read more about this here: https://www.typescriptlang.org/tsconfig/#moduleResolution.",
40-
"factory": "./src/migrations/update-21-2-0/update-module-resolution",
94+
"cli": "nx",
95+
"version": "21.6.1-beta.2",
96+
"requires": { "@angular/core": ">=20.3.0" },
97+
"description": "Update the @angular/cli package version to ~20.3.0.",
98+
"factory": "./src/migrations/update-21-6-1/update-angular-cli",
4199
"package": "@nx/angular",
42-
"name": "update-module-resolution"
100+
"name": "update-angular-cli-version-20-3-0"
101+
},
102+
{
103+
"version": "20.2.0",
104+
"description": "Replaces usages of the deprecated Router.getCurrentNavigation method with the Router.currentNavigation signal",
105+
"factory": "./bundles/router-current-navigation.cjs#migrate",
106+
"optional": true,
107+
"package": "@angular/core",
108+
"name": "router-current-navigation"
109+
},
110+
{
111+
"version": "20.3.0",
112+
"description": "Adds `BootstrapContext` to `bootstrapApplication` calls in `main.server.ts` to support server rendering.",
113+
"factory": "./bundles/add-bootstrap-context-to-server-main.cjs#migrate",
114+
"package": "@angular/core",
115+
"name": "add-bootstrap-context-to-server-main"
43116
}
44117
]
45118
}

npm/ng-packs/package.json

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -48,49 +48,49 @@
4848
"devDependencies": {
4949
"@abp/ng.theme.lepton-x": "~5.0.1",
5050
"@abp/utils": "~10.0.1",
51-
"@angular-devkit/build-angular": "~20.0.0",
52-
"@angular-devkit/core": "~20.0.0",
53-
"@angular-devkit/schematics": "~20.0.0",
54-
"@angular-devkit/schematics-cli": "~20.0.0",
55-
"@angular-eslint/eslint-plugin": "~20.0.0",
56-
"@angular-eslint/eslint-plugin-template": "~20.0.0",
57-
"@angular-eslint/template-parser": "~20.0.0",
58-
"@angular/animations": "~20.0.0",
59-
"@angular/build": "~20.0.0",
60-
"@angular/cli": "~20.0.0",
61-
"@angular/common": "~20.0.0",
62-
"@angular/compiler": "~20.0.0",
63-
"@angular/compiler-cli": "~20.0.0",
64-
"@angular/core": "~20.0.0",
65-
"@angular/forms": "~20.0.0",
66-
"@angular/language-service": "~20.0.0",
67-
"@angular/localize": "~20.0.0",
68-
"@angular/platform-browser": "~20.0.0",
69-
"@angular/platform-browser-dynamic": "~20.0.0",
70-
"@angular/platform-server": "~20.0.0",
71-
"@angular/router": "~20.0.0",
72-
"@angular/ssr": "~20.0.0",
51+
"@angular-devkit/build-angular": "~21.0.0",
52+
"@angular-devkit/core": "~21.0.0",
53+
"@angular-devkit/schematics": "~21.0.0",
54+
"@angular-devkit/schematics-cli": "~21.0.0",
55+
"@angular-eslint/eslint-plugin": "~21.0.0",
56+
"@angular-eslint/eslint-plugin-template": "~21.0.0",
57+
"@angular-eslint/template-parser": "~21.0.0",
58+
"@angular/animations": "21.0.0",
59+
"@angular/build": "~21.0.0",
60+
"@angular/cli": "~21.0.0",
61+
"@angular/common": "~21.0.0",
62+
"@angular/compiler": "~21.0.0",
63+
"@angular/compiler-cli": "~21.0.0",
64+
"@angular/core": "~21.0.0",
65+
"@angular/forms": "~21.0.0",
66+
"@angular/language-service": "~21.0.0",
67+
"@angular/localize": "~21.0.0",
68+
"@angular/platform-browser": "~21.0.0",
69+
"@angular/platform-browser-dynamic": "~21.0.0",
70+
"@angular/platform-server": "~21.0.0",
71+
"@angular/router": "~21.0.0",
72+
"@angular/ssr": "~21.0.0",
7373
"@fortawesome/fontawesome-free": "^6.0.0",
74-
"@ng-bootstrap/ng-bootstrap": "~19.0.0",
74+
"@ng-bootstrap/ng-bootstrap": "~20.0.0",
7575
"@ngneat/spectator": "~19.6.2",
7676
"@ngx-validate/core": "^0.2.0",
77-
"@nx/angular": "~21.2.0",
78-
"@nx/cypress": "~21.2.0",
79-
"@nx/devkit": "~21.2.0",
80-
"@nx/eslint": "~21.2.0",
81-
"@nx/eslint-plugin": "~21.2.0",
82-
"@nx/jest": "~21.2.0",
83-
"@nx/js": "~21.2.0",
84-
"@nx/plugin": "~21.2.0",
85-
"@nx/web": "~21.2.0",
86-
"@nx/workspace": "~21.2.0",
77+
"@nx/angular": "~22.2.0",
78+
"@nx/cypress": "~22.2.0",
79+
"@nx/devkit": "~22.2.0",
80+
"@nx/eslint": "~22.2.0",
81+
"@nx/eslint-plugin": "~22.2.0",
82+
"@nx/jest": "~22.2.0",
83+
"@nx/js": "~22.2.0",
84+
"@nx/plugin": "~22.2.0",
85+
"@nx/web": "~22.2.0",
86+
"@nx/workspace": "~22.2.0",
8787
"@popperjs/core": "~2.11.0",
88-
"@schematics/angular": "~20.0.0",
88+
"@schematics/angular": "~21.0.0",
8989
"@swc-node/register": "1.9.2",
9090
"@swc/cli": "0.6.0",
9191
"@swc/core": "~1.5.0",
9292
"@swc/helpers": "~0.5.0",
93-
"@swimlane/ngx-datatable": "~21.1.0",
93+
"@swimlane/ngx-datatable": "~22.0.0",
9494
"@types/express": "~5.0.0",
9595
"@types/jest": "29.5.14",
9696
"@types/node": "~20.11.0",
@@ -120,9 +120,9 @@
120120
"just-compare": "^2.0.0",
121121
"lerna": "^4.0.0",
122122
"lint-staged": "^13.0.0",
123-
"ng-packagr": "~20.0.0",
124-
"ng-zorro-antd": "~20.0.0",
125-
"nx": "~21.2.0",
123+
"ng-packagr": "~21.0.0",
124+
"ng-zorro-antd": "~21.0.0-next.1",
125+
"nx": "~22.2.0",
126126
"postcss": "^8.0.0",
127127
"postcss-import": "14.1.0",
128128
"postcss-preset-env": "7.5.0",
@@ -131,12 +131,12 @@
131131
"protractor": "~7.0.0",
132132
"rxjs": "~7.8.0",
133133
"should-quote": "^1.0.0",
134-
"ts-jest": "29.1.0",
134+
"ts-jest": "29.4.6",
135135
"ts-node": "10.9.1",
136136
"ts-toolbelt": "^9.0.0",
137137
"tslib": "^2.3.0",
138138
"tslint": "~6.1.0",
139-
"typescript": "~5.8.0",
139+
"typescript": "~5.9.0",
140140
"zone.js": "~0.15.0"
141141
},
142142
"lint-staged": {

npm/ng-packs/packages/account-core/project.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
"projectType": "library",
55
"sourceRoot": "packages/account-core/src",
66
"prefix": "abp",
7+
"tags": [],
8+
"implicitDependencies": ["core", "theme-shared"],
79
"targets": {
810
"build": {
911
"executor": "@nx/angular:package",
@@ -32,7 +34,5 @@
3234
"executor": "@nx/eslint:lint",
3335
"outputs": ["{options.outputFile}"]
3436
}
35-
},
36-
"tags": [],
37-
"implicitDependencies": ["core", "theme-shared"]
37+
}
3838
}

npm/ng-packs/packages/account/project.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
"projectType": "library",
55
"sourceRoot": "packages/account/src",
66
"prefix": "abp",
7+
"tags": [],
8+
"implicitDependencies": ["core", "theme-shared", "account-core"],
79
"targets": {
810
"build": {
911
"executor": "@nx/angular:package",
@@ -32,7 +34,5 @@
3234
"executor": "@nx/eslint:lint",
3335
"outputs": ["{options.outputFile}"]
3436
}
35-
},
36-
"tags": [],
37-
"implicitDependencies": ["core", "theme-shared", "account-core"]
37+
}
3838
}

npm/ng-packs/packages/components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"dependencies": {
1414
"chart.js": "^3.5.1",
15-
"ng-zorro-antd": "~20.0.0",
15+
"ng-zorro-antd": "~21.0.0-next.1",
1616
"@ctrl/tinycolor": "^4.0.0",
1717
"tslib": "^2.0.0"
1818
},

npm/ng-packs/packages/components/project.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
"projectType": "library",
55
"sourceRoot": "packages/components/src",
66
"prefix": "abp",
7+
"tags": [],
8+
"implicitDependencies": ["core", "theme-shared"],
79
"targets": {
810
"build": {
911
"executor": "@nx/angular:package",
@@ -32,7 +34,5 @@
3234
"executor": "@nx/eslint:lint",
3335
"outputs": ["{options.outputFile}"]
3436
}
35-
},
36-
"tags": [],
37-
"implicitDependencies": ["core", "theme-shared"]
37+
}
3838
}

npm/ng-packs/packages/components/tree/src/lib/components/tree.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { DISABLE_TREE_STYLE_LOADING_TOKEN } from '../disable-tree-style-loading.
2929
import { TreeNodeTemplateDirective } from '../templates/tree-node-template.directive';
3030
import { ExpandedIconTemplateDirective } from '../templates/expanded-icon-template.directive';
3131
import { NgTemplateOutlet } from '@angular/common';
32-
import { NzNoAnimationDirective } from 'ng-zorro-antd/core/no-animation';
32+
import { NzNoAnimationDirective } from 'ng-zorro-antd/core/animation';
3333

3434
export type DropEvent = NzFormatEmitEvent & { pos: number };
3535

npm/ng-packs/packages/components/tsconfig.lib.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
44
"outDir": "../../dist/out-tsc",
5-
"target": "ES2022",
65
"declaration": true,
76
"declarationMap": true,
87
"inlineSources": true,
98
"types": [],
10-
"lib": ["dom", "es2020"],
9+
"target": "ES2022",
10+
"lib": ["ES2020", "dom"],
1111
"useDefineForClassFields": false
1212
},
13-
"exclude": ["src/test-setup.ts", "**/*.spec.ts", "jest.config.ts"],
14-
"include": ["**/*.ts"]
13+
"exclude": [
14+
"src/test-setup.ts",
15+
"src/**/*.spec.ts",
16+
"jest.config.ts"
17+
],
18+
"include": ["src/**/*.ts"]
1519
}

0 commit comments

Comments
 (0)