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" } }