deps: update corepack to 0.32.0 · nodejs/node@b402799
@@ -41,6 +41,25 @@ is distributed along with Node.js itself.
41414242</details>
434344+<details><summary>Update Corepack using npm</summary>
45+46+To install the latest version of Corepack, use:
47+48+```shell
49+npm install -g corepack@latest
50+```
51+52+If Corepack was installed on your system using a Node.js Windows Installer
53+`.msi` package then you might need to remove it before attempting to install a
54+different version of Corepack using npm. You can select the Modify option of the
55+Node.js app settings to access the Windows Installer feature selection, and on
56+the "corepack manager" feature of the Node.js `.msi` package by selecting
57+"Entire feature will be unavailable". See
58+[Repair apps and programs in Windows](https://support.microsoft.com/en-us/windows/repair-apps-and-programs-in-windows-e90eefe4-d0a2-7c1b-dd59-949a9030f317)
59+for instructions on accessing the Windows apps page to modify settings.
60+61+</details>
62+4463<details><summary>Install Corepack from source</summary>
45644665See [`CONTRIBUTING.md`](./CONTRIBUTING.md).
@@ -94,6 +113,35 @@ use in the archive).
94113}
95114```
96115116+#### `devEngines.packageManager`
117+118+When a `devEngines.packageManager` field is defined, and is an object containing
119+a `"name"` field (can also optionally contain `version` and `onFail` fields),
120+Corepack will use it to validate you're using a compatible package manager.
121+122+Depending on the value of `devEngines.packageManager.onFail`:
123+124+- if set to `ignore`, Corepack won't print any warning or error.
125+- if unset or set to `error`, Corepack will throw an error in case of a mismatch.
126+- if set to `warn` or some other value, Corepack will print a warning in case
127+ of mismatch.
128+129+If the top-level `packageManager` field is missing, Corepack will use the
130+package manager defined in `devEngines.packageManager` – in which case you must
131+provide a specific version in `devEngines.packageManager.version`, ideally with
132+a hash, as explained in the previous section:
133+134+```json
135+{
136+"devEngines":{
137+"packageManager": {
138+"name": "yarn",
139+"version": "3.2.3+sha224.953c8233f7a92884eee2de69a1b92d1f2ec1655e66d08071ba9a02fa"
140+ }
141+ }
142+}
143+```
144+97145## Known Good Releases
9814699147When running Corepack within projects that don't list a supported package
227275228276Unlike `corepack use` this command doesn't take a package manager name nor a
229277version range, as it will always select the latest available version from the
278+range specified in `devEngines.packageManager.version`, or fallback to the
230279same major line. Should you need to upgrade to a new major, use an explicit
231280`corepack use {name}@latest` call (or simply `corepack use {name}`).
232281@@ -248,6 +297,7 @@ same major line. Should you need to upgrade to a new major, use an explicit
248297 set to `1` to have the URL shown. By default, when Corepack is called
249298 explicitly (e.g. `corepack pnpm …`), it is set to `0`; when Corepack is called
250299 implicitly (e.g. `pnpm …`), it is set to `1`.
300+ The default value cannot be overridden in a `.corepack.env` file.
251301 When standard input is a TTY and no CI environment is detected, Corepack will
252302 ask for user input before starting the download.
253303@@ -273,6 +323,14 @@ same major line. Should you need to upgrade to a new major, use an explicit
273323 project. This means that it will always use the system-wide package manager
274324 regardless of what is being specified in the project's `packageManager` field.
275325326+- `COREPACK_ENV_FILE` can be set to `0` to request Corepack to not attempt to
327+ load `.corepack.env`; it can be set to a path to specify a different env file.
328+ Only keys that start with `COREPACK_` and are not in the exception list
329+ (`COREPACK_ENABLE_DOWNLOAD_PROMPT` and `COREPACK_ENV_FILE` are ignored)
330+ will be taken into account.
331+ For Node.js 18.x users, this setting has no effect as that version doesn't
332+ support parsing of `.env` files.
333+276334- `COREPACK_HOME` can be set in order to define where Corepack should install
277335 the package managers. By default it is set to `%LOCALAPPDATA%\node\corepack`
278336 on Windows, and to `$HOME/.cache/node/corepack` everywhere else.
@@ -294,7 +352,7 @@ same major line. Should you need to upgrade to a new major, use an explicit
294352 empty password, explicitly set `COREPACK_NPM_PASSWORD` to an empty string.
295353296354- `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` are supported through
297-[`node-proxy-agent`](https://github.com/TooTallNate/node-proxy-agent).
355+[`proxy-from-env`](https://github.com/Rob--W/proxy-from-env).
298356299357- `COREPACK_INTEGRITY_KEYS` can be set to an empty string or `0` to
300358 instruct Corepack to skip integrity checks, or to a JSON string containing