Skip to content

Commit f03ee29

Browse files
committed
Use node 22 and yarn 4
1 parent 9e731bd commit f03ee29

23 files changed

Lines changed: 7530 additions & 5303 deletions

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
const config = {
44
parser: '@typescript-eslint/parser',
55
parserOptions: {
6-
ecmaVersion: 2020,
6+
ecmaVersion: 2022,
77
project: ['tsconfig.json'],
88
},
99
plugins: ['@typescript-eslint', 'etc'],

.github/workflows/docsite.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Check out code
2424
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2525

26-
# The docs have a separate installation using Node 22 due to needing newer dependencies
26+
# The docs have a separate installation using Node 22
2727
- name: Install Node.js
2828
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
2929
with:

.github/workflows/pr.yml

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ name: PR
55

66
on:
77
pull_request:
8-
branches: [main]
8+
branches: [main, next]
99
push:
10-
branches: [main]
10+
branches: [main, next]
11+
12+
env:
13+
npmVersion: 10
1114

1215
concurrency:
1316
# For PRs, use the ref (branch) in the concurrency group so that new pushes cancel any old runs.
@@ -23,15 +26,8 @@ jobs:
2326
strategy:
2427
matrix:
2528
os: [ubuntu-latest, windows-latest]
26-
npm: [8]
27-
include:
28-
- os: ubuntu-latest
29-
# npm 6 and 8 have slightly different behavior with verdaccio in publishing tests.
30-
# It's unclear if this translates to meaningful differences in behavior in actual scenarios,
31-
# but test against both versions to be safe. (Only do this on the ubuntu build for speed.)
32-
npm: 6
3329

34-
name: build (${{ matrix.os }}, npm ${{ matrix.npm }})
30+
name: build (${{ matrix.os }})
3531

3632
runs-on: ${{ matrix.os }}
3733

@@ -45,11 +41,11 @@ jobs:
4541
cache: yarn
4642
node-version-file: .nvmrc
4743

48-
# Guarantee a predictable version of npm for the first round of tests
49-
- name: Install npm@${{ matrix.npm }}
50-
run: npm install --global npm@${{ matrix.npm }}
44+
# Guarantee a predictable version of npm
45+
- name: Install npm@${{ env.npmVersion }}
46+
run: npm install --global npm@${{ env.npmVersion }}
5147

52-
- run: yarn --frozen-lockfile
48+
- run: yarn --immutable
5349

5450
- run: yarn build
5551

@@ -64,9 +60,10 @@ jobs:
6460

6561
- run: yarn test:func
6662

67-
- run: yarn test:e2e
63+
- name: yarn test:e2e (npm ${{ env.npmVersion }})
64+
run: yarn test:e2e
6865

69-
# The docs have a separate installation using Node 22 due to needing newer dependencies
66+
# The docs have a separate installation using Node 22
7067
docs:
7168
name: build docs
7269

@@ -76,11 +73,11 @@ jobs:
7673
- name: Check out code
7774
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
7875

79-
- name: Install Node.js 22
76+
- name: Install Node.js
8077
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
8178
with:
8279
cache: yarn
83-
node-version: 24
80+
node-version-file: .nvmrc
8481

8582
- run: yarn --immutable
8683
working-directory: ./docs

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
workflow_dispatch:
66

77
env:
8-
npmVersion: 8
8+
npmVersion: 10
99

1010
concurrency:
1111
group: ${{ github.workflow }}-${{ github.ref }}
@@ -31,11 +31,11 @@ jobs:
3131
with:
3232
node-version-file: .nvmrc
3333

34-
# Guarantee a predictable version of npm (the PR build tests against both 6 and 8)
35-
- name: Install package managers
36-
run: npm install --global npm@${{ env.npmVersion }} yarn@1
34+
# Guarantee a predictable version of npm
35+
- name: Install npm@${{ env.npmVersion }}
36+
run: npm install --global npm@${{ env.npmVersion }}
3737

38-
- run: yarn --frozen-lockfile
38+
- run: yarn --immutable
3939

4040
- run: yarn build
4141

.gitignore

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ lib/
88
package-lock.json
99
target
1010
.claude/settings.local.json
11-
# ignore when switching between yarn 1/4 branches
12-
/.yarn
1311

1412
docs/.vuepress/.cache
1513
docs/.vuepress/.temp
16-
docs/.yarn/*
17-
!docs/.yarn/patches/
18-
!docs/.yarn/releases/
14+
docs/.yarn
15+
16+
.yarn/*
17+
!.yarn/patches/
18+
!.yarn/releases/
19+
# Ignore this in case a local .npmrc is added with a token for publishing
20+
.npmrc

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14
1+
22

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.yarn/
12
*.log
23
*.snap
34
*.styl

.vscode/launch.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414
"args": ["--", "--runInBand", "--watch", "--testTimeout=1000000", "${file}"],
1515
"sourceMaps": true,
1616
"outputCapture": "std",
17-
"console": "integratedTerminal",
18-
// Debug with Node 14 via nvm.
19-
// On Windows, you might have to change this to a specific version.
20-
"runtimeVersion": "14"
17+
"console": "integratedTerminal"
2118
},
2219
{
2320
"type": "node",
@@ -56,8 +53,7 @@
5653
"--runTestsByPath",
5754
"${jest.testFile}"
5855
],
59-
"console": "integratedTerminal",
60-
"runtimeVersion": "14"
56+
"console": "integratedTerminal"
6157
}
6258
]
6359
}

.yarnrc.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
nodeLinker: node-modules
2+
3+
# Prefer reusing existing dep ranges if possible, rather than adding duplicates
4+
preferReuse: true
5+
6+
yarnPath: .yarn/releases/yarn-4.13.0.cjs

0 commit comments

Comments
 (0)