From dfc0c4150a969dd6babebd1645a6f1224d4e680c Mon Sep 17 00:00:00 2001 From: Danny Willems Date: Tue, 1 Aug 2023 19:55:25 +0200 Subject: [PATCH] Replace joo_global_object by globalThis joo_global_object is deprecated --- nix/javascript.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nix/javascript.nix b/nix/javascript.nix index 68f451c11063..12791560f422 100644 --- a/nix/javascript.nix +++ b/nix/javascript.nix @@ -36,9 +36,9 @@ in { # better error messages # TODO: find a less hacky way to make adjustments to jsoo compiler output # `s` is the jsoo representation of the error message string, and `s.c` is the actual JS string - sed -i 's/function failwith(s){throw \[0,Failure,s\]/function failwith(s){throw joo_global_object.Error(s.c)/' "$BINDINGS_PATH"/snarky_js_node.bc.js - sed -i 's/function invalid_arg(s){throw \[0,Invalid_argument,s\]/function invalid_arg(s){throw joo_global_object.Error(s.c)/' "$BINDINGS_PATH"/snarky_js_node.bc.js - sed -i 's/return \[0,Exn,t\]/return joo_global_object.Error(t.c)/' "$BINDINGS_PATH"/snarky_js_node.bc.js + sed -i 's/function failwith(s){throw \[0,Failure,s\]/function failwith(s){throw globalThis.Error(s.c)/' "$BINDINGS_PATH"/snarky_js_node.bc.js + sed -i 's/function invalid_arg(s){throw \[0,Invalid_argument,s\]/function invalid_arg(s){throw globalThis.Error(s.c)/' "$BINDINGS_PATH"/snarky_js_node.bc.js + sed -i 's/return \[0,Exn,t\]/return globalThis.Error(t.c)/' "$BINDINGS_PATH"/snarky_js_node.bc.js ''; npmBuild = "npm run build"; };