Skip to content

Commit 74f679d

Browse files
authored
chore: update supported Node.js versions (#258)
BREAKING CHANGE: remove support for Node.js 14.x
1 parent c94c400 commit 74f679d

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ jobs:
4646
fail-fast: false
4747
matrix:
4848
node:
49-
- 14
5049
- 16
5150
- 18
51+
- 20
5252
platform:
5353
- ubuntu-latest
5454
- macos-latest

.github/workflows/update-nock-files.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
with:
2626
# Let's use the oldest version supported to be sure the V8
2727
# serialization is compatible with all supported versions.
28-
node-version: 14.x
28+
node-version: 16.x
2929

3030
- name: Get the Yarn cache directory path
3131
id: yarn-cache-dir-path

README.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,20 @@
22

33
Corepack is a zero-runtime-dependency Node.js script that acts as a bridge
44
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**.
137

148
## How to Install
159

1610
### Default Installs
1711

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.
2014

2115
### Manual Installs
2216

2317
<details>
24-
<summary>Click here to see how to install Corepack using npm</summary>
18+
<summary>Install Corepack using npm</summary>
2519

2620
First uninstall your global Yarn and pnpm binaries (just leave npm). In general,
2721
you'd do this by running the following command:
@@ -45,6 +39,12 @@ is distributed along with Node.js itself.
4539

4640
</details>
4741

42+
<details><summary>Install Corepack from source</summary>
43+
44+
See [`CONTRIBUTING.md`](./CONTRIBUTING.md).
45+
46+
</details>
47+
4848
## Usage
4949

5050
### When Building Packages

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"url": "https://github.com/nodejs/corepack.git"
1111
},
1212
"engines": {
13-
"node": ">=14.14.0"
13+
"node": ">=16.20.0"
1414
},
1515
"exports": {
1616
"./package.json": "./package.json"
@@ -51,7 +51,7 @@
5151
},
5252
"scripts": {
5353
"build": "rm -rf dist shims && run build:bundle && ts-node ./mkshims.ts",
54-
"build:bundle": "esbuild ./sources/_lib.ts --bundle --platform=node --target=node14.14.0 --external:corepack --outfile='./dist/lib/corepack.cjs' --resolve-extensions='.ts,.mjs,.js'",
54+
"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'",
5555
"corepack": "ts-node ./sources/_cli.ts",
5656
"lint": "eslint .",
5757
"prepack": "yarn build",

tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
"moduleResolution": "node",
88
"noEmit": true,
99
"forceConsistentCasingInFileNames": true,
10-
"lib": ["ES2020"],
10+
"lib": ["ES2021"],
1111
"module": "commonjs",
1212
"resolveJsonModule": true,
1313
"skipLibCheck": true,
1414
"strict": true,
15-
"target": "ES2020"
15+
"target": "ES2021"
1616
},
1717
"ts-node": {
1818
"transpileOnly": true

0 commit comments

Comments
 (0)