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 up -i --latest Updates unspecified packages #8031

Open
1 of 4 tasks
alex-way opened this issue Apr 29, 2024 · 7 comments
Open
1 of 4 tasks

pnpm up -i --latest Updates unspecified packages #8031

alex-way opened this issue Apr 29, 2024 · 7 comments

Comments

@alex-way
Copy link

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

v9.0.6

Which area(s) of pnpm are affected? (leave empty if unsure)

Lockfile

Link to the code that reproduces this issue or a replay of the bug

No response

Reproduction steps

  • pnpm up -i --latest
  • Select one package

Describe the Bug

When running pnpm up -i --latest and picking specific packages pnpm ignores the packages requested and updates everything to latest.

Versions in package.json are not updated, but the lockfile is.

Expected Behavior

Only the dependencies specified should have their versions updated.

Which Node.js version are you using?

20.11.1

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

No response

@alex-way
Copy link
Author

alex-way commented Apr 29, 2024

The only workaround is to run pnpm up -i --latest as normal, delete the pnpm-lock.yaml and then run pnpm i

@KSXGitHub
Copy link
Contributor

delete the package-lock.json and then run pnpm i

Did you mean pnpm-lock.yaml?

@alex-way
Copy link
Author

delete the package-lock.json and then run pnpm i

Did you mean pnpm-lock.yaml?

Ah apologies, I did mean pnpm-lock.yaml!

@KSXGitHub
Copy link
Contributor

KSXGitHub commented May 1, 2024

I cannot reproduce it. Can you provide your package.json and pnpm-lock.yaml, and also tell me which packages you chose to update. I suspect they may depend on each other.

@alex-way
Copy link
Author

alex-way commented May 2, 2024

Sure, let me see if I can get a minimal repro for you

@AronBe
Copy link

AronBe commented May 16, 2024

I experienced exactly the same issue, basically everything gets updated regardless of what is selected when using the interactive feature

@DrSh4dow
Copy link

Same experience over here, it seems to be related to the .npmrc file, when we add the flag node-linker=hoisted then it updates all of the repository dependencies whether you specified them or not in the update command.
I have created a minimal repository to reproduce the issue here:
https://github.com/DrSh4dow/pnpm-issue-POC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants