Skip to content

Commit 07b47ad

Browse files
nodejs-github-botdanielleadams
authored andcommitted
deps: update corepack to 0.15.0
PR-URL: #45235 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
1 parent bb6e8b1 commit 07b47ad

File tree

4 files changed

+168
-65
lines changed

4 files changed

+168
-65
lines changed

deps/corepack/CHANGELOG.md

+15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Changelog
22

3+
## [0.15.0](https://github.com/nodejs/corepack/compare/v0.14.2...v0.15.0) (2022-10-28)
4+
5+
6+
### Features
7+
8+
* add support for configurable registries and applicable auth options ([#186](https://github.com/nodejs/corepack/issues/186)) ([662ae90](https://github.com/nodejs/corepack/commit/662ae9057c7360cb05e9476914e611a9bf0074db))
9+
* update package manager versions ([#193](https://github.com/nodejs/corepack/issues/193)) ([0ec3a73](https://github.com/nodejs/corepack/commit/0ec3a7384729c5cf4ac566d91f1a4bb74e08a64f))
10+
* when strict checking is off, treat like transparent ([#197](https://github.com/nodejs/corepack/issues/197)) ([5eadc50](https://github.com/nodejs/corepack/commit/5eadc50192e205c60bfb1cad91854e9014a747b8))
11+
12+
13+
### Bug Fixes
14+
15+
* **doc:** add package configuration instruction to readme ([#188](https://github.com/nodejs/corepack/issues/188)) ([0b7abb9](https://github.com/nodejs/corepack/commit/0b7abb9833d332bad97902260d31652482c274a0))
16+
* recreate cache folder if necessary ([#200](https://github.com/nodejs/corepack/issues/200)) ([7b5f2f9](https://github.com/nodejs/corepack/commit/7b5f2f9fcb24fe3fe517a96deaac7f32854f3124))
17+
318
## [0.14.2](https://github.com/nodejs/corepack/compare/v0.14.1...v0.14.2) (2022-09-24)
419

520
### Features

deps/corepack/README.md

+33-17
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ We do acknowledge the irony and overhead of using npm to install Corepack, which
3636

3737
## Usage
3838

39+
### When Building Packages
40+
3941
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:
4042

4143
- **If the local project is configured for the package manager you're using**, Corepack will silently download and cache the latest compatible version.
@@ -44,6 +46,18 @@ Just use your package managers as you usually would. Run `yarn install` in Yarn
4446

4547
- **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.
4648

49+
### When Authoring Packages
50+
51+
Set your package's manager with the `packageManager` field in `package.json`:
52+
53+
```json
54+
{
55+
"packageManager": "yarn@3.2.3+sha224.953c8233f7a92884eee2de69a1b92d1f2ec1655e66d08071ba9a02fa"
56+
}
57+
```
58+
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`.
60+
4761
## Known Good Releases
4862

4963
When running Corepack within projects that don't list a supported package
@@ -120,38 +134,40 @@ This command will retrieve the given package manager from the specified archive
120134
manager versions that will be required for the projects you'll run, using
121135
`corepack hydrate`).
122136

123-
- `COREPACK_ENABLE_STRICT` can be set to `0` to prevent Corepack from checking
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.
143+
144+
- `COREPACK_ENABLE_PROJECT_SPEC` can be set to `0` to prevent Corepack from checking
124145
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.
125148

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

130153
- `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`).
131154

132-
- `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` are supported through [`node-proxy-agent`](https://github.com/TooTallNate/node-proxy-agent).
155+
- `COREPACK_NPM_REGISTRY` sets the registry base url used when retrieving package managers from npm. Default value is `https://registry.npmjs.org`
133156

134-
## Contributing
157+
- `COREPACK_NPM_TOKEN` sets a Bearer token authorization header when connecting to a npm type registry.
135158

136-
If you want to build corepack yourself, you can build the project like this:
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.
137160

138-
1. Clone this repository
139-
2. Run `yarn build` (no need for `yarn install`)
140-
3. The `dist/` directory now contains the corepack build and the shims
141-
4. Call `node ./dist/corepack --help` and behold
161+
- `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` are supported through [`node-proxy-agent`](https://github.com/TooTallNate/node-proxy-agent).
162+
163+
## Contributing
142164

143-
You can also run the tests with `yarn jest` (still no install needed).
165+
See [`CONTRIBUTING.md`](./CONTRIBUTING.md).
144166

145167
## Design
146168

147-
Various tidbits about Corepack's design are explained in more details in [DESIGN.md](/DESIGN.md).
169+
See [`DESIGN.md`](/DESIGN.md).
148170

149171
## License (MIT)
150172

151-
> **Copyright © Corepack contributors**
152-
>
153-
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
154-
>
155-
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
156-
>
157-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
173+
See [`LICENSE.md`](./LICENSE.md).

0 commit comments

Comments
 (0)