Skip to content

Commit cb42644

Browse files
committed
fix: resolve ESM compatibility issues in CI
- Update Node.js version requirement from >=16 to >=20 in package.json - Move chalk from devDependencies to dependencies with CommonJS version (^4.1.2) - Update GitHub workflow to use Node.js 20 instead of 18 - Fix ERR_REQUIRE_ESM error when running evalops CLI in CI environment This resolves the CI failure where chalk module was trying to be imported as CommonJS but was ESM-only in newer versions.
1 parent 165a061 commit cb42644

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/evalops-ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Setup Node.js
2626
uses: actions/setup-node@v4
2727
with:
28-
node-version: '18'
28+
node-version: '20'
2929

3030
- name: Install EvalOps CLI
3131
run: npm install -g evalops-cli
@@ -62,7 +62,7 @@ jobs:
6262
- name: Setup Node.js
6363
uses: actions/setup-node@v4
6464
with:
65-
node-version: '18'
65+
node-version: '20'
6666

6767
- name: Run EvalOps Evaluation
6868
id: evaluation
@@ -92,7 +92,7 @@ jobs:
9292
- name: Setup Node.js
9393
uses: actions/setup-node@v4
9494
with:
95-
node-version: '18'
95+
node-version: '20'
9696

9797
- name: Install EvalOps CLI
9898
run: npm install -g evalops-cli

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@
4141
"@types/jest": "^30.0.0",
4242
"@types/js-yaml": "^4.0.9",
4343
"@types/node": "^24.2.1",
44-
"chalk": "^4.1.2",
4544
"jest": "^30.0.5",
4645
"ts-jest": "^29.4.1",
4746
"tsx": "^4.20.3",
4847
"typescript": "^5.9.2"
4948
},
5049
"dependencies": {
50+
"chalk": "^4.1.2",
5151
"commander": "^14.0.0",
5252
"dotenv": "^17.2.1",
5353
"glob": "^11.0.3",
@@ -67,7 +67,7 @@
6767
},
6868
"homepage": "https://github.com/evalops/evalops_cli#readme",
6969
"engines": {
70-
"node": ">=16.0.0"
70+
"node": ">=20.0.0"
7171
},
7272
"files": [
7373
"dist/**/*",

0 commit comments

Comments
 (0)