From 1cb6e9c4b2d76fb46d9302b8a737ddb90d4ac7d1 Mon Sep 17 00:00:00 2001 From: Amaad Martin Date: Fri, 31 Jul 2026 05:13:12 -0700 Subject: [PATCH] Fix: declare @types/node in the CommonJS TypeScript build_setup fixtures The ts_commonjs and ts_commonjs_native_addon fixtures use the CommonJS ambient globals require and module, which TypeScript only knows about when @types/node is present, but neither manifest declared it. They typecheck today only because @types/node reaches them by accident: the fixture install hoists a copy through unrelated transitive edges, and tsc's automatic @types inclusion also walks up to the repo root's node_modules/@types. Declare the build-time type dependency each fixture actually consumes, at the ^20.12.7 the repo root and dev/package.json already pin. devDependencies rather than dependencies: type definitions are build-time only, matching 59b99b9b ("Move openapi-types to devDependencies"). --- tests/integration/build_setup/ts_commonjs/package.json | 3 +++ .../build_setup/ts_commonjs_native_addon/package.json | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tests/integration/build_setup/ts_commonjs/package.json b/tests/integration/build_setup/ts_commonjs/package.json index 9fdafc3ac..604bf6445 100644 --- a/tests/integration/build_setup/ts_commonjs/package.json +++ b/tests/integration/build_setup/ts_commonjs/package.json @@ -17,5 +17,8 @@ "@google/adk": "file:../../../../core", "@google/adk-devtools": "file:../../../../dev", "@google/genai": "^2.9.0" + }, + "devDependencies": { + "@types/node": "^20.12.7" } } diff --git a/tests/integration/build_setup/ts_commonjs_native_addon/package.json b/tests/integration/build_setup/ts_commonjs_native_addon/package.json index 8c2643423..b8f7fde24 100644 --- a/tests/integration/build_setup/ts_commonjs_native_addon/package.json +++ b/tests/integration/build_setup/ts_commonjs_native_addon/package.json @@ -15,5 +15,8 @@ "@google/adk-devtools": "file:../../../../dev", "@google/genai": "^2.9.0", "onnxruntime-node": "file:./fake-onnxruntime-node" + }, + "devDependencies": { + "@types/node": "^20.12.7" } }