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

The pnpm.updateConfig.ignoreDependencies configuration in package.json is not working. #6548

Closed
u3u opened this issue May 16, 2023 · 3 comments · Fixed by #6590
Closed

The pnpm.updateConfig.ignoreDependencies configuration in package.json is not working. #6548

u3u opened this issue May 16, 2023 · 3 comments · Fixed by #6590

Comments

@u3u
Copy link

u3u commented May 16, 2023

pnpm version:

8.5.1

Code to reproduce the issue:

  • pnpm -r up -i --latest
  • pnpm -r outdated

Expected behavior:

These dependencies should not be listed for update.

The package.json file in the root directory:

"pnpm": {
  "updateConfig": {
    "ignoreDependencies": [
      "@mantine/*",
      "@types/*",
      "react",
      "react-dom",
      "next"
    ]
  }
}

Actual behavior:

They still appear in the update list.

I also tested command line reverse filtering, which cannot execute commands.

pnpm -r up -i --latest "!@types/*"
zsh: event not found: @types/

# And strangely, redoing a history command will directly discard the input.
pnpm -r up -i --latest ""

Additional information:

  • node -v prints: 18.16.0
  • Windows, macOS, or Linux?: macOS
@u3u u3u added the type: bug label May 16, 2023
@markgaze
Copy link

I tried using this in package.json inside one of my packages in a monorepo and it also didn't work but I'm not sure if that's how it should work? If not, would it be possible to support that?

@await-ovo
Copy link
Member

Hi @u3u , maybe this could be a temporary workaround: pnpm -r update -i --latest "\!@types/*". I will try to fix the issue where updateConfig.ignoreDependencies is not working as expected.

@u3u
Copy link
Author

u3u commented May 25, 2023

@await-ovo 😘 Thank you! pnpm -r update -i --latest "\!@types/*" works! 🥳
Maybe we should also update the documentation related to patterns. 🧐
https://pnpm.io/cli/update#selecting-dependencies-with-patterns
https://pnpm.io/package_json#pnpmupdateconfigignoredependencies

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