mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
deps: update corepack to 0.18.0
PR-URL: https://github.com/nodejs/node/pull/48091 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
1 parent
3e4a469139
commit
d4572d31fa
11 files changed
+39915
-45027
No files matched your search
Vendored
+21
@@ -1,5 +1,26 @@
|
||||
# Changelog
|
||||
|
||||
## [0.18.0](https://github.com/nodejs/corepack/compare/v0.17.2...v0.18.0) (2023-05-19)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* remove support for Node.js 14.x
|
||||
|
||||
### Features
|
||||
|
||||
* update package manager versions ([#256](https://github.com/nodejs/corepack/issues/256)) ([7b61ff6](https://github.com/nodejs/corepack/commit/7b61ff6bc797ec4ed50c2ba1e1f1689264cbf4fc))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **doc:** add a note about troubleshooting network errors ([#259](https://github.com/nodejs/corepack/issues/259)) ([aa3cbdb](https://github.com/nodejs/corepack/commit/aa3cbdb54fb21b8e0adde96dc781cdf750932843))
|
||||
|
||||
|
||||
### Miscellaneous Chores
|
||||
|
||||
* update supported Node.js versions ([#258](https://github.com/nodejs/corepack/issues/258)) ([74f679d](https://github.com/nodejs/corepack/commit/74f679d8a72cc10a3720fc679b95e9bd086d95be))
|
||||
|
||||
## [0.17.2](https://github.com/nodejs/corepack/compare/v0.17.1...v0.17.2) (2023-04-07)
|
||||
|
||||
|
||||
|
||||
Vendored
+47
-12
@@ -2,26 +2,20 @@
|
||||
|
||||
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.
|
||||
with during development. In practical terms, **Corepack lets you use Yarn, npm,
|
||||
and pnpm without having to install them**.
|
||||
|
||||
## 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 all recent Node.js versions](https://nodejs.org/api/corepack.html).
|
||||
Run `corepack enable` to install the required Yarn and pnpm binaries on your path.
|
||||
|
||||
### Manual Installs
|
||||
|
||||
<details>
|
||||
<summary>Click here to see how to install Corepack using npm</summary>
|
||||
<summary>Install Corepack using npm</summary>
|
||||
|
||||
First uninstall your global Yarn and pnpm binaries (just leave npm). In general,
|
||||
you'd do this by running the following command:
|
||||
@@ -45,6 +39,12 @@ is distributed along with Node.js itself.
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>Install Corepack from source</summary>
|
||||
|
||||
See [`CONTRIBUTING.md`](./CONTRIBUTING.md).
|
||||
|
||||
</details>
|
||||
|
||||
## Usage
|
||||
|
||||
### When Building Packages
|
||||
@@ -131,12 +131,37 @@ on a project where the `packageManager` field references `pnpm`).
|
||||
| --------------------- | --------------------------------------- |
|
||||
| `--install-directory` | Add the shims to the specified location |
|
||||
|
||||
This command will detect where Node.js is installed and will create shims next
|
||||
This command will detect where Corepack 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.
|
||||
|
||||
If the file system where the `corepack` binary is located is read-only, this
|
||||
command will fail. A workaround is to add the binaries as alias in your
|
||||
shell configuration file (e.g. in `~/.bash_aliases`):
|
||||
|
||||
```sh
|
||||
alias yarn="corepack yarn"
|
||||
alias yarnpkg="corepack yarnpkg"
|
||||
alias pnpm="corepack pnpm"
|
||||
alias pnpx="corepack pnpx"
|
||||
alias npm="corepack npm"
|
||||
alias npx="corepack npx"
|
||||
```
|
||||
|
||||
On Windows PowerShell, you can add functions using the `$PROFILE` automatic
|
||||
variable:
|
||||
|
||||
```powershell
|
||||
echo "function yarn { corepack yarn `$args }" >> $PROFILE
|
||||
echo "function yarnpkg { corepack yarnpkg `$args }" >> $PROFILE
|
||||
echo "function pnpm { corepack pnpm `$args }" >> $PROFILE
|
||||
echo "function pnpx { corepack pnpx `$args }" >> $PROFILE
|
||||
echo "function npm { corepack npm `$args }" >> $PROFILE
|
||||
echo "function npx { corepack npx `$args }" >> $PROFILE
|
||||
```
|
||||
|
||||
### `corepack disable [... name]`
|
||||
|
||||
| Option | Description |
|
||||
@@ -217,6 +242,16 @@ network interaction.
|
||||
- `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` are supported through
|
||||
[`node-proxy-agent`](https://github.com/TooTallNate/node-proxy-agent).
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Networking
|
||||
|
||||
There are a wide variety of networking issues that can occur while running `corepack` commands. Things to check:
|
||||
|
||||
- Make sure your network connection is active.
|
||||
- Make sure the host for your request can be resolved by your DNS; try using `curl [URL]` from your shell.
|
||||
- Check your proxy settings (see [Environment Variables](#environment-variables)).
|
||||
|
||||
## Contributing
|
||||
|
||||
See [`CONTRIBUTING.md`](./CONTRIBUTING.md).
|
||||
|
||||
Vendored
+1
-44996
File diff suppressed because it is too large.
Load diff
Vendored
+39826
File diff suppressed because it is too large.
Load diff
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
||||
#!/usr/bin/env node
|
||||
require('./corepack').runMain(['npm', ...process.argv.slice(2)]);
|
||||
require('./lib/corepack.cjs').runMain(['npm', ...process.argv.slice(2)]);
|
||||
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
||||
#!/usr/bin/env node
|
||||
require('./corepack').runMain(['npx', ...process.argv.slice(2)]);
|
||||
require('./lib/corepack.cjs').runMain(['npx', ...process.argv.slice(2)]);
|
||||
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
||||
#!/usr/bin/env node
|
||||
require('./corepack').runMain(['pnpm', ...process.argv.slice(2)]);
|
||||
require('./lib/corepack.cjs').runMain(['pnpm', ...process.argv.slice(2)]);
|
||||
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
||||
#!/usr/bin/env node
|
||||
require('./corepack').runMain(['pnpx', ...process.argv.slice(2)]);
|
||||
require('./lib/corepack.cjs').runMain(['pnpx', ...process.argv.slice(2)]);
|
||||
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
||||
#!/usr/bin/env node
|
||||
require('./corepack').runMain(['yarn', ...process.argv.slice(2)]);
|
||||
require('./lib/corepack.cjs').runMain(['yarn', ...process.argv.slice(2)]);
|
||||
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
||||
#!/usr/bin/env node
|
||||
require('./corepack').runMain(['yarnpkg', ...process.argv.slice(2)]);
|
||||
require('./lib/corepack.cjs').runMain(['yarnpkg', ...process.argv.slice(2)]);
|
||||
Vendored
+14
-13
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "corepack",
|
||||
"version": "0.17.2",
|
||||
"version": "0.18.0",
|
||||
"homepage": "https://github.com/nodejs/corepack#readme",
|
||||
"bugs": {
|
||||
"url": "https://github.com/nodejs/corepack/issues"
|
||||
@@ -10,49 +10,50 @@
|
||||
"url": "https://github.com/nodejs/corepack.git"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.14.0"
|
||||
"node": ">=16.20.0"
|
||||
},
|
||||
"exports": {
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"license": "MIT",
|
||||
"packageManager": "yarn@4.0.0-rc.15+sha224.7fa5c1d1875b041cea8fcbf9a364667e398825364bf5c5c8cd5f6601",
|
||||
"packageManager": "yarn@4.0.0-rc.44+sha224.6526204ca38ed0105e81ba52d83dc0c7b8ee63600a13dc332914fde0",
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.14.3",
|
||||
"@babel/plugin-transform-modules-commonjs": "^7.14.0",
|
||||
"@babel/preset-typescript": "^7.13.0",
|
||||
"@jest/globals": "^29.0.0",
|
||||
"@types/debug": "^4.1.5",
|
||||
"@types/jest": "^29.0.0",
|
||||
"@types/node": "^18.0.0",
|
||||
"@types/node": "^20.0.0",
|
||||
"@types/semver": "^7.1.0",
|
||||
"@types/tar": "^6.0.0",
|
||||
"@types/which": "^2.0.0",
|
||||
"@types/which": "^3.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
||||
"@typescript-eslint/parser": "^5.0.0",
|
||||
"@yarnpkg/eslint-config": "^1.0.0-rc.5",
|
||||
"@yarnpkg/eslint-config": "^0.6.0-rc.7",
|
||||
"@yarnpkg/fslib": "^2.1.0",
|
||||
"@zkochan/cmd-shim": "^5.0.0",
|
||||
"@zkochan/cmd-shim": "^6.0.0",
|
||||
"babel-plugin-dynamic-import-node": "^2.3.3",
|
||||
"clipanion": "^3.0.1",
|
||||
"debug": "^4.1.1",
|
||||
"esbuild": "0.16.15",
|
||||
"esbuild": "0.17.19",
|
||||
"eslint": "^8.0.0",
|
||||
"eslint-plugin-arca": "^0.15.0",
|
||||
"jest": "^29.0.0",
|
||||
"nock": "^13.0.4",
|
||||
"proxy-agent": "^5.0.0",
|
||||
"proxy-agent": "^6.0.0",
|
||||
"semver": "^7.1.3",
|
||||
"supports-color": "^9.0.0",
|
||||
"tar": "^6.0.1",
|
||||
"ts-node": "^10.0.0",
|
||||
"typescript": "^4.3.2",
|
||||
"typescript": "^5.0.4",
|
||||
"v8-compile-cache": "^2.3.0",
|
||||
"which": "^2.0.2"
|
||||
"which": "^3.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "rm -rf dist shims && run build:bundle && ts-node ./mkshims.ts",
|
||||
"build:bundle": "esbuild ./sources/_entryPoint.ts --bundle --platform=node --target=node14.14.0 --external:corepack --outfile='./dist/corepack.js' --resolve-extensions='.ts,.mjs,.js'",
|
||||
"corepack": "ts-node ./sources/_entryPoint.ts",
|
||||
"build:bundle": "esbuild ./sources/_lib.ts --bundle --platform=node --target=node16.20.0 --external:corepack --outfile='./dist/lib/corepack.cjs' --resolve-extensions='.ts,.mjs,.js'",
|
||||
"corepack": "ts-node ./sources/_cli.ts",
|
||||
"lint": "eslint .",
|
||||
"prepack": "yarn build",
|
||||
"postpack": "rm -rf dist shims",
|
||||
|
||||
Reference in new issue
Block a user