Skip to content

Commit 669b851

Browse files
committed
quotation around keys
1 parent af74a31 commit 669b851

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

jscomp/core/js_dump_import_export.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ let dumpImportAttributes f (importAttributes : External_ffi_types.import_attribu
132132
P.brace_group f 0 (
133133
fun _ ->
134134
importAttributes |> Hashtbl.iter(fun key value ->
135-
P.string f key;
135+
Js_dump_string.pp_string f key;
136136
P.string f L.colon_space;
137137
Js_dump_string.pp_string f value;
138138
let shouldAddComma = !idx < total in

jscomp/test/ImportAttributes.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Generated by ReScript, PLEASE EDIT WITH CARE
22

3-
import MyJsonJson from "./myJson.json" with {type: "json"};
3+
import MyJsonJson from "./myJson.json" with {"type": "json", "some-identifier": "yep"};
44

55
var myJson = MyJsonJson;
66

jscomp/test/ImportAttributes.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@@config({flags: ["-bs-package-output", "es6:jscomp/test:.mjs"]})
22

3-
@module({from: "./myJson.json", with: {type_: "json"}})
3+
@module({from: "./myJson.json", with: {type_: "json", \"some-identifier": "yep"}})
44
external myJson: Js.Json.t = "default"
55

66
Js.log(myJson)

0 commit comments

Comments
 (0)