Skip to content

Add reproducible dependency install hook - #437

Closed
vlinkz wants to merge 2 commits into
mainfrom
chore/reproducible-npm-ci
Closed

vlinkz wants to merge 2 commits into
mainfrom
chore/reproducible-npm-ci

Conversation

@vlinkz

@vlinkz vlinkz commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Why

Make future Replit River development sandboxes install the project's locked dependencies automatically during environment builds.

What changed

  • Add an executable .nexus/hooks/on_build that locates the repository root relative to itself and runs npm ci.
  • The hook works when invoked from the environment workspace root as well as from the repository.

Validation

  • bash -n passed for the hook.
  • From outside the repository, bash river/.nexus/hooks/on_build installed all locked dependencies successfully without changing tracked application files.
  • npm run check passed after the final hook change.
  • The unchanged application tree previously passed npm run test:single (37 files, 815 passed, 1 skipped) and npm run build.
  • The saved replit-river environment now explicitly invokes this hook during its build. Fresh-image verification remains blocked: the latest two builds failed before checkout with "build repl is not ready". An earlier successful image did not contain node_modules, so dependency preinstallation has not yet been verified in a fresh image.
  • CI was pending when checked after commit 4ac58c5.

Versioning

  • Breaking protocol change
  • Breaking ts/js API change

~ written by ⠕ Replit

@vlinkz vlinkz closed this Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant