Skip to content

Centralize template dependency versions (closes #19)#25

Merged
DanMat merged 1 commit into
mainfrom
refactor/version-catalog
Jul 26, 2026
Merged

Centralize template dependency versions (closes #19)#25
DanMat merged 1 commit into
mainfrom
refactor/version-catalog

Conversation

@DanMat

@DanMat DanMat commented Jul 26, 2026

Copy link
Copy Markdown
Owner

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 reason
  • LAST_REVIEWED

All 16 feature modules and monorepo.js reference the catalog instead of literals.

Guarded two ways

  • Byte-identical output across 3740 configs — snapshot captured from pre-refactor main, compared after migration: zero differences.
  • A conformance test (test/versions.test.js) asserts every version in the generated output comes from the catalog. It earned its keep while being written — caught a wrong ts-jest spec (^30^29) and two deps the matrix missed (supertest, @types/supertest).

scripts/check-template-deps.mjs now imports HELD instead of duplicating it.

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 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

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>
@DanMat
DanMat merged commit b099cc3 into main Jul 26, 2026
37 checks passed
@DanMat
DanMat deleted the refactor/version-catalog branch July 26, 2026 22:27
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.

Stale template dependencies

1 participant