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 create react admin detect package manager #10534

Merged
merged 2 commits into from
Feb 20, 2025

Conversation

djhi
Copy link
Collaborator

@djhi djhi commented Feb 20, 2025

Problem

create-react-admin does not detect the package manager used to run it correctly.

Solution

Leverage the process.env.npm_config_user_agent environment variable to detect it, just like create-vite

How To Test

Difficult to test without a release as you have to modify the global cache of the package manager.

  • For bun it's in $HOME/.bun/install/cache and the package is unzipped into create-react-admin@5.6.0@@@1
  • For yarn it's in $HOME/.yarn/berry/cache and the package is not unzipped but renamed to create-react-admin-npm-5.6.0-941ece3bdb-10c0.zip

Additional Checks

  • The PR targets master for a bugfix, or next for a feature

Also, please make sure to read the contributing guidelines.

@djhi djhi added the RFR Ready For Review label Feb 20, 2025
@slax57 slax57 self-requested a review February 20, 2025 16:24
@slax57 slax57 added this to the 5.6.1 milestone Feb 20, 2025
@slax57 slax57 merged commit db94078 into master Feb 20, 2025
16 checks passed
@slax57 slax57 deleted the fix-create-react-admin-detect-package-manager branch February 20, 2025 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants