react-native-cli
Advanced tools
Comparing version 2.0.0 to 2.0.1
22
index.js
@@ -59,3 +59,2 @@ #!/usr/bin/env node | ||
var options = require('minimist')(process.argv.slice(2)); | ||
checkForVersionArgument(options); | ||
@@ -80,2 +79,6 @@ var CLI_MODULE_PATH = function() { | ||
if (options._.length === 0 && (options.v || options.version)) { | ||
printVersionsAndExit(REACT_NATIVE_PACKAGE_JSON_PATH()); | ||
} | ||
// Use Yarn if available, it's much faster than the npm client. | ||
@@ -320,12 +323,11 @@ // Return the version of yarn installed on the system, null if yarn is not available. | ||
function checkForVersionArgument(options) { | ||
if (options._.length === 0 && (options.v || options.version)) { | ||
console.log('react-native-cli: ' + require('./package.json').version); | ||
try { | ||
console.log('react-native: ' + require(REACT_NATIVE_PACKAGE_JSON_PATH()).version); | ||
} catch (e) { | ||
console.log('react-native: n/a - not inside a React Native project directory'); | ||
} | ||
process.exit(); | ||
function printVersionsAndExit(reactNativePackageJsonPath) { | ||
console.log('react-native-cli: ' + require('./package.json').version); | ||
try { | ||
console.log('react-native: ' + require(reactNativePackageJsonPath).version); | ||
} catch (e) { | ||
console.log('react-native: n/a - not inside a React Native project directory'); | ||
} | ||
process.exit(); | ||
} | ||
{ | ||
"name": "react-native-cli", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"license": "BSD-3-Clause", | ||
@@ -5,0 +5,0 @@ "description": "The React Native CLI tools", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14785