Skip to content

Merge release in master #2951

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 5, 2017
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
NativeScript CLI Changelog
================

3.1.2 (2017, July 06)
==

### Fixed
* [Fixed #2950](https://github.com/NativeScript/nativescript-cli/issues/2950): Unable to provide user input on postinstall of plugin

3.1.1 (2017, June 28)
==

Expand All @@ -8,6 +15,7 @@ NativeScript CLI Changelog
* [Fixed #2892](https://github.com/NativeScript/nativescript-cli/issues/2892): Not copying the CFBundleURLTypes from the plist file to the project
* [Fixed #2916](https://github.com/NativeScript/nativescript-cli/issues/2916): If no device or emulator is attached `tns debug android` kills the commandline process and doesn't start an emulator
* [Fixed #2923](https://github.com/NativeScript/nativescript-cli/issues/2923): Fix asking for user email on postinstall
* [Fixed #2929](https://github.com/NativeScript/nativescript-cli/issues/2929): Android release builds with webpack disregards plugin's gradle dependencies.


3.1.0 (2017, June 22)
Expand Down
1 change: 1 addition & 0 deletions lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export class StaticConfig extends StaticConfigBase implements IStaticConfig {
public CLIENT_NAME = "tns";
public CLIENT_NAME_ALIAS = "NativeScript";
public ANALYTICS_API_KEY = "5752dabccfc54c4ab82aea9626b7338e";
public ANALYTICS_EXCEPTIONS_API_KEY = "35478fe7de68431399e96212540a3d5d";
public TRACK_FEATURE_USAGE_SETTING_NAME = "TrackFeatureUsage";
public ERROR_REPORT_SETTING_NAME = "TrackExceptions";
public ANALYTICS_INSTALLATION_ID_SETTING_NAME = "AnalyticsInstallationID";
Expand Down
15 changes: 10 additions & 5 deletions lib/node-package-manager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as path from "path";
import { exported } from "./common/decorators";
import { isInteractive } from "./common/helpers";

export class NodePackageManager implements INodePackageManager {
private static SCOPED_DEPENDENCY_REGEXP = /^(@.+?)(?:@(.+?))?$/;
Expand Down Expand Up @@ -208,16 +209,20 @@ export class NodePackageManager implements INodePackageManager {
private async getNpmInstallResult(params: string[], cwd: string): Promise<ISpawnResult> {
return new Promise<ISpawnResult>((resolve, reject) => {
const npmExecutable = this.getNpmExecutableName();
let childProcess = this.$childProcess.spawn(npmExecutable, params, { cwd, stdio: "pipe" });
const stdioValue = isInteractive() ? "inherit" : "pipe";

const childProcess = this.$childProcess.spawn(npmExecutable, params, { cwd, stdio: stdioValue });

let isFulfilled = false;
let capturedOut = "";
let capturedErr = "";

childProcess.stdout.on("data", (data: string) => {
this.$logger.write(data.toString());
capturedOut += data;
});
if (childProcess.stdout) {
childProcess.stdout.on("data", (data: string) => {
this.$logger.write(data.toString());
capturedOut += data;
});
}

if (childProcess.stderr) {
childProcess.stderr.on("data", (data: string) => {
Expand Down