Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
? stage => {
this.logger.warn("lifecycle", "Skipping root %j because it has already been called", stage);
}
: stage => this.runPackageLifecycle(this.project.manifest, stage);
const tasks = [
() => this.getVersionsForUpdates(),
versions => this.setUpdatesForVersions(versions),
() => this.confirmVersions(),
];
// amending a commit probably means the working tree is dirty
if (this.commitAndTag && this.gitOpts.amend !== true) {
const { forcePublish, conventionalCommits, conventionalGraduate } = this.options;
const checkUncommittedOnly = forcePublish || (conventionalCommits && conventionalGraduate);
const check = checkUncommittedOnly ? checkWorkingTree.throwIfUncommitted : checkWorkingTree;
tasks.unshift(() => check(this.execOpts));
} else {
this.logger.warn("version", "Skipping working tree validation, proceed at your own risk");
}
return pWaterfall(tasks);
}
verifyWorkingTreeClean() {
return describeRef(this.execOpts).then(checkWorkingTree.throwIfUncommitted);
}