From ce23a8e6b8c82b0a1018f88332f8e3d61a3778da Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Tue, 19 Nov 2024 10:25:46 +0100 Subject: [PATCH] remove references to joo_global_object --- lib/ojs.ml | 2 +- node-test/bindings/imports.js | 2 +- node-test/test1/recursive.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ojs.ml b/lib/ojs.ml index f9a5b52..2dfc740 100644 --- a/lib/ojs.ml +++ b/lib/ojs.ml @@ -58,7 +58,7 @@ let undefined = pure_js_expr "undefined" external equals: t -> t -> bool = "caml_js_equals" -let global = pure_js_expr "joo_global_object" +let global = pure_js_expr "globalThis" external new_obj: t -> t array -> t = "caml_js_new" diff --git a/node-test/bindings/imports.js b/node-test/bindings/imports.js index 24e4932..5f63e5a 100644 --- a/node-test/bindings/imports.js +++ b/node-test/bindings/imports.js @@ -1,4 +1,4 @@ -joo_global_object.__LIB__NODE__IMPORTS = { +globalThis.__LIB__NODE__IMPORTS = { path: require('path'), fs: require('fs'), }; diff --git a/node-test/test1/recursive.js b/node-test/test1/recursive.js index d34c7bf..6208628 100644 --- a/node-test/test1/recursive.js +++ b/node-test/test1/recursive.js @@ -38,5 +38,5 @@ var Bar = /*#__PURE__*/function () { return Bar; }(); -joo_global_object.Foo = Foo -joo_global_object.Bar = Bar +globalThis.Foo = Foo +globalThis.Bar = Bar