Skip to content

Commit 4068012

Browse files
committed
Bump Yarn to 4.2.2
This allows us to use newer features of Yarn. For instance, we will be able to write constraints in JavaScript format rather than Prolog.
1 parent 9f3498a commit 4068012

File tree

8 files changed

+4376
-4991
lines changed

8 files changed

+4376
-4991
lines changed

.github/workflows/lint-build-test.yml

Lines changed: 41 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,15 @@ jobs:
1313
outputs:
1414
child-workspace-package-names: ${{ steps.workspace-package-names.outputs.child-workspace-package-names }}
1515
steps:
16-
- uses: actions/checkout@v3
16+
- name: Install a version of Node that gives us access to Corepack
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 'lts/*'
20+
- name: Install Yarn
21+
run: corepack enable
22+
- uses: actions/checkout@v4
1723
- name: Use Node.js ${{ matrix.node-version }}
18-
uses: actions/setup-node@v3
24+
uses: actions/setup-node@v4
1925
with:
2026
node-version: ${{ matrix.node-version }}
2127
cache: yarn
@@ -34,9 +40,15 @@ jobs:
3440
matrix:
3541
node-version: [20.x]
3642
steps:
37-
- uses: actions/checkout@v3
43+
- name: Install a version of Node that gives us access to Corepack
44+
uses: actions/setup-node@v4
45+
with:
46+
node-version: 'lts/*'
47+
- name: Install Yarn
48+
run: corepack enable
49+
- uses: actions/checkout@v4
3850
- name: Use Node.js ${{ matrix.node-version }}
39-
uses: actions/setup-node@v3
51+
uses: actions/setup-node@v4
4052
with:
4153
node-version: ${{ matrix.node-version }}
4254
cache: yarn
@@ -56,14 +68,18 @@ jobs:
5668
needs: prepare
5769
strategy:
5870
matrix:
59-
node-version: [20.x]
6071
package-name: ${{ fromJson(needs.prepare.outputs.child-workspace-package-names) }}
6172
steps:
62-
- uses: actions/checkout@v3
63-
- name: Use Node.js ${{ matrix.node-version }}
64-
uses: actions/setup-node@v3
73+
- name: Install a version of Node that gives us access to Corepack
74+
uses: actions/setup-node@v4
75+
with:
76+
node-version: 'lts/*'
77+
- name: Install Yarn
78+
run: corepack enable
79+
- uses: actions/checkout@v4
80+
- name: Use Node.js
81+
uses: actions/setup-node@v4
6582
with:
66-
node-version: ${{ matrix.node-version }}
6783
cache: yarn
6884
- run: yarn --immutable
6985
- run: yarn workspace ${{ matrix.package-name }} changelog:validate
@@ -83,9 +99,15 @@ jobs:
8399
matrix:
84100
node-version: [20.x]
85101
steps:
86-
- uses: actions/checkout@v3
102+
- name: Install a version of Node that gives us access to Corepack
103+
uses: actions/setup-node@v4
104+
with:
105+
node-version: 'lts/*'
106+
- name: Install Yarn
107+
run: corepack enable
108+
- uses: actions/checkout@v4
87109
- name: Use Node.js ${{ matrix.node-version }}
88-
uses: actions/setup-node@v3
110+
uses: actions/setup-node@v4
89111
with:
90112
node-version: ${{ matrix.node-version }}
91113
cache: yarn
@@ -108,9 +130,15 @@ jobs:
108130
node-version: [18.x, 20.x]
109131
package-name: ${{ fromJson(needs.prepare.outputs.child-workspace-package-names) }}
110132
steps:
111-
- uses: actions/checkout@v3
133+
- name: Install a version of Node that gives us access to Corepack
134+
uses: actions/setup-node@v4
135+
with:
136+
node-version: 'lts/*'
137+
- name: Install Yarn
138+
run: corepack enable
139+
- uses: actions/checkout@v4
112140
- name: Use Node.js ${{ matrix.node-version }}
113-
uses: actions/setup-node@v3
141+
uses: actions/setup-node@v4
114142
with:
115143
node-version: ${{ matrix.node-version }}
116144
cache: yarn

.yarn/plugins/@yarnpkg/plugin-constraints.cjs

Lines changed: 0 additions & 52 deletions
This file was deleted.

.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Lines changed: 0 additions & 28 deletions
This file was deleted.

.yarn/releases/yarn-3.3.0.cjs

Lines changed: 0 additions & 807 deletions
This file was deleted.

.yarnrc.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
compressionLevel: mixed
2+
3+
enableGlobalCache: false
4+
15
enableScripts: false
26

3-
enableTelemetry: 0
7+
enableTelemetry: false
48

59
logFilters:
610
- code: YN0004
@@ -11,9 +15,3 @@ nodeLinker: node-modules
1115
plugins:
1216
- path: .yarn/plugins/@yarnpkg/plugin-allow-scripts.cjs
1317
spec: "https://raw.githubusercontent.com/LavaMoat/LavaMoat/main/packages/yarn-plugin-allow-scripts/bundles/@yarnpkg/plugin-allow-scripts.js"
14-
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
15-
spec: "@yarnpkg/plugin-workspace-tools"
16-
- path: .yarn/plugins/@yarnpkg/plugin-constraints.cjs
17-
spec: "@yarnpkg/plugin-constraints"
18-
19-
yarnPath: .yarn/releases/yarn-3.3.0.cjs

docs/contributing.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
- Install the current LTS version of [Node.js](https://nodejs.org)
66
- If you are using [nvm](https://github.com/creationix/nvm#installation) (recommended) running `nvm install` will install the latest version and running `nvm use` will automatically choose the right node version for you.
7-
- Install [Yarn v3](https://yarnpkg.com/getting-started/install).
7+
- Install [Yarn](https://yarnpkg.com) via [Corepack](https://github.com/nodejs/corepack?tab=readme-ov-file#how-to-install)
8+
- If you have Yarn installed globally via Homebrew or NPM, you'll need to uninstall it before enabling it via Corepack.
89
- Run `yarn install` to install dependencies and run any required post-install scripts.
910
- Run `yarn simple-git-hooks` to add a [Git hook](https://github.com/toplenboren/simple-git-hooks#what-is-a-git-hook) to your local development environment which will ensure that all files pass linting before you push a branch.
1011

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"typescript": "~4.9.5",
8989
"yargs": "^17.7.2"
9090
},
91-
"packageManager": "yarn@3.3.0",
91+
"packageManager": "yarn@4.2.2",
9292
"engines": {
9393
"node": "^18.18 || >=20"
9494
},

0 commit comments

Comments
 (0)