diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ce684e9bb..8402a05b2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,10 @@ - Fix issue with Dynamic import of module in nested expressions https://github.com/rescript-lang/rescript-compiler/pull/6431 - Fix issue where GenType was not supporting `@tag` on ordinary variatns https://github.com/rescript-lang/rescript-compiler/pull/6437 +#### :nail_care: Polish + +- Add [`Deno`](https://deno.land/api?s=Deno) to reserved names, so that modules named `Deno` don't clash with the globally exposed `Deno` object. https://github.com/rescript-lang/rescript-compiler/pull/6428 + # 11.0.0-rc.4 #### :rocket: New Feature diff --git a/jscomp/ext/js_reserved_map.ml b/jscomp/ext/js_reserved_map.ml index 21cef5b3bf..c60bea0975 100644 --- a/jscomp/ext/js_reserved_map.ml +++ b/jscomp/ext/js_reserved_map.ml @@ -169,6 +169,7 @@ let sorted_keywords = [| "DecompressionStream"; "DelayNode"; "DelegatedInkTrailPresenter"; + "Deno"; "Document"; "DocumentFragment"; "DocumentPictureInPictureEvent"; diff --git a/scripts/build_reserved.ml b/scripts/build_reserved.ml index 148117ee65..6e5103a1e9 100644 --- a/scripts/build_reserved.ml +++ b/scripts/build_reserved.ml @@ -24,7 +24,7 @@ let reserved_words = [| - (* keywork *) + (* keywords *) "break"; "case"; "catch"; "continue"; "debugger";"default";"delete";"do"; @@ -130,7 +130,10 @@ "__esModule"; (* Bun global obj *) - "Bun" + "Bun"; + + (* Deno global obj *) + "Deno"; |]