@@ -11,6 +11,32 @@ The `dist/` directory now contains the corepack build and the shims.
1111Call ` node ./dist/corepack --help ` and behold.
1212You can also run the tests with ` yarn test ` .
1313
14+ # Adding a new package manager
15+
16+ New package managers can be added by editing the following files:
17+
18+ - [ ` config.json ` ] ( ./config.json ) ,
19+ - [ ` .github/workflows/sync.yml ` ] ( ./.github/workflows/sync.yml ) that keeps pinned
20+ versions up-to-date,
21+ - [ ` package.json ` ] ( ./package.json ) to add to add the added shims to the list of
22+ ` "publishConfig/bin" ` and ` "executableFiles" ` ,
23+ - [ ` sources/types.ts ` ] ( ./sources/types.ts ) to add the package manager to the
24+ ` SupportedPackageManagers ` enum,
25+ - [ ` tests/main.test.ts ` ] ( ./tests/main.test.ts ) tests to ensure the added package
26+ manager works as expected.
27+
28+ Once added, the shims pertaining to new package managers won't be automatically
29+ enabled by ` corepack enable ` when called without arguments - it'll require users
30+ to explicitly install the relevant shims (e.g. ` corepack enable mypm ` ). A
31+ separate PR adding the package manager to the default list can be opened a
32+ couple of months after the new package manager was introduced.
33+
34+ Finally, this repository does not manage which package managers are distributed
35+ with default install of Node.js. This is managed in the
36+ [ nodejs/node] ( https://github.com/nodejs/node ) repository, refer to the
37+ [ CONTRIBUTING.md] ( https://github.com/nodejs/node/blob/main/CONTRIBUTING.md ) over
38+ there for more information.
39+
1440## Developer's Certificate of Origin 1.1
1541
1642By making a contribution to this project, I certify that:
0 commit comments