Skip to content

Incomplete "Update available!" instructions (doesn't work w/ 'packageManager' field?) #6325

@jrr

Description

@jrr

pnpm version:

8.0.0

Summary

I like how pnpm informs me of available updates, but its instructions don't work for my project. I think this is due to using the packageManager field in package.json. (when I remove the field, then the provided command works)

Detail

> pnpm --version
8.0.0

> pnpm i
Scope: all 4 workspace projects
Lockfile is up to date, resolution step is skipped
Already up to date

   ╭─────────────────────────────────────────────────────────────────╮
   │                                                                 │
   │                Update available! 8.0.0 → 8.1.0.                 │
   │   Changelog: https://github.com/pnpm/pnpm/releases/tag/v8.1.0   │
   │     Run "corepack prepare [email protected] --activate" to update.     │
   │                                                                 │
   │     Follow @pnpmjs for updates: https://twitter.com/pnpmjs      │
   │                                                                 │
   ╰─────────────────────────────────────────────────────────────────╯
Done in 978ms

> corepack prepare [email protected] --activate
Preparing [email protected] for immediate activation...

> pnpm --version
8.0.0

> grep packageManager package.json
  "packageManager": "[email protected]",

(then, when I remove packageManager, I get v8.1.0)

Additional information:

node v18.15.0 / macOS

I realize that managing this version sits on the boundary of the responsibilities of pnpm and corepack. Ideally one or both projects would offer a nice way to upgrade the packageManager version. But at minimum, pnpm should not misdirect folks as it does today.

Maybe an adjusted message when packageManager is in use?

Related:
#5583
#3638

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions