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

Add explicit packageManager field to package.json #365

Closed
wants to merge 1 commit into from

Conversation

aryaemami59
Copy link
Contributor

This PR:

  • Adds explicit packageManager field to package.json.

@ai
Copy link
Owner

ai commented Jun 6, 2024

I have 50+ open source projects, it will be very hard for me keep up to date to version of pnpm in package.json manually in every project.

Do you have any reason why this key is important to spend more time on maintenance?

@aryaemami59
Copy link
Contributor Author

Mostly because corepack needs it, but there are some other reasons:

  • Allow contributors to have the same version of pnpm.
  • The pnpm/action-setup reads the packageManager field so basically all we're doing is moving the version specification from the test.yml file to package.json.
  • If you don't have it, corepack adds it automatically so there can be a version mismatch.
  • Bumping the version is as simple as running corepack use pnpm@*, which is easier to do and can be automated, as opposed to manually editing the test.yml file.

I understand if you're not on board with this, and if not, just say so and I'll go ahead and close the PR, but if you're okay with it, I can help put up PRs for the rest of your libraries (yes all 50+).

@ai
Copy link
Owner

ai commented Jun 6, 2024

I really afraid of locking the exact version of pnpm.

What if there is old project with 9.1.1 and new developer come with 9.2? Will it require too many versions of pnpm on developers machine in corepack?

@aryaemami59
Copy link
Contributor Author

In that case, they will already have version 9.1.1 on their machine, since corepack caches the old versions on the global registry, and will not remove them unless they call corepack cache clear manually.

@ai
Copy link
Owner

ai commented Jun 27, 2024

I decided to not use it right now. It is better to use the latest pnpm.

@ai ai closed this Jun 27, 2024
@aryaemami59 aryaemami59 deleted the add-packageManager-field branch June 27, 2024 22:02
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.

2 participants