Skip to content

Commit d0e16e8

Browse files
committed
Require Node 22 and use yarn 4 locally
1 parent af808dd commit d0e16e8

24 files changed

Lines changed: 7670 additions & 5599 deletions

.github/workflows/docsite.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ jobs:
3232
exit 1
3333
fi
3434
35-
# The docs have a separate installation using Node 22 due to needing newer dependencies
35+
# The docs have a separate installation
3636
- name: Install Node.js
3737
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
3838
with:
39-
node-version-file: docs/.nvmrc
39+
node-version-file: .nvmrc
4040

4141
- run: yarn --immutable
4242
working-directory: ./docs

.github/workflows/pr.yml

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,20 @@ jobs:
2222
fail-fast: false
2323
matrix:
2424
include:
25+
# node 22/npm 10 on ubuntu and windows
2526
- os: ubuntu-latest
26-
# npm 6 and 8 have slightly different behavior with verdaccio in publishing tests.
27-
# It's unclear if this translates to meaningful differences in behavior in actual scenarios,
28-
# but test against both versions to be safe. (Only do this on the ubuntu build for speed.)
29-
npm: 6
30-
node: 14
31-
# node 14/npm 8 on ubuntu and windows
32-
- os: ubuntu-latest
33-
npm: 8
34-
node: 14
27+
npm: 10
28+
node: 22
3529
- os: windows-latest
36-
npm: 8
37-
node: 14
38-
# node 20/npm 11 on ubuntu and windows (can't use 22 for reasons described in release.yml)
30+
npm: 10
31+
node: 22
32+
# node 24/npm 11 on ubuntu and windows
3933
- os: ubuntu-latest
4034
npm: 11
41-
node: 20
35+
node: 24
4236
- os: windows-latest
4337
npm: 11
44-
node: 20
38+
node: 24
4539

4640
name: build (${{ matrix.os }}, node ${{ matrix.node }}, npm ${{ matrix.npm }})
4741

@@ -57,21 +51,21 @@ jobs:
5751
cache: yarn
5852
node-version: ${{ matrix.node }}
5953

60-
# Guarantee a predictable version of npm for the first round of tests
54+
# Guarantee a predictable version of npm
6155
- name: Install npm@${{ matrix.npm }}
6256
run: npm install --global npm@${{ matrix.npm }}
6357

64-
- run: yarn --frozen-lockfile
58+
- run: yarn --immutable
6559

6660
- run: yarn build --verbose
6761

6862
- run: yarn checkchange --verbose
6963

7064
- run: yarn format:check
71-
if: matrix.os == 'ubuntu-latest' && matrix.node == 14 && matrix.npm == 8
65+
if: matrix.os == 'ubuntu-latest' && matrix.node == 22
7266

7367
- run: yarn lint:ci
74-
if: matrix.os == 'ubuntu-latest' && matrix.node == 14 && matrix.npm == 8
68+
if: matrix.os == 'ubuntu-latest' && matrix.node == 22
7569

7670
- run: yarn test --verbose
7771
id: test
@@ -97,7 +91,7 @@ jobs:
9791
path: ${{ env.NPM_CACHE_DIR }}/_logs
9892
retention-days: 3
9993

100-
# The docs have a separate installation using Node 22 due to needing newer dependencies
94+
# The docs have a separate installation
10195
docs:
10296
name: build docs
10397

@@ -111,7 +105,7 @@ jobs:
111105
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
112106
with:
113107
cache: yarn
114-
node-version-file: ./docs/.nvmrc
108+
node-version-file: .nvmrc
115109

116110
- run: yarn --immutable
117111
working-directory: ./docs

.github/workflows/release.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@ name: Release
44
on:
55
workflow_dispatch:
66

7-
# Use newer node and npm for trusted publishing support. Can't use node 22 yet because of test issues.
8-
# (`npm login` hangs with the current verdaccio version; this is fixed in latest verdaccio, but it's
9-
# not compatible with old node)
107
env:
11-
nodeVersion: 20
8+
nodeVersion: 24
129
npmVersion: 11
1310

1411
concurrency:
@@ -50,7 +47,7 @@ jobs:
5047
- name: Install npm@${{ env.npmVersion }}
5148
run: npm install --global npm@${{ env.npmVersion }}
5249

53-
- run: yarn --frozen-lockfile
50+
- run: yarn --immutable
5451

5552
- run: yarn build --verbose
5653

.gitignore

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

1513
docs/.vuepress/.cache
1614
docs/.vuepress/.temp
17-
docs/.yarn/*
18-
!docs/.yarn/patches/
19-
!docs/.yarn/releases/
15+
docs/.yarn
16+
17+
.yarn/*
18+
!.yarn/patches/
19+
!.yarn/releases/
20+
# Ignore this in case a local .npmrc is added with a token for publishing
21+
.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
*.patch
34
*.snap

.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: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
approvedGitRepositories:
2+
- '**'
3+
4+
enableScripts: true
5+
6+
nodeLinker: node-modules
7+
8+
npmMinimalAgeGate: 3d
9+
10+
npmPreapprovedPackages:
11+
- lage
12+
- workspace-tools
13+
14+
preferReuse: true
15+
16+
yarnPath: .yarn/releases/yarn-4.14.1.cjs

CLAUDE.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,18 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
66

77
Beachball is a CLI tool for automating semantic version bumping, changelog generation, and npm publishing in monorepos and single-package repos.
88

9+
## Branches
10+
11+
- `v2`: the current stable release branch from `beachball@latest` and the doc site are published.
12+
- `main`: contains development work for the next major release of beachball, version 3. Breaking changes are allowed if necessary.
13+
914
## Monorepo structure
1015

1116
- `packages/beachball`: `beachball` package
1217
- `scripts`: repo-internal scripts (`@microsoft/beachball-scripts`)
1318

1419
## Commands
1520

16-
Beachball currently uses Node 14. Before running tests, you may need to activate `nvm`: on Mac or Linux, `source ~/.nvm/nvm.sh && nvm use`.
17-
1821
### Top-level
1922

2023
These commands work at the top level of the monorepo.
@@ -124,7 +127,7 @@ Test helpers in `src/__fixtures__/` provide mock factories for repos, logs, pack
124127

125128
## Documentation site
126129

127-
The doc site uses Vuepress and is located under `/docs`. It uses a separate yarn installation with Node 22 + Yarn 4 to get rid of very outdated deps while keeping beachball v2 on Node 14.
130+
The doc site uses Vuepress and is located under `/docs`. It uses a separate yarn installation to keep the docs dependencies separate.
128131

129132
### Editing and validating docs
130133

0 commit comments

Comments
 (0)