Skip to content

docs: add Migrate to v13 guide - #1492

Draft
fhammerschmidt wants to merge 6 commits into
v13from
docs/migrate-to-v13
Draft

fhammerschmidt wants to merge 6 commits into
v13from
docs/migrate-to-v13

Conversation

@fhammerschmidt

@fhammerschmidt fhammerschmidt commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Replaces #1488, moved to a branch in this repository so #1493 can be stacked on it.

Start a "Migrate to v13" guide that collects the changes that need action when upgrading from ReScript 12. This follows the review feedback on #1486, which moved its legacy-configuration notes here.

The guide isn't a complete changelog yet; the page says so. Every point it does contain is fully described and checked against the 13.0.0-alpha.7 rewatch/src/config.rs.

Contents

The guide covers every change from the compiler changelog for 13.0.0-alpha.1 to alpha.7 that needs action when upgrading from v12. It leaves out changes that were later reversed, changes already backported to 12.x, and the pending alpha.8 changes, which could still be reverted. The guide says it covers changes up to alpha.7.

  • Before you upgrade: Node.js 22, no macOS on Intel, and running migrate-all on the latest 12.x for the APIs removed in v13.
  • Dependencies: Belt moved to @rescript/belt, and the Js namespace is removed.
  • Build system and CLI: removed commands and flags, plus new errors.
  • Build configuration: bsconfig.json and legacy keys, the esmodule default, module names, and distinct suffixes.
  • Language changes: a table of removed syntax with replacements, and other changes such as break/continue as keywords, @unboxed, and object-field @set.
  • Standard library: Temporal, typed arrays, fromString, Intl.Collator.compare, iterators, Int.Ref, and removed primitives.

I checked the replacements by compiling them with 13.0.0-alpha.7, and checked that the old forms fail. Many of the compiler error messages already name the replacement.

Other changes

  • Links the guide from the Build Configuration page.
  • Removes the v11 and v12 migration guides from v13. Links now point to each version's own docs site. The v12 guide is at https://v12.rescript-lang.org/docs/manual/migrate-to-v12; it is linked from the v13 guide intro, the four bitwise operator syntax lookup pages and the 12.0 release post. The v11 guide is at https://v11.rescript-lang.org/docs/manual/v11.0.0/migrate-to-v11, linked from the 11.0 release post. _redirects sends the old /docs/manual/migrate-to-v12 and -v11 URLs to the same addresses.
  • Regenerates Path.res, and uses the v13 guide as the sample route in the route type test.

Until v13 becomes the default branch, v12.rescript-lang.org must forward to rescript-lang.org. That forwarding is set up at the domain level, outside this repo. Remove it when v13 becomes the default branch, so that v12.rescript-lang.org then serves the v12 docs.

Follow-ups

Add the alpha.8 changes once they are released.

Testing

yarn test: 184 pages checked, with 0 stale outputs, 0 compilation errors, and 0 link or redirect issues. oxfmt --check passes.

Refs #1476, #1486.

🤖 Generated with Claude Code

fhammerschmidt and others added 6 commits November 24, 2026 09:45
Start a v13 migration guide covering build configuration: the
bsconfig.json fallback, deprecated key aliases, the removed
external-stdlib option, the esmodule default, legacy module names, and
the requirement for distinct suffixes when emitting multiple formats.
Order it before the v12 guide in the sidebar and regenerate route types.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a Language Changes section explaining that the %debugger extension
was removed in favor of the debugger() function, with the new syntax
error and a before/after diff.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- State that the guide is still being completed during the prereleases.
- Fix the esmodule default: it applies when package-specs is omitted;
  each spec still has to set module.
- Shorten the build configuration and %debugger sections without
  dropping any required change, and fix the external-stdlib note.
- Link the guide from the Build Configuration page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uide

Go through the compiler changelog for 13.0.0-alpha.1 to alpha.7 and add
every change that needs action when upgrading from v12:

- Before you upgrade: Node.js 22, no macOS Intel, run migrate-all on
  the latest 12.x for the removed v12 deprecations.
- Dependencies: Belt as @rescript/belt, removed Js namespace.
- Build system and CLI: removed commands and flags, new errors.
- Language: a table of removed syntax with replacements, plus other
  changes such as break/continue keywords, @unboxed, object @set.
- Standard library: Temporal, typed arrays, fromString, Intl.Collator,
  iterators, Int.Ref, removed primitives.

Changes reversed or backported to 12.x are left out, as are the
pending alpha.8 changes. Replacement examples were compiled against
13.0.0-alpha.7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The v13 docs only need the v13 migration guide. Remove the v11 and v12
guides from this branch and point every link to them at
v12.rescript-lang.org, where the v12 docs will live once v13 becomes
the default:

- The v13 guide tells v11 users to follow the v12 guide first.
- The bitwise operator syntax lookup pages and the 11.0 and 12.0
  release posts link to the v12 docs site.
- Redirect the old /docs/manual/migrate-to-v11 and -v12 URLs there,
  covered by the redirect check.
- Regenerate route types and use the v13 guide as the sample route in
  the route type test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The v11 guide belongs with the v11 docs at v11.rescript-lang.org, not
the v12 docs site. Point the 11.0 release post and the redirect for
/docs/manual/migrate-to-v11 there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
guide 8a2b5c7 Commit Preview URL

Branch Preview URL
Nov 24 2026, 10:02 AM

@github-actions

Copy link
Copy Markdown
Contributor

Docs preview

@github-actions

Copy link
Copy Markdown
Contributor

Lighthouse baseline

Compared with target branch v13 at commit a1ae8b6. Scores are the median of 3 runs against the deployed Cloudflare preview.

Category Target Current Change
Performance 85 83 -2
Accessibility 80 80 0
Best practices 100 100 0
SEO 100 66 -34

Download the full Lighthouse reports and baseline

Commit 2d76e82 · Cloudflare preview

This branch was successfully deployed

2 active deployments
preview — 8a2b5c7a Deployed Nov 24, 2026 by github-actions[bot]
guide-preview — 8a2b5c7a Deployed Nov 24, 2026 by github-actions[bot]
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