Restructure the package for the one-major-per-line model - #134
Merged
Conversation
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
enabled auto-merge (squash)
August 31, 2026 14:15
lorisleiva
disabled auto-merge
August 31, 2026 14:32
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.
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../apionly: the./v1subpath export, itsfilesentry and its tsup entry are removed. The v1 spec remains available as@codama/spec@^1, published from the1.xline.spec.json,schema.json,docs/; thev1/folder is deleted from this line (it lives on1.x). The docs landing page gains a version switcher ("Other majors: v1") driven byPREVIOUS_MAJOR_DOCSin the docs generator — one entry appended per major.sync-spec-version.tstargetssrc/spec/version.ts;SPEC_VERSIONstays1.9.2until the regenerated release PR flips it to2.0.0-rc.0alongside the package bump, preserving the "spec version == package version" invariant at every commit.spec.test.ts,docs.test.ts) and retargeted; the docs link-integrity test now skips absolute URLs; oxlint/oxfmt ignore patterns retargeted fromv[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 stampsrc/spec/and the root artifacts instead.Part of #102.