The toolchain carries the SDK the mesh last published, and esbuild (hq issue 212, ADR 0193) #44

Merged
mesh-admin merged 1 commits from feat/the-toolchain-follows-the-sdk-and-bundles into main 2026-10-03 21:32:00 +00:00
Contributor

Issue 212. module.json build.on gains {arg: MESH_SDK, module: mesh-sdk, artifact: lib}: the builder passes the SDK's published package by its exact version (@novox/mesh-sdk@0.1.6), and the Dockerfile installs it after the package.json install (ARG MESH_SDK … npm install "${MESH_SDK}"), so a new release is a new argument and Docker's cached layer can no longer keep an older SDK. The planner already orders a module after what it stands on, so an SDK merge rebuilds the toolchain, and (issue 211) every bundle after it.

One-file bundles (ADR 0193). esbuild ^0.25 as a dev dependency, so the toolchain image carries it at /app/node_modules/esbuild/bin/esbuild (npm installs the native binary there; mesh-controller runs it directly).

Verified: built --target toolchain locally with MESH_SDK=@novox/mesh-sdk@0.1.6 — image carries esbuild and SDK 0.1.6. Manifest passes module check.

Merge first, before mesh-controller feat/a-typescript-bundle-is-one-file: the builder refuses to bundle in a toolchain image without esbuild.

**Issue 212.** `module.json` `build.on` gains `{arg: MESH_SDK, module: mesh-sdk, artifact: lib}`: the builder passes the SDK's published package by its exact version (`@novox/mesh-sdk@0.1.6`), and the Dockerfile installs it after the package.json install (`ARG MESH_SDK` … `npm install "${MESH_SDK}"`), so a new release is a new argument and Docker's cached layer can no longer keep an older SDK. The planner already orders a module after what it stands on, so an SDK merge rebuilds the toolchain, and (issue 211) every bundle after it. **One-file bundles (ADR 0193).** `esbuild` ^0.25 as a dev dependency, so the toolchain image carries it at `/app/node_modules/esbuild/bin/esbuild` (npm installs the native binary there; mesh-controller runs it directly). Verified: built `--target toolchain` locally with `MESH_SDK=@novox/mesh-sdk@0.1.6` — image carries esbuild and SDK 0.1.6. Manifest passes `module check`. **Merge first**, before mesh-controller `feat/a-typescript-bundle-is-one-file`: the builder refuses to bundle in a toolchain image without esbuild.
mesh-admin added 1 commit 2026-10-03 21:26:19 +00:00
mesh-tools stands on mesh-sdk's published package: the build receives its exact version and
installs it after the package.json install, so a release is a new argument and the cached layer
cannot keep an older SDK; the planner orders the toolchain after the SDK, and every bundle after the
toolchain (issue 211). esbuild, a development dependency, is what the builder bundles each
TypeScript entrypoint and launcher into one file with.
mesh-admin merged commit 094a7d0d7c into main 2026-10-03 21:32:00 +00:00
mesh-admin deleted branch feat/the-toolchain-follows-the-sdk-and-bundles 2026-10-03 21:32:02 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-tools#44