From 47915328e6c91cfd3dfe411d83b7e44ba44d7e02 Mon Sep 17 00:00:00 2001 From: murderteeth Date: Mon, 13 Apr 2026 17:35:08 +0000 Subject: [PATCH] Address Copilot review nits Fixes US spelling (recognised -> recognized) across docs, QLDoc, change note, and test fixture comments. Clarifies the handler QLDoc to note sync/async support. Renames the supported-frameworks entry from "vercel" to "Vercel (@vercel/node)" to avoid implying broader platform coverage. Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/codeql/reusables/supported-frameworks.rst | 2 +- javascript/ql/lib/change-notes/2026-04-12-vercel-node.md | 2 +- .../ql/lib/semmle/javascript/frameworks/VercelNode.qll | 9 +++++---- .../library-tests/frameworks/vercel/src/notahandler.ts | 2 +- .../ql/test/library-tests/frameworks/vercel/src/now.ts | 2 +- .../test/library-tests/frameworks/vercel/src/vercel.ts | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/codeql/reusables/supported-frameworks.rst b/docs/codeql/reusables/supported-frameworks.rst index 581f34f9227..930cdc6b629 100644 --- a/docs/codeql/reusables/supported-frameworks.rst +++ b/docs/codeql/reusables/supported-frameworks.rst @@ -197,7 +197,7 @@ and the CodeQL library pack ``codeql/javascript-all`` (`changelog void`, where - * the types are imported from the `@vercel/node` package. The Vercel runtime - * invokes the default export for every incoming HTTP request. + * taking parameters `(req: VercelRequest, res: VercelResponse)`, where the + * types are imported from the `@vercel/node` package. The default export may + * be synchronous or `async`, and the Vercel runtime invokes it for every + * incoming HTTP request. */ module VercelNode { /** @@ -20,7 +21,7 @@ module VercelNode { * `VercelResponse` from `@vercel/node`. * * Since `@vercel/node` is commonly imported as a type-only import, handlers - * are recognised by their TypeScript parameter types. The default-export + * are recognized by their TypeScript parameter types. The default-export * constraint excludes private helpers or test utilities that share the * same signature. */ diff --git a/javascript/ql/test/library-tests/frameworks/vercel/src/notahandler.ts b/javascript/ql/test/library-tests/frameworks/vercel/src/notahandler.ts index 086673306b1..7bb1d903a84 100644 --- a/javascript/ql/test/library-tests/frameworks/vercel/src/notahandler.ts +++ b/javascript/ql/test/library-tests/frameworks/vercel/src/notahandler.ts @@ -2,7 +2,7 @@ import type { VercelRequest, VercelResponse } from "@vercel/node"; // A default-exported function that has VercelRequest/VercelResponse at // positions 1 and 2, not 0 and 1. Vercel does not invoke it this way, -// so it must NOT be recognised as a route handler. +// so it must NOT be recognized as a route handler. export default function notAHandler(ctx: unknown, req: VercelRequest, res: VercelResponse) { res.send(req.query.name); } diff --git a/javascript/ql/test/library-tests/frameworks/vercel/src/now.ts b/javascript/ql/test/library-tests/frameworks/vercel/src/now.ts index a8ac7020408..33a34d47e2a 100644 --- a/javascript/ql/test/library-tests/frameworks/vercel/src/now.ts +++ b/javascript/ql/test/library-tests/frameworks/vercel/src/now.ts @@ -1,7 +1,7 @@ import type { NowRequest, NowResponse } from "@now/node"; // Legacy Zeit-era aliases. The model should treat these identically to -// the modern @vercel/node NowRequest -> VercelRequest, NowResponse -> VercelResponse. +// the modern @vercel/node types (NowRequest -> VercelRequest, NowResponse -> VercelResponse). export default function handler(req: NowRequest, res: NowResponse) { res.send(req.query.name); } diff --git a/javascript/ql/test/library-tests/frameworks/vercel/src/vercel.ts b/javascript/ql/test/library-tests/frameworks/vercel/src/vercel.ts index 62ff9744772..0dae664e2c4 100644 --- a/javascript/ql/test/library-tests/frameworks/vercel/src/vercel.ts +++ b/javascript/ql/test/library-tests/frameworks/vercel/src/vercel.ts @@ -1,6 +1,6 @@ import type { VercelRequest, VercelResponse } from "@vercel/node"; -// A private helper with the same signature. Must NOT be recognised as a +// A private helper with the same signature. Must NOT be recognized as a // route handler, since Vercel only invokes the default export. function internalHelper(req: VercelRequest, res: VercelResponse) { res.send(req.query.name);