Skip to content

docs: remove the unreferenced legacy readme pages and stale info.md - #667

Open
unional wants to merge 1 commit into
mainfrom
docs-remove-legacy-src-readmes
Open

docs: remove the unreferenced legacy readme pages and stale info.md#667
unional wants to merge 1 commit into
mainfrom
docs-remove-legacy-src-readmes

Conversation

@unional

@unional unional commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

What

Deletes 13 of the 33 legacy packages/type-plus/src/**/readme.md pages and the root info.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 root info.md.

Ported first — nothing was silently destroyed:

from to what
$type/branch/readme.md api/type-branching.mdx § Branch options how $O branch keys compose from $Unknown.$Options / $Never.$Options / $SelectionOptions, and why it is called $Selection
$type/special/readme.md api/type-branching.mdx § Special types $Special as predicate, as filter, and with per-special-type branching
$type/errors/readme.md api/type-branching.mdx § Type-level errors $Error and $InferErrorlive exported types with no website coverage at all before this
$type/readme.md api/type-branching.mdx § $Type and the $ prefix the $Type brand, _$type/_$value, $O: { bare: true }
equal/readme.md new api/equality.md Equal (previously undocumented on the site) plus the one-level intersection-flattening caveat and why it is deliberate

The new page needs no astro.config.mjs change — the API sidebar is autogenerated 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.
  • src is listed in files, so npm pack ships all 33. They are published, reachable documentation, not orphans. (npm pack --dry-run counted 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:

  1. Website headings group symbols (## \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.
  2. The alternative — rewriting packages/type-plus/readme.md to defer to the site — is a 1377-line rewrite, well beyond this change.
  3. Either option collides head-on with feat(type-plus)!: remove types deprecated in v7 #658 and feat(testType): add defer and assert for reusable type-test helpers #664, which are both editing that file right now.

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/ and void/ (#660), testing/ (#663, #664) — so the follow-up sweep needs to wait on more than just #659.

And a gap info.md was 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.
  • Repo-wide grep for inbound references to every deleted path: none remain.

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

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

changeset-bot Bot commented Sep 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: af380ad

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
type-plus Patch

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

codecov Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (4575277) to head (af380ad).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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