Skip to content

Commit

Permalink
fix(update-checker): suggest to update @pnpm/exe, when @pnpm/exe is used
Browse files Browse the repository at this point in the history
  • Loading branch information
zkochan committed Apr 24, 2022
1 parent 88da235 commit 22ab407
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -6,14 +6,15 @@ import { filter, map, take } from 'rxjs/operators'
import semver from 'semver'

export default (log$: Rx.Observable<UpdateCheckLog>) => {
const pkgName = process['pkg'] != null ? '@pnpm/exe' : 'pnpm'
return log$.pipe(
take(1),
filter((log) => semver.gt(log.latestVersion, log.currentVersion)),
map((log) => 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}
Run ${chalk.magenta('pnpm add -g pnpm')} to update.
Run ${chalk.magenta(`pnpm add -g ${pkgName}`)} to update.
Follow ${chalk.magenta('@pnpmjs')} for updates: https://twitter.com/pnpmjs`,
{
Expand Down

0 comments on commit 22ab407

Please sign in to comment.