Skip to content

Commit 3e8ddcf

Browse files
rosen-vladimirovyyosifov
authored andcommitted
Merge release in master (#2749)
* Fix debug on iOS simulator with watch (#2721) During `tns debug ios`, in case you make changes, the application must be restarted and the debugger must attached again. However, in many cases we kill the old lldb process and immediately try to start the new one. The childProcess.kill operation finishes, but lldb process does not die immedietely. So in some occasions, the attach of new debugger fails. This leads to multiple errors - you cannot start this application on simulator anymore, you cannot exit CLI's process with `Ctrl + C`, etc. Fix this by attaching to "close" event of the processes and waiting for them to be really finish their execution. * Implement extensibility model for CLI (#2724) Implement extensibilty of CLI that allows anyone to add easily create packages that add new functionality to NativeScript CLI. The packages are installed in a specific directory, so they are persisted through CLI's updated. The directory where extensions are installed contains a package.json and each extension is npm package installed there. The extensions can be mainatined in two different ways: - navigate to the directory where extensions are installed and use `npm` for install/uninstall/update of packages. - use CLI's commands to update them: `tns extension install <name>`, `tns extension uninstall <name>`, `tns extension` Implement extensibilityService that executes all operations and expose it to public API. In {N} CLI the extensions are loaded in the entry point, before parsing command line arguments. This way extensions can add new commands. In Fusion, after CLI is required as a library, the `extensibilityService.loadExtensions` method should be called. It returns array of Promises - one for each installed extension. Add help for the new commands, but do not link the new commands in other commands help for the moment. Add unit tests for the new service. * Fix installation scripts for Mac (#2714) * Fix android sdk commands to use sdkmanager * Replace brew install with brew cask * Fix installation for haxm * Change brew formulae repository before installing android sdk * Fix setting the ENV variable missing cast * Do not start emulator when `--available-devices` is passed (#2736) In case there's no devices attached and no emulators running, trying `<cli name> devices <platform> --available-devices` will start emulator. In order to fix this, modify the `startEmulatorIfNecessary` method to skip the starting in case `skipInferPlatform` option is passed. This option indicates that we are not concerned of specific platform, so the method does not know which is the target platform for which to start emulator. Add unit test for this behavior. * Install karma peer dependencies on `test init` (#2693) * implicitly install karma-<testingFramework>'s peer dependencies on test init command * add exception handling when installing packages already present in the project * log warning instead of throwing errors when a package's name couldn't be determined when installed using the node-package-manager service * Freeze mocha-typescript to 1.0.23 (#2746) * Freeze mocha-typescript to 1.0.23 (#2746) * Fix the six package detection in release (#2748)
1 parent 9306f38 commit 3e8ddcf

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

lib/node-package-manager.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export class NodePackageManager implements INodePackageManager {
7777
throw err;
7878
}
7979
}
80-
}
80+
}
8181

8282
@exported("npm")
8383
public async uninstall(packageName: string, config?: any, path?: string): Promise<string> {

lib/services/doctor-service.ts

+8-7
Original file line numberDiff line numberDiff line change
@@ -226,17 +226,18 @@ class DoctorService implements IDoctorService {
226226
let hasInvalidPackages = false;
227227
if (this.$hostInfo.isDarwin) {
228228
try {
229-
let queryForSixPackage = await this.$childProcess.exec(`pip freeze | grep '^six=' | wc -l`);
230-
let sixPackagesFoundCount = parseInt(queryForSixPackage);
231-
if (sixPackagesFoundCount === 0) {
229+
await this.$childProcess.exec(`python -c "import six"`);
230+
} catch (error) {
231+
// error.code = 1 so the Python is present, but we don't have six.
232+
if (error.code === 1) {
232233
hasInvalidPackages = true;
233234
this.$logger.warn("The Python 'six' package not found.");
234235
this.$logger.out("This package is required by the Debugger library (LLDB) for iOS. You can install it by running 'pip install six' from the terminal.");
236+
} else {
237+
this.$logger.warn("Couldn't retrieve installed python packages.");
238+
this.$logger.out("We cannot verify your python installation is setup correctly. Please, make sure you have both 'python' and 'pip' installed.");
239+
this.$logger.trace(`Error while validating Python packages. Error is: ${error.message}`);
235240
}
236-
} catch (error) {
237-
this.$logger.warn("Couldn't retrieve installed python packages.");
238-
this.$logger.out("We cannot verify your python installation is setup correctly. Please, make sure you have both 'python' and 'pip' installed.");
239-
this.$logger.trace(`Error while validating Python packages. Error is: ${error.message}`);
240241
}
241242
}
242243
return hasInvalidPackages;

0 commit comments

Comments
 (0)