Centralize template dependency versions (closes #19)#25
Merged
Conversation
Template versions were hard-coded across 16 feature/monorepo modules, so a bump meant hunting through source and the freshness check duplicated the held-back list. They now live in one catalog, src/core/versions.js: V — dependency specs PEER — the looser peer-dependency ranges (react/vue/svelte) HELD — deps deliberately kept below latest major, with the reason LAST_REVIEWED Every feature module and monorepo.js references the catalog instead of a literal. Guarded two ways: - byte-identical output across 3740 configs (snapshot vs pre-refactor main); - a conformance test (test/versions.test.js) asserts every version in the generated output comes from the catalog — it caught a wrong ts-jest spec and two missing deps (supertest, @types/supertest) while being written. scripts/check-template-deps.mjs now imports HELD rather than keeping its own copy. Closes #19: release-it was a major behind (^20 → ^21). With the catalog that's a one-line change in versions.js — no feature edits — which is the whole point. Freshness check is green again. 97 tests pass, lint clean, web configurator verified. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Template versions were hard-coded across 16 feature/monorepo modules, so a bump meant hunting through source, and the freshness check kept its own duplicate of the held-back list. The architecture review asked for one catalog with compatibility notes and a review date.
The catalog
src/core/versions.js:V— dependency specs (one entry per dep)PEER— the looser peer-dependency ranges (react/vue/svelte declare>=X, not a hard pin)HELD— deps deliberately kept below their latest major, with the reasonLAST_REVIEWEDAll 16 feature modules and
monorepo.jsreference the catalog instead of literals.Guarded two ways
main, compared after migration: zero differences.test/versions.test.js) asserts every version in the generated output comes from the catalog. It earned its keep while being written — caught a wrongts-jestspec (^30→^29) and two deps the matrix missed (supertest,@types/supertest).scripts/check-template-deps.mjsnow importsHELDinstead of duplicating it.Closes #19
release-itwas a major behind (^20→^21). With the catalog that's a one-line change inversions.js— no feature edits — which is exactly the value. The freshness check is green again, and the three held-back deps (typescript, knip, lint-staged) are correctly still held.97 tests pass, lint clean, web configurator verified.
Closes #19
🤖 Generated with Claude Code