Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

install-nativescript

Package Overview
Dependencies
Maintainers
5
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

install-nativescript - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0

14

lib/ensure-cli-service.js

@@ -66,3 +66,3 @@ const _ = require("lodash");

const findCLI = (minVersion) => {
const findCLI = (versionRange) => {
return getNativeScriptCliVersion()

@@ -84,9 +84,9 @@ .then((cliVersion) => {

.then((cliVersion) => {
const hasMinRequirement = !_.isNil(minVersion) && !_.isNull(semver.valid(minVersion));
const hasRangeRequirement = !_.isNil(versionRange) && !_.isNull(semver.validRange(versionRange));
if (!hasMinRequirement || semver.gte(cliVersion, minVersion)) {
if (!hasRangeRequirement || semver.satisfies(cliVersion, versionRange)) {
return Promise.resolve(cliVersion);
}
const errorMessage = `Found version ${cliVersion} does not satisfy required minVersion ${minVersion}.`;
const errorMessage = `Found version ${cliVersion} does not satisfy required range ${versionRange}.`;
const error = new Error(errorMessage);

@@ -102,4 +102,4 @@

const ensureCLI = ({ version = "latest", minVersion } = {}) => {
return findCLI(minVersion)
const ensureCLI = ({ version = "latest", versionRange } = {}) => {
return findCLI(versionRange)
.catch((error) => {

@@ -116,3 +116,3 @@ if (!error || !error.ignoreInstallation) {

return findCLI(minVersion);
return findCLI(versionRange);
});

@@ -119,0 +119,0 @@ };

{
"name": "install-nativescript",
"version": "0.2.1",
"version": "0.3.0",
"description": "Package that helps you install Node.js, npm and nativescript-cli. Works only on Windows and Mac.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -43,3 +43,3 @@ # install-nativescript

- In case it cannot detect it, the method installs it globally using npm. You can pass a specific NativeScript CLI version to install. In case it is not provided, the method installs the latest official version.
- In case it detects a version, the method will update it in case you pass a specific minVersion and the current version does not satisfy the requirement. Again, in case a specific version is not provided, the method installs the latest official version.
- In case it detects a version, the method will update it in case you pass a specific versionRange and the current version does not satisfy the requirement. Again, in case a specific version is not provided, the method installs the latest official version.

@@ -46,0 +46,0 @@ Usage:

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc