chore: add CONTRIBUTING version guardrail check#7527
chore: add CONTRIBUTING version guardrail check#7527Nsanjayboruds wants to merge 13 commits intolayer5io:masterfrom
Conversation
Signed-off-by: Nsanjayboruds <nishantborude555@gmail.com>
|
🚀 Preview for commit 2916336 at: https://69bb8681c74622d6c775935c--layer5.netlify.app |
|
🚀 Preview for commit c66750e at: https://69be69dc8945e4363d3fe31a--layer5.netlify.app |
|
🚀 Preview for commit bc73ced at: https://69bf86c7c6f8cdb1c306a9ca--layer5.netlify.app |
|
🚀 Preview for commit cdc32f2 at: https://69c14f8fc85a57287054e4d7--layer5.netlify.app |
|
🚀 Preview for commit 3d9efee at: https://69c2251ac023e198088522a7--layer5.netlify.app |
|
🚀 Preview for commit ff98763 at: https://69c3e136302f142115187995--layer5.netlify.app |
|
🚀 Preview for commit 4f5a5f1 at: https://69c4d093dea62af19c360c51--layer5.netlify.app |
|
🚀 Preview for commit e67e6d9 at: https://69c77ae8cc2403ee4d57b8fe--layer5.netlify.app |
|
🚀 Preview for commit b524f48 at: https://69c8bcf2c76258fb066edc49--layer5.netlify.app |
|
hey @CodexRaunak, Could you please review this pr ? If any changes are required, please let me know and I will fix them. |
| const reactVersion = pkg.dependencies?.react; | ||
| const gatsbyVersion = pkg.dependencies?.gatsby; |
There was a problem hiding this comment.
@Nsanjayboruds
The script only reads pkg.dependencies.react and pkg.dependencies.gatsby. If the project ever moves these to devDependencies (or uses one in devDependencies already), the check would fail incorrectly or miss mismatches. Consider checking both dependencies and devDependencies, or a fallback chain.
There was a problem hiding this comment.
hey @kishore08-07 , Updated the guard to resolve versions from the full dependency chain, not just dependencies, so it remains resilient if react or gatsby move to devDependencies or another dependency section.
Signed-off-by: Nsanjayboruds <nishantborude555@gmail.com>
|
🚀 Preview for commit 7c705fa at: https://69ce69b5f7ed5a9aae10d588--layer5.netlify.app |
|
🚀 Preview for commit bf26a0c at: https://69cf5a6b4d902b481b9325c5--layer5.netlify.app |
This PR fixes #7520
It introduces an automated guardrail to prevent outdated dependency version references in contributor documentation.
What changed
.github/scripts/check-contributing-versions.cjs:CONTRIBUTING.mdagainstpackage.json"react": "...","gatsby": "..."React <major>andGatsby (<major>...)package.json:check:contributing-versions.github/workflows/checks.yml:npm run check:contributing-versionsbefore buildCONTRIBUTING.mdto match current dependencies and wording.Notes for Reviewers
Validation performed:
npm run check:contributing-versionspasses locally.make sitewas previously run successfully in this environment.This change is scoped to docs guardrails and CI checks; no runtime site behavior is modified.
Signed commits