Skip to content

fix(ci): install from the lockfile - #65

Closed
jfrench9 wants to merge 1 commit into
mainfrom
bugfix/ci-npm-ci
Closed

fix(ci): install from the lockfile#65
jfrench9 wants to merge 1 commit into
mainfrom
bugfix/ci-npm-ci

Conversation

@jfrench9

@jfrench9 jfrench9 commented Sep 9, 2026

Copy link
Copy Markdown
Member

Summary

Main went red on the merge of #64 and again on the v0.8.9 release commit, with npm install failing ERESOLVE: it resolved react-dom to the just-published 19.3.0, which requires react@^19.3.0, while react was still 19.2.8. Nothing in either commit touched dependencies. react-dom@19.3.0 was published at 17:17:40Z, two minutes before the merge; react@19.3.0 followed a few minutes later. Both CI workflows re-resolved on every run because they used npm install; this switches them to npm 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.ymlnpm installnpm ci, with a comment recording why.

Verified locally: npm ci on the current lockfile installs react/react-dom 19.2.8 cleanly, including with the lockfile's root version lagging package.json (the release flow bumps only package.json, which npm ci does not mind).

Consumer Impact

None. No package contents change; this is how CI installs its own dependencies.

Testing

npm ci locally, then npm run test:all via the pre-push hook: format, lint, typecheck, tests, build all green. The two red runs on main were re-run once react@19.3.0 existed and should pass on their own; this PR prevents the recurrence.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Wrb85mvgMjYTHHSkKWFre4

`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
@jfrench9

jfrench9 commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

Closing: this repo deliberately commits no lockfile (.gitignore, the Dependabot config and test.yml's own comment all say so — a library's lockfile constrains nothing for consumers, and CI resolving from the live registry is the point). npm ci cannot run without one, so this change was wrong for this repo. The failures on main were the react-dom 19.3.0 / react 19.3.0 publish gap; both runs pass on re-run now that both exist. The race is a known cost of the policy, and a re-run is the remedy.

@jfrench9 jfrench9 closed this Sep 9, 2026
@jfrench9
jfrench9 deleted the bugfix/ci-npm-ci branch September 9, 2026 17:28
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