Skip to content

chore: migrate website workspaces to ReScript v13 - #1470

Closed
aspeddro wants to merge 1 commit into
rescript-lang:v13from
aspeddro:migrate-compiler-v13
Closed

aspeddro wants to merge 1 commit into
rescript-lang:v13from
aspeddro:migrate-compiler-v13

Conversation

@aspeddro

@aspeddro aspeddro commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

Context

The website and interactive guide still used ReScript 12 bindings and APIs. Upgrading the compiler to v13 exposed incompatible WebAPI namespaces, React component types, removed standard-library functions, and the removed @deriving(abstract) decorator.

This migration lets all four workspaces compile with the ReScript v13 alpha and the current WebAPI alpha.

Changes

  • Upgrade ReScript to ^13.0.0-alpha.6, @rescript/react to ^0.16.0-beta.1, and @rescript/webapi to the alpha tag; refresh the lockfile.
  • Replace legacy WebAPI type paths and implicit globals with the public namespace, window accessors, fetch APIs, and timer APIs. Update clipboard handling, DOM references, iframe messaging, storage, search, and browser tests.
  • Handle nullable DOM lookups and URL search parameters explicitly, including dialogs, scrolling, image decoding, and playground initialization.
  • Update React component signatures, MDX component maps, record-props components, and element creation for v13. Replace Fuse's generated options constructor with an ordinary record and remove unused props and obsolete compiler configuration.
  • Update the guide's optimized runtime imports to .mjs.
  • Refresh the example checker's temporary React bindings after dependency upgrades and add a regression test for stale cached bindings.

Validation

  • yarn install --immutable: passes with peer-dependency warnings.
  • yarn build:res: passes across all workspaces.
  • yarn ci:test: 140 docs browser tests, 48 guide browser tests, and 52 guide lesson checks pass.
  • Docs and guide production builds passed during the migration.
  • Clipboard and homepage asset-report tests: 8 tests pass.
  • Example-runner tests: 49 existing tests and the new stale-binding regression test pass.
  • git diff --check: passes.

Remaining Work

yarn test still fails on documentation content targeting the older compiler: the latest content audit reported 18 compilation/parsing errors and 116 stale JavaScript output blocks across 190 pages. Updating that content is outside this application migration and is required before the full content-validation check can pass.

Related migration reference: #1320.

Support the alpha compiler with compatible React and WebAPI bindings
across the docs, guide, playground, and shared workspaces. Replace removed
APIs and implicit globals so compilation and browser workflows keep
working with the new type definitions.

Refresh temporary React bindings in the example checker after dependency
upgrades to prevent stale cached packages from masking content errors.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 1, 2026 •

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 14425a1 Commit Preview URL

Branch Preview URL
Nov 01 2026, 01:02 AM

@aspeddro

aspeddro commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

See #1472

This branch was successfully deployed

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