fix(ci): install from the lockfile - #65
Closed
jfrench9 wants to merge 1 commit into
Closed
Conversation
`npm install` re-resolved the peer dependencies on every CI run, so an upstream publish could turn main red between a PR's green run and its merge. It did today: react-dom 19.3.0 was published two minutes before react 19.3.0, and the merge of #64 landed in between. `npm ci` installs exactly what the lockfile says, in both the test and publish workflows. Claude-Session: https://claude.ai/code/session_01Wrb85mvgMjYTHHSkKWFre4
Member
Author
|
Closing: this repo deliberately commits no lockfile ( |
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
Main went red on the merge of #64 and again on the v0.8.9 release commit, with
npm installfailingERESOLVE: it resolvedreact-domto the just-published 19.3.0, which requiresreact@^19.3.0, whilereactwas still 19.2.8. Nothing in either commit touched dependencies.react-dom@19.3.0was published at 17:17:40Z, two minutes before the merge;react@19.3.0followed a few minutes later. Both CI workflows re-resolved on every run because they usednpm install; this switches them tonpm ci, so the lockfile governs and an upstream publish cannot change what CI tests between a PR's green run and its merge.Changes
.github/workflows/test.yml,.github/workflows/publish.yml—npm install→npm ci, with a comment recording why.Verified locally:
npm cion the current lockfile installsreact/react-dom19.2.8 cleanly, including with the lockfile's root version laggingpackage.json(the release flow bumps onlypackage.json, whichnpm cidoes not mind).Consumer Impact
None. No package contents change; this is how CI installs its own dependencies.
Testing
npm cilocally, thennpm run test:allvia the pre-push hook: format, lint, typecheck, tests, build all green. The two red runs onmainwere re-run oncereact@19.3.0existed and should pass on their own; this PR prevents the recurrence.🤖 Generated with Claude Code
https://claude.ai/code/session_01Wrb85mvgMjYTHHSkKWFre4