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

Global shamefully-hoist config overriding local public-hoist-pattern config #7312

Open
2 of 4 tasks
jpoissonnet opened this issue Nov 14, 2023 · 0 comments
Open
2 of 4 tasks

Comments

@jpoissonnet
Copy link

Verify latest release

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

pnpm version

No response

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

Dependencies resolver, Store

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

https://github.com/jpoissonnet/hoisting-behavior

Reproduction steps

  • Beware to have unset the global shamefully-hoist config
    You can check the current configuration with pnpm config get To unset the global config, run pnpm config --global delete shamefully-hoist

  • Run pnpm install

  • Check your root node_modules, in the .bin you should see the jest binary which confirms that jest is hoisted

  • Now run pnpm config --global set shamefully-hoist false

  • Run pnpm install it should ask to recreate the node_modules

  • If you check the node_modules you will see that there is no trace left of jest

Describe the Bug

Setting shamfully-hoist=false in the global config overrides the local public-hoist-pattern configuration. This prevents to hoist any dependencies even with the public-hoist-pattern.

Expected Behavior

Patterns specified in the local public-hoist-pattern should be hoisted whatever value the global shamefully-hoist has.

Else we should specify it in the docs.

Which Node.js version are you using?

v21.1.0

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

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

1 participant