From 3493edf369283e389b93d1529befc1884a0006d7 Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Tue, 3 Oct 2023 16:15:47 +0200 Subject: [PATCH 1/3] make Js.Json.t use Boolean(bool) instead of explicit true/false --- jscomp/others/js_json.res | 3 +-- jscomp/others/js_json.resi | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/jscomp/others/js_json.res b/jscomp/others/js_json.res index 22a117ecce..ccfa6de9f7 100644 --- a/jscomp/others/js_json.res +++ b/jscomp/others/js_json.res @@ -26,8 +26,7 @@ @unboxed type rec t = - | @as(false) False - | @as(true) True + | Boolean(bool) | @as(null) Null | String(string) | Number(float) diff --git a/jscomp/others/js_json.resi b/jscomp/others/js_json.resi index 3063bc90ff..fad033bf14 100644 --- a/jscomp/others/js_json.resi +++ b/jscomp/others/js_json.resi @@ -32,8 +32,7 @@ @unboxed /** The JSON data structure */ type rec t = - | @as(false) False - | @as(true) True + | Boolean(bool) | @as(null) Null | String(string) | Number(float) From 334213f5bc54b729dda83e9d294583958945753e Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Tue, 3 Oct 2023 16:17:00 +0200 Subject: [PATCH 2/3] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e014fd81c..c133852688 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ - Pass through the `-verbose` flag to builds in watch mode. https://github.com/rescript-lang/rescript-compiler/pull/6404 - Improve error message when defining duplicate labels in a record. https://github.com/rescript-lang/rescript-compiler/pull/6415 - Improve error message when trying to concatenate strings using the wrong operator. https://github.com/rescript-lang/rescript-compiler/pull/6416 +- `Js.Json.t` now uses `Boolean(bool)` instead of explicit `@as(true) True | @as(false) False`. https://github.com/rescript-lang/rescript-compiler/pull/6421 # 11.0.0-rc.3 From 84af6795374639d169ecca4225977b08bc5470ae Mon Sep 17 00:00:00 2001 From: Gabriel Nordeborn Date: Wed, 4 Oct 2023 10:23:19 +0200 Subject: [PATCH 3/3] move changelog entry to breaking changes --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c133852688..d62d72d3bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ #### :boom: Breaking Change - Add smart printer for pipe-chains. https://github.com/rescript-lang/rescript-compiler/pull/6411 (the formatter will reformat existing code in certain cases) +- `Js.Json.t` now uses `Boolean(bool)` instead of explicit `@as(true) True | @as(false) False`. https://github.com/rescript-lang/rescript-compiler/pull/6421 #### :nail_care: Polish @@ -39,7 +40,6 @@ - Pass through the `-verbose` flag to builds in watch mode. https://github.com/rescript-lang/rescript-compiler/pull/6404 - Improve error message when defining duplicate labels in a record. https://github.com/rescript-lang/rescript-compiler/pull/6415 - Improve error message when trying to concatenate strings using the wrong operator. https://github.com/rescript-lang/rescript-compiler/pull/6416 -- `Js.Json.t` now uses `Boolean(bool)` instead of explicit `@as(true) True | @as(false) False`. https://github.com/rescript-lang/rescript-compiler/pull/6421 # 11.0.0-rc.3