test: prove the packed registry installs and runs - #167
Merged
lmcorbalan merged 10 commits intoSep 3, 2026
Merged
Conversation
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #161.
Adds
npm run smoke:registry, the npm counterpart ofnpm run smoke: it packs the repository, installs the tarball into a scratch consumer outside it, and runs the bin that install links. No participant and no Daml toolchain.Changes
scripts/registry-install-smoke.sh: asserts the five archive entries, then runs the bin unconfigured and against a closed port. Both npm calls hold their own exit status and print what npm wrote, because--silentand a bare command substitution each swallow the diagnostics for the failures likeliest here (a compile error inprepare, an install that cannot reach the registry).package.json: onesmoke:registryscript entry.Acceptance criteria
Test plan
Thirteen runs (a green baseline, eleven faults expected red, one expected green) executed under npm 9.2.0 and npm 10.9.9, all thirteen correct under both. The npm version is load bearing: since npm 10,
npm packrunspreparein the foreground and writes to stdout, which made an earlier draft of this script fail on every good pack and discard the compiler's output on a bad one, so the name is read from the last line of a captured stdout instead. A spec that ships but does not parse is caught only by the/inforequest; a missing archive entry only by the listing. Afilesentry that dropsregistry/distis caught at the bin run rather than the listing, since npm always packs the filebinpoints at. Interrupted mid-run, the temp directory and the server are both gone. shellcheck clean,npm run check:depsgreen.Breaking changes
None. The check cannot prove the root manifest is complete:
expressis a peer dependency ofexpress-openapi-validator, so npm installs it at the consumer's top level and the service runs whether or not the root names it.npm run check:depscovers that comparison, and the script's header says so.