From 847055c7588af1bac62fb5355a347c335c9c23b9 Mon Sep 17 00:00:00 2001 From: jochen Date: Mon, 12 Oct 2026 12:27:40 +0200 Subject: [PATCH] Give the TypeScript toolchain pg, mongodb and mssql, so a catalogue check can type-check the modules that use them (issue 385) A catalogue's TypeScript check fetches nothing and reads this image's node_modules. Once a module it cannot check fails rather than passing with a note, mesh-catalog, model-usage, mongodb and mssql could never merge again. They are development dependencies, so the runtime image stays as it is. --- Dockerfile | 5 +++++ node-tools/package.json | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 636a8cb..5ab16d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,6 +61,11 @@ RUN npm prune --omit=dev # modules. The builder copies this directory whole into a compiled bundle (novox/hq ADR 0188 §5), # so a bundle unpacked on a machine starts — a `.js` without that package.json is read as # CommonJS, and an import of `nats` without node_modules beside it resolves to nothing. +# +# **The client libraries a catalogue module depends on are here too** (novox/hq issue 385): pg, mongodb and +# mssql, development dependencies of node-tools, so the runtime stage prunes them. A catalogue's +# merge-check-typescript.sh fetches nothing and copies this image's node_modules beside a module; a module +# depending on a package that is not here cannot be type-checked or tested, and fails its check. FROM compiling AS toolchain COPY --from=lean /app/node_modules /app/runtime/node_modules RUN printf '{"type":"module","private":true}\n' > /app/runtime/package.json diff --git a/node-tools/package.json b/node-tools/package.json index 0019ab2..9bc65fa 100644 --- a/node-tools/package.json +++ b/node-tools/package.json @@ -19,6 +19,9 @@ "devDependencies": { "@types/node": "^22.20.1", "typescript": "^5.9.3", - "esbuild": "^0.25.0" + "esbuild": "^0.25.0", + "mongodb": "^6.21.0", + "mssql": "^11.0.2", + "pg": "^8" } }