From 7d1bc5547972332d67fb08fdef4f18ddc9fbcb17 Mon Sep 17 00:00:00 2001 From: sis0k0 Date: Thu, 21 Jun 2018 11:28:08 +0300 Subject: [PATCH 1/5] fix(animations): inject document object in the animation engine Caused by API changes in https://github.com/angular/angular/pull/23300. fixes https://github.com/NativeScript/nativescript-angular/issues/1393 --- .../animations/animations.module.ts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/nativescript-angular/animations/animations.module.ts b/nativescript-angular/animations/animations.module.ts index b8965c06f..8e000fb04 100644 --- a/nativescript-angular/animations/animations.module.ts +++ b/nativescript-angular/animations/animations.module.ts @@ -1,5 +1,14 @@ -import { NgModule, Injectable, NgZone, Provider, RendererFactory2, Optional, SkipSelf } from "@angular/core"; - +import { + NgModule, + Injectable, + Inject, + NgZone, + Provider, + RendererFactory2, + Optional, + SkipSelf, +} from "@angular/core"; +import { DOCUMENT } from "@angular/common"; import { AnimationBuilder } from "@angular/animations"; import { @@ -21,8 +30,8 @@ import { throwIfAlreadyLoaded } from "../common/utils"; @Injectable() export class InjectableAnimationEngine extends AnimationEngine { - constructor(driver: AnimationDriver, normalizer: AnimationStyleNormalizer) { - super(driver, normalizer); + constructor(@Inject(DOCUMENT) doc: any, driver: AnimationDriver, normalizer: AnimationStyleNormalizer) { + super(doc.body, driver, normalizer); } } From d8b0fa56b74521e4c959042c66f61cb9873f16a2 Mon Sep 17 00:00:00 2001 From: sis0k0 Date: Thu, 21 Jun 2018 16:10:59 +0300 Subject: [PATCH 2/5] fix: update the minimal required version of @angular/* to 6.0.6 BREAKING CHANGE You have to update your @angular/* dependencies to 6.0.6 due to changes in the @angular/animations API. --- nativescript-angular/package.json | 36 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/nativescript-angular/package.json b/nativescript-angular/package.json index 78a669ee0..724d46382 100644 --- a/nativescript-angular/package.json +++ b/nativescript-angular/package.json @@ -43,30 +43,30 @@ "reflect-metadata": "^0.1.8" }, "peerDependencies": { - "@angular/platform-browser-dynamic": "~6.0.0", - "@angular/common": "~6.0.0", - "@angular/compiler": "~6.0.0", - "@angular/core": "~6.0.0", - "@angular/forms": "~6.0.0", - "@angular/http": "~6.0.0", - "@angular/platform-browser": "~6.0.0", - "@angular/router": "~6.0.0", + "@angular/platform-browser-dynamic": "~6.0.6", + "@angular/common": "~6.0.6", + "@angular/compiler": "~6.0.6", + "@angular/core": "~6.0.6", + "@angular/forms": "~6.0.6", + "@angular/http": "~6.0.6", + "@angular/platform-browser": "~6.0.6", + "@angular/router": "~6.0.6", "rxjs": "~6.0.0 || >=6.1.0", "tns-core-modules": "^4.0.0 || >4.0.0- || >4.1.0-", "zone.js": "^0.8.26", "typescript": "~2.7.2" }, "devDependencies": { - "@angular/animations": "~6.0.0", - "@angular/common": "~6.0.0", - "@angular/compiler": "~6.0.0", - "@angular/compiler-cli": "~6.0.0", - "@angular/core": "~6.0.0", - "@angular/forms": "~6.0.0", - "@angular/http": "~6.0.0", - "@angular/platform-browser": "~6.0.0", - "@angular/platform-browser-dynamic": "~6.0.0", - "@angular/router": "~6.0.0", + "@angular/animations": "~6.0.6", + "@angular/common": "~6.0.6", + "@angular/compiler": "~6.0.6", + "@angular/compiler-cli": "~6.0.6", + "@angular/core": "~6.0.6", + "@angular/forms": "~6.0.6", + "@angular/http": "~6.0.6", + "@angular/platform-browser": "~6.0.6", + "@angular/platform-browser-dynamic": "~6.0.6", + "@angular/router": "~6.0.6", "codelyzer": "^4.3.0", "rxjs": "~6.1.0", "tns-core-modules": "next", From 88244ee02e9aafaf6b72cc05ba860cfcfc072889 Mon Sep 17 00:00:00 2001 From: sis0k0 Date: Thu, 21 Jun 2018 17:09:01 +0300 Subject: [PATCH 3/5] test(e2e): update renderer app configs and dependencies --- e2e/renderer/package.json | 23 +++-------------------- e2e/renderer/tsconfig.json | 5 ++++- 2 files changed, 7 insertions(+), 21 deletions(-) diff --git a/e2e/renderer/package.json b/e2e/renderer/package.json index 209ab9315..50b293d62 100644 --- a/e2e/renderer/package.json +++ b/e2e/renderer/package.json @@ -4,10 +4,7 @@ "readme": "NativeScript Application", "repository": "", "nativescript": { - "id": "org.nativescript.renderer", - "tns-android": { - "version": "4.1.0-2018.4.13.1" - } + "id": "org.nativescript.renderer" }, "dependencies": { "@angular/common": "~6.0.0-rc.3", @@ -26,9 +23,7 @@ "zone.js": "^0.8.4" }, "devDependencies": { - "@angular-devkit/core": "~0.5.5", - "@angular/compiler-cli": "~6.0.0-rc.3", - "@ngtools/webpack": "~6.0.0-rc.3", + "@angular/compiler-cli": "~6.1.0-beta.1", "@types/chai": "^4.0.2", "@types/mocha": "^2.2.41", "@types/node": "^7.0.5", @@ -37,11 +32,7 @@ "babylon": "6.17.4", "chai": "~4.1.1", "chai-as-promised": "~7.1.1", - "clean-webpack-plugin": "~0.1.19", "colors": "^1.1.2", - "copy-webpack-plugin": "~4.5.1", - "css-loader": "~0.28.7", - "extract-text-webpack-plugin": "~3.0.2", "lazy": "1.0.11", "mocha": "~3.5.0", "mocha-junit-reporter": "^1.13.0", @@ -49,17 +40,9 @@ "nativescript-dev-appium": "next", "nativescript-dev-typescript": "~0.7.1", "nativescript-dev-webpack": "next", - "nativescript-worker-loader": "~0.8.1", - "raw-loader": "~0.5.1", - "resolve-url-loader": "~2.3.0", "tslib": "^1.7.1", "typescript": "~2.7.2", - "uglifyjs-webpack-plugin": "~1.2.4", - "webpack": "~4.5.0", - "webpack-bundle-analyzer": "^2.9.1", - "clean-webpack-plugin": "~0.1.19", - "webpack-cli": "~2.0.14", - "webpack-sources": "~1.1.0" + "@angular-devkit/build-angular": "~0.7.0-rc.0" }, "scripts": { "e2e": "tsc -p e2e && mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json", diff --git a/e2e/renderer/tsconfig.json b/e2e/renderer/tsconfig.json index f89ae0f58..a4ddb2d04 100644 --- a/e2e/renderer/tsconfig.json +++ b/e2e/renderer/tsconfig.json @@ -16,6 +16,9 @@ "*": [ "./node_modules/tns-core-modules/*", "./node_modules/*" + ], + "~/*": [ + "app/*" ] } }, @@ -24,4 +27,4 @@ "platforms", "e2e" ] -} +} \ No newline at end of file From f2130d8b4eeee8467d827e572d189bad580030c9 Mon Sep 17 00:00:00 2001 From: sis0k0 Date: Thu, 21 Jun 2018 17:09:51 +0300 Subject: [PATCH 4/5] chore: git ignore webpack config files --- .gitignore | 4 +--- e2e/renderer/package.json | 18 +++++++++--------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index e64188546..610c9ed25 100644 --- a/.gitignore +++ b/.gitignore @@ -29,9 +29,7 @@ ng-sample/app/**/*.js # Webpack configuration files webpack.config.js -vendor.ts -vendor-platform.android.ts -vendor-platform.ios.ts +tsconfig.esm.json # IDEs and editors /.idea diff --git a/e2e/renderer/package.json b/e2e/renderer/package.json index 50b293d62..387be6a3b 100644 --- a/e2e/renderer/package.json +++ b/e2e/renderer/package.json @@ -7,18 +7,18 @@ "id": "org.nativescript.renderer" }, "dependencies": { - "@angular/common": "~6.0.0-rc.3", - "@angular/compiler": "~6.0.0-rc.3", - "@angular/core": "~6.0.0-rc.3", - "@angular/forms": "~6.0.0-rc.3", - "@angular/http": "~6.0.0-rc.3", - "@angular/platform-browser": "~6.0.0-rc.3", - "@angular/platform-browser-dynamic": "~6.0.0-rc.3", - "@angular/router": "~6.0.0-rc.3", + "@angular/common": "~6.0.6", + "@angular/compiler": "~6.0.6", + "@angular/core": "~6.0.6", + "@angular/forms": "~6.0.6", + "@angular/http": "~6.0.6", + "@angular/platform-browser": "~6.0.6", + "@angular/platform-browser-dynamic": "~6.0.6", + "@angular/router": "~6.0.6", "nativescript-angular": "file:../../nativescript-angular", "nativescript-intl": "^3.0.0", "reflect-metadata": "~0.1.8", - "rxjs": "~6.0.0-rc.1", + "rxjs": "~6.1.0", "tns-core-modules": "next", "zone.js": "^0.8.4" }, From 9a8e620305078ffb59bcd10341ad23367aede065 Mon Sep 17 00:00:00 2001 From: sis0k0 Date: Thu, 21 Jun 2018 17:15:21 +0300 Subject: [PATCH 5/5] test(e2e): update router app configs and dependencies --- e2e/router/package.json | 51 ++++++++++++----------------------------- 1 file changed, 15 insertions(+), 36 deletions(-) diff --git a/e2e/router/package.json b/e2e/router/package.json index f6ea6a8c8..88e436722 100644 --- a/e2e/router/package.json +++ b/e2e/router/package.json @@ -4,35 +4,28 @@ "readme": "NativeScript Application", "repository": "", "nativescript": { - "id": "org.nativescript.router", - "tns-android": { - "version": "next" - }, - "tns-ios": { - "version": "next" - } + "id": "org.nativescript.router" }, "dependencies": { - "@angular/animations": "~6.0.0-rc.3", - "@angular/common": "~6.0.0-rc.3", - "@angular/compiler": "~6.0.0-rc.3", - "@angular/core": "~6.0.0-rc.3", - "@angular/forms": "~6.0.0-rc.3", - "@angular/http": "~6.0.0-rc.3", - "@angular/platform-browser": "~6.0.0-rc.3", - "@angular/platform-browser-dynamic": "~6.0.0-rc.3", - "@angular/router": "~6.0.0-rc.3", + "@angular/animations": "~6.0.6", + "@angular/common": "~6.0.6", + "@angular/compiler": "~6.0.6", + "@angular/core": "~6.0.6", + "@angular/forms": "~6.0.6", + "@angular/http": "~6.0.6", + "@angular/platform-browser": "~6.0.6", + "@angular/platform-browser-dynamic": "~6.0.6", + "@angular/router": "~6.0.6", "nativescript-angular": "file:../../nativescript-angular", "nativescript-intl": "^3.0.0", "reflect-metadata": "~0.1.8", - "rxjs": "~6.0.0-rc.1", + "rxjs": "~6.1.0", "tns-core-modules": "next", - "zone.js": "^0.8.4" + "zone.js": "^0.8.26" }, "devDependencies": { - "@angular-devkit/core": "~0.5.5", - "@angular/compiler-cli": "~6.0.0-rc.3", - "@ngtools/webpack": "~6.0.0-rc.3", + "@angular-devkit/build-angular": "~0.7.0-rc.0", + "@angular/compiler-cli": "~6.1.0-beta.1", "@types/chai": "^4.0.2", "@types/mocha": "^2.2.41", "@types/node": "^7.0.5", @@ -41,11 +34,7 @@ "babylon": "6.17.4", "chai": "~4.1.1", "chai-as-promised": "~7.1.1", - "clean-webpack-plugin": "~0.1.19", "colors": "^1.1.2", - "copy-webpack-plugin": "~4.5.1", - "css-loader": "~0.28.7", - "extract-text-webpack-plugin": "~3.0.2", "lazy": "1.0.11", "mocha": "~3.5.0", "mocha-junit-reporter": "^1.13.0", @@ -53,18 +42,8 @@ "nativescript-dev-appium": "next", "nativescript-dev-typescript": "~0.4.0", "nativescript-dev-webpack": "next", - "nativescript-worker-loader": "~0.8.1", - "raw-loader": "~0.5.1", - "resolve-url-loader": "~2.3.0", "tslib": "^1.7.1", - "typescript": "~2.7.2", - "uglifyjs-webpack-plugin": "~1.2.4", - "webpack": "~4.5.0", - "webpack-bundle-analyzer": "^2.9.1", - "webpack-sources": "~1.1.0", - "webpack-cli": "~2.0.14", - "webpack-sources": "~1.1.0", - "clean-webpack-plugin": "~0.1.19" + "typescript": "~2.7.2" }, "scripts": { "e2e": "tsc -p e2e && mocha --opts ../config/mocha.opts --recursive e2e --appiumCapsLocation ../config/appium.capabilities.json",