Skip to content

chore: migrate website workspaces to ReScript v13 - #1472

Open
aspeddro wants to merge 1 commit into
v13from
migrate-compiler-v13
Open

aspeddro wants to merge 1 commit into
v13from
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

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

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Docs preview

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Lighthouse baseline

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

Category Target Current Change
Performance 79 86 +7
Accessibility 80 80 0
Best practices 100 100 0
SEO 100 66 -34

Download the full Lighthouse reports and baseline

Commit 40d8658 · Cloudflare preview

@aspeddro
aspeddro marked this pull request as ready for review November 1, 2026 02:36
@aspeddro aspeddro self-assigned this Nov 1, 2026
@aspeddro
aspeddro requested a review from jderochervlk November 1, 2026 02:36
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T02:37:44.807724Z 14425a1 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@fhammerschmidt fhammerschmidt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to tackle this already, but fell a little off because of vacation, thanks!.

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.

2 participants