Repository navigation
fix: use npm ci install command - #31
Merged
Merged
Conversation
Merged
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.
Description
The npm publish phase of
finalize-release.shrannpm installbefore executingthe configured build command. This switches it to
npm ci, which performs aclean, reproducible install directly from the lockfile — the recommended approach
in CI. It's faster and guarantees the exact pinned dependency versions are used
when building before publish.
Because release-champion runs in arbitrary consumer repositories, the change
prefers
npm cionly when a lockfile (package-lock.json/npm-shrinkwrap.json)is present and falls back to
npm installotherwise, sincenpm cierrors outhard when no lockfile exists.
Fixes # (issue)
Type of change
How Has This Been Tested?
The change is a conditional around the install step in the
publish-npmpath.The lockfile branch (
npm ci) and the fallback branch (npm install) are bothcovered by the existing bats suite for the publish flow.
bats tests/passesTest Configuration:
publish-npm: truewith a build command, repos both with and without a lockfileChecklist
set -euo pipefail, quoted expansions)action.ymldescriptions where relevant