Skip to content

Commit 6d9cd17

Browse files
chore: unblock uses with Deno and Bun (#151)
I wanna test more NodeJS versions to see that this does not cause other issues. Deno test command: ```sh npx @modelcontextprotocol/inspector deno --allow-env --allow-read ./build/src/index.js ``` Bun test command: ```sh npx @modelcontextprotocol/inspector bun ./build/src/index.js ```
1 parent 90f686e commit 6d9cd17

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
* SPDX-License-Identifier: Apache-2.0
77
*/
88

9-
const [major, minor] = process.version.substring(1).split('.').map(Number);
9+
import {version} from 'node:process';
10+
11+
const [major, minor] = version.substring(1).split('.').map(Number);
1012

1113
if (major < 22 || (major === 22 && minor < 12)) {
1214
console.error(

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"ESNext.Iterator",
99
"ESNext.Collection"
1010
],
11-
"module": "nodenext",
12-
"moduleResolution": "nodenext",
11+
"module": "esnext",
12+
"moduleResolution": "bundler",
1313
"outDir": "./build",
1414
"rootDir": ".",
1515
"strict": true,

0 commit comments

Comments
 (0)