22
33Corepack is a zero-runtime-dependency Node.js script that acts as a bridge
44between Node.js projects and the package managers they are intended to be used
5- with during development. In practical terms, ** Corepack lets you use Yarn, npm,
6- and pnpm without having to install them** .
5+ with during development. In practical terms, ** Corepack lets you use Yarn and pnpm
6+ without having to install them** .
77
88## How to Install
99
@@ -50,8 +50,8 @@ See [`CONTRIBUTING.md`](./CONTRIBUTING.md).
5050### When Building Packages
5151
5252Just use your package managers as you usually would. Run ` yarn install ` in Yarn
53- projects, ` pnpm install ` in pnpm projects, and ` npm ` in npm projects. Corepack
54- will catch these calls, and depending on the situation:
53+ projects and ` pnpm install ` in pnpm projects. Corepack will catch these calls,
54+ and depending on the situation:
5555
5656- ** If the local project is configured for the package manager you're using** ,
5757 Corepack will silently download and cache the latest compatible version.
@@ -79,7 +79,7 @@ Here, `yarn` is the name of the package manager, specified at version `3.2.3`,
7979along with the SHA-224 hash of this version for validation.
8080` [email protected] ` is required. The hash is optional but strongly
8181recommended as a security practice. Permitted values for the package manager are
82- ` yarn ` , ` npm ` , and ` pnpm ` .
82+ ` yarn ` and ` pnpm ` .
8383
8484You can also provide a URL to a ` .js ` file (which will be interpreted as a
8585CommonJS module) or a ` .tgz ` file (which will be interpreted as a package, and
@@ -148,9 +148,7 @@ Clears the local `COREPACK_HOME` cache directory.
148148
149149This command will detect where Corepack is installed and will create shims next
150150to it for each of the specified package managers (or all of them if the command
151- is called without parameters). Note that the npm shims will not be installed
152- unless explicitly requested, as npm is currently distributed with Node.js
153- through other means.
151+ is called without parameters).
154152
155153If the file system where the ` corepack ` binary is located is read-only, this
156154command will fail. A workaround is to add the binaries as alias in your
@@ -161,8 +159,6 @@ alias yarn="corepack yarn"
161159alias yarnpkg=" corepack yarnpkg"
162160alias pnpm=" corepack pnpm"
163161alias pnpx=" corepack pnpx"
164- alias npm=" corepack npm"
165- alias npx=" corepack npx"
166162```
167163
168164On Windows PowerShell, you can add functions using the ` $PROFILE ` automatic
@@ -173,8 +169,6 @@ echo "function yarn { corepack yarn `$args }" >> $PROFILE
173169echo "function yarnpkg { corepack yarnpkg `$args }" >> $PROFILE
174170echo "function pnpm { corepack pnpm `$args }" >> $PROFILE
175171echo "function pnpx { corepack pnpx `$args }" >> $PROFILE
176- echo "function npm { corepack npm `$args }" >> $PROFILE
177- echo "function npx { corepack npx `$args }" >> $PROFILE
178172```
179173
180174### ` corepack disable [... name] `
@@ -250,7 +244,7 @@ same major line. Should you need to upgrade to a new major, use an explicit
250244 ask for user input before starting the download.
251245
252246- ` COREPACK_ENABLE_UNSAFE_CUSTOM_URLS ` can be set to ` 1 ` to allow use of
253- custom URLs to load a package manager known by Corepack (` yarn ` , ` npm ` , and
247+ custom URLs to load a package manager known by Corepack (` yarn ` and
254248 ` pnpm ` ).
255249
256250- ` COREPACK_ENABLE_NETWORK ` can be set to ` 0 ` to prevent Corepack from accessing
0 commit comments