| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5b061c8 commit 07df5c4
11 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,26 @@ | |||
| 1 | 1 | # Changelog | |
| 2 | 2 | ||
| 3 | + ## [0.18.0](https://github.com/nodejs/corepack/compare/v0.17.2...v0.18.0) (2023-05-19) | ||
| 4 | + | ||
| 5 | + | ||
| 6 | + ### ⚠ BREAKING CHANGES | ||
| 7 | + | ||
| 8 | + * remove support for Node.js 14.x | ||
| 9 | + | ||
| 10 | + ### Features | ||
| 11 | + | ||
| 12 | + * update package manager versions ([#256](https://github.com/nodejs/corepack/issues/256)) ([7b61ff6](https://github.com/nodejs/corepack/commit/7b61ff6bc797ec4ed50c2ba1e1f1689264cbf4fc)) | ||
| 13 | + | ||
| 14 | + | ||
| 15 | + ### Bug Fixes | ||
| 16 | + | ||
| 17 | + * **doc:** add a note about troubleshooting network errors ([#259](https://github.com/nodejs/corepack/issues/259)) ([aa3cbdb](https://github.com/nodejs/corepack/commit/aa3cbdb54fb21b8e0adde96dc781cdf750932843)) | ||
| 18 | + | ||
| 19 | + | ||
| 20 | + ### Miscellaneous Chores | ||
| 21 | + | ||
| 22 | + * update supported Node.js versions ([#258](https://github.com/nodejs/corepack/issues/258)) ([74f679d](https://github.com/nodejs/corepack/commit/74f679d8a72cc10a3720fc679b95e9bd086d95be)) | ||
| 23 | + | ||
| 3 | 24 | ## [0.17.2](https://github.com/nodejs/corepack/compare/v0.17.1...v0.17.2) (2023-04-07) | |
| 4 | 25 | ||
| 5 | 26 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,26 +2,20 @@ | |||
| 2 | 2 | ||
| 3 | 3 | Corepack is a zero-runtime-dependency Node.js script that acts as a bridge | |
| 4 | 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. | ||
| 8 | - | ||
| 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. | ||
| 5 | + with during development. In practical terms, **Corepack lets you use Yarn, npm, | ||
| 6 | + and pnpm without having to install them**. | ||
| 13 | 7 | ||
| 14 | 8 | ## How to Install | |
| 15 | 9 | ||
| 16 | 10 | ### Default Installs | |
| 17 | 11 | ||
| 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. | ||
| 12 | + Corepack is [distributed by default with all recent Node.js versions](https://nodejs.org/api/corepack.html). | ||
| 13 | + Run `corepack enable` to install the required Yarn and pnpm binaries on your path. | ||
| 20 | 14 | ||
| 21 | 15 | ### Manual Installs | |
| 22 | 16 | ||
| 23 | 17 | <details> | |
| 24 | - <summary>Click here to see how to install Corepack using npm</summary> | ||
| 18 | + <summary>Install Corepack using npm</summary> | ||
| 25 | 19 | ||
| 26 | 20 | First uninstall your global Yarn and pnpm binaries (just leave npm). In general, | |
| 27 | 21 | you'd do this by running the following command: | |
@@ -45,6 +39,12 @@ is distributed along with Node.js itself. | |||
| 45 | 39 | ||
| 46 | 40 | </details> | |
| 47 | 41 | ||
| 42 | + <details><summary>Install Corepack from source</summary> | ||
| 43 | + | ||
| 44 | + See [`CONTRIBUTING.md`](./CONTRIBUTING.md). | ||
| 45 | + | ||
| 46 | + </details> | ||
| 47 | + | ||
| 48 | 48 | ## Usage | |
| 49 | 49 | ||
| 50 | 50 | ### When Building Packages | |
@@ -131,12 +131,37 @@ on a project where the `packageManager` field references `pnpm`). | |||
| 131 | 131 | | --------------------- | --------------------------------------- | | |
| 132 | 132 | | `--install-directory` | Add the shims to the specified location | | |
| 133 | 133 | ||
| 134 | - This command will detect where Node.js is installed and will create shims next | ||
| 134 | + This command will detect where Corepack is installed and will create shims next | ||
| 135 | 135 | to it for each of the specified package managers (or all of them if the command | |
| 136 | 136 | is called without parameters). Note that the npm shims will not be installed | |
| 137 | 137 | unless explicitly requested, as npm is currently distributed with Node.js | |
| 138 | 138 | through other means. | |
| 139 | 139 | ||
| 140 | + If the file system where the `corepack` binary is located is read-only, this | ||
| 141 | + command will fail. A workaround is to add the binaries as alias in your | ||
| 142 | + shell configuration file (e.g. in `~/.bash_aliases`): | ||
| 143 | + | ||
| 144 | + ```sh | ||
| 145 | + alias yarn="corepack yarn" | ||
| 146 | + alias yarnpkg="corepack yarnpkg" | ||
| 147 | + alias pnpm="corepack pnpm" | ||
| 148 | + alias pnpx="corepack pnpx" | ||
| 149 | + alias npm="corepack npm" | ||
| 150 | + alias npx="corepack npx" | ||
| 151 | + ``` | ||
| 152 | + | ||
| 153 | + On Windows PowerShell, you can add functions using the `$PROFILE` automatic | ||
| 154 | + variable: | ||
| 155 | + | ||
| 156 | + ```powershell | ||
| 157 | + echo "function yarn { corepack yarn `$args }" >> $PROFILE | ||
| 158 | + echo "function yarnpkg { corepack yarnpkg `$args }" >> $PROFILE | ||
| 159 | + echo "function pnpm { corepack pnpm `$args }" >> $PROFILE | ||
| 160 | + echo "function pnpx { corepack pnpx `$args }" >> $PROFILE | ||
| 161 | + echo "function npm { corepack npm `$args }" >> $PROFILE | ||
| 162 | + echo "function npx { corepack npx `$args }" >> $PROFILE | ||
| 163 | + ``` | ||
| 164 | + | ||
| 140 | 165 | ### `corepack disable [... name]` | |
| 141 | 166 | ||
| 142 | 167 | | Option | Description | | |
@@ -217,6 +242,16 @@ network interaction. | |||
| 217 | 242 | - `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` are supported through | |
| 218 | 243 | [`node-proxy-agent`](https://github.com/TooTallNate/node-proxy-agent). | |
| 219 | 244 | ||
| 245 | + ## Troubleshooting | ||
| 246 | + | ||
| 247 | + ### Networking | ||
| 248 | + | ||
| 249 | + There are a wide variety of networking issues that can occur while running `corepack` commands. Things to check: | ||
| 250 | + | ||
| 251 | + - Make sure your network connection is active. | ||
| 252 | + - Make sure the host for your request can be resolved by your DNS; try using `curl [URL]` from your shell. | ||
| 253 | + - Check your proxy settings (see [Environment Variables](#environment-variables)). | ||
| 254 | + | ||
| 220 | 255 | ## Contributing | |
| 221 | 256 | ||
| 222 | 257 | See [`CONTRIBUTING.md`](./CONTRIBUTING.md). | |
| Back | FazBrowse Home | New Git URL |
0 commit comments