Give the TypeScript toolchain pg, mongodb and mssql, so a catalogue check can type-check the modules that use them (issue 385)
mesh/merge-gate pass: builds mesh-tools, sent nowhere; no bus step; every machine composes with the change as it did without (4 of 4 compose)
mesh/repo-check pass: its merge-check.sh passed
mesh/delivery delivered
mesh/delivery-group group fix/385-an-untestable-module-fails-the-check delivered: every member is delivered
mesh/merge-gate pass: builds mesh-tools, sent nowhere; no bus step; every machine composes with the change as it did without (4 of 4 compose)
mesh/repo-check pass: its merge-check.sh passed
mesh/delivery delivered
mesh/delivery-group group fix/385-an-untestable-module-fails-the-check delivered: every member is delivered
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.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user