Skip to content

Commit 089937e

Browse files
committed
chore(e2e): update router app to webpack 4 and NG 6
1 parent 958f65c commit 089937e

8 files changed

+32
-32
lines changed

Diff for: e2e/router/app/app.module.ts

-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import { NgModule, NgModuleFactoryLoader, NO_ERRORS_SCHEMA } from "@angular/core
22
import { NativeScriptModule } from "nativescript-angular/nativescript.module";
33
import { NSModuleFactoryLoader } from "nativescript-angular/router";
44

5-
import "./rxjs-operators";
6-
75
import {
86
AppRoutingModule,
97
navigatableComponents,

Diff for: e2e/router/app/first/first.component.ts

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { Location } from "@angular/common";
44
import { RouterExtensions } from "nativescript-angular/router";
55

66
import { Page } from "ui/page";
7-
import { Observable } from "rxjs/Observable";
87

98
@Component({
109
selector: "first",

Diff for: e2e/router/app/lazy/lazy-componentless-route.component.ts

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { Location } from "@angular/common";
44
import { RouterExtensions } from "nativescript-angular/router";
55

66
import { Page } from "ui/page";
7-
import { Observable } from "rxjs/Observable";
87

98
@Component({
109
selector: "lazy",

Diff for: e2e/router/app/lazy/lazy.component.ts

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { Location } from "@angular/common";
44
import { RouterExtensions } from "nativescript-angular/router";
55

66
import { Page } from "ui/page";
7-
import { Observable } from "rxjs/Observable";
87

98
@Component({
109
selector: "lazy",

Diff for: e2e/router/app/rxjs-operators.ts

-1
This file was deleted.

Diff for: e2e/router/app/second/detail.component.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { Component, OnInit, OnDestroy } from "@angular/core";
22
import { ActivatedRoute, Router, Route } from "@angular/router";
33
import { Location } from "@angular/common";
44
import { Page } from "ui/page";
5-
import { Observable } from "rxjs/Observable";
5+
import { Observable } from "rxjs";
6+
import { map } from "rxjs/operators";
67

78
@Component({
89
selector: "detail",
@@ -19,7 +20,7 @@ export class DetailComponent {
1920

2021
constructor(private router: Router, private route: ActivatedRoute) {
2122
console.log("DetailComponent - constructor()");
22-
this.id$ = route.params.map(r => r["id"]);
23+
this.id$ = route.params.pipe(map(r => r["id"]));
2324
}
2425

2526
ngOnInit() {
@@ -29,4 +30,4 @@ export class DetailComponent {
2930
ngOnDestroy() {
3031
console.log("DetailComponent - ngOnDestroy()");
3132
}
32-
}
33+
}

Diff for: e2e/router/app/second/second.component.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { ActivatedRoute, Router, Route } from "@angular/router";
33

44
import { RouterExtensions } from "nativescript-angular/router";
55
import { Page } from "ui/page";
6-
import { Observable } from "rxjs/Observable";
6+
import { Observable } from "rxjs";
7+
import { map } from "rxjs/operators";
78

89
@Component({
910
selector: "second",
@@ -28,8 +29,8 @@ export class SecondComponent implements OnInit, OnDestroy {
2829

2930
constructor(private routerExt: RouterExtensions, route: ActivatedRoute, page: Page) {
3031
console.log("SecondComponent - constructor() page: " + page);
31-
this.depth$ = route.params.map(r => r["depth"]);
32-
this.nextDepth$ = route.params.map(r => +r["depth"] + 1);
32+
this.depth$ = route.params.pipe(map(r => r["depth"]));
33+
this.nextDepth$ = route.params.pipe(map(r => +r["depth"] + 1));
3334
}
3435

3536
ngOnInit() {
@@ -43,4 +44,4 @@ export class SecondComponent implements OnInit, OnDestroy {
4344
goBack() {
4445
this.routerExt.back();
4546
}
46-
}
47+
}

Diff for: e2e/router/package.json

+23-19
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,33 @@
66
"nativescript": {
77
"id": "org.nativescript.router",
88
"tns-android": {
9-
"version": "3.4.0-2017-12-4-1"
9+
"version": "next"
1010
},
1111
"tns-ios": {
1212
"version": "next"
1313
}
1414
},
1515
"dependencies": {
16-
"@angular/animations": "~5.2.0",
17-
"@angular/common": "~5.2.0",
18-
"@angular/compiler": "~5.2.0",
19-
"@angular/core": "~5.2.0",
20-
"@angular/forms": "~5.2.0",
21-
"@angular/http": "~5.2.0",
22-
"@angular/platform-browser": "~5.2.0",
23-
"@angular/platform-browser-dynamic": "~5.2.0",
24-
"@angular/router": "~5.2.0",
16+
"@angular/animations": "~6.0.0-rc.3",
17+
"@angular/common": "~6.0.0-rc.3",
18+
"@angular/compiler": "~6.0.0-rc.3",
19+
"@angular/core": "~6.0.0-rc.3",
20+
"@angular/forms": "~6.0.0-rc.3",
21+
"@angular/http": "~6.0.0-rc.3",
22+
"@angular/platform-browser": "~6.0.0-rc.3",
23+
"@angular/platform-browser-dynamic": "~6.0.0-rc.3",
24+
"@angular/router": "~6.0.0-rc.3",
2525
"nativescript-angular": "file:../../nativescript-angular",
2626
"nativescript-intl": "^3.0.0",
2727
"reflect-metadata": "~0.1.8",
28-
"rxjs": "^5.5.4",
28+
"rxjs": "~6.0.0-rc.1",
2929
"tns-core-modules": "next",
3030
"zone.js": "^0.8.4"
3131
},
3232
"devDependencies": {
33-
"@angular/compiler-cli": "~5.2.0",
34-
"@ngtools/webpack": "~1.9.4",
33+
"@angular-devkit/core": "~0.5.5",
34+
"@angular/compiler-cli": "~6.0.0-rc.3",
35+
"@ngtools/webpack": "~6.0.0-rc.3",
3536
"@types/chai": "^4.0.2",
3637
"@types/mocha": "^2.2.41",
3738
"@types/node": "^7.0.5",
@@ -40,8 +41,9 @@
4041
"babylon": "6.17.4",
4142
"chai": "~4.1.1",
4243
"chai-as-promised": "~7.1.1",
44+
"clean-webpack-plugin": "~0.1.19",
4345
"colors": "^1.1.2",
44-
"copy-webpack-plugin": "~4.3.0",
46+
"copy-webpack-plugin": "~4.5.1",
4547
"css-loader": "~0.28.7",
4648
"extract-text-webpack-plugin": "~3.0.2",
4749
"lazy": "1.0.11",
@@ -50,16 +52,18 @@
5052
"mocha-multi": "^0.11.0",
5153
"nativescript-dev-appium": "next",
5254
"nativescript-dev-typescript": "~0.4.0",
53-
"nativescript-dev-webpack": "^0.11.0",
55+
"nativescript-dev-webpack": "next",
5456
"nativescript-worker-loader": "~0.8.1",
5557
"raw-loader": "~0.5.1",
56-
"resolve-url-loader": "~2.2.1",
58+
"resolve-url-loader": "~2.3.0",
5759
"tslib": "^1.7.1",
58-
"typescript": "~2.6.2",
59-
"uglifyjs-webpack-plugin": "~1.1.6",
60-
"webpack": "~3.10.0",
60+
"typescript": "~2.7.2",
61+
"uglifyjs-webpack-plugin": "~1.2.4",
62+
"webpack": "~4.5.0",
6163
"webpack-bundle-analyzer": "^2.9.1",
6264
"webpack-sources": "~1.1.0",
65+
"webpack-cli": "~2.0.14",
66+
"webpack-sources": "~1.1.0",
6367
"clean-webpack-plugin": "~0.1.19"
6468
},
6569
"scripts": {

0 commit comments

Comments
 (0)