Skip to content

Commit 114633a

Browse files
nodejs-github-botrichardlau
authored andcommitted
deps: update corepack to 0.17.1
PR-URL: #47156 Backport-PR-URL: #47337 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
1 parent 18e796f commit 114633a

File tree

4 files changed

+115
-51
lines changed

4 files changed

+115
-51
lines changed

deps/corepack/CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## [0.17.1](https://github.com/nodejs/corepack/compare/v0.17.0...v0.17.1) (2023-03-17)
4+
5+
6+
### Features
7+
8+
* update package manager versions ([#245](https://github.com/nodejs/corepack/issues/245)) ([673f3b7](https://github.com/nodejs/corepack/commit/673f3b7f18421a49da1e2c55656666a74ce94474))
9+
310
## [0.17.0](https://github.com/nodejs/corepack/compare/v0.16.0...v0.17.0) (2023-02-24)
411

512

deps/corepack/README.md

+103-46
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,30 @@
11
# <img src="./icon.svg" height="25" /> corepack
22

3-
Corepack is a zero-runtime-dependency Node.js script that acts as a bridge between Node.js projects and the package managers they are intended to be used with during development. In practical terms, **Corepack will let you use Yarn and pnpm without having to install them** - just like what currently happens with npm, which is shipped by Node.js by default.
3+
Corepack is a zero-runtime-dependency Node.js script that acts as a bridge
4+
between Node.js projects and the package managers they are intended to be used
5+
with during development. In practical terms, **Corepack will let you use Yarn
6+
and pnpm without having to install them** - just like what currently happens
7+
with npm, which is shipped by Node.js by default.
48

5-
**Important:** At the moment, Corepack only covers Yarn and pnpm. Given that we have little control on the npm project, we prefer to focus on the Yarn and pnpm use cases. As a result, Corepack doesn't have any effect at all on the way you use npm.
9+
**Important:** At the moment, Corepack only covers Yarn and pnpm. Given that we
10+
have little control on the npm project, we prefer to focus on the Yarn and pnpm
11+
use cases. As a result, Corepack doesn't have any effect at all on the way you
12+
use npm.
613

714
## How to Install
815

916
### Default Installs
1017

11-
Corepack is distributed by default with Node.js 14.19.0 and 16.9.0, but is opt-in for the time being. Run `corepack enable` to install the required shims.
18+
Corepack is distributed by default with Node.js 14.19.0 and 16.9.0, but is
19+
opt-in for the time being. Run `corepack enable` to install the required shims.
1220

1321
### Manual Installs
1422

1523
<details>
1624
<summary>Click here to see how to install Corepack using npm</summary>
1725

18-
First uninstall your global Yarn and pnpm binaries (just leave npm). In general, you'd do this by running the following command:
26+
First uninstall your global Yarn and pnpm binaries (just leave npm). In general,
27+
you'd do this by running the following command:
1928

2029
```shell
2130
npm uninstall -g yarn pnpm
@@ -30,21 +39,31 @@ Then install Corepack:
3039
npm install -g corepack
3140
```
3241

33-
We do acknowledge the irony and overhead of using npm to install Corepack, which is at least part of why the preferred option is to use the Corepack version that is distributed along with Node.js itself.
42+
We do acknowledge the irony and overhead of using npm to install Corepack, which
43+
is at least part of why the preferred option is to use the Corepack version that
44+
is distributed along with Node.js itself.
3445

3546
</details>
3647

3748
## Usage
3849

3950
### When Building Packages
4051

41-
Just use your package managers as you usually would. Run `yarn install` in Yarn projects, `pnpm install` in pnpm projects, and `npm` in npm projects. Corepack will catch these calls, and depending on the situation:
52+
Just 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:
4255

43-
- **If the local project is configured for the package manager you're using**, Corepack will silently download and cache the latest compatible version.
56+
- **If the local project is configured for the package manager you're using**,
57+
Corepack will silently download and cache the latest compatible version.
4458

45-
- **If the local project is configured for a different package manager**, Corepack will request you to run the command again using the right package manager - thus avoiding corruptions of your install artifacts.
59+
- **If the local project is configured for a different package manager**,
60+
Corepack will request you to run the command again using the right package
61+
manager - thus avoiding corruptions of your install artifacts.
4662

47-
- **If the local project isn't configured for any package manager**, Corepack will assume that you know what you're doing, and will use whatever package manager version has been pinned as "known good release". Check the relevant section for more details.
63+
- **If the local project isn't configured for any package manager**, Corepack
64+
will assume that you know what you're doing, and will use whatever package
65+
manager version has been pinned as "known good release". Check the relevant
66+
section for more details.
4867

4968
### When Authoring Packages
5069

@@ -56,13 +75,18 @@ Set your package's manager with the `packageManager` field in `package.json`:
5675
}
5776
```
5877

59-
Here, `yarn` is the name of the package manager, specified at version `3.2.3`, along with the SHA-224 hash of this version for validation. `packageManager@x.y.z` is required. The hash is optional but strongly recommended as a security practice. Permitted values for the package manager are `yarn`, `npm`, and `pnpm`.
78+
Here, `yarn` is the name of the package manager, specified at version `3.2.3`,
79+
along with the SHA-224 hash of this version for validation.
80+
`packageManager@x.y.z` is required. The hash is optional but strongly
81+
recommended as a security practice. Permitted values for the package manager are
82+
`yarn`, `npm`, and `pnpm`.
6083

6184
## Known Good Releases
6285

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

6791
If there is no Known Good Release for the requested package manager, Corepack
6892
looks up the npm registry for the latest available version and cache it for
@@ -75,53 +99,76 @@ from the `corepack prepare` and `corepack hydrate` commands.
7599

76100
The utility commands detailed in the next section.
77101

78-
- Either you can use the network while building your container image, in which case you'll simply run `corepack prepare` to make sure that your image includes the Last Known Good release for the specified package manager.
102+
- Either you can use the network while building your container image, in which
103+
case you'll simply run `corepack prepare` to make sure that your image
104+
includes the Last Known Good release for the specified package manager.
79105

80-
- If you want to have *all* Last Known Good releases for all package managers, just use the `--all` flag which will do just that.
106+
- If you want to have _all_ Last Known Good releases for all package managers,
107+
just use the `--all` flag which will do just that.
81108

82-
- Or you're publishing your project to a system where the network is unavailable, in which case you'll preemptively generate a package manager archive from your local computer (using `corepack prepare -o`) before storing it somewhere your container will be able to access (for example within your repository). After that it'll just be a matter of running `corepack hydrate <path/to/corepack.tgz>` to setup the cache.
109+
- Or you're publishing your project to a system where the network is
110+
unavailable, in which case you'll preemptively generate a package manager
111+
archive from your local computer (using `corepack prepare -o`) before storing
112+
it somewhere your container will be able to access (for example within your
113+
repository). After that it'll just be a matter of running
114+
`corepack hydrate <path/to/corepack.tgz>` to setup the cache.
83115

84116
## Utility Commands
85117

86118
### `corepack <binary name>[@<version>] [... args]`
87119

88-
This meta-command runs the specified package manager in the local folder. You can use it to force an install to run with a given version, which can be useful when looking for regressions.
120+
This meta-command runs the specified package manager in the local folder. You
121+
can use it to force an install to run with a given version, which can be useful
122+
when looking for regressions.
89123

90-
Note that those commands still check whether the local project is configured for the given package manager (ie you won't be able to run `corepack yarn install` on a project where the `packageManager` field references `pnpm`).
124+
Note that those commands still check whether the local project is configured for
125+
the given package manager (ie you won't be able to run `corepack yarn install`
126+
on a project where the `packageManager` field references `pnpm`).
91127

92128
### `corepack enable [... name]`
93129

94-
| Option | Description |
95-
| --- | --- |
130+
| Option | Description |
131+
| --------------------- | --------------------------------------- |
96132
| `--install-directory` | Add the shims to the specified location |
97133

98-
This command will detect where Node.js is installed and will create shims next to it for each of the specified package managers (or all of them if the command is called without parameters). Note that the npm shims will not be installed unless explicitly requested, as npm is currently distributed with Node.js through other means.
134+
This command will detect where Node.js is installed and will create shims next
135+
to it for each of the specified package managers (or all of them if the command
136+
is called without parameters). Note that the npm shims will not be installed
137+
unless explicitly requested, as npm is currently distributed with Node.js
138+
through other means.
99139

100140
### `corepack disable [... name]`
101141

102-
| Option | Description |
103-
| --- | --- |
142+
| Option | Description |
143+
| --------------------- | ------------------------------------------ |
104144
| `--install-directory` | Remove the shims to the specified location |
105145

106-
This command will detect where Node.js is installed and will remove the shims from there.
146+
This command will detect where Node.js is installed and will remove the shims
147+
from there.
107148

108149
### `corepack prepare [... name@version]`
109150

110-
| Option | Description |
111-
| --- | --- |
112-
| `--all` | Prepare the "Last Known Good" version of all supported package managers |
113-
| `-o,--output` | Also generate an archive containing the package managers |
114-
| `--activate` | Also update the "Last Known Good" release |
151+
| Option | Description |
152+
| ------------- | ----------------------------------------------------------------------- |
153+
| `--all` | Prepare the "Last Known Good" version of all supported package managers |
154+
| `-o,--output` | Also generate an archive containing the package managers |
155+
| `--activate` | Also update the "Last Known Good" release |
115156

116-
This command will download the given package managers (or the one configured for the local project if no argument is passed in parameter) and store it within the Corepack cache. If the `-o,--output` flag is set (optionally with a path as parameter), an archive will also be generated that can be used by the `corepack hydrate` command.
157+
This command will download the given package managers (or the one configured for
158+
the local project if no argument is passed in parameter) and store it within the
159+
Corepack cache. If the `-o,--output` flag is set (optionally with a path as
160+
parameter), an archive will also be generated that can be used by the
161+
`corepack hydrate` command.
117162

118163
### `corepack hydrate <path/to/corepack.tgz>`
119164

120-
| Option | Description |
121-
| --- | --- |
165+
| Option | Description |
166+
| ------------ | ----------------------------------------- |
122167
| `--activate` | Also update the "Last Known Good" release |
123168

124-
This command will retrieve the given package manager from the specified archive and will install it within the Corepack cache, ready to be used without further network interaction.
169+
This command will retrieve the given package manager from the specified archive
170+
and will install it within the Corepack cache, ready to be used without further
171+
network interaction.
125172

126173
## Environment Variables
127174

@@ -134,31 +181,41 @@ This command will retrieve the given package manager from the specified archive
134181
manager versions that will be required for the projects you'll run, using
135182
`corepack hydrate`).
136183

137-
- `COREPACK_ENABLE_STRICT` can be set to `0` to prevent Corepack from throwing error
138-
if the package manager does not correspond to the one defined for the current project.
139-
This means that if a user is using the package manager specified in the current project,
140-
it will use the version specified by the project's `packageManager` field.
141-
But if the user is using other package manager different from the one specified
142-
for the current project, it will use the system-wide package manager version.
184+
- `COREPACK_ENABLE_STRICT` can be set to `0` to prevent Corepack from throwing
185+
error if the package manager does not correspond to the one defined for the
186+
current project. This means that if a user is using the package manager
187+
specified in the current project, it will use the version specified by the
188+
project's `packageManager` field. But if the user is using other package
189+
manager different from the one specified for the current project, it will use
190+
the system-wide package manager version.
143191

144-
- `COREPACK_ENABLE_PROJECT_SPEC` can be set to `0` to prevent Corepack from checking
145-
if the package manager corresponds to the one defined for the current project.
146-
This means that it will always use the system-wide package manager regardless of
147-
what is being specified in the project's `packageManager` field.
192+
- `COREPACK_ENABLE_PROJECT_SPEC` can be set to `0` to prevent Corepack from
193+
checking if the package manager corresponds to the one defined for the current
194+
project. This means that it will always use the system-wide package manager
195+
regardless of what is being specified in the project's `packageManager` field.
148196

149197
- `COREPACK_HOME` can be set in order to define where Corepack should install
150198
the package managers. By default it is set to `%LOCALAPPDATA%\node\corepack`
151199
on Windows, and to `$HOME/.cache/node/corepack` everywhere else.
152200

153-
- `COREPACK_ROOT` has no functional impact on Corepack itself; it's automatically being set in your environment by Corepack when it shells out to the underlying package managers, so that they can feature-detect its presence (useful for commands like `yarn init`).
201+
- `COREPACK_ROOT` has no functional impact on Corepack itself; it's
202+
automatically being set in your environment by Corepack when it shells out to
203+
the underlying package managers, so that they can feature-detect its presence
204+
(useful for commands like `yarn init`).
154205

155-
- `COREPACK_NPM_REGISTRY` sets the registry base url used when retrieving package managers from npm. Default value is `https://registry.npmjs.org`
206+
- `COREPACK_NPM_REGISTRY` sets the registry base url used when retrieving
207+
package managers from npm. Default value is `https://registry.npmjs.org`
156208

157-
- `COREPACK_NPM_TOKEN` sets a Bearer token authorization header when connecting to a npm type registry.
209+
- `COREPACK_NPM_TOKEN` sets a Bearer token authorization header when connecting
210+
to a npm type registry.
158211

159-
- `COREPACK_NPM_USERNAME` and `COREPACK_NPM_PASSWORD` to set a Basic authorization header when connecting to a npm type registry. Note that both environment variables are required and as plain text. If you want to send an empty password, explicitly set `COREPACK_NPM_PASSWORD` to an empty string.
212+
- `COREPACK_NPM_USERNAME` and `COREPACK_NPM_PASSWORD` to set a Basic
213+
authorization header when connecting to a npm type registry. Note that both
214+
environment variables are required and as plain text. If you want to send an
215+
empty password, explicitly set `COREPACK_NPM_PASSWORD` to an empty string.
160216

161-
- `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` are supported through [`node-proxy-agent`](https://github.com/TooTallNate/node-proxy-agent).
217+
- `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` are supported through
218+
[`node-proxy-agent`](https://github.com/TooTallNate/node-proxy-agent).
162219

163220
## Contributing
164221

deps/corepack/dist/corepack.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -43737,7 +43737,7 @@ function String2(descriptor, ...args) {
4373743737
}
4373843738

4373943739
// package.json
43740-
var version = "0.17.0";
43740+
var version = "0.17.1";
4374143741

4374243742
// sources/Engine.ts
4374343743
var import_fs3 = __toESM(require("fs"));
@@ -43749,7 +43749,7 @@ var import_semver3 = __toESM(require_semver2());
4374943749
var config_default = {
4375043750
definitions: {
4375143751
npm: {
43752-
default: "9.5.1+sha1.dc74eb85d07d78e24fadc674968a1ea16b18108c",
43752+
default: "9.6.2+sha1.b7858ab694c4335778c6d91e2310a61f2e369dac",
4375343753
fetchLatestFrom: {
4375443754
type: "npm",
4375543755
package: "npm"
@@ -43780,7 +43780,7 @@ var config_default = {
4378043780
}
4378143781
},
4378243782
pnpm: {
43783-
default: "7.27.1+sha1.75c15a7a16389531192dab282e45aacdac1ed4c0",
43783+
default: "7.29.3+sha1.700f102ef6d5e57e01093ede3bfe5028d18cc52b",
4378443784
fetchLatestFrom: {
4378543785
type: "npm",
4378643786
package: "pnpm"
@@ -43832,7 +43832,7 @@ var config_default = {
4383243832
package: "yarn"
4383343833
},
4383443834
transparent: {
43835-
default: "3.4.1+sha224.cca891d4a8671d4898aba3426674bb734dbbf88cef82dd4dacd71c9f",
43835+
default: "3.5.0+sha224.8f42459cf3e9d5e6b89b7f432466d6b4017c6d948798ba16725e047f",
4383643836
commands: [
4383743837
[
4383843838
"yarn",

deps/corepack/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "corepack",
3-
"version": "0.17.0",
3+
"version": "0.17.1",
44
"homepage": "https://github.com/nodejs/corepack#readme",
55
"bugs": {
66
"url": "https://github.com/nodejs/corepack/issues"

0 commit comments

Comments
 (0)