Skip to content

feat(docs): migration notes for a version range - #25778

Merged
alejoamiras merged 5 commits into
nextfrom
worktree-docs-migration-ranges
Nov 8, 2026
Merged

alejoamiras merged 5 commits into
nextfrom
worktree-docs-migration-ranges

Conversation

@alejoamiras

Copy link
Copy Markdown
Contributor

Developers upgrading across several versions can now get just the migration notes they need. migration_notes.md?from=5.2.0&to=6.0.0 returns only the sections in that range, oldest first, and the migration notes page has a panel that copies the same text. llms.txt and the AI tooling page tell agents about the link.

  • A bad range returns a 400 that explains how to fix it.
  • Without from or to, the page and its markdown copy are unchanged.

A post-build step cuts each migration_notes.md twin at its version
headings (outside code fences) and writes migration_notes.json beside
it. The build fails when a twin has no version heading or its versions
do not run strictly newest first. src/migration_ranges.mjs selects and
renders a range (from < v <= to, oldest first) from that index; it has
no Node or DOM imports so the edge runtime and the page can share it.
An edge function on */migration_notes.md answers ?from=X&to=Y with
only the sections from < v <= to, oldest first, under a header naming
the included versions. Malformed values get a 400 before the index is
read; a reversed range gets a 400 listing the page's versions. Without
from/to, or without an index, the static twin is served unchanged.
Under the migration notes title, a panel picks a from/to version, shows
the size of the result and copies the same text the range URL serves,
with a link to that URL. It renders in the browser only, so it stays out
of the markdown twin, and Copy page skips it (data-copy-skip). The
clipboard fallback moves from CopyMarkdownButton to src/utils/clipboard.ts
so both buttons share it.
llms.txt Start here gets a "Migration notes for a version range" entry
whose URL carries an example query, and the AI tooling page (both dev
lines and the v6.0.0 snapshot production serves) describes the URL and
the page's copy panel.
Build the index URL by assigning the request's pathname to its origin
instead of resolving the pathname as a reference, and compare version
numbers as BigInt so precedence stays exact past 2^53. Tighten the edge
function's header comment and restore the converter's original one.
@alejoamiras
alejoamiras requested a review from a team as a code owner November 6, 2026 18:20
@alejoamiras
alejoamiras merged commit 58826ba into next Nov 8, 2026
16 checks passed
@alejoamiras
alejoamiras deleted the worktree-docs-migration-ranges branch November 8, 2026 12:17
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.

2 participants