Skip to content

Restructure the package for the one-major-per-line model - #134

Merged
lorisleiva merged 1 commit into
mainfrom
scaffold-v2-line
Aug 31, 2026
Merged

Restructure the package for the one-major-per-line model#134
lorisleiva merged 1 commit into
mainfrom
scaffold-v2-line

Conversation

@lorisleiva

Copy link
Copy Markdown
Member

This PR restructures the repository for the one-major-per-line release model settled in the migration framework (Model B): each release line hosts exactly one spec major, so nothing in the tree carries a version in its name any more.

  • src/v1/src/spec/ (git rename; docblocks reworded). The folder never renames again at future cuts — the branch carries the major.
  • The package ships root + ./api only: the ./v1 subpath export, its files entry and its tsup entry are removed. The v1 spec remains available as @codama/spec@^1, published from the 1.x line.
  • Generated artifacts move to the repo root: spec.json, schema.json, docs/; the v1/ folder is deleted from this line (it lives on 1.x). The docs landing page gains a version switcher ("Other majors: v1") driven by PREVIOUS_MAJOR_DOCS in the docs generator — one entry appended per major.
  • sync-spec-version.ts targets src/spec/version.ts; SPEC_VERSION stays 1.9.2 until the regenerated release PR flips it to 2.0.0-rc.0 alongside the package bump, preserving the "spec version == package version" invariant at every commit.
  • Tests renamed (spec.test.ts, docs.test.ts) and retargeted; the docs link-integrity test now skips absolute URLs; oxlint/oxfmt ignore patterns retargeted from v[0-9]*/** to the root artifacts; README and CONTRIBUTING swept.

Must land before #110 merges: as generated today, that PR stamps the v1 artifacts with 2.0.0-rc.0. Once this lands, the regenerated release PR will correctly stamp src/spec/ and the root artifacts instead.

Part of #102.

Each release line hosts exactly one spec major, so nothing in the tree carries a version in its name any more: src/v1 becomes src/spec (never renamed again at future cuts — the branch carries the major), the package ships root + ./api only (the ./v1 subpath is removed; the v1 spec remains available as @codama/spec@^1 from the 1.x line), and the generated artifacts move to the repo root (spec.json, schema.json, docs/) with a version switcher on the docs landing page linking to previous majors' docs on their maintenance branches. sync-spec-version.ts targets src/spec/version.ts, tests and oxc ignore patterns are retargeted, and README/CONTRIBUTING are swept. Must land before the release PR merges so the rc version stamps the new layout instead of the v1 artifacts.
@lorisleiva
lorisleiva enabled auto-merge (squash) August 31, 2026 14:15
@lorisleiva
lorisleiva disabled auto-merge August 31, 2026 14:32
@lorisleiva
lorisleiva merged commit f14dd93 into main Aug 31, 2026
3 checks passed
@lorisleiva
lorisleiva deleted the scaffold-v2-line branch August 31, 2026 14:32
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