Skip to content

Commit 91466f1

Browse files
committed
Auto-commit: Sync changes [2026-03-02]
1 parent 91aefb8 commit 91466f1

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

URGENT-RESCRIPT-MIGRATION.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# URGENT: ReScript Migration Required
2+
3+
**Generated:** 2026-03-02
4+
**Current stable ReScript:** 12.2.0
5+
**Pre-release:** 13.0.0-alpha.2 (2025-02-27)
6+
7+
This repo has ReScript code that needs migration. Address in priority order.
8+
9+
## HIGH: ReScript 11.x → 12.2.0 Upgrade Required
10+
11+
ReScript 11 is outdated. v12 has breaking changes that need migration.
12+
13+
- `sinople-theme/rescript (^11.0.0)`
14+
15+
**Key v11 → v12 migration steps:**
16+
1. Update `package.json`: `"rescript": "^12.2.0"`
17+
2. Add `@rescript/core` and `@rescript/react` (if applicable) to dependencies
18+
3. Config: `bs-dependencies``dependencies`, `bs-dev-dependencies``dev-dependencies`
19+
4. Remove `bsc-flags` from config
20+
5. JSX: v3 is removed in v12 — must use JSX v4
21+
6. Module format: `es6`/`es6-global``esmodule` (now default)
22+
7. Migrate deprecated `Js.*` APIs → `@rescript/core` equivalents:
23+
- `Js.Dict``Dict`, `Js.Console.log``Console.log`
24+
- `Js.String2``String`, `Js.Array2``Array`
25+
- `Js.Math``Math`, `Js.Float``Float`, `Js.Int``Int`
26+
- `Js.Promise``Promise`, `Js.Nullable``Nullable`
27+
8. Functions ending in `Exn``OrThrow` (e.g. `getExn``getOrThrow`)
28+
9. Run `npx rescript-tools migrate` for automated codemods
29+
30+
---
31+
32+
## ReScript 13 Preparation (v13.0.0-alpha.2 available)
33+
34+
v13 is in alpha. These breaking changes are CONFIRMED — prepare now:
35+
36+
1. **`bsconfig.json` support removed** — must use `rescript.json` only
37+
2. **`rescript-legacy` command removed** — only modern build system
38+
3. **`bs-dependencies`/`bs-dev-dependencies`/`bsc-flags` config keys removed**
39+
4. **Uncurried `(. args) => ...` syntax removed** — use standard `(args) => ...`
40+
5. **`es6`/`es6-global` module format names removed** — use `esmodule`
41+
6. **`external-stdlib` config option removed**
42+
7. **`--dev`, `--create-sourcedirs`, `build -w` CLI flags removed**
43+
8. **`Int.fromString`/`Float.fromString` API changes** — no explicit radix arg
44+
9. **`js-post-build` behaviour changed** — now passes correct output paths
45+
46+
**Migration path:** Complete all v12 migration FIRST, then test against v13-alpha.

0 commit comments

Comments
 (0)