mirror of
https://github.com/pnpm/pnpm.git
synced 2026-05-19 06:07:59 -04:00
@@ -22,7 +22,7 @@ export function reportUpdateCheck (log$: Rx.Observable<UpdateCheckLog>, opts: {
|
||||
return Rx.of({
|
||||
msg: boxen(`\
|
||||
Update available! ${chalk.red(log.currentVersion)} → ${chalk.green(log.latestVersion)}.
|
||||
${chalk.magenta('Changelog:')} https://github.com/pnpm/pnpm/releases/tag/v${log.latestVersion}
|
||||
${chalk.magenta('Changelog:')} https://pnpm.io/v/${log.latestVersion}
|
||||
${updateMessage}`,
|
||||
{
|
||||
padding: 1,
|
||||
@@ -45,7 +45,7 @@ interface UpdateMessageOptions {
|
||||
|
||||
function renderUpdateMessage (opts: UpdateMessageOptions): string {
|
||||
const updateCommand = renderUpdateCommand(opts)
|
||||
return `Run "${chalk.magenta(updateCommand)}" to update.`
|
||||
return `To update, run: ${chalk.magenta(updateCommand)}`
|
||||
}
|
||||
|
||||
function renderUpdateCommand (opts: UpdateMessageOptions): string {
|
||||
|
||||
@@ -2,36 +2,36 @@
|
||||
|
||||
exports[`print update notification for Corepack if the latest version is greater than the current 1`] = `
|
||||
"
|
||||
╭──────────────────────────────────────────────────────────────────╮
|
||||
│ │
|
||||
│ Update available! 10.0.0 → 11.0.0. │
|
||||
│ Changelog: https://github.com/pnpm/pnpm/releases/tag/v11.0.0 │
|
||||
│ Run "corepack use pnpm@11.0.0" to update. │
|
||||
│ │
|
||||
╰──────────────────────────────────────────────────────────────────╯
|
||||
╭──────────────────────────────────────────────╮
|
||||
│ │
|
||||
│ Update available! 10.0.0 → 11.0.0. │
|
||||
│ Changelog: https://pnpm.io/v/11.0.0 │
|
||||
│ To update, run: corepack use pnpm@11.0.0 │
|
||||
│ │
|
||||
╰──────────────────────────────────────────────╯
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`print update notification if the latest version is greater than the current 1`] = `
|
||||
"
|
||||
╭──────────────────────────────────────────────────────────────────╮
|
||||
│ │
|
||||
│ Update available! 10.0.0 → 11.0.0. │
|
||||
│ Changelog: https://github.com/pnpm/pnpm/releases/tag/v11.0.0 │
|
||||
│ Run "pnpm add -g pnpm" to update. │
|
||||
│ │
|
||||
╰──────────────────────────────────────────────────────────────────╯
|
||||
╭─────────────────────────────────────────╮
|
||||
│ │
|
||||
│ Update available! 10.0.0 → 11.0.0. │
|
||||
│ Changelog: https://pnpm.io/v/11.0.0 │
|
||||
│ To update, run: pnpm add -g pnpm │
|
||||
│ │
|
||||
╰─────────────────────────────────────────╯
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`print update notification that suggests to use the standalone scripts for the upgrade 1`] = `
|
||||
"
|
||||
╭──────────────────────────────────────────────────────────────────╮
|
||||
│ │
|
||||
│ Update available! 10.0.0 → 11.0.0. │
|
||||
│ Changelog: https://github.com/pnpm/pnpm/releases/tag/v11.0.0 │
|
||||
│ Run "pnpm self-update" to update. │
|
||||
│ │
|
||||
╰──────────────────────────────────────────────────────────────────╯
|
||||
╭─────────────────────────────────────────╮
|
||||
│ │
|
||||
│ Update available! 10.0.0 → 11.0.0. │
|
||||
│ Changelog: https://pnpm.io/v/11.0.0 │
|
||||
│ To update, run: pnpm self-update │
|
||||
│ │
|
||||
╰─────────────────────────────────────────╯
|
||||
"
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user