Skip to content

Commit

Permalink
chore: update supported Node.js versions (#258)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: remove support for Node.js 14.x
  • Loading branch information
aduh95 committed May 19, 2023
1 parent c94c400 commit 74f679d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ jobs:
fail-fast: false
matrix:
node:
- 14
- 16
- 18
- 20
platform:
- ubuntu-latest
- macos-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-nock-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
with:
# Let's use the oldest version supported to be sure the V8
# serialization is compatible with all supported versions.
node-version: 14.x
node-version: 16.x

- name: Get the Yarn cache directory path
id: yarn-cache-dir-path
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"url": "https://github.com/nodejs/corepack.git"
},
"engines": {
"node": ">=14.14.0"
"node": ">=16.20.0"
},
"exports": {
"./package.json": "./package.json"
Expand Down Expand Up @@ -51,7 +51,7 @@
},
"scripts": {
"build": "rm -rf dist shims && run build:bundle && ts-node ./mkshims.ts",
"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'",
"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",
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
"moduleResolution": "node",
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"lib": ["ES2020"],
"lib": ["ES2021"],
"module": "commonjs",
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"target": "ES2020"
"target": "ES2021"
},
"ts-node": {
"transpileOnly": true
Expand Down

0 comments on commit 74f679d

Please sign in to comment.