Skip to content

Commit 7f3132a

Browse files
oliverguentherchristopherthielen
authored andcommitted
feat(angular): Updates for Angular 7
As already sketched in #423, we are already using Angular 7 with uirouter/angular over at opf/openproject and meanwhile in production as well, so we can safely attest that the current version of uirouter works unchanged with even the recent Angular 7.2.2 release with only some minor hassle during the upgrade due to the peer depedndency. This PR tries to add the dependency and a downstream test. I had to bump the local typescript version to ensure RxJS is being built, without it `ngc` will output the following errors node_modules/rxjs/internal/types.d.ts(81,74): error TS1005: ';' expected. This is due to this issue: ReactiveX/rxjs#4511 Using the newest typescript also uncovered an issue in `uiSrefStatus.ts`. In all downstream tests with TS < 2.8., I pinned rxjs to avoid the same issue.
1 parent 960048e commit 7f3132a

37 files changed

+26239
-12
lines changed

downstream_projects.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"angular5": "./test-angular-versions/v5",
33
"angular6": "./test-angular-versions/v6",
4+
"angular7": "./test-angular-versions/v7",
45
"typescript2.3": "./test-typescript-versions/typescript2.3",
56
"typescript2.4": "./test-typescript-versions/typescript2.4",
67
"typescript2.5": "./test-typescript-versions/typescript2.5",

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@
5252
"@uirouter/rx": "0.5.0"
5353
},
5454
"peerDependencies": {
55-
"@angular/common": "^5.0.0 || ^6.0.0",
56-
"@angular/core": "^5.0.0 || ^6.0.0",
57-
"@angular/router": "^5.0.0 || ^6.0.0"
55+
"@angular/common": "^5.0.0 || ^6.0.0 || ^7.0.0",
56+
"@angular/core": "^5.0.0 || ^6.0.0 || ^7.0.0",
57+
"@angular/router": "^5.0.0 || ^6.0.0 || ^7.0.0"
5858
},
5959
"devDependencies": {
6060
"@angular/animations": "^6.1.2",
@@ -90,7 +90,7 @@
9090
"ts-loader": "^3.5.0",
9191
"tslib": "^1.9.3",
9292
"tslint": "^5.11.0",
93-
"typescript": "~2.7.2",
93+
"typescript": "^3.2.4",
9494
"webpack": "^3.11.0",
9595
"webpack-dev-server": "^3.1.4",
9696
"zone.js": "^0.8.20"

src/directives/uiSrefStatus.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ export class UISrefStatus {
233233
this._srefChangesSub = this._srefs.changes.subscribe(srefs => this._srefs$.next(srefs));
234234

235235
const targetStates$: Observable<TargetState[]> = this._srefs$.pipe(
236-
switchMap((srefs: UISref[]) => combineLatest<TargetState>(srefs.map(sref => sref.targetState$)))
236+
switchMap((srefs: UISref[]) => combineLatest<TargetState[]>(srefs.map(sref => sref.targetState$)))
237237
);
238238

239239
// Calculate the status of each UISref based on the transition event.

0 commit comments

Comments
 (0)