Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return true;
}
},
{
type: 'confirm',
name: 'confirm',
message: answers => {
const tag = answers.tag || options.tag;
const tagPart = tag ? ` and tag this release in npm as ${tag}` : '';
return `Will bump from ${chalk.cyan(oldVersion)} to ${chalk.cyan(answers.version + tagPart)}. Continue?`;
}
},
{
type: 'confirm',
name: 'publishScoped',
when: isScoped(pkg.name) && options.publish && !pkg.private,
message: `${chalk.bold.magenta(pkg.name)} is a scoped package. Do you want to publish it publicly?`,
default: true
}
];
const { hasCommits, releaseNotes } = await printCommitLog(repoUrl);
if (!hasCommits) {
const answers = await inquirer.prompt([{
type: 'confirm',
name: 'confirm',
message: 'No commits found since previous release, continue?',
default: false
}]);
if (!answers.confirm) {
return Object.assign({}, options, answers);
}
}
}
},
{
type: 'confirm',
name: 'confirm',
message: answers => {
const tag = answers.tag || options.tag;
const tagPart = tag ? ` and tag this release in npm as ${tag}` : '';
return `Will bump from ${chalk.cyan(oldVersion)} to ${chalk.cyan(answers.version + tagPart)}. Continue?`;
}
},
{
type: 'confirm',
name: 'publishScoped',
when: isScoped(pkg.name) && options.publish && !pkg.private,
message: `${chalk.bold.magenta(pkg.name)} is a scoped package. Do you want to publish it publicly?`,
default: true
}
];
const {hasCommits, releaseNotes} = await printCommitLog(repoUrl);
if (!hasCommits) {
const answers = await inquirer.prompt([{
type: 'confirm',
name: 'confirm',
message: 'No commits found since previous release, continue?',
default: false
}]);
if (!answers.confirm) {