Skip to content

Commit fd71458

Browse files
authored
feat(angular): support for v10 (#2189)
1 parent b765e02 commit fd71458

File tree

171 files changed

+5775
-10890
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+5775
-10890
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ node_js:
44
script:
55
- cd nativescript-angular
66
- npm install
7-
- npm run tslint
7+
- npm run format-check
88
- npm pack

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22
# [9.0.0](https://github.com/NativeScript/nativescript-angular/compare/8.20.4...9.0.0) (2020-06-03)
33

44

5+
6+
### Bug Fixes
7+
8+
* **bindable:** parent referenced expression-values now load properly using an update call ([#8670](https://github.com/NativeScript/NativeScript/issues/8670)) ([6b0028a](https://github.com/NativeScript/NativeScript/commit/6b0028afd7b554914b039cdf371e8e30f6e02dac)), closes [#8666](https://github.com/NativeScript/NativeScript/issues/8666) [#6981](https://github.com/NativeScript/NativeScript/issues/6981) [#5054](https://github.com/NativeScript/NativeScript/issues/5054)
9+
* **scroll-view:** android 'isScrollEnabled' will apply if changed while gesture is underway ([#8695](https://github.com/NativeScript/NativeScript/issues/8695)) ([02ec7f1](https://github.com/NativeScript/NativeScript/commit/02ec7f104d327df53df687ddd1b8ac5b1cdc04ba))
10+
* **snapshots:** android is not defined ([#8691](https://github.com/NativeScript/NativeScript/issues/8691)) ([a8bbd7c](https://github.com/NativeScript/NativeScript/commit/a8bbd7c1e580e77e7ad5ddc7be6845e3d8fb02de))
11+
* **text-view:** only reload text if hint is showing on ios ([#8662](https://github.com/NativeScript/NativeScript/issues/8662)) ([ec17727](https://github.com/NativeScript/NativeScript/commit/ec17727e91f7a3209ada2c7de0bcf59c98c4e62a))
12+
13+
14+
### Features
15+
16+
* **connectivity:** getActiveNetworkInfo and NetworkInfo modern compliance [#8580](https://github.com/NativeScript/NativeScript/issues/8580) ([#8652](https://github.com/NativeScript/NativeScript/issues/8652)) ([635f31f](https://github.com/NativeScript/NativeScript/commit/635f31f81f7826112142c707aff2a66c2b480b0e))
17+
* **dialog:** ios destructive style from options ([#8676](https://github.com/NativeScript/NativeScript/issues/8676)) ([bb531ce](https://github.com/NativeScript/NativeScript/commit/bb531ce71028f9c4fd4d753df16c82104f158e35))
18+
* **ImageSource:** resize method ([#8678](https://github.com/NativeScript/NativeScript/issues/8678)) ([bd12baf](https://github.com/NativeScript/NativeScript/commit/bd12bafb4aae8f1c523be4c7e04fa73722092304))
19+
* **text-view:** allow easy subclassing on ios ([#8663](https://github.com/NativeScript/NativeScript/issues/8663)) ([7d36447](https://github.com/NativeScript/NativeScript/commit/7d364474c23e17acf7696f159d3945d8a73d63e6))
20+
21+
522
### Features
623

724
* angular 9 ivy ([fbe2450](https://github.com/NativeScript/nativescript-angular/commit/fbe2450))

build/pack-scripts/pack-scoped.ts

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,29 @@ import { execSync } from "child_process";
55
console.log(`Packing @nativescript/angular package`);
66

77
const distFolderPath = path.resolve("../../dist");
8-
const tempFolderPath = path.resolve("./temp-scoped");
98
const outFileName = "nativescript-angular-scoped.tgz";
109

1110
const nsAngularPackagePath = path.resolve("../../nativescript-angular");
11+
const nsAngularPackageDistPath = path.resolve(nsAngularPackagePath + "/dist");
1212

13-
execSync(`npm install --save-exact`, {
14-
cwd: nsAngularPackagePath
15-
});
13+
function getFilesFromPath(path, extension) {
14+
let files = fs.readdirSync( path );
15+
return files.filter(file => file.match(new RegExp(`.*\.(${extension})`, 'ig')));
16+
}
17+
18+
// execSync(`npm install --save-exact`, {
19+
// cwd: nsAngularPackagePath
20+
// });
1621

1722
// ensure empty temp and dist folders
18-
fs.emptyDirSync(tempFolderPath);
1923
fs.ensureDirSync(distFolderPath);
2024

2125
// create .tgz in temp folder
22-
execSync(`npm pack ${nsAngularPackagePath}`, {
23-
cwd: tempFolderPath
24-
});
26+
execSync(`cd ${nsAngularPackagePath} && npm run build.pack`);
2527

2628
// assume we have a single file built in temp folder, take its name
27-
const currentFileName = fs.readdirSync(tempFolderPath)[0];
29+
const currentFileName = getFilesFromPath(nsAngularPackageDistPath, ".tgz")[0];
30+
console.log('currentFileName:', currentFileName);
2831

2932
// move built file and remove temp folder
30-
fs.moveSync(`${tempFolderPath}/${currentFileName}`, `${distFolderPath}/${outFileName}`, { overwrite: true });
31-
fs.removeSync(`${tempFolderPath}`);
33+
fs.moveSync(`${nsAngularPackageDistPath}/${currentFileName}`, `${distFolderPath}/${outFileName}`, { overwrite: true });

build/pack-scripts/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
33
"module": "commonjs",
4-
"target": "es5",
4+
"target": "es2015",
55
"experimentalDecorators": true,
66
"emitDecoratorMetadata": true,
77
"noEmitHelpers": true,

doc/upgrading-zonejs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
`nativescript-angular` uses a fork of the `zone.js` package in order to work around incompatibilities between node, browser, and mobile implementations.
44

5-
The fork resides at https://github.com/NativeScript/zone.js in the `zone-nativescript` branch. It adds a separate `lib/nativescript/nativescript.ts` entry point that is used to generate a new bundle: `dist/zone-nativescript.js`.
5+
The fork resides at https://github.com/NativeScript/zone.js in the `zone-nativescript` branch. It adds a separate `lib/nativescript/nativescript.ts` entry point that is used to generate a new bundle: `zone-nativescript.js`.
66

77
To upgrade to a newer release of `zone.js`:
88

@@ -11,5 +11,5 @@ To upgrade to a newer release of `zone.js`:
1111
3. Rebuild: `gulp build`
1212
4. Run the node-based smoke tests: `gulp test/nativescript`
1313
5. Run the browser tests: `node_modules/.bin/karma start karma.conf.js --single-run` (You need to run node `test/ws-server.js` in a separate console first)
14-
6. Commit `dist/zone-nativescript.js`, drop the previous `dist/zone-nativescript.js` commit from the branch. Force push the new `zone-nativescript` branch to GitHub.
14+
6. Commit `zone-nativescript.js`, drop the previous `zone-nativescript.js` commit from the branch. Force push the new `zone-nativescript` branch to GitHub.
1515
7. Update your copy of `nativescript-angular/zone.js/dist/zone-nativescript.js` with the bundle you just built.

e2e/animation-examples/app/App_Resources/iOS/build.xcconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@
44
// To build for device with Xcode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html
55
// DEVELOPMENT_TEAM = YOUR_TEAM_ID;
66
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
7-
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.btn-primary {
2+
background-color: pink;
3+
}

e2e/animation-examples/app/animation-builder.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import { Component, ViewChild } from '@angular/core';
44
@Component({
55
template: `
66
<Button #button (tap)="makeAnimation()" class="btn btn-primary" automationText="tapToDisappear" text="Tap to disappear!"></Button>
7-
`
7+
`,
8+
styleUrls: ['./animation-builder.component.scss']
89
})
910
export class AnimationBuilderComponent {
1011
@ViewChild('button', { static: false }) button;

e2e/animation-examples/app/app.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function asyncBoot(): Function {
2424
return (): Promise<any> => new Promise(resolve => {
2525
setTimeout(() => {
2626
resolve();
27-
}, 2000);
27+
}, 5000);
2828
})
2929
}
3030

e2e/animation-examples/app/app.routing.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { NgModule } from "@angular/core";
22
import { Routes } from "@angular/router";
3-
import { NativeScriptRouterModule } from "@nativescript/angular/router";
3+
import { NativeScriptRouterModule } from "@nativescript/angular";
44

55
import { AnimationsListComponent } from "./animations-list.component";
66
import { AnimationBuilderComponent } from "./animation-builder.component";

0 commit comments

Comments
 (0)