Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pnpm update should also update the packageManager setting #7134

Closed
1 task
Bessonov opened this issue Sep 26, 2023 · 3 comments · May be fixed by #7235
Closed
1 task

pnpm update should also update the packageManager setting #7134

Bessonov opened this issue Sep 26, 2023 · 3 comments · May be fixed by #7235

Comments

@Bessonov
Copy link

Contribution

Describe the user story

The pnpm update --interactive --recursive --latest command is amazing for updating dependencies. But for updating the version of pnpm used in corepack's packageManager setting, I need to find out the last release of pnpm and change it manually.

Describe the solution you'd like

> pnpm update --interactive --recursive --latest

? Choose which packages to update (Press <space> to select, <a> to toggle all, <i> to invert selection) … 
❯ ○ pnpm (packageManager)        8.1.1 ❯ 8.8.0 
  ○ @types/node (dev)        20.6.5 ❯ 20.7.0 
  ○ @types/webpack-env (dev) 1.18.1 ❯ 1.18.2 
  ○ kill-port (dev)           1.6.1 ❯ 2.0.1  
  ○ tailwindcss (dev)         3.3.1 ❯ 3.3.3

Describe the drawbacks of your solution

Effort required for implementation and maintenance.

Describe alternatives you've considered

It could probably be resolved by an independent package, but I didn't find any. Additionally, the same argument could be applied to the existing pnpm update command.

@zkochan
Copy link
Member

zkochan commented Sep 27, 2023

Sounds good, I think

@edvinv
Copy link

edvinv commented Nov 2, 2023

pnpm update is for updating dependencies, for updating package manager and packageManager property inside package.json you should use corepack up or corepack use <name@version> when you need next major version.

@Bessonov
Copy link
Author

Bessonov commented Nov 3, 2023

@edvinv Thanks, I wasn't aware of corepack up. More details here.

Although I disagree that pnpm update is solely for updating dependencies, I believe using corepack up makes sense to save valuable development resources.

@zkochan @fireairforce I'm going to close this feature request. Feel free to reopen it if you believe that the value (for instance user update to the new pnpm version earlier) outweighs the effort. Personally, I would love to see it in pnpm, but I see the drawbacks too.

@Bessonov Bessonov closed this as not planned Won't fix, can't repro, duplicate, stale Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants