Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
output("");
output("Changes:");
output(changes.join(os.EOL));
output("");
if (this.options.yes) {
this.logger.info("auto-confirmed");
return true;
}
// When composed from `lerna publish`, use this opportunity to confirm publishing
const message = this.composed
? "Are you sure you want to publish these packages?"
: "Are you sure you want to create these versions?";
return PromptUtilities.confirm(message);
}
this.preImportHead = this.getCurrentSHA();
if (this.execSync("git", ["diff-index", "HEAD"])) {
throw new ValidationError("ECHANGES", "Local repository has un-committed changes");
}
this.logger.info(
"",
`About to import ${this.commits.length} commits from ${inputPath} into ${targetDir}`
);
if (this.options.yes) {
return true;
}
return PromptUtilities.confirm("Are you sure you want to import these commits onto the current branch?");
}
const count = this.packagesToPublish.length;
const message = this.packagesToPublish.map(
pkg => ` - ${pkg.name} => ${this.updatesVersions.get(pkg.name)}`
);
output("");
output(`Found ${count} ${count === 1 ? "package" : "packages"} to publish:`);
output(message.join(os.EOL));
output("");
if (this.options.yes) {
this.logger.info("auto-confirmed");
return true;
}
return PromptUtilities.confirm("Are you sure you want to publish these packages?");
}
return chain.then(() => {
if (this.options.yes) {
return true;
}
this.logger.info("", "Removing the following directories:");
this.logger.info(
"clean",
this.directoriesToDelete.map(dir => path.relative(this.project.rootPath, dir)).join("\n")
);
return PromptUtilities.confirm("Proceed?");
});
}