docs: remove the unreferenced legacy readme pages and stale info.md - #667
Open
unional wants to merge 1 commit into
Open
docs: remove the unreferenced legacy readme pages and stale info.md#667unional wants to merge 1 commit into
unional wants to merge 1 commit into
Conversation
The `src/**/readme.md` tree is v6/v7-era documentation for an API that no longer exists, and `src` ships in `files`, so it was going out in the tarball. This removes the 13 pages nothing in the repo links to, plus the root `info.md`, which had no inbound references at all. The explanation that only lived in those pages was ported to the website first: branch-option composition, `$Special`, `$Error`/`$InferError` and the `$Type` brand onto the type-branching page, and `Equal` onto a new equality page. The other 20 pages stay — `packages/type-plus/readme.md` links into them 122 times, so removing them means rewriting the published readme. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019f2P5bUGxqe1niopUctKqP
🦋 Changeset detectedLatest commit: af380ad The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #667 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 43 43
Lines 232 232
Branches 51 51
=========================================
Hits 232 232 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
What
Deletes 13 of the 33 legacy
packages/type-plus/src/**/readme.mdpages and the rootinfo.md, after porting the explanation that only lived in them onto the documentation site.Deleted (13 +
info.md):$type/{,branch/,distributive/,errors/,exact/,special/,utils/}readme.md,binary/,equal/,logical/,math/README.md,numeric/,utils/readme.md, and rootinfo.md.Ported first — nothing was silently destroyed:
$type/branch/readme.mdapi/type-branching.mdx§ Branch options$Obranch keys compose from$Unknown.$Options/$Never.$Options/$SelectionOptions, and why it is called$Selection$type/special/readme.mdapi/type-branching.mdx§ Special types$Specialas predicate, as filter, and with per-special-type branching$type/errors/readme.mdapi/type-branching.mdx§ Type-level errors$Errorand$InferError— live exported types with no website coverage at all before this$type/readme.mdapi/type-branching.mdx§$Typeand the$prefix$Typebrand,_$type/_$value,$O: { bare: true }equal/readme.mdapi/equality.mdEqual(previously undocumented on the site) plus the one-level intersection-flattening caveat and why it is deliberateThe new page needs no
astro.config.mjschange — the API sidebar isautogenerated from the directory.Why these 13 and not all 33
The brief for this work assumed the tree "rotted precisely because nothing points at it." That is only half true, and the half that is false matters:
packages/type-plus/readme.md— the npm landing page — links into this tree 122 times, across 21 of the 33 files.srcis listed infiles, sonpm packships all 33. They are published, reachable documentation, not orphans. (npm pack --dry-runcounted 33 before this PR, 20 after.)The 13 removed here are exactly the set with zero inbound links from anywhere in the repo, and no surviving readme cross-links into any of them, so this leaves no dead link behind. I verified that rather than assuming it.
What is left for a human decision
The other 20 cannot be deleted without dealing with those 122 links, and there is no clean way to do it:
## \At` and `IndexAt`,## `Reverse`, `Concat`, `PadStart`, `SplitAt`), so the per-symbol anchors in the published readme (#at,#padstart`, …) have no 1:1 target. Repointing means degrading 122 symbol-precise links to page-level links.packages/type-plus/readme.mdto defer to the site — is a 1377-line rewrite, well beyond this change.That trade-off is the maintainer's call, so I stopped rather than guessing.
Also worth knowing: six of the 33 are under active edit by open PRs —
array/(#659, #661),null/andvoid/(#660),testing/(#663, #664) — so the follow-up sweep needs to wait on more than just #659.And a gap
info.mdwas hiding: it was the only surviving documentation for several live APIs that never made it onto the new site —JSONTypes,context(),compose(),nominalMatch(),typeOverrideIncompatible(),unpartial()/required()/requiredDeep(),EitherOrBoth. Deleting it does not break anything (nothing referenced it), but it does make that gap invisible. Worth a follow-up issue.Verification
pnpm -w turbo build lint test— 4/4 green; site builds 23 pages (was 22).pnpm --filter type-plus test:type— 5.4, 5.5, 5.6, 6.0 and latest green.patchchangeset included — the deletions change the published tarball, so this is not a repo-only docs change.🤖 Generated with Claude Code
https://claude.ai/code/session_019f2P5bUGxqe1niopUctKqP