From 2a6c23ea5eeb8ab9077ff5a5e02d9b3e566a27d6 Mon Sep 17 00:00:00 2001 From: "Node.js GitHub Bot" Date: Fri, 31 Mar 2023 12:17:34 +0100 Subject: [PATCH] deps: update corepack to 0.17.1 PR-URL: https://github.com/nodejs/node/pull/47156 Reviewed-By: Antoine du Hamel Reviewed-By: Moshe Atlow Reviewed-By: Yagiz Nizipli Reviewed-By: Mohammed Keyvanzadeh Reviewed-By: Zijian Liu --- deps/corepack/CHANGELOG.md | 7 ++ deps/corepack/README.md | 149 +++++++++++++++++++++++---------- deps/corepack/dist/corepack.js | 8 +- deps/corepack/package.json | 2 +- 4 files changed, 115 insertions(+), 51 deletions(-) diff --git a/deps/corepack/CHANGELOG.md b/deps/corepack/CHANGELOG.md index 71167e79cd6461..cb381271d05e56 100644 --- a/deps/corepack/CHANGELOG.md +++ b/deps/corepack/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.17.1](https://github.com/nodejs/corepack/compare/v0.17.0...v0.17.1) (2023-03-17) + + +### Features + +* update package manager versions ([#245](https://github.com/nodejs/corepack/issues/245)) ([673f3b7](https://github.com/nodejs/corepack/commit/673f3b7f18421a49da1e2c55656666a74ce94474)) + ## [0.17.0](https://github.com/nodejs/corepack/compare/v0.16.0...v0.17.0) (2023-02-24) diff --git a/deps/corepack/README.md b/deps/corepack/README.md index 8d76baea4bbf8d..a68555daf5f318 100644 --- a/deps/corepack/README.md +++ b/deps/corepack/README.md @@ -1,21 +1,30 @@ # corepack -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. +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. -**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. +**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. ## How to Install ### Default Installs -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. +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. ### Manual Installs
Click here to see how to install Corepack using npm -First uninstall your global Yarn and pnpm binaries (just leave npm). In general, you'd do this by running the following command: +First uninstall your global Yarn and pnpm binaries (just leave npm). In general, +you'd do this by running the following command: ```shell npm uninstall -g yarn pnpm @@ -30,7 +39,9 @@ Then install Corepack: npm install -g corepack ``` -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. +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.
@@ -38,13 +49,21 @@ We do acknowledge the irony and overhead of using npm to install Corepack, which ### When Building Packages -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: +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: -- **If the local project is configured for the package manager you're using**, Corepack will silently download and cache the latest compatible version. +- **If the local project is configured for the package manager you're using**, + Corepack will silently download and cache the latest compatible version. -- **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. +- **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. -- **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. +- **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. ### When Authoring Packages @@ -56,13 +75,18 @@ Set your package's manager with the `packageManager` field in `package.json`: } ``` -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`. +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`. ## Known Good Releases When running Corepack within projects that don't list a supported package manager, it 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. +compare this to Node.js, where each version ships with a specific version of +npm. If there is no Known Good Release for the requested package manager, Corepack 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. The utility commands detailed in the next section. -- 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. +- 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. - - If you want to have *all* Last Known Good releases for all package managers, just use the `--all` flag which will do just that. + - If you want to have _all_ Last Known Good releases for all package managers, + just use the `--all` flag which will do just that. -- 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 ` to setup the cache. +- 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 ` to setup the cache. ## Utility Commands ### `corepack [@] [... args]` -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. +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. -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`). +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`). ### `corepack enable [... name]` -| Option | Description | -| --- | --- | +| Option | Description | +| --------------------- | --------------------------------------- | | `--install-directory` | Add the shims to the specified location | -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. +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. ### `corepack disable [... name]` -| Option | Description | -| --- | --- | +| Option | Description | +| --------------------- | ------------------------------------------ | | `--install-directory` | Remove the shims to the specified location | -This command will detect where Node.js is installed and will remove the shims from there. +This command will detect where Node.js is installed and will remove the shims +from there. ### `corepack prepare [... name@version]` -| Option | Description | -| --- | --- | -| `--all` | Prepare the "Last Known Good" version of all supported package managers | -| `-o,--output` | Also generate an archive containing the package managers | -| `--activate` | Also update the "Last Known Good" release | +| Option | Description | +| ------------- | ----------------------------------------------------------------------- | +| `--all` | Prepare the "Last Known Good" version of all supported package managers | +| `-o,--output` | Also generate an archive containing the package managers | +| `--activate` | Also update the "Last Known Good" release | -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. +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. ### `corepack hydrate ` -| Option | Description | -| --- | --- | +| Option | Description | +| ------------ | ----------------------------------------- | | `--activate` | Also update the "Last Known Good" release | -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. +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. ## Environment Variables @@ -134,31 +181,41 @@ This command will retrieve the given package manager from the specified archive manager versions that will be required for the projects you'll run, using `corepack hydrate`). -- `COREPACK_ENABLE_STRICT` can be set to `0` to prevent Corepack from throwing error - if the package manager does not correspond to the one defined for the current project. - This means that if a user is using the package manager specified in the current project, - it will use the version specified by the project's `packageManager` field. - But if the user is using other package manager different from the one specified - for the current project, it will use the system-wide package manager version. +- `COREPACK_ENABLE_STRICT` can be set to `0` to prevent Corepack from throwing + error if the package manager does not correspond to the one defined for the + current project. This means that if a user is using the package manager + specified in the current project, it will use the version specified by the + project's `packageManager` field. But if the user is using other package + manager different from the one specified for the current project, it will use + the system-wide package manager version. -- `COREPACK_ENABLE_PROJECT_SPEC` can be set to `0` to prevent Corepack from checking - if the package manager corresponds to the one defined for the current project. - This means that it will always use the system-wide package manager regardless of - what is being specified in the project's `packageManager` field. +- `COREPACK_ENABLE_PROJECT_SPEC` can be set to `0` to prevent Corepack from + checking if the package manager corresponds to the one defined for the current + project. This means that it will always use the system-wide package manager + regardless of what is being specified in the project's `packageManager` field. - `COREPACK_HOME` can be set in order to define where Corepack should install the package managers. By default it is set to `%LOCALAPPDATA%\node\corepack` on Windows, and to `$HOME/.cache/node/corepack` everywhere else. -- `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`). +- `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`). -- `COREPACK_NPM_REGISTRY` sets the registry base url used when retrieving package managers from npm. Default value is `https://registry.npmjs.org` +- `COREPACK_NPM_REGISTRY` sets the registry base url used when retrieving + package managers from npm. Default value is `https://registry.npmjs.org` -- `COREPACK_NPM_TOKEN` sets a Bearer token authorization header when connecting to a npm type registry. +- `COREPACK_NPM_TOKEN` sets a Bearer token authorization header when connecting + to a npm type registry. -- `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. +- `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. -- `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` are supported through [`node-proxy-agent`](https://github.com/TooTallNate/node-proxy-agent). +- `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` are supported through + [`node-proxy-agent`](https://github.com/TooTallNate/node-proxy-agent). ## Contributing diff --git a/deps/corepack/dist/corepack.js b/deps/corepack/dist/corepack.js index 79d93830e8278c..e87b6958323623 100755 --- a/deps/corepack/dist/corepack.js +++ b/deps/corepack/dist/corepack.js @@ -43737,7 +43737,7 @@ function String2(descriptor, ...args) { } // package.json -var version = "0.17.0"; +var version = "0.17.1"; // sources/Engine.ts var import_fs3 = __toESM(require("fs")); @@ -43749,7 +43749,7 @@ var import_semver3 = __toESM(require_semver2()); var config_default = { definitions: { npm: { - default: "9.5.1+sha1.dc74eb85d07d78e24fadc674968a1ea16b18108c", + default: "9.6.2+sha1.b7858ab694c4335778c6d91e2310a61f2e369dac", fetchLatestFrom: { type: "npm", package: "npm" @@ -43780,7 +43780,7 @@ var config_default = { } }, pnpm: { - default: "7.27.1+sha1.75c15a7a16389531192dab282e45aacdac1ed4c0", + default: "7.29.3+sha1.700f102ef6d5e57e01093ede3bfe5028d18cc52b", fetchLatestFrom: { type: "npm", package: "pnpm" @@ -43832,7 +43832,7 @@ var config_default = { package: "yarn" }, transparent: { - default: "3.4.1+sha224.cca891d4a8671d4898aba3426674bb734dbbf88cef82dd4dacd71c9f", + default: "3.5.0+sha224.8f42459cf3e9d5e6b89b7f432466d6b4017c6d948798ba16725e047f", commands: [ [ "yarn", diff --git a/deps/corepack/package.json b/deps/corepack/package.json index bf81b36b4dc6e6..2445e510c10a41 100644 --- a/deps/corepack/package.json +++ b/deps/corepack/package.json @@ -1,6 +1,6 @@ { "name": "corepack", - "version": "0.17.0", + "version": "0.17.1", "homepage": "https://github.com/nodejs/corepack#readme", "bugs": { "url": "https://github.com/nodejs/corepack/issues"