The prepare lifecycle script already runs npm run build automatically
during npm ci, making the explicit build step redundant.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
prepack does not reliably run when installing repomix as a git dependency,
causing the server Docker build to fail (lib/ directory missing).
Change to prepare which reliably runs for git dependency installation.
Also change npm ci --omit=dev to npm prune --omit=dev in Dockerfile and CI,
since npm prune does not trigger lifecycle scripts (avoiding prepare failure
when devDependencies are no longer available).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The previous commit unnecessarily changed the order of npm link and the
dev dependency removal step. Since npm link only creates a global symlink
to the package directory, it should come before npm ci --omit=dev, matching
the original order when npm prune --omit=dev was used.
https://claude.ai/code/session_01WorTDgSv8c9jvVpa1YsSeo
Now that `prepare` has been replaced with `prepack` (which only runs on
npm pack/publish), `npm ci --omit=dev` no longer triggers an unwanted
build. This allows a cleaner approach: install all deps, build, then
reinstall with only production dependencies via `npm ci --omit=dev`.
https://claude.ai/code/session_01WorTDgSv8c9jvVpa1YsSeo
npm 10.x (shipped with Node 22) deprecates the --production flag.
Use --omit=dev instead for both Dockerfile and CI workflow.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace `npm ci --omit=dev --ignore-scripts` with `npm prune --production`
which is more efficient (removes packages in-place instead of reinstalling)
and does not trigger lifecycle scripts by default.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The `prepare` script (`npm run build`) added in #1053 causes the Docker
build to fail because `npm ci --omit=dev` triggers it without
devDependencies (`rimraf`, `tsc`) being available. Adding
`--ignore-scripts` skips the unnecessary rebuild since the build output
already exists from the prior step.
Docker builds have been broken since 2025-12-31 (PR #1053).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>