Skip to content

Commit 379b67f

Browse files
authored
feat: update angular to v21 (#3306)
* Angular-v21 :recycle: revertes changes and only keeps changes directly related to Angular v21 upgrade * Angular v21 :package: adds overrides for "@angular/fire" dependencies to resolve dependency until version "21.0.0" is released. * Angular v21 :white_check_mark: updates test configurations to make sure schematic tests are excluded from browser test environment (Karma), since they need Node.js modules. * Angular v21 :recycle: updates formatting to reduce changes * Angular v21 :recycle: removes spaces * Angular v21 :recycle: adds line underneath json to have less changes * Update select-with-autocomplete.spec.ts * Angular v21 :recycle: added previously removed trailing new line * Update moment-date.service.spec.ts * Update package.json * Update select-with-autocomplete.spec.ts * Update select-with-autocomplete.spec.ts * Update package.json * Update tsconfig.spec.json * Update tsconfig.spec.json * Update angular.json * Update package.json * Update playground-routing.module.ts
1 parent 0f4f8df commit 379b67f

File tree

12 files changed

+3244
-2321
lines changed

12 files changed

+3244
-2321
lines changed

angular.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,13 @@
120120
"src/assets"
121121
],
122122
"styles": [],
123-
"scripts": []
123+
"scripts": [],
124+
"include": [
125+
"src/**/*.spec.ts"
126+
],
127+
"exclude": [
128+
"src/framework/theme/schematics/**/*.spec.ts"
129+
]
124130
},
125131
"configurations": {
126132
"production-wp": {
@@ -342,7 +348,13 @@
342348
"options": {
343349
"main": "src/framework/theme/test.ts",
344350
"tsConfig": "src/framework/theme/tsconfig.spec.json",
345-
"karmaConfig": "karma.conf.js"
351+
"karmaConfig": "karma.conf.js",
352+
"include": [
353+
"src/framework/theme/**/*.spec.ts"
354+
],
355+
"exclude": [
356+
"src/framework/theme/schematics/**/*.spec.ts"
357+
]
346358
}
347359
},
348360
"lint": {

package-lock.json

Lines changed: 3164 additions & 2264 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,16 @@
6262
"nebular"
6363
],
6464
"dependencies": {
65-
"@angular/animations": "^20.3.2",
66-
"@angular/cdk": "^20.2.5",
67-
"@angular/common": "^20.3.2",
68-
"@angular/compiler": "^20.3.2",
69-
"@angular/core": "^20.3.2",
65+
"@angular/animations": "^21.0.0",
66+
"@angular/cdk": "^21.0.0",
67+
"@angular/common": "^21.0.0",
68+
"@angular/compiler": "^21.0.0",
69+
"@angular/core": "^21.0.0",
7070
"@angular/fire": "^20.0.1",
71-
"@angular/forms": "^20.3.2",
72-
"@angular/platform-browser": "^20.3.2",
73-
"@angular/platform-browser-dynamic": "^20.3.2",
74-
"@angular/router": "^20.3.2",
71+
"@angular/forms": "^21.0.0",
72+
"@angular/platform-browser": "^21.0.0",
73+
"@angular/platform-browser-dynamic": "^21.0.0",
74+
"@angular/router": "^21.0.0",
7575
"date-fns": "^2.0.0",
7676
"docsearch.js": "^2.5.2",
7777
"eva-icons": "^1.1.3",
@@ -87,15 +87,15 @@
8787
"zone.js": "~0.15.0"
8888
},
8989
"devDependencies": {
90-
"@angular-devkit/build-angular": "^20.3.3",
91-
"@angular-devkit/core": "^20.3.3",
92-
"@angular-devkit/schematics": "^20.3.3",
93-
"@angular/cli": "^20.3.3",
94-
"@angular/compiler-cli": "^20.3.2",
95-
"@angular/language-service": "^20.3.2",
90+
"@angular-devkit/build-angular": "^21.0.0",
91+
"@angular-devkit/core": "^21.0.0",
92+
"@angular-devkit/schematics": "^21.0.0",
93+
"@angular/cli": "^21.0.0",
94+
"@angular/compiler-cli": "^21.0.0",
95+
"@angular/language-service": "^21.0.0",
9696
"@eslint/eslintrc": "^3.1.0",
9797
"@eslint/js": "^9.8.0",
98-
"@schematics/angular": "^20.3.3",
98+
"@schematics/angular": "^21.0.0",
9999
"@types/gulp": "4.0.6",
100100
"@types/highlight.js": "^9.12.4",
101101
"@types/jasmine": "~3.10.0",
@@ -104,7 +104,7 @@
104104
"@typescript-eslint/eslint-plugin": "^8.0.0",
105105
"@typescript-eslint/parser": "^8.0.0",
106106
"angular-cli-ghpages": "0.5.0",
107-
"angular-eslint": "~20.3.0",
107+
"angular-eslint": "~21.0.0",
108108
"browserstack-local": "^1.3.7",
109109
"colors.js": "1.2.4",
110110
"conventional-changelog-cli": "1.3.4",
@@ -130,7 +130,7 @@
130130
"karma-jasmine": "~4.0.0",
131131
"karma-jasmine-html-reporter": "~1.7.0",
132132
"lint-staged": "^11.2.3",
133-
"ng-packagr": "^20.3.0",
133+
"ng-packagr": "^21.0.0",
134134
"npm-run-all": "4.1.5",
135135
"prettier": "^2.4.1",
136136
"protractor": "~7.0.0",
@@ -141,5 +141,13 @@
141141
"typedoc": "^0.12.0",
142142
"typescript": "~5.9.2"
143143
},
144+
"overrides": {
145+
"@angular/fire": {
146+
"@angular/common": "$@angular/common",
147+
"@angular/core": "$@angular/core",
148+
"@angular/platform-browser": "$@angular/platform-browser",
149+
"@angular/platform-browser-dynamic": "$@angular/platform-browser-dynamic"
150+
}
151+
},
144152
"schematics": "./tools/dev-schematics/dist/collection.json"
145153
}

packages-smoke/package.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313
},
1414
"private": true,
1515
"dependencies": {
16-
"@angular/animations": "~20.3.2",
17-
"@angular/cdk": "~20.2.5",
18-
"@angular/common": "~20.3.2",
19-
"@angular/compiler": "~20.3.2",
20-
"@angular/core": "~20.3.2",
21-
"@angular/forms": "~20.3.2",
22-
"@angular/platform-browser": "~20.3.2",
23-
"@angular/platform-browser-dynamic": "~20.3.2",
24-
"@angular/platform-server": "~20.3.2",
25-
"@angular/router": "~20.3.2",
26-
"@angular/ssr": "^20.3.3",
16+
"@angular/animations": "~21.0.0",
17+
"@angular/cdk": "~21.0.0",
18+
"@angular/common": "~21.0.0",
19+
"@angular/compiler": "~21.0.0",
20+
"@angular/core": "~21.0.0",
21+
"@angular/forms": "~21.0.0",
22+
"@angular/platform-browser": "~21.0.0",
23+
"@angular/platform-browser-dynamic": "~21.0.0",
24+
"@angular/platform-server": "~21.0.0",
25+
"@angular/router": "~21.0.0",
26+
"@angular/ssr": "^21.0.0",
2727
"@nebular/auth": "file:.lib/auth",
2828
"@nebular/date-fns": "file:.lib/date-fns",
2929
"@nebular/eva-icons": "file:.lib/eva-icons",
@@ -40,16 +40,16 @@
4040
"zone.js": "~0.15.0"
4141
},
4242
"devDependencies": {
43-
"@angular-devkit/build-angular": "~20.3.3",
44-
"@angular-eslint/builder": "~19.1.0",
45-
"@angular-eslint/eslint-plugin": "~19.1.0",
46-
"@angular-eslint/eslint-plugin-template": "~19.1.0",
47-
"@angular-eslint/schematics": "~19.1.0",
48-
"@angular-eslint/template-parser": "~19.1.0",
49-
"@angular/cli": "~20.3.3",
50-
"@angular/compiler-cli": "~20.3.2",
43+
"@angular-devkit/build-angular": "~21.0.0",
44+
"@angular-eslint/builder": "~21.0.0",
45+
"@angular-eslint/eslint-plugin": "~21.0.0",
46+
"@angular-eslint/eslint-plugin-template": "~21.0.0",
47+
"@angular-eslint/schematics": "~21.0.0",
48+
"@angular-eslint/template-parser": "~21.0.0",
49+
"@angular/cli": "~21.0.0",
50+
"@angular/compiler-cli": "~21.0.0",
5151
"@nguniversal/builders": "~16.2.0",
52-
"@schematics/angular": "~20.3.3",
52+
"@schematics/angular": "~21.0.0",
5353
"@types/express": "^5.0.1",
5454
"@types/jasmine": "^3.10.0",
5555
"@types/node": "^20.19.17",

src/app/components-list/components-list.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export class ComponentsListComponent {
4242
components: ComponentLink[] = [];
4343

4444
@HostBinding('class.column')
45-
private isVertical: boolean;
45+
protected isVertical: boolean;
4646

4747
@Input()
4848
set vertical(value) {

src/framework/auth/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
"nebular"
2525
],
2626
"peerDependencies": {
27-
"@angular/common": "^20.0.0",
28-
"@angular/core": "^20.0.0",
29-
"@angular/router": "^20.0.0",
30-
"@angular/forms": "^20.0.0",
27+
"@angular/common": "^21.0.0",
28+
"@angular/core": "^21.0.0",
29+
"@angular/router": "^21.0.0",
30+
"@angular/forms": "^21.0.0",
3131
"@nebular/theme": "16.0.0",
3232
"rxjs": "^6.5.3 || ^7.4.0"
3333
},

src/framework/firebase-auth/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@
2525
"firebase"
2626
],
2727
"peerDependencies": {
28-
"@angular/core": "^20.0.0",
28+
"@angular/core": "^21.0.0",
2929
"@nebular/auth": "16.0.0",
3030
"rxjs": "^6.5.3 || ^7.4.0",
3131
"firebase": "^11.3.1",
32-
"@angular/fire": "^20.0.0"
32+
"@angular/fire": "^20.0.1"
3333
},
3434
"dependencies": {
3535
"tslib": "^2.3.0"

src/framework/moment/services/moment-date.service.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { TestBed } from '@angular/core/testing';
99

1010
import { NbDateService } from '@nebular/theme';
1111
import { NbMomentDateService } from '@nebular/moment';
12-
import * as moment from 'moment';
12+
import moment from 'moment';
1313

1414
type Moment = moment.Moment;
1515

src/framework/security/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
"nebular"
2727
],
2828
"peerDependencies": {
29-
"@angular/common": "^20.0.0",
30-
"@angular/core": "^20.0.0",
31-
"@angular/router": "^20.0.0",
29+
"@angular/common": "^21.0.0",
30+
"@angular/core": "^21.0.0",
31+
"@angular/router": "^21.0.0",
3232
"rxjs": "^6.5.3 || ^7.4.0"
3333
},
3434
"dependencies": {

src/framework/theme/components/select-with-autocomplete/select-with-autocomplete.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1299,7 +1299,7 @@ describe('NbSelect - experimental search', () => {
12991299
});
13001300

13011301
it("should update search input and don't emit filterChange when value of select is changed", fakeAsync(() => {
1302-
const searchInput = testComponent.selectComponent.optionSearchInput.nativeElement;
1302+
const searchInput = testComponent.selectComponent.optionsAutocompleteInput.nativeElement;
13031303

13041304
expect(searchInput.value).toEqual('');
13051305
expect(testComponent.filterValue).toEqual('');

0 commit comments

Comments
 (0)