Skip to content

Commit 3846133

Browse files
Merge remote-tracking branch 'origin/release' into vladimirov/merge-rel-master
2 parents 3463f98 + ac077f0 commit 3846133

File tree

9 files changed

+99
-9
lines changed

9 files changed

+99
-9
lines changed

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
NativeScript CLI Changelog
22
================
3+
4+
5.1.0 (2018, December 11)
5+
==
6+
7+
### Implemented
8+
* [Implemented #2737](https://github.com/NativeScript/nativescript-cli/issues/2737): Make it possible `tns` to use Yarn as the package manager
9+
* [Implemented #2992](https://github.com/NativeScript/nativescript-cli/issues/2992): Do not restart application when changing `.xml`, `.html` or `.css` file when debugging
10+
* [Implemented #4068](https://github.com/NativeScript/nativescript-cli/issues/4068): Android application bundle initial support (build .aab files)
11+
* [Implemented #4152](https://github.com/NativeScript/nativescript-cli/issues/4152): Analytics: Get information for what has been tracked in Google Analytics
12+
* [Implemented #4200](https://github.com/NativeScript/nativescript-cli/issues/4200): Analytics: Add analytics for code-sharing projects usage
13+
* [Implemented #4201](https://github.com/NativeScript/nativescript-cli/issues/4201): Analytics: Track project property on every analytics hit
14+
* [Implemented #4211](https://github.com/NativeScript/nativescript-cli/issues/4211): Analytics: Track command options in analytics
15+
16+
### Fixed
17+
* [Fixed #4075](https://github.com/NativeScript/nativescript-cli/issues/4075): `tns preview` - app is refreshed on ios devices when changing android specific files
18+
* [Fixed #4141](https://github.com/NativeScript/nativescript-cli/issues/4141): Don't prepare the project on `tns preview` command
19+
* [Fixed #4178](https://github.com/NativeScript/nativescript-cli/issues/4178): Broken files pattern in karma config
20+
* [Fixed #4198](https://github.com/NativeScript/nativescript-cli/issues/4198): The NativeScript Inspector is not closed on `Ctrl + C`
21+
* [Fixed #4049](https://github.com/NativeScript/nativescript-cli/issues/4049): `tns` commands Removing Newline Added by `npm` from `package.json`
22+
23+
324
5.0.3 (2018, December 4)
425
==
526
### Fixed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<% if (isJekyll) { %>---
2+
title: tns package-manager get
3+
position: 18
4+
---<% } %>
5+
6+
# tns package-manager get
7+
8+
### Description
9+
10+
Prints the value of the current package manager.
11+
12+
### Commands
13+
14+
Usage | Synopsis
15+
------|-------
16+
General | `$ tns package-manager get`
17+
18+
<% if(isHtml) { %>
19+
20+
### Related Commands
21+
22+
Command | Description
23+
----------|----------
24+
[package-manager-set](package-manager-set.html) | Enables the specified package manager for the NativeScript CLI. Supported values are npm and yarn.
25+
<% } %>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<% if (isJekyll) { %>---
2+
title: tns package-manager set
3+
position: 17
4+
---<% } %>
5+
6+
# tns package-manager set
7+
8+
### Description
9+
10+
Enables the specified package manager for the NativeScript CLI. Supported values are npm and yarn.
11+
12+
### Commands
13+
14+
Usage | Synopsis
15+
------|-------
16+
General | `$ tns package-manager set <PackageManager>`
17+
18+
### Arguments
19+
20+
* `<PackageManager>` is the name of the package manager. Supported values are npm and yarn.
21+
22+
<% if(isHtml) { %>
23+
24+
### Related Commands
25+
26+
Command | Description
27+
----------|----------
28+
[package-manager-get](package-manager-get.html) | Prints the value of the current package manager.
29+
<% } %>

lib/common/mobile/ios/device/ios-application-manager.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export class IOSApplicationManager extends ApplicationManagerBase {
88

99
constructor(protected $logger: ILogger,
1010
protected $hooksService: IHooksService,
11-
private device: Mobile.IDevice,
11+
private device: Mobile.IiOSDevice,
1212
private $errors: IErrors,
1313
private $iOSNotificationService: IiOSNotificationService,
1414
private $iosDeviceOperations: IIOSDeviceOperations,
@@ -88,6 +88,9 @@ export class IOSApplicationManager extends ApplicationManagerBase {
8888
public async stopApplication(appData: Mobile.IApplicationData): Promise<void> {
8989
const { appId } = appData;
9090

91+
this.device.destroyDebugSocket(appId);
92+
this.device.destroyLiveSyncSocket(appId);
93+
9194
const action = () => this.$iosDeviceOperations.stop([{ deviceId: this.device.deviceInfo.identifier, ddi: this.$options.ddi, appId }]);
9295

9396
try {

lib/common/mobile/ios/simulator/ios-simulator-application-manager.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@ export class IOSSimulatorApplicationManager extends ApplicationManagerBase {
4747
}
4848

4949
public async stopApplication(appData: Mobile.IApplicationData): Promise<void> {
50-
return this.iosSim.stopApplication(this.device.deviceInfo.identifier, appData.appId, appData.projectName);
50+
const { appId } = appData;
51+
52+
this.device.destroyDebugSocket(appId);
53+
this.device.destroyLiveSyncSocket(appId);
54+
55+
await this.iosSim.stopApplication(this.device.deviceInfo.identifier, appData.appId, appData.projectName);
5156
}
5257

5358
public async getApplicationInfo(applicationIdentifier: string): Promise<Mobile.IApplicationInfo> {

lib/device-sockets/ios/app-debug-socket-proxy-factory.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,8 @@ export class AppDebugSocketProxyFactory extends EventEmitter implements IAppDebu
152152
appDebugSocket.on("close", () => {
153153
this.$logger.info("Backend socket closed!");
154154
webSocket.close();
155+
server.close();
156+
delete this.deviceWebServers[cacheKey];
155157
});
156158

157159
webSocket.on("close", () => {

lib/services/livesync/livesync-service.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ export class LiveSyncService extends EventEmitter implements IDebugLiveSyncServi
5656
}
5757

5858
public async liveSyncToPreviewApp(data: IPreviewAppLiveSyncData): Promise<IQrCodeImageData> {
59-
this.$previewAppLiveSyncService.on(LiveSyncEvents.previewAppLiveSyncError, liveSyncData => {
60-
this.emit(LiveSyncEvents.previewAppLiveSyncError, liveSyncData);
61-
});
59+
this.attachToPreviewAppLiveSyncError();
6260

6361
await this.liveSync([], {
6462
syncToPreviewApp: true,
@@ -139,6 +137,13 @@ export class LiveSyncService extends EventEmitter implements IDebugLiveSyncServi
139137
return currentDescriptors || [];
140138
}
141139

140+
@cache()
141+
private attachToPreviewAppLiveSyncError(): void {
142+
this.$previewAppLiveSyncService.on(LiveSyncEvents.previewAppLiveSyncError, liveSyncData => {
143+
this.emit(LiveSyncEvents.previewAppLiveSyncError, liveSyncData);
144+
});
145+
}
146+
142147
private handleWarnings(liveSyncData: ILiveSyncInfo, projectData: IProjectData) {
143148
if (liveSyncData.useHotModuleReload) {
144149
this.$logger.warn("Hot Module Replacement (HMR) is currently in Beta. For more information about the current development state and any known issues, please check the relevant GitHub issue: https://github.com/NativeScript/NativeScript/issues/6398");

npm-shrinkwrap.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"mkdirp": "0.5.1",
6060
"mute-stream": "0.0.5",
6161
"nativescript-doctor": "1.8.1",
62-
"nativescript-preview-sdk": "0.3.1",
62+
"nativescript-preview-sdk": "0.3.2",
6363
"open": "0.0.5",
6464
"ora": "2.0.0",
6565
"osenv": "0.1.3",

0 commit comments

Comments
 (0)