The Node build module installs the dependencies a placed mesh package declares (H-A-491) #741

Merged
mesh-tools merged 1 commits from fix/node-placed-deps into main 2026-11-22 19:10:14 +00:00
Member

Builds: design 47 H, lead answer H-A-491 and its addendum (hq branch design/47-H1-answers-59, commits 30c6d51e and ecc9934f).

Cause

The forge module's bundle failed all day: esbuild could not resolve blakejs, a dependency of the placed SDK (its seal code imports it). The Node build module (mesh-build-node) unpacks a mesh package's tarball straight into node_modules, so the dependencies that package declares were never installed.

Change

After every mesh package is placed, the fetch installs the dependencies those packages declare, through the same npm path as the module's own dependencies, before the bundle. It leaves out their devDependencies, any mesh package, and any package the module's node_modules already holds.

Files: modules/mesh-build-node/cmd/mesh-build-node/package.go, fetch.go, fetch_test.go.

Tests

TestAMeshPackageIsNotBeyondTheSdk (fetch_test.go) gains a case: the placed SDK declares blakejs, tweetnacl (already present), a mesh package and devDependencies. npm is asked once, for blakejs only, and blakejs lands beside the SDK, which stays at its placed version.

checks/*

I ran each checks/* package locally on this head. 20 pass. The other 13 cannot run outside the checker: they lack go.sum entries for mesh packages, which the builder resolves, or they need MESH_CHECK_BESIDE. None of them touches mesh-build-node. The module's own unit suite needs the same resolution, so it runs in this pull request's check.

Reviewed-by: mesh-code-reviewer@shanks at 6476e3595a
Pushed-by: lead-47@shanks

Builds: design 47 H, lead answer H-A-491 and its addendum (hq branch design/47-H1-answers-59, commits 30c6d51e and ecc9934f). ## Cause The forge module's bundle failed all day: esbuild could not resolve `blakejs`, a dependency of the placed SDK (its seal code imports it). The Node build module (mesh-build-node) unpacks a mesh package's tarball straight into `node_modules`, so the dependencies that package declares were never installed. ## Change After every mesh package is placed, the fetch installs the dependencies those packages declare, through the same npm path as the module's own dependencies, before the bundle. It leaves out their devDependencies, any mesh package, and any package the module's `node_modules` already holds. Files: `modules/mesh-build-node/cmd/mesh-build-node/package.go`, `fetch.go`, `fetch_test.go`. ## Tests `TestAMeshPackageIsNotBeyondTheSdk` (fetch_test.go) gains a case: the placed SDK declares `blakejs`, `tweetnacl` (already present), a mesh package and devDependencies. npm is asked once, for `blakejs` only, and `blakejs` lands beside the SDK, which stays at its placed version. ## checks/* I ran each `checks/*` package locally on this head. 20 pass. The other 13 cannot run outside the checker: they lack go.sum entries for mesh packages, which the builder resolves, or they need `MESH_CHECK_BESIDE`. None of them touches mesh-build-node. The module's own unit suite needs the same resolution, so it runs in this pull request's check. Reviewed-by: mesh-code-reviewer@shanks at 6476e3595aafe495cfb13929519eb400e649ab2c Pushed-by: lead-47@shanks
mesh-tools added 1 commit 2026-11-22 19:10:05 +00:00
A mesh package's tarball is unpacked straight into node_modules, so its own
dependencies were never there: the forge module's bundle failed with esbuild
"Could not resolve blakejs" from the SDK's seal code. After every mesh package
is placed, the fetch installs the dependencies they declare (not their
devDependencies, not a mesh package, not one already present) through the
same npm path as the module's own, before the bundle.

Builds: design 47 H H-A-491 (addendum)
mesh-tools merged commit 25e6a46b0a into main 2026-11-22 19:10:14 +00:00
mesh-tools deleted branch fix/node-placed-deps 2026-11-22 19:10:15 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-catalog#741