INNER CODE UNIT · JavaScript

updateCheck

yeoman/yo · lib/cli.js:51

function updateCheck() {
  const notifier = updateNotifier({pkg});
  const message = [];

  if (notifier.update) {
    message.push(
      'Update available: ' + chalk.green.bold(notifier.update.latest) + chalk.gray(' (current: ' + notifier.update.current + ')'),
      'Run ' + chalk.magenta('npm install -g ' + pkg.name) + ' to update.',
    );
    console.log(yosay(message.join(' '), {maxLength: stringLength(message[0])}));
  }
}

async function pre() {
  // Debugging helper
  if (cmd === 'doctor') {
    const {default: yeomanDoctor} = await import('yeoman-doctor');
    yeomanDoctor();

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…