Skip to content

Commit f126c19

Browse files
vakrilovsis0k0
vakrilov
authored andcommitted
chore: e2e apps migrated to ng6 + rxjs6
1 parent 6fa2a41 commit f126c19

File tree

11 files changed

+59
-56
lines changed

11 files changed

+59
-56
lines changed

Diff for: e2e/modal-navigation-ng/package.json

+13-13
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,31 @@
66
"nativescript": {
77
"id": "org.nativescript.modalnavigationng",
88
"tns-android": {
9-
"version": "next"
9+
"version": "4.1.0-2018.4.16.8"
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-theme-core": "~1.0.4",
2727
"reflect-metadata": "~0.1.8",
28-
"rxjs": "~5.5.2",
28+
"rxjs": "~6.0.0-rc.1",
2929
"tns-core-modules": "next",
3030
"zone.js": "~0.8.2"
3131
},
3232
"devDependencies": {
33-
"@angular/compiler-cli": "~5.2.0",
33+
"@angular/compiler-cli": "~6.0.0-rc.3",
3434
"@ngtools/webpack": "~1.9.4",
3535
"@types/chai": "^4.0.2",
3636
"@types/mocha": "^2.2.41",
@@ -48,7 +48,7 @@
4848
"nativescript-worker-loader": "~0.8.1",
4949
"raw-loader": "~0.5.1",
5050
"resolve-url-loader": "~2.2.1",
51-
"typescript": "~2.6.2",
51+
"typescript": "~2.7.2",
5252
"uglifyjs-webpack-plugin": "~1.1.6",
5353
"webpack": "~3.10.0",
5454
"webpack-bundle-analyzer": "^2.9.1",

Diff for: e2e/renderer/.vscode/settings.json

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
{
2-
"typescript.check.tscVersion": false,
3-
"window.zoomLevel": 0,
4-
"workbench.iconTheme": "vscode-icons",
5-
"vsicons.dontShowNewVersionMessage": true,
6-
"workbench.colorTheme": "Default Light+",
72
"files.exclude": {
83
"**/.git": true,
94
"**/.svn": true,
105
"**/.hg": true,
116
"**/CVS": true,
127
"**/.DS_Store": true,
13-
"**/*.js": true,
8+
// "**/*.js": true,
149
"**/*.map": true,
15-
"node_modules": true,
10+
// "node_modules": true,
1611
"hooks": true,
1712
"platforms": true
1813
}

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

+15-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
1+
import { NgModule, NO_ERRORS_SCHEMA, ErrorHandler } from "@angular/core";
22
import { NativeScriptModule } from "nativescript-angular/nativescript.module";
33

44
import {
@@ -10,20 +10,30 @@ import { AppComponent } from "./app.component";
1010
import { ItemsService } from "./items.service";
1111

1212
import { rendererTraceCategory, viewUtilCategory, bootstrapCategory } from "nativescript-angular/trace";
13-
import { addCategories, enable } from "trace";
13+
import { addCategories, enable, categories } from "trace";
1414
addCategories(bootstrapCategory);
15-
// addCategories(rendererTraceCategory);
16-
// addCategories(viewUtilCategory);
15+
addCategories(rendererTraceCategory);
16+
addCategories(viewUtilCategory);
17+
addCategories(categories.ViewHierarchy);
1718
enable();
1819

20+
export class MyErrorHandler implements ErrorHandler {
21+
handleError(error) {
22+
console.log("### ErrorHandler Error: " + error.toString());
23+
console.log("### ErrorHandler Stack: " + error.stack);
24+
}
25+
}
26+
27+
1928
@NgModule({
2029
declarations: [
2130
AppComponent,
2231
...navigatableComponents,
2332
],
2433
bootstrap: [AppComponent],
2534
providers: [
26-
ItemsService
35+
ItemsService,
36+
{ provide: ErrorHandler, useClass: MyErrorHandler }
2737
],
2838
imports: [
2939
NativeScriptModule,

Diff for: e2e/router-tab-view/app/player/player-detail.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Component, OnInit } from "@angular/core";
22
import { ActivatedRoute } from "@angular/router";
33

44
import { DataService, DataItem } from "../data.service";
5-
import { Subscription } from "rxjs/Subscription";
5+
import { Subscription } from "rxjs";
66

77
@Component({
88
selector: "ns-player-details",

Diff for: e2e/router-tab-view/app/team/team-detail.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Component, OnInit } from "@angular/core";
22
import { ActivatedRoute } from "@angular/router";
33

44
import { DataService, DataItem } from "../data.service";
5-
import { Subscription } from "rxjs/Subscription";
5+
import { Subscription } from "rxjs";
66

77
@Component({
88
selector: "ns-team-details",

Diff for: e2e/router-tab-view/package.json

+11-11
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@
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-theme-core": "~1.0.4",
2727
"reflect-metadata": "~0.1.8",
28-
"rxjs": "~5.5.2",
28+
"rxjs": "~6.0.0-rc.1",
2929
"tns-core-modules": "next",
3030
"zone.js": "~0.8.2"
3131
},
@@ -36,7 +36,7 @@
3636
"lazy": "1.0.11",
3737
"nativescript-dev-appium": "^3.1.0",
3838
"nativescript-dev-typescript": "~0.6.0",
39-
"typescript": "~2.6.2"
39+
"typescript": "~2.7.2"
4040
},
4141
"scripts": {
4242
"e2e": "tsc -p e2e && mocha --opts ./e2e/config/mocha.opts",

Diff for: e2e/single-page/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/single-page/app/first/first.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { ActivatedRoute, Router, Route } from "@angular/router";
33
import { Location } from "@angular/common";
44

55
import { Page } from "ui/page";
6-
import { Observable } from "rxjs/Observable";
6+
import { Observable } from "rxjs";
77
import { FrameService } from "nativescript-angular/platform-providers";
88

99
@Component({

Diff for: e2e/single-page/app/rxjs-operators.ts

-1
This file was deleted.

Diff for: e2e/single-page/app/second/second.component.ts

+3-2
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

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: "second",
@@ -22,7 +23,7 @@ import { Observable } from "rxjs/Observable";
2223
export class SecondComponent implements OnInit, OnDestroy {
2324
public id$: Observable<number>;
2425
constructor(route: ActivatedRoute) {
25-
this.id$ = route.params.map(r => +r["id"]);
26+
this.id$ = route.params.pipe(map(r => +r["id"]));
2627
}
2728

2829
ngOnInit() {

Diff for: e2e/single-page/package.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,24 @@
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",
33+
"@angular/compiler-cli": "~6.0.0-rc.3",
3434
"@ngtools/webpack": "~1.9.4",
3535
"@types/chai": "^4.0.2",
3636
"@types/mocha": "^2.2.41",
@@ -55,7 +55,7 @@
5555
"raw-loader": "~0.5.1",
5656
"resolve-url-loader": "~2.2.1",
5757
"tslib": "^1.7.1",
58-
"typescript": "~2.6.2",
58+
"typescript": "~2.7.2",
5959
"uglifyjs-webpack-plugin": "~1.1.6",
6060
"webpack": "~3.10.0",
6161
"webpack-bundle-analyzer": "^2.9.1",

0 commit comments

Comments
 (0)