summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-05-11 21:24:40 +0200
committerGitHub <noreply@github.com>2023-05-11 21:24:40 +0200
commitc926bc0debd0df3bf62d5125a490f8675e70c6ef (patch)
treef9e7036b1ef7c01fcf38cc18b6e63a21ccfe4c03
parent18e9f4642cc9ff598105a0d51263e307949c0423 (diff)
fix(npm): make http2 module available, make 'nodeGlobalThisName' writable (#19092)
-rw-r--r--ext/node/polyfill.rs4
-rw-r--r--ext/node/polyfills/02_init.js2
2 files changed, 5 insertions, 1 deletions
diff --git a/ext/node/polyfill.rs b/ext/node/polyfill.rs
index b334d2d34..8cf1cec70 100644
--- a/ext/node/polyfill.rs
+++ b/ext/node/polyfill.rs
@@ -102,6 +102,10 @@ pub static SUPPORTED_BUILTIN_NODE_MODULES: &[NodeModulePolyfill] = &[
specifier: "ext:deno_node/http.ts",
},
NodeModulePolyfill {
+ name: "http2",
+ specifier: "ext:deno_node/http2.ts",
+ },
+ NodeModulePolyfill {
name: "https",
specifier: "ext:deno_node/https.ts",
},
diff --git a/ext/node/polyfills/02_init.js b/ext/node/polyfills/02_init.js
index d419c3bca..b8070d50f 100644
--- a/ext/node/polyfills/02_init.js
+++ b/ext/node/polyfills/02_init.js
@@ -39,7 +39,7 @@ function initialize(
// get node's globalThis
ObjectDefineProperty(globalThis, nodeGlobalThisName, {
enumerable: false,
- writable: false,
+ writable: true,
value: nodeGlobalThis,
});
// FIXME(bartlomieju): not nice to depend on `Deno` namespace here