This is an automated email from the ASF dual-hosted git repository. jrgemignani pushed a commit to branch PG19 in repository https://gitbox.apache.org/repos/asf/age.git
commit b07cf69b304c55c4a59a5aafb3d6c795a7626a91 Author: John Gemignani <[email protected]> AuthorDate: Wed Jul 1 19:01:42 2026 -0700 Fix Node.js driver CI build broken by @types/node drift (#2452) The Node.js driver CI (npm install -> npm run build -> tsc) failed with parser errors in node_modules/@types/node/ffi.d.ts (TS1139/TS1005/TS1109/ TS1128). package-lock.json is gitignored, so CI resolves dependencies purely from package.json. @types/node was only pulled transitively via a wildcard range (@types/pg and jest depend on @types/node@*), so a fresh install grabbed the latest (26.x). That version uses `const` type parameters (a TypeScript 5.0 feature) in ffi.d.ts, which [email protected] cannot parse. skipLibCheck does not suppress these parser-level errors. The runtime Node version is unrelated: @types/node is resolved from the npm dependency graph, not the Node.js runtime. Fix: - Add a bounded direct devDependency "@types/node": "^20.19.0" so a fresh install constrains the typings to the Node 20 LTS line, which is compatible with [email protected] and keeps the toolchain consistent (eslint 7 / typescript-eslint 4 / TS 4.9 / Node 20 typings). - Pin CI to Node 20 (setup-node@v4, node-version: 20) for reproducibility and to match the pinned typings; replaces the deprecated setup-node@v3 and floating node-version: latest. Verified: a clean, no-lockfile install (matching CI) now resolves @types/[email protected] and tsc builds successfully. Co-authored-by: Copilot <[email protected]> modified: .github/workflows/nodejs-driver.yaml modified: drivers/nodejs/package.json --- .github/workflows/nodejs-driver.yaml | 4 ++-- drivers/nodejs/package.json | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nodejs-driver.yaml b/.github/workflows/nodejs-driver.yaml index d0557fdf..e6a9e461 100644 --- a/.github/workflows/nodejs-driver.yaml +++ b/.github/workflows/nodejs-driver.yaml @@ -22,9 +22,9 @@ jobs: run: docker compose up -d - name: Set up Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: latest + node-version: 20 - name: Install dependencies run: npm install diff --git a/drivers/nodejs/package.json b/drivers/nodejs/package.json index 15c2371f..d17aa3b3 100644 --- a/drivers/nodejs/package.json +++ b/drivers/nodejs/package.json @@ -34,6 +34,7 @@ }, "devDependencies": { "@types/jest": "^29.5.14", + "@types/node": "^20.19.0", "@types/pg": "^7.14.10", "@typescript-eslint/eslint-plugin": "^4.22.1", "@typescript-eslint/parser": "^4.22.1",
