Skip to content

Commit 5b9d693

Browse files
authored
Deprecate JSX 3 (#7042)
* deprecate jsx 3 from bsb * clean up * changelog * fix changelog
1 parent 3d8ca49 commit 5b9d693

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
> - :house: [Internal]
1111
> - :nail_care: [Polish]
1212
13+
# 11.1.5 (Unreleased)
14+
15+
- Deprecate JSX 3 https://github.com/rescript-lang/rescript-compiler/pull/7042
16+
1317
# 11.1.4
1418

1519
- Fix issue where long layout break added a trailing comma in partial application `...`. https://github.com/rescript-lang/rescript-compiler/pull/6949

jscomp/bsb/bsb_jsx.ml

+7-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,13 @@ let from_map map =
4343
match m.?(Bsb_build_schemas.jsx_version) with
4444
| Some (Flo { loc; flo }) -> (
4545
match flo with
46-
| "3" -> version := Some Jsx_v3
46+
| "3" ->
47+
let loc_end =
48+
{loc with Lexing.pos_cnum = loc.Lexing.pos_cnum + 1}
49+
in
50+
let loc = {Warnings.loc_start = loc; loc_end; loc_ghost = false} in
51+
Location.deprecated loc "jsx 3 is deprecated, use jsx 4 instead";
52+
version := Some Jsx_v3
4753
| "4" -> version := Some Jsx_v4
4854
| _ -> Bsb_exception.errorf ~loc "Unsupported jsx version %s" flo
4955
)

0 commit comments

Comments
 (0)