Skip to content

Commit 5aec3af

Browse files
nodejs-github-botrichardlau
authored andcommitted
deps: update corepack to 0.25.2
PR-URL: #51810 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
1 parent a593985 commit 5aec3af

File tree

11 files changed

+14207
-33296
lines changed

11 files changed

+14207
-33296
lines changed

deps/corepack/CHANGELOG.md

+51
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,56 @@
11
# Changelog
22

3+
## [0.25.2](https://github.com/nodejs/corepack/compare/v0.25.1...v0.25.2) (2024-02-21)
4+
5+
6+
### Features
7+
8+
* update package manager versions ([#362](https://github.com/nodejs/corepack/issues/362)) ([1423312](https://github.com/nodejs/corepack/commit/1423312a0eb7844dcdd43ae8a63cf12dcacedb2b))
9+
10+
11+
### Bug Fixes
12+
13+
* do not hard fail if Corepack home folder cannot be created ([#382](https://github.com/nodejs/corepack/issues/382)) ([9834f57](https://github.com/nodejs/corepack/commit/9834f5790a99ce2c6c283321bb38b02e5561b7ca))
14+
* do not show download prompt when downloading JSON ([#383](https://github.com/nodejs/corepack/issues/383)) ([bc137a0](https://github.com/nodejs/corepack/commit/bc137a0073c3343ce2d552b6e13bfd2a48f08351))
15+
16+
## [0.25.1](https://github.com/nodejs/corepack/compare/v0.25.0...v0.25.1) (2024-02-20)
17+
18+
19+
### Bug Fixes
20+
21+
* use valid semver range for `engines.node` ([#378](https://github.com/nodejs/corepack/issues/378)) ([f2185fe](https://github.com/nodejs/corepack/commit/f2185fefa145cc75fca082acc169f8aaef637ca2))
22+
23+
## [0.25.0](https://github.com/nodejs/corepack/compare/v0.24.1...v0.25.0) (2024-02-20)
24+
25+
26+
### ⚠ BREAKING CHANGES
27+
28+
* remove `--all` flag ([#351](https://github.com/nodejs/corepack/issues/351))
29+
* remove Node.js 19.x from the range of supported versions ([#375](https://github.com/nodejs/corepack/issues/375))
30+
* use `fetch` ([#365](https://github.com/nodejs/corepack/issues/365))
31+
* remove old install folder migration ([#373](https://github.com/nodejs/corepack/issues/373))
32+
* prompt user before downloading software ([#360](https://github.com/nodejs/corepack/issues/360))
33+
34+
### Features
35+
36+
* add `corepack cache` command ([#363](https://github.com/nodejs/corepack/issues/363)) ([f442366](https://github.com/nodejs/corepack/commit/f442366c1c00d0c3f388b757c3797504f9a6b62e))
37+
* add support for URL in `"packageManager"` ([#359](https://github.com/nodejs/corepack/issues/359)) ([4a8ce6d](https://github.com/nodejs/corepack/commit/4a8ce6d42f081047a341f36067696346c9f3e1ea))
38+
* bump Known Good Release when downloading new version ([#364](https://github.com/nodejs/corepack/issues/364)) ([a56c13b](https://github.com/nodejs/corepack/commit/a56c13bd0b1c11e50361b8b4b6f8a53571e3981a))
39+
* prompt user before downloading software ([#360](https://github.com/nodejs/corepack/issues/360)) ([6b8d87f](https://github.com/nodejs/corepack/commit/6b8d87f2374f79855b24d659f2a2579d6b39f54f))
40+
* remove `--all` flag ([#351](https://github.com/nodejs/corepack/issues/351)) ([d9c70b9](https://github.com/nodejs/corepack/commit/d9c70b91f698787d693406626a73dc95cb18bc1d))
41+
* remove old install folder migration ([#373](https://github.com/nodejs/corepack/issues/373)) ([54e9510](https://github.com/nodejs/corepack/commit/54e9510cdaf6ed08c9dea1ed3999fa65116cb4c7))
42+
* use `fetch` ([#365](https://github.com/nodejs/corepack/issues/365)) ([fe6a307](https://github.com/nodejs/corepack/commit/fe6a3072f64efa810b90e4ee52e0b3ff14c63184))
43+
44+
45+
### Bug Fixes
46+
47+
* remove unsafe remove of install folder ([#372](https://github.com/nodejs/corepack/issues/372)) ([65880ca](https://github.com/nodejs/corepack/commit/65880cafed5f4195f8e7656ca9af4cbcbb7682d3))
48+
49+
50+
### Miscellaneous Chores
51+
52+
* remove Node.js 19.x from the range of supported versions ([#375](https://github.com/nodejs/corepack/issues/375)) ([9a1cb38](https://github.com/nodejs/corepack/commit/9a1cb385bba9ade8e9fbf5517c2bdff60295f9ed))
53+
354
## [0.24.1](https://github.com/nodejs/corepack/compare/v0.24.0...v0.24.1) (2024-01-13)
455

556

deps/corepack/README.md

+38-14
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,29 @@ along with the SHA-224 hash of this version for validation.
8181
recommended as a security practice. Permitted values for the package manager are
8282
`yarn`, `npm`, and `pnpm`.
8383

84+
You can also provide a URL to a `.js` file (which will be interpreted as a
85+
CommonJS module) or a `.tgz` file (which will be interpreted as a package, and
86+
the `"bin"` field of the `package.json` will be used to determine which file to
87+
use in the archive).
88+
89+
```json
90+
{
91+
"packageManager": "yarn@https://registry.npmjs.org/@yarnpkg/cli-dist/-/cli-dist-3.2.3.tgz#sha224.16a0797d1710d1fb7ec40ab5c3801b68370a612a9b66ba117ad9924b"
92+
}
93+
```
94+
8495
## Known Good Releases
8596

8697
When running Corepack within projects that don't list a supported package
87-
manager, it will default to a set of Known Good Releases. In a way, you can
88-
compare this to Node.js, where each version ships with a specific version of
89-
npm.
98+
manager, it will default to a set of Known Good Releases.
9099

91100
If there is no Known Good Release for the requested package manager, Corepack
92101
looks up the npm registry for the latest available version and cache it for
93102
future use.
94103

95104
The Known Good Releases can be updated system-wide using `corepack install -g`.
105+
When Corepack downloads a new version of a given package manager on the same
106+
major line as the Known Good Release, it auto-updates it by default.
96107

97108
## Offline Workflow
98109

@@ -102,9 +113,6 @@ The utility commands detailed in the next section.
102113
case you'll simply run `corepack pack` to make sure that your image
103114
includes the Last Known Good release for the specified package manager.
104115

105-
- If you want to have _all_ Last Known Good releases for all package managers,
106-
just use the `--all` flag which will do just that.
107-
108116
- Or you're publishing your project to a system where the network is
109117
unavailable, in which case you'll preemptively generate a package manager
110118
archive from your local computer (using `corepack pack -o`) before storing
@@ -124,6 +132,14 @@ Note that those commands still check whether the local project is configured for
124132
the given package manager (ie you won't be able to run `corepack yarn install`
125133
on a project where the `packageManager` field references `pnpm`).
126134

135+
### `corepack cache clean`
136+
137+
Clears the local `COREPACK_HOME` cache directory.
138+
139+
### `corepack cache clear`
140+
141+
Clears the local `COREPACK_HOME` cache directory.
142+
127143
### `corepack enable [... name]`
128144

129145
| Option | Description |
@@ -177,23 +193,18 @@ This command doesn't change the global version used when running the package
177193
manager from outside the project (use the \`-g,--global\` flag if you wish
178194
to do this).
179195

180-
### `corepack install <-g,--global> [--all] [... name[@<version>]]`
181-
182-
| Option | Description |
183-
| --------------------- | ------------------------------------------ |
184-
| `--all` | Install all Last Known Good releases |
196+
### `corepack install <-g,--global> [... name[@<version>]]`
185197

186198
Install the selected package managers and install them on the system.
187199

188200
Package managers thus installed will be configured as the new default when
189201
calling their respective binaries outside of projects defining the
190202
`packageManager` field.
191203

192-
### `corepack pack [--all] [... name[@<version>]]`
204+
### `corepack pack [... name[@<version>]]`
193205

194206
| Option | Description |
195207
| --------------------- | ------------------------------------------ |
196-
| `--all` | Pack all Last Known Good releases |
197208
| `--json ` | Print the output folder rather than logs |
198209
| `-o,--output ` | Path where to generate the archive |
199210

@@ -221,7 +232,20 @@ same major line. Should you need to upgrade to a new major, use an explicit
221232

222233
- `COREPACK_DEFAULT_TO_LATEST` can be set to `0` in order to instruct Corepack
223234
not to lookup on the remote registry for the latest version of the selected
224-
package manager.
235+
package manager, and to not update the Last Known Good version when it
236+
downloads a new version of the same major line.
237+
238+
- `COREPACK_ENABLE_DOWNLOAD_PROMPT` can be set to `0` to
239+
prevent Corepack showing the URL when it needs to download software, or can be
240+
set to `1` to have the URL shown. By default, when Corepack is called
241+
explicitly (e.g. `corepack pnpm …`), it is set to `0`; when Corepack is called
242+
implicitely (e.g. `pnpm …`), it is set to `1`.
243+
When standard input is a TTY and no CI environment is detected, Corepack will
244+
ask for user input before starting the download.
245+
246+
- `COREPACK_ENABLE_UNSAFE_CUSTOM_URLS` can be set to `1` to allow use of
247+
custom URLs to load a package manager known by Corepack (`yarn`, `npm`, and
248+
`pnpm`).
225249

226250
- `COREPACK_ENABLE_NETWORK` can be set to `0` to prevent Corepack from accessing
227251
the network (in which case you'll be responsible for hydrating the package

deps/corepack/dist/corepack.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
#!/usr/bin/env node
2+
process.env.COREPACK_ENABLE_DOWNLOAD_PROMPT??='0';
23
require('./lib/corepack.cjs').runMain(process.argv.slice(2));

0 commit comments

Comments
 (0)