Merge pull request 'The TypeScript toolchain holds pg, mongodb and mssql, so a catalogue check can check the modules that use them (issue 385)' (#31) from fix/385-an-untestable-module-fails-the-check into main

This commit was merged in pull request #31.
This commit is contained in:
2026-10-12 10:46:07 +00:00
2 changed files with 9 additions and 1 deletions
+5
View File
@@ -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
+4 -1
View File
@@ -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"
}
}