From a569182b5177b2ca281cad79f43ea1ed36f6c046 Mon Sep 17 00:00:00 2001 From: Sora Morimoto Date: Thu, 26 Dec 2024 22:28:10 +0900 Subject: [PATCH] No longer rely on `joo_global_object` Signed-off-by: Sora Morimoto --- src-bindings/node/node_stub.js | 17 ++++++----------- src-bindings/polka/polka_stub.js | 4 ++-- src-bindings/vscode/vscode_stub.js | 2 +- .../vscode_languageclient_stub.js | 2 +- 4 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src-bindings/node/node_stub.js b/src-bindings/node/node_stub.js index ba19d8382..d9f1ac35d 100644 --- a/src-bindings/node/node_stub.js +++ b/src-bindings/node/node_stub.js @@ -1,11 +1,6 @@ -joo_global_object.constants = require("node:constants"); - -joo_global_object.fs = require("node:fs/promises"); - -joo_global_object.child_process = require("node:child_process"); - -joo_global_object.path = require("node:path"); - -joo_global_object.os = require("node:os"); - -joo_global_object.net = require("node:net"); +globalThis.child_process = require("node:child_process"); +globalThis.constants = require("node:constants"); +globalThis.fs = require("node:fs/promises"); +globalThis.net = require("node:net"); +globalThis.os = require("node:os"); +globalThis.path = require("node:path"); diff --git a/src-bindings/polka/polka_stub.js b/src-bindings/polka/polka_stub.js index 87c00a6eb..a825a923d 100644 --- a/src-bindings/polka/polka_stub.js +++ b/src-bindings/polka/polka_stub.js @@ -1,2 +1,2 @@ -joo_global_object.polka = require("polka"); -joo_global_object.sirv = require("sirv"); +globalThis.polka = require("polka"); +globalThis.sirv = require("sirv"); diff --git a/src-bindings/vscode/vscode_stub.js b/src-bindings/vscode/vscode_stub.js index 9d7376f27..c70e241c3 100644 --- a/src-bindings/vscode/vscode_stub.js +++ b/src-bindings/vscode/vscode_stub.js @@ -1 +1 @@ -joo_global_object.vscode = require("vscode"); +globalThis.vscode = require("vscode"); diff --git a/src-bindings/vscode_languageclient/vscode_languageclient_stub.js b/src-bindings/vscode_languageclient/vscode_languageclient_stub.js index 875f885b0..70f96a061 100644 --- a/src-bindings/vscode_languageclient/vscode_languageclient_stub.js +++ b/src-bindings/vscode_languageclient/vscode_languageclient_stub.js @@ -1 +1 @@ -joo_global_object.vscode_languageclient = require("vscode-languageclient"); +globalThis.vscode_languageclient = require("vscode-languageclient");