lerna-update-wizard
Advanced tools
Comparing version 0.1.3 to 0.1.4
23
index.js
@@ -29,2 +29,4 @@ const path = require("path"); | ||
}, 100); | ||
} else { | ||
ui.updateBottomBar(""); | ||
} | ||
@@ -36,2 +38,5 @@ } | ||
const fileExists = async path => | ||
new Promise(resolve => fs.stat(path, err => resolve(!err))); | ||
const runCommand = async (options = {}) => { | ||
@@ -66,7 +71,6 @@ showBottomMessage(options.startMessage); | ||
const readPackageErr = await new Promise(cb => | ||
fs.stat(resolve(dir, "package.json"), cb) | ||
); | ||
const projectPackagePath = resolve(dir, "package.json"); | ||
const packagesDir = resolve(dir, "packages"); | ||
if (readPackageErr) { | ||
if (!await fileExists(projectPackagePath)) { | ||
ui.log.write( | ||
@@ -78,5 +82,10 @@ chalk.red.bold("No 'package.json' found in specified directory") | ||
const packagesDir = resolve(dir, "packages"); | ||
const projectPackage = require(resolve(dir, "package.json")); | ||
const projectName = projectPackage.name; | ||
if (!await fileExists(packagesDir)) { | ||
ui.log.write( | ||
chalk.red.bold("No 'packages/' directory found. Is this a lerna project?") | ||
); | ||
process.exit(); | ||
} | ||
const { name: projectName } = require(projectPackagePath); | ||
const packages = fs.readdirSync(packagesDir); | ||
@@ -83,0 +92,0 @@ |
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"main": "index.js", | ||
@@ -9,0 +9,0 @@ "license": "MIT", |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
13954
188