packages: wolfi import batch 4 — node (eslint, lerna, json-server, serve) - #370
Conversation
Fourth batch from `pkgmgr import-wolfi` — node CLI tools. Node installs from
the npm registry by name+version (cf. typescript-language-server), so these
have no Source: build.sh runs `npm install -g --prefix=$OUTPUT_DIR/usr
<name>@$MINIMAL_ARG_VERSION`, with base+node build_deps, coreutils+node runtime,
a needs{dns,internet} block, and outputs = console-script bins + node_modules.
Each builds clean and passes every `minimal check` at 0 TODOs.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 12 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughThis PR adds build specifications and install scripts for four new npm-based packages: eslint (10.6.0), json-server (0.17.4), lerna (9.0.7), and serve (14.2.6). Each package includes a build.ncl spec and a build.sh script performing global npm installs. ChangesNew npm package build specs
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
| }, | ||
| outputs = { | ||
| json-server = { glob = "usr/bin/json-server" } | OutputBin, | ||
| node_modules = { glob = "usr/lib/node_modules/**", allow_executable = true } | OutputData, |
There was a problem hiding this comment.
I dont think a global node_modules is gonna go so well, particularly if someone uses node vs node-lts
| }, | ||
| outputs = { | ||
| lerna = { glob = "usr/bin/lerna" } | OutputBin, | ||
| node_modules = { glob = "usr/lib/node_modules/**", allow_executable = true } | OutputData, |
twitchyliquid64 flagged the global usr/lib/node_modules output — it overlaps the node/node-lts runtime's ownership of that path and welds the tool to one node variant. Install each tool into a package-private prefix (usr/libexec/<pkg>) and expose the bins as relative symlinks on PATH (../libexec/<pkg>/bin/<tool>). The inner `#!/usr/bin/env node` shebang is served by coreutils(env)+node, so no shell is needed and runtime_deps=[coreutils, node] stays correct — matching what pnpm and bash-language-server already ship. (Deliberately NOT a `#!/bin/sh` wrapper, which would need bash in the runtime closure and fail at runtime with "bad interpreter" while still passing minimal check.) Build-proven all 4: usr/bin/<tool> resolves through libexec to the node script; zero leak into usr/lib/node_modules. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Good catch — fixed in The bins are exposed as relative symlinks on PATH ( Build-proven all four: Follow-ups (separate PRs): fixing the |
Follows Tom's review on #370 — "I dont think a global `node_modules` is gonna go so well, particularly if someone uses `node` vs `node-lts`". The collision half of that was already handled: vlt installs into a private `usr/libexec/vlt` prefix with relative PATH symlinks, never the shared `usr/lib/node_modules` the node runtime owns. But the variant question the comment raises was still answered by the importer's hardcoded default rather than by evidence. The evidence says LTS: - vlt's own CI tests Node 22.x ONLY (`node-version: '^22.22.0'` and `[22.x]`); `engines` says `>=22.22.0`. Our node-lts is 24.14.1 and node is 25.8.2 — neither is 22.x, but LTS is two majors closer to what upstream actually tests against. - pnpm is the closest analogue in this repo (a package manager, a node CLI, same shape of package) and it is on node-lts, per #97/#98: the node most users and hosting providers run is whatever ships with current LTS. node-lts ships its own npm, so it serves the build (`npm ci`) and the runtime (`#!/usr/bin/env node`) both — no split between build_deps and runtime_deps. Rebuilt and re-checked on the min path: 15/15 Pass.
Fourth batch from
pkgmgr import-wolfi— node CLI tools. Node is a different shape from the tarball-built families: Minimal installs node CLIs from the npm registry by name+version (cf. typescript-language-server), not from a github source — so these have noSource, theynpm install -gat build time.What's here (4 packages, all build + pass every
minimal checkat 0 TODOs)@nxaddons)How they're produced
npm install -g --prefix="$OUTPUT_DIR/usr" <name>@$MINIMAL_ARG_VERSION.base+nodebuild_deps,coreutils+noderuntime_deps, aneeds = { dns, internet }block for the npm fetch, andbuild_args { include version }.usr/bin/<tool>is a symlink intonode_modules) +node_modules(allow_executable— some packages ship native.nodeaddons). Read from a verified build.Reviewer notes (surfaced, not hidden)
source_provenance— node packages install from the npm registry, not a pinned github tarball, so there's no'GithubRepoprovenance for vuln-scanning (matches Minimal's existing node packages like typescript-language-server). Worth a follow-up: an npm PURL for scan coverage.typescript). These 4 resolve their own deps vianpm install; the generated build.sh installs the single named package, and the import surfaces a reviewer note to add peers if a tool needs them.🤖 Generated with Claude Code
Summary by CodeRabbit
eslint,json-server,lerna, andserve.