Switch to devEngines.packageManager in "When Authoring Packages"
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.8k
- Forks
- 279
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 2
Description
Hi, thanks for Corepack! It's been a useful tool to maintain environments across student machines.
In the When Authoring Packages section of the readme, the instructions start with suggesting using a top-level packageManager field of package.json:
Set your package's manager with the
packageManagerfield inpackage.json:{ "packageManager": "yarn@3.2.3+sha224.953c8233f7a92884eee2de69a1b92d1f2ec1655e66d08071ba9a02fa" }
Further down in the readme, there is a subsection devEngines.packageManager, which shifts to describing the devEngines.packageManager field:
devEngines.packageManagerWhen a
devEngines.packageManagerfield is defined, and is an object containing
a"name"field (can also optionally containversionandonFailfields),
Corepack will use it to validate you're using a compatible package manager.
devEngines.packageManager has some level of support in:
- npm v10+ https://docs.npmjs.com/cli/v10/configuring-npm/package-json#devengines
- Yarn via Corepack
- pnpm https://pnpm.io/package_json#devenginespackagemanager
My suggestion is regarding that first starting section of the readme on the top-level packageManager field:
- replace the
packageManagerdocs withdevEngines.packageManagerdocs (without the extra subsection) - and then either:
- drop the
packageManagerdocs - deprioritize the
packageManagerdocs by moving them to the end and describing it as "Legacy" or similar
- drop the
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the README's "When Authoring Packages" section and compare its top-level packageManager guidance with the later devEngines.packageManager subsection. Review the linked npm, Yarn, pnpm, and package-metadata documentation, then align the README's structure and examples with the chosen recommendation and verify all links and JSON snippets.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100