Skip to content

docs(website): add the v7 to v8 migration guide - #797

Merged
unional merged 1 commit into
mainfrom
docs-v8-migration
Sep 28, 2026
Merged

unional merged 1 commit into
mainfrom
docs-v8-migration

Conversation

@unional

@unional unional commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator

Adds guides/migrating-to-v8: every change between type-plus@7.6.2 and 8.0 that breaks a build or changes a result. Each entry gives the change, the reason, and a before and after example. A checklist sits at the top.

How the list was built

  • Every major and minor changeset in .changeset/, and the 8.0.0-beta.* entries in CHANGELOG.md.
  • A diff of the export surface: the published 7.6.2 esm/index.d.ts against the current build, via the compiler API. This found about 100 removed names, including the whole XxxType / NotXxxType / IsStrictXxx family and Positive / Negative / Integer / IsWhole. No pending changeset covers those.
  • The v7 "before" results were read off the 7.6.2 declarations, not the changesets. Some changesets describe beta states, not 7.x. For example, CanAssign<never, number> was false in 7.x, not never, and v7 IsPositive had no exact option.
  • Every v8 "after" example was pinned in a throwaway spec with testType.equal, which compiled clean on TS 6.0. The spec was deleted before this commit.

Findings worth a look

  • v8 predicates distribute over unions by default. IsString<'a' | 1> was false in 7.x and is boolean in v8. IsTrue<boolean> went from false to boolean. No changeset mentions this, and it is the change most likely to catch users silently. The page puts it first under "Changed results", with { distributive: false } as the fix.

Other changes

  • Sidebar entry under Guides.
  • A link from readme.md and packages/type-plus/readme.md, in the v8 beta status section.
  • migrating-then-else-to-options.mdx: removed the claim that NotUnknownOr keeps a positional Else. It takes { $unknown } since refactor(type-plus)!: one options convention for transforms #721.
  • src/object/readme.md: ObjectPlus.Merge no longer shows the removed Options parameter. The legacy tree already records the other removals.
  • Patch changeset, because both readmes ship in the tarball.

pnpm verify passes locally, including the website build.

🤖 Generated with Claude Code

List every change between type-plus 7.6.2 and 8.0 that breaks a build or
changes a result, with the reason and a before and after example for each,
and a checklist at the top. The removed names come from diffing the export
surface of the published 7.6.2 against the current build, not only from the
changesets. The v7 results were read off the 7.6.2 declarations, and every
v8 example was compiled against the current source.

Link the page from both readmes and the Guides sidebar. Drop a stale claim
that NotUnknownOr takes a positional Else, and fix the ObjectPlus.Merge
signature in the legacy object readme.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Sep 28, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 214a71c

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 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (eb8d2cb) to head (214a71c).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #797   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           40        40           
  Lines          173       173           
  Branches        30        30           
=========================================
  Hits           173       173           

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

@unional
unional added this pull request to the merge queue Sep 28, 2026
Merged via the queue into main with commit 6aa4285 Sep 28, 2026
7 checks passed
@unional
unional deleted the docs-v8-migration branch September 28, 2026 08:28
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