Skip to content

Commit 3b66efd

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 3b66efd

File tree

44 files changed

+4411
-5002
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+4411
-5002
lines changed

.github/workflows/ensure-blocking-pr-labels-absent.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ jobs:
1313
permissions:
1414
pull-requests: read
1515
steps:
16-
- uses: actions/checkout@v3
17-
- name: Set up Node.js
18-
uses: actions/setup-node@v3
16+
- uses: actions/checkout@v4
17+
- name: Use Node.js
18+
uses: actions/setup-node@v4
1919
with:
20+
node-version-file: '.nvmrc'
2021
cache: yarn
21-
- name: Install dependencies
22-
run: yarn --immutable
22+
- name: Install Yarn
23+
run: corepack enable
24+
- run: yarn --immutable
2325
- name: Run command
2426
uses: actions/github-script@v7
2527
with:

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

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ 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+
- uses: actions/checkout@v4
1717
- name: Use Node.js ${{ matrix.node-version }}
18-
uses: actions/setup-node@v3
18+
uses: actions/setup-node@v4
1919
with:
2020
node-version: ${{ matrix.node-version }}
2121
cache: yarn
22+
- name: Install Yarn
23+
run: corepack enable
2224
- run: yarn --immutable
2325
- name: Fetch workspace package names
2426
id: workspace-package-names
@@ -34,12 +36,14 @@ jobs:
3436
matrix:
3537
node-version: [20.x]
3638
steps:
37-
- uses: actions/checkout@v3
39+
- uses: actions/checkout@v4
3840
- name: Use Node.js ${{ matrix.node-version }}
39-
uses: actions/setup-node@v3
41+
uses: actions/setup-node@v4
4042
with:
4143
node-version: ${{ matrix.node-version }}
4244
cache: yarn
45+
- name: Install Yarn
46+
run: corepack enable
4347
- run: yarn --immutable
4448
- run: yarn lint
4549
- name: Require clean working directory
@@ -59,12 +63,14 @@ jobs:
5963
node-version: [20.x]
6064
package-name: ${{ fromJson(needs.prepare.outputs.child-workspace-package-names) }}
6165
steps:
62-
- uses: actions/checkout@v3
66+
- uses: actions/checkout@v4
6367
- name: Use Node.js ${{ matrix.node-version }}
64-
uses: actions/setup-node@v3
68+
uses: actions/setup-node@v4
6569
with:
6670
node-version: ${{ matrix.node-version }}
6771
cache: yarn
72+
- name: Install Yarn
73+
run: corepack enable
6874
- run: yarn --immutable
6975
- run: yarn workspace ${{ matrix.package-name }} changelog:validate
7076
- name: Require clean working directory
@@ -83,12 +89,14 @@ jobs:
8389
matrix:
8490
node-version: [20.x]
8591
steps:
86-
- uses: actions/checkout@v3
92+
- uses: actions/checkout@v4
8793
- name: Use Node.js ${{ matrix.node-version }}
88-
uses: actions/setup-node@v3
94+
uses: actions/setup-node@v4
8995
with:
9096
node-version: ${{ matrix.node-version }}
9197
cache: yarn
98+
- name: Install Yarn
99+
run: corepack enable
92100
- run: yarn --immutable
93101
- run: yarn build
94102
- name: Require clean working directory
@@ -108,12 +116,14 @@ jobs:
108116
node-version: [18.x, 20.x]
109117
package-name: ${{ fromJson(needs.prepare.outputs.child-workspace-package-names) }}
110118
steps:
111-
- uses: actions/checkout@v3
119+
- uses: actions/checkout@v4
112120
- name: Use Node.js ${{ matrix.node-version }}
113-
uses: actions/setup-node@v3
121+
uses: actions/setup-node@v4
114122
with:
115123
node-version: ${{ matrix.node-version }}
116124
cache: yarn
125+
- name: Install Yarn
126+
run: corepack enable
117127
- run: yarn --immutable
118128
- run: yarn test:scripts
119129
- run: yarn workspace ${{ matrix.package-name }} run test

.github/workflows/publish-release.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,17 @@ jobs:
1414
contents: write
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818
with:
1919
ref: ${{ github.sha }}
20-
- name: Setup Node
21-
uses: actions/setup-node@v3
20+
- name: Install Node
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 'lts/*'
24+
- name: Install Yarn
25+
run: corepack enable
26+
- name: Restore Yarn cache
27+
uses: actions/setup-node@v4
2228
with:
2329
node-version-file: '.nvmrc'
2430
cache: yarn
@@ -38,7 +44,7 @@ jobs:
3844
runs-on: ubuntu-latest
3945
needs: publish-release
4046
steps:
41-
- uses: actions/checkout@v3
47+
- uses: actions/checkout@v4
4248
with:
4349
ref: ${{ github.sha }}
4450
- uses: actions/cache@v3
@@ -62,7 +68,7 @@ jobs:
6268
runs-on: ubuntu-latest
6369
needs: publish-npm-dry-run
6470
steps:
65-
- uses: actions/checkout@v3
71+
- uses: actions/checkout@v4
6672
with:
6773
ref: ${{ github.sha }}
6874
- uses: actions/cache@v3

.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

constraints.pro

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,9 @@ gen_enforced_dependency(WorkspaceCwd, DependencyIdent, CorrectPeerDependencyRang
408408
atom_concat('^', CurrentDependencyVersion, CorrectPeerDependencyRange)
409409
).
410410

411+
% All packages must specify the exact version of Yarn required for development.
412+
gen_enforced_field(WorkspaceCwd, 'packageManager', 'yarn@4.2.2').
413+
411414
% All packages must specify a minimum Node version of 18.
412415
gen_enforced_field(WorkspaceCwd, 'engines.node', '^18.18 || >=20').
413416

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)