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 packageManager field in package.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.packageManager
When a devEngines.packageManager field is defined, and is an object containing
a "name" field (can also optionally contain version and onFail fields),
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
packageManager docs with devEngines.packageManager docs (without the extra subsection)
- and then either:
- drop the
packageManager docs
- deprioritize the
packageManager docs by moving them to the end and describing it as "Legacy" or similar
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
packageManagerfield ofpackage.json:Further down in the readme, there is a subsection
devEngines.packageManager, which shifts to describing thedevEngines.packageManagerfield:devEngines.packageManagerhas some level of support in:My suggestion is regarding that first starting section of the readme on the top-level
packageManagerfield:packageManagerdocs withdevEngines.packageManagerdocs (without the extra subsection)packageManagerdocspackageManagerdocs by moving them to the end and describing it as "Legacy" or similar