From ca483e9d4cb17082e3eebfa085cfcafd8469531c Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Fri, 1 May 2026 19:03:18 -0300 Subject: [PATCH 1/2] Deprecate `Stdlib_Error` and `Stdlib_Exn` modules in favor of `JsError`/`JsExn` --- packages/@rescript/runtime/Stdlib_Error.resi | 1 + packages/@rescript/runtime/Stdlib_Exn.resi | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/@rescript/runtime/Stdlib_Error.resi b/packages/@rescript/runtime/Stdlib_Error.resi index 3abc756f860..86327ba7130 100644 --- a/packages/@rescript/runtime/Stdlib_Error.resi +++ b/packages/@rescript/runtime/Stdlib_Error.resi @@ -3,6 +3,7 @@ Functions for working with JavaScript exceptions. See [`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) on MDN. */ +@@deprecated("Use `JsError` module") /** Represents a JavaScript exception. */ @deprecated({ diff --git a/packages/@rescript/runtime/Stdlib_Exn.resi b/packages/@rescript/runtime/Stdlib_Exn.resi index 5435507bc7b..e82347c6911 100644 --- a/packages/@rescript/runtime/Stdlib_Exn.resi +++ b/packages/@rescript/runtime/Stdlib_Exn.resi @@ -7,6 +7,7 @@ /*** Provide utilities for dealing with JS exceptions. */ +@@deprecated("Use `JsExn` module") /** Represents a JS exception */ @deprecated({ From 3172ed1a12e89b57dd80a5aebd35a88e09140861 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Fri, 22 May 2026 10:20:22 -0300 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7cf6c436c6..7bebcf65267 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ - Use a single vendored @rescript/react package across the repo. https://github.com/rescript-lang/rescript/pull/7525 - Improve deprecated attribute extraction and support record form. https://github.com/rescript-lang/rescript/pull/8396 - Refactor analysis to decouple I/O from core logic. https://github.com/rescript-lang/rescript/pull/8426 +- Deprecate `Stdlib_Error` and `Stdlib_Exn` modules in favor of `JsError/JsExn`. https://github.com/rescript-lang/rescript/pull/8404 #### :house: Internal