chore(ci): validate regenerated lockfile during impit-node release - #468
Merged
Merged
Conversation
pnpm install --lockfile-only exits 0 even when an optional dependency cannot be resolved, silently omitting it from the lockfile. Right after publishing, platform packages may not have propagated on the npm registry yet, so the regenerated lockfile could be committed missing an entry while still passing the retry loop's exit-code check. Chain a frozen-lockfile install after regeneration so the loop only succeeds once the lockfile is actually consistent with package.json, otherwise it retries until the registry catches up. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
impit-node release
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.
Follow-up to #467, which fixed the symptom. This fixes the root cause in the release workflow.
The
Update lockfilestep runspnpm install --lockfile-onlyafter publishing. That command exits 0 even when an optional dependency can't be resolved — it just silently drops it from the lockfile. Because the regeneration runs seconds afterpnpm publish, a freshly published platform package may not have propagated on the npm registry yet, so it gets omitted while the retry loop's exit-code check still passes. That is exactly how theimpit-linux-arm64-muslentry went missing in the 0.14.1 release.This chains a
pnpm install --frozen-lockfileafter the regeneration. The loop now only exits 0 once the regenerated lockfile actually matchespackage.json(the same check CI runs); if an optional dep was dropped, the frozen install fails and the loop retries after 30s until the registry catches up.