Skip to content

Commit ba9c8f3

Browse files
committed
fix(ci): support older Node.js in test matrix
ESLint devDependencies require Node ^20.19.0 || ^22.13.0 || >=24, which breaks `yarn install` on older Node versions used by the prebuildify test matrix. Add `.yarnrc` with `--ignore-engines true` to skip engine checks. Also move `yarn install` for test subdirectories from `test/crashtracker/index.js` into `scripts/test.sh` so dependencies are installed before Node loads the test file.
1 parent 0c67727 commit ba9c8f3

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.yarnrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--ignore-engines true

scripts/test.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
set -e
33

44
run_test() {
5+
local dir
6+
dir=$(dirname "$1")
7+
if [ -f "${dir}/package.json" ]; then
8+
echo "Installing dependencies for $1"
9+
yarn --cwd "$dir" install
10+
fi
511
echo "Running $1"
612
node "$1"
713
}

test/crashtracker/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ const uid = process.getuid()
1414
const gid = process.getgid()
1515
const opts = { cwd, stdio, uid, gid }
1616

17-
execSync('yarn install', opts)
18-
1917
const app = express()
2018

2119
rmSync(path.join(cwd, 'stdout.log'), { force: true })

0 commit comments

Comments
 (0)