Skip to content

Commit cd20ecc

Browse files
arcanisrichardlau
authored andcommitted
deps: upgrade Corepack to 0.10
PR-URL: #40374 Backport-PR-URL: #40479 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 737df75 commit cd20ecc

11 files changed

+191
-206
lines changed

deps/corepack/README.md

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

3-
Corepack is a zero-runtime-dependency Node script that acts as a bridge between Node 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 by default.
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.
44

55
**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.
66

77
## How to Install
88

99
### Default Installs
1010

11-
Corepack isn't intended to be installed manually. While it's certainly possible, we're working with the Node TSC to provide Corepack by default starting from Node 15, thus ensuring that all package managers can be used with little to no friction.
11+
Corepack is distributed by default with Node.js 16.9, but is opt-in for the time being. Run `corepack enable` to install the required shims.
1212

1313
### Manual Installs
1414

@@ -30,22 +30,7 @@ Then install Corepack:
3030
npm install -g corepack
3131
```
3232

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 will be distributed along with Node itself.
34-
35-
</details>
36-
37-
### Prebuilt Binaries
38-
39-
<details>
40-
<summary>Click here to see how to download prebuilt Corepack Node distributions</summary>
41-
42-
We have a few prebuilt Node binaries (based on the [following branch](https://github.com/arcanis/node/tree/mael/pmm)) that you can just download, unpack somewhere, and add to your `PATH` environment variable.
43-
44-
1. Go to [this page](https://github.com/arcanis/pmm/actions?query=workflow%3ABuild)
45-
2. Open the latest build (the one at the top)
46-
3. Download the right artifact (Linux or Darwin)
47-
4. Unzip the artifact, then untar it
48-
5. Add the `node-v15.0.0-nightlyYYYY-MM-DDXXXX-linux-x64/bin` directory to your `$PATH`
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.
4934

5035
</details>
5136

@@ -61,7 +46,7 @@ Just use your package managers as you usually would. Run `yarn install` in Yarn
6146

6247
## Known Good Releases
6348

64-
When running Yarn or pnpm within projects that don't list a supported package manager, Corepack will default to a set of Known Good Releases. In a way, you can compare this to Node, where each version ships with a specific version of npm.
49+
When running Yarn or pnpm within projects that don't list a supported package manager, Corepack will default to a set of Known Good Releases. In a way, you can compare this to Node.js, where each version ships with a specific version of npm.
6550

6651
The Known Good Releases can be updated system-wide using the `--activate` flag from the `corepack prepare` and `corepack hydrate` commands.
6752

@@ -89,15 +74,15 @@ Note that those commands still check whether the local project is configured for
8974
| --- | --- |
9075
| `--install-directory` | Add the shims to the specified location |
9176

92-
This command will detect where Node 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 through other means.
77+
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.
9378

9479
### `corepack disable [... name]`
9580

9681
| Option | Description |
9782
| --- | --- |
9883
| `--install-directory` | Remove the shims to the specified location |
9984

100-
This command will detect where Node is installed and will remove the shims from there.
85+
This command will detect where Node.js is installed and will remove the shims from there.
10186

10287
### `corepack prepare [... name@version]`
10388

@@ -119,7 +104,7 @@ This command will retrieve the given package manager from the specified archive
119104

120105
## Environment Variables
121106

122-
- `COREPACK_ENABLED` 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`).
107+
- `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`).
123108

124109
## Contributing
125110

0 commit comments

Comments
 (0)