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

feat: lock pnpm version via npx #4788

Closed

Conversation

rkristelijn
Copy link
Contributor

  • I've read and followed the contributing guide on how to create great pull requests.
  • I've updated the relevant documentation for any new or updated feature.
  • I've linked relevant GitHub issue with Closes request: use pnpm in dev dependency #4787
  • I've added a visual demonstration in the form of a screenshot or video.
# get the version from package.json
❯ npm pkg get devDependencies.pnpm
"9.12.3"
# install a different version globally
❯ npm i pnpm@8 -g
# print the version of pnpm from within the repo root
❯ pnpm --version
# observe it can be different and therefore can cause issues
8.15.9
# whereas if you use npm pnpm, it always picks from the dev dependencies
❯ npx pnpm --version
9.12.3

Copy link
Member

@Janpot Janpot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can run pnpm through npx if you want but we won't recommend it. I think this PR can be closed.

@rkristelijn
Copy link
Contributor Author

Can you elaborate a bit? I think my argument is valid, would like to understand your viewpoint

@Janpot
Copy link
Member

Janpot commented Mar 20, 2025

pnpm is our package manager of choice, if you want to contribute we recommend installing it globally. If you don't want to do that, you can use something like corepack. Both of these methods will respect the packageManager field in our package.json and automatically use the configured version of pnpm. All maintainers of the mui ecosystem have a global pnpm, we don't need npx pnpm.

@Janpot Janpot closed this Mar 20, 2025
@rkristelijn
Copy link
Contributor Author

@Janpot Thanks for the clarification, I would like to add this in the CONTRIBUTING.md, is that ok?

@rkristelijn rkristelijn deleted the feature/lock-pnpm-version-via-npx branch March 20, 2025 14:47
@rkristelijn
Copy link
Contributor Author

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

Successfully merging this pull request may close these issues.

request: use pnpm in dev dependency
3 participants