Skip to content

Commit 1c2e651

Browse files
committed
fix: support node20
1 parent 2275553 commit 1c2e651

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

.github/workflows/run-tests.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
- windows-latest
2121
- macos-latest
2222
node:
23+
- 20
2324
- 22
2425
- 24
2526
steps:
@@ -32,17 +33,26 @@ jobs:
3233
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
3334
with:
3435
cache: npm
35-
node-version: ${{ matrix.node }}
36+
node-version: 22
3637

3738
- name: Install dependencies
3839
run: npm ci
3940

41+
- name: Build
42+
run: npm run build
43+
44+
- name: Set up Node.js
45+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
46+
with:
47+
cache: npm
48+
node-version: ${{ matrix.node }}
49+
4050
- name: Disable AppArmor
4151
if: ${{ matrix.os == 'ubuntu-latest' }}
4252
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
4353

4454
- name: Run tests
45-
run: npm run test
55+
run: npm run test:no-build
4656

4757
# Gating job for branch protection.
4858
test-success:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ MCP clients.
2626

2727
## Requirements
2828

29-
- [Node.js 22](https://nodejs.org/) or newer.
29+
- [Node.js 20](https://nodejs.org/) or newer.
3030
- [Chrome](https://www.google.com/chrome/) current stable version or newer.
3131
- [npm](https://www.npmjs.com/).
3232

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"generate-docs": "npm run build && node --experimental-strip-types scripts/generate-docs.ts",
1616
"start": "npm run build && node build/src/index.js",
1717
"start-debug": "DEBUG=mcp:* DEBUG_COLORS=false npm run build && node build/src/index.js",
18-
"test": "npm run build && node --require ./build/tests/setup.js --test-reporter spec --test-force-exit --test 'build/tests/**/*.test.js'",
18+
"test:no-build": "node --require ./build/tests/setup.js --test-reporter spec --test-force-exit --test 'build/tests/**/*.test.js'",
19+
"test": "npm run build && npm run test:no-build",
1920
"test:only": "npm run build && node --require ./build/tests/setup.js --test-reporter spec --test-force-exit --test --test-only 'build/tests/**/*.test.js'",
2021
"test:only:no-build": "node --require ./build/tests/setup.js --test-reporter spec --test-force-exit --test --test-only 'build/tests/**/*.test.js'",
2122
"test:update-snapshots": "npm run build && node --require ./build/tests/setup.js --test-force-exit --test --test-update-snapshots 'build/tests/**/*.test.js'",

0 commit comments

Comments
 (0)