ci: include package manifest in dependency cache keys - #1175
Merged
Conversation
doistbot
reviewed
Aug 18, 2026
doistbot
left a comment
Member
There was a problem hiding this comment.
This PR adds package.json to the node_modules cache keys across all workflow files so that manifest-only dependency changes invalidate the cache and force npm ci to run, catching conflicts before they merge. No inline issues were flagged.
I also left one optional follow-up note in the details below.
Optional follow-up note (1)
.github/workflows/check-ci-validation.yml:41:
package.jsonis a bare path while the other entries in thishashFilescall are globs (**/package-lock.json,**/.node-version). Today there's only a rootpackage.json, so it's functionally fine, but if a sub-package is ever added itspackage.jsonchanges wouldn't invalidate the cache while itspackage-lock.jsonwould — the exact manifest/lockfile asymmetry this PR is meant to prevent. Using**/package.jsonkeeps it consistent with the surrounding globs.
rfgamaral
requested review from
a team and
nvignola
and removed request for
a team
August 18, 2026 13:51
Contributor
|
🎉 This PR is included in version 37.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
🗺 Overview
A recent Reactist dependency update introduced a peer dependency conflict. Because the update changed
package.jsonwithout changingpackage-lock.json, CI restored cachednode_modules, skippednpm ci, and passed with the previous dependency installed. A later lockfile change invalidated the cache and exposed the installation failure, blocking unrelated work.After fixing the immediate Reactist issue, I audited other active projects for the same cache pattern. This PR adds
package.jsonto thenode_modulescache key so manifest-only changes run dependency installation and expose failures immediately.This can cause an extra cache miss when a
package.jsonchange does not affect installed dependencies, but it’s a small price to pay for catching broken dependency changes before they merge and block unrelated work.🔗 Reference