From b07920318c96ec423aa30431cfef99764006b294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Nison?= Date: Tue, 27 Feb 2024 09:36:39 +0100 Subject: [PATCH 1/3] Adds a note explicitating how to add new package managers --- CONTRIBUTING.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0c414f90a..f73fdc167 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,6 +11,14 @@ The `dist/` directory now contains the corepack build and the shims. Call `node ./dist/corepack --help` and behold. You can also run the tests with `yarn test`. +# Adding a new package manager + +New package managers can be added by editing the [config.json](/config.json) file. + +Once added, the shims pertaining to new package managers won't be automatically enabled by `corepack enable` when called without arguments - it'll require users to explicitly install the relevant shims (e.g. `corepack enable mypm`). A separate PR adding the package manager to the default list can be opened a couple of months after the new package manager was introduced. + +Finally, for the package manager to be distributed by default with Node.js, a separate PR will have to be made against the [nodejs/node](https://github.com/nodejs/node) repository asking for standard inclusion, following the process outlined in [GOVERNANCE.md](https://github.com/nodejs/node/blob/main/GOVERNANCE.md). + ## Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: From 9213bdeed5d14dd4fefbd6700ef41c27ecaa4487 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Nison?= Date: Tue, 27 Feb 2024 10:21:20 +0100 Subject: [PATCH 2/3] Update CONTRIBUTING.md Co-authored-by: Antoine du Hamel --- CONTRIBUTING.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f73fdc167..5e03ef3b0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,9 +15,17 @@ You can also run the tests with `yarn test`. New package managers can be added by editing the [config.json](/config.json) file. -Once added, the shims pertaining to new package managers won't be automatically enabled by `corepack enable` when called without arguments - it'll require users to explicitly install the relevant shims (e.g. `corepack enable mypm`). A separate PR adding the package manager to the default list can be opened a couple of months after the new package manager was introduced. - -Finally, for the package manager to be distributed by default with Node.js, a separate PR will have to be made against the [nodejs/node](https://github.com/nodejs/node) repository asking for standard inclusion, following the process outlined in [GOVERNANCE.md](https://github.com/nodejs/node/blob/main/GOVERNANCE.md). +Once added, the shims pertaining to new package managers won't be automatically +enabled by `corepack enable` when called without arguments - it'll require users +to explicitly install the relevant shims (e.g. `corepack enable mypm`). A +separate PR adding the package manager to the default list can be opened a +couple of months after the new package manager was introduced. + +Finally, this repository does not manage which package managers are distributed +with default install of Node.js. This is managed in the +[nodejs/node](https://github.com/nodejs/node) repository, refer to the +[CONTRIBUTING.md](https://github.com/nodejs/node/blob/main/CONTRIBUTING.md) over +there for more information. ## Developer's Certificate of Origin 1.1 From 8b8f877f7a8143c4076ac9f1c2e739e200b65a13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Nison?= Date: Tue, 27 Feb 2024 10:33:35 +0100 Subject: [PATCH 3/3] Update CONTRIBUTING.md Co-authored-by: Antoine du Hamel --- CONTRIBUTING.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5e03ef3b0..67f852eeb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -13,7 +13,17 @@ You can also run the tests with `yarn test`. # Adding a new package manager -New package managers can be added by editing the [config.json](/config.json) file. +New package managers can be added by editing the following files: + +- [`config.json`](./config.json), +- [`.github/workflows/sync.yml`](./.github/workflows/sync.yml) that keeps pinned + versions up-to-date, +- [`package.json`](./package.json) to add to add the added shims to the list of + `"publishConfig/bin"` and `"executableFiles"`, +- [`sources/types.ts`](./sources/types.ts) to add the package manager to the + `SupportedPackageManagers` enum, +- [`tests/main.test.ts`](./tests/main.test.ts) tests to ensure the added package + manager works as expected. Once added, the shims pertaining to new package managers won't be automatically enabled by `corepack enable` when called without arguments - it'll require users