Skip to content

Commit

Permalink
Unvendor Yarn; favor Corepack for installation (#243)
Browse files Browse the repository at this point in the history
According to the Yarn documentation, Yarn no longer needs to be bundled
with a project, but rather, installing Yarn ought to be done using
[Corepack](https://yarnpkg.com/corepack), which is shipped in modern
Node versions. This commit removes the Yarn binary from the repo and
updates the installation instructions in the README to match.

---------

Co-authored-by: legobeat <[email protected]>
  • Loading branch information
mcmire and legobeat authored Jun 6, 2024
1 parent b14503d commit 03f796f
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 900 deletions.
38 changes: 34 additions & 4 deletions .github/workflows/build-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@ jobs:
name: Prepare
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version: 'lts/*'
- name: Install Yarn
run: corepack enable
- uses: actions/checkout@v4
- name: Use Node.js and install dependencies
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'yarn'
- name: Install Yarn dependencies
run: yarn --immutable
Expand All @@ -23,11 +29,17 @@ jobs:
needs:
- prepare
steps:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Install Yarn
run: corepack enable
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version: 'lts/*'
cache: 'yarn'
- run: yarn --immutable --immutable-cache
- run: yarn build
Expand All @@ -45,11 +57,17 @@ jobs:
needs:
- prepare
steps:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Install Yarn
run: corepack enable
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
node-version: 'lts/*'
cache: 'yarn'
- run: yarn --immutable --immutable-cache
- run: yarn lint
Expand All @@ -76,6 +94,12 @@ jobs:
matrix:
node-version: [18.x, 20.x]
steps:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Yarn
run: corepack enable
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
Expand All @@ -101,6 +125,12 @@ jobs:
matrix:
node-version: [18.x, 20.x]
steps:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Yarn
run: corepack enable
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
Expand Down
Loading

0 comments on commit 03f796f

Please sign in to comment.