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

fix: get package manager #22

Merged
merged 2 commits into from Apr 9, 2024

Conversation

devjiwonchoi
Copy link
Contributor

cc @rschristian

This PR added the get package manager method, which looks for process.env of npm_config_user_agent.
This method is supported for yarn, npm, and pnpm.

P.S. create-next-app also uses this method

x-ref: pnpm/pnpm#4317
x-ref: npm/cli#1919
x-ref: yarnpkg/yarn#7127
x-ref: stackoverflow

Copy link
Member

@rschristian rschristian left a comment

Choose a reason for hiding this comment

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

Thank you so much!

src/index.js Outdated Show resolved Hide resolved
@rschristian rschristian merged commit 8c3fc29 into preactjs:master Apr 9, 2024
@devjiwonchoi devjiwonchoi deleted the get-package-manager branch April 9, 2024 16:23
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.

None yet

2 participants