diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 04ba17c90..4b5a5771b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,6 +26,23 @@ jobs: - run: npm test - run: npm run lint + check-deno-compatibility: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18 + cache: npm + - uses: denoland/setup-deno@v2 + with: + deno-version: v2.x + - run: npm ci + - run: npm run build + - name: Check Deno compatibility + run: deno check dist/**/*.js + publish: runs-on: ubuntu-latest if: github.event_name == 'release' diff --git a/src/server/sse.ts b/src/server/sse.ts index e07256867..d98621610 100644 --- a/src/server/sse.ts +++ b/src/server/sse.ts @@ -5,7 +5,7 @@ import { JSONRPCMessage, JSONRPCMessageSchema, MessageExtraInfo, RequestInfo } f import getRawBody from "raw-body"; import contentType from "content-type"; import { AuthInfo } from "./auth/types.js"; -import { URL } from 'url'; +import { URL } from 'node:url'; const MAXIMUM_MESSAGE_SIZE = "4mb"; diff --git a/src/server/stdio.ts b/src/server/stdio.ts index 30c80012e..fbbb9d75c 100644 --- a/src/server/stdio.ts +++ b/src/server/stdio.ts @@ -1,3 +1,4 @@ +import type { Buffer } from "node:buffer"; import process from "node:process"; import { Readable, Writable } from "node:stream"; import { ReadBuffer, serializeMessage } from "../shared/stdio.js"; diff --git a/src/shared/stdio.test.ts b/src/shared/stdio.test.ts index b12279664..8e65857d5 100644 --- a/src/shared/stdio.test.ts +++ b/src/shared/stdio.test.ts @@ -1,3 +1,4 @@ +import { Buffer } from "node:buffer"; import { JSONRPCMessage } from "../types.js"; import { ReadBuffer } from "./stdio.js"; diff --git a/src/shared/stdio.ts b/src/shared/stdio.ts index 52bde646f..ff320ffac 100644 --- a/src/shared/stdio.ts +++ b/src/shared/stdio.ts @@ -1,3 +1,4 @@ +import { Buffer } from "node:buffer"; import { JSONRPCMessage, JSONRPCMessageSchema } from "../types.js"; /**