aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-03-14 08:15:59 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-03-14 08:16:53 -0700
commit27f5012f50b998fec5b45531de2439a11a72eaa2 (patch)
tree8987a33931c078c0856611ec7c353db70b8a8387 /src/bun.js
parentba994c52b820a0f0466b9412735d522892767f9c (diff)
downloadbun-27f5012f50b998fec5b45531de2439a11a72eaa2.tar.gz
bun-27f5012f50b998fec5b45531de2439a11a72eaa2.tar.zst
bun-27f5012f50b998fec5b45531de2439a11a72eaa2.zip
Fix `node:https` being readonly
Diffstat (limited to 'src/bun.js')
-rw-r--r--src/bun.js/http.exports.js10
-rw-r--r--src/bun.js/https.exports.js2
2 files changed, 4 insertions, 8 deletions
diff --git a/src/bun.js/http.exports.js b/src/bun.js/http.exports.js
index 29421b836..433fd7aa0 100644
--- a/src/bun.js/http.exports.js
+++ b/src/bun.js/http.exports.js
@@ -1487,13 +1487,7 @@ var defaultObject = {
return (_globalAgent ??= new Agent());
},
set globalAgent(agent) {},
+ [Symbol.for("CommonJS")]: 0,
};
-var wrapper =
- (0,
- function () {
- return defaultObject;
- });
-
-wrapper[Symbol.for("CommonJS")] = true;
-export default wrapper;
+export default defaultObject;
diff --git a/src/bun.js/https.exports.js b/src/bun.js/https.exports.js
index d79deedb3..30e0469f5 100644
--- a/src/bun.js/https.exports.js
+++ b/src/bun.js/https.exports.js
@@ -1 +1,3 @@
export * from "node:http";
+const HTTP = import.meta.require("node:http");
+export default HTTP;