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(cpa): detect package manager from command execution environment #8087

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

r1tsuu
Copy link
Member

@r1tsuu r1tsuu commented Sep 6, 2024

Description

Previously, on some machines this command:
pnpx create-payload-app@beta app created a project using npm, instead of pnpm, the same with yarn.

Also, the way we detected the package manager was always prioritizing pnpm, even if they executed the command with yarn / npm. Now we are relying only on from which package manager user executed create-payload-app.

The code for detection is grabbed from create-next-app https://github.com/vercel/next.js/blob/canary/packages/create-next-app/helpers/get-pkg-manager.ts

  • I have read and understand the CONTRIBUTING.md document in this repository.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • Existing test suite passes locally with my changes

Copy link
Member

@denolfe denolfe left a comment

Choose a reason for hiding this comment

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

This is a good change! 👍

This behavior better falls in line with what is expected.

@denolfe denolfe merged commit c624661 into beta Sep 6, 2024
61 checks passed
@denolfe denolfe deleted the fix/cpa-detect-pkg-manager-from-env branch September 6, 2024 12:57
Copy link
Contributor

github-actions bot commented Sep 6, 2024

🚀 This is included in version v3.0.0-beta.100

r1tsuu added a commit that referenced this pull request Sep 10, 2024
…8088)

## Description

Port of #8087 to 2.0

- [x] I have read and understand the
[CONTRIBUTING.md](https://github.com/payloadcms/payload/blob/main/CONTRIBUTING.md)
document in this repository.

## Type of change

<!-- Please delete options that are not relevant. -->
- [x] Bug fix (non-breaking change which fixes an issue)

## Checklist:

- [x] Existing test suite passes locally with my changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants