From e7bd5d46bc0bae4874ff69cd189e889b301215d0 Mon Sep 17 00:00:00 2001 From: Suguru Inatomi Date: Wed, 16 Apr 2025 23:05:07 +0900 Subject: [PATCH 1/3] Import `Buffer` from `node:buffer` explicitly --- src/server/stdio.ts | 1 + src/shared/stdio.test.ts | 1 + src/shared/stdio.ts | 1 + 3 files changed, 3 insertions(+) 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"; /** From 93f781936cfc458e08b659d8a9653012c98c9e2c Mon Sep 17 00:00:00 2001 From: Suguru Inatomi Date: Wed, 2 Jul 2025 00:27:59 +0900 Subject: [PATCH 2/3] Import URL from `node:url` --- src/server/sse.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"; From 0e1c58698b71ac01cec0ad020f28c4303c611262 Mon Sep 17 00:00:00 2001 From: Suguru Inatomi Date: Wed, 2 Jul 2025 00:28:28 +0900 Subject: [PATCH 3/3] ci: Add deno compatibility check job --- .github/workflows/main.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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'