aboutsummaryrefslogtreecommitdiff
path: root/src/js/out/modules_dev/node/vm.js
diff options
context:
space:
mode:
authorGravatar dave caruso <me@paperdave.net> 2023-06-03 00:36:05 -0400
committerGravatar GitHub <noreply@github.com> 2023-06-02 21:36:05 -0700
commitcfd73cec816cb73e0017cf306e133a7b0e5ae4eb (patch)
treeb628d48e6962f9e71e3b9b75884f684d8297e180 /src/js/out/modules_dev/node/vm.js
parent3e437a6ae0d4a68f8f29c60276918d662ad7bbc7 (diff)
downloadbun-cfd73cec816cb73e0017cf306e133a7b0e5ae4eb.tar.gz
bun-cfd73cec816cb73e0017cf306e133a7b0e5ae4eb.tar.zst
bun-cfd73cec816cb73e0017cf306e133a7b0e5ae4eb.zip
fixes with hardcoded modules (#3182)
* fixes with hardcoded modules * add make hardcoded to make dev * adjust this message * remove debugging logs * this * restore2
Diffstat (limited to 'src/js/out/modules_dev/node/vm.js')
-rw-r--r--src/js/out/modules_dev/node/vm.js52
1 files changed, 0 insertions, 52 deletions
diff --git a/src/js/out/modules_dev/node/vm.js b/src/js/out/modules_dev/node/vm.js
deleted file mode 100644
index 8acaedcb0..000000000
--- a/src/js/out/modules_dev/node/vm.js
+++ /dev/null
@@ -1,52 +0,0 @@
-function throwNotImplemented(feature, issue) {
- throw hideFromStack(throwNotImplemented), new NotImplementedError(feature, issue);
-}
-function hideFromStack(...fns) {
- for (let fn of fns)
- Object.defineProperty(fn, "name", {
- value: "::bunternal::"
- });
-}
-
-class NotImplementedError extends Error {
- code;
- constructor(feature, issue) {
- super(feature + " is not yet implemented in Bun." + (issue ? " Track the status & thumbs up the issue: https://github.com/oven-sh/bun/issues/" + issue : ""));
- this.name = "NotImplementedError", this.code = "ERR_NOT_IMPLEMENTED", hideFromStack(NotImplementedError);
- }
-}
-
-// src/js/node/vm.ts
-var runInContext = function(code, context, options) {
- return new Script(code, options).runInContext(context);
-}, compileFunction = function() {
- throwNotImplemented("node:vm compileFunction", 401);
-}, measureMemory = function() {
- throwNotImplemented("node:vm measureMemory", 401);
-}, lazy = globalThis[Symbol.for("Bun.lazy")];
-if (!lazy || typeof lazy !== "function")
- throw new Error("Something went wrong while loading Bun. Expected 'Bun.lazy' to be defined.");
-var vm = lazy("vm"), { createContext, isContext, Script, runInNewContext, runInThisContext } = vm, defaultObject = {
- createContext,
- runInContext,
- runInNewContext,
- runInThisContext,
- isContext,
- compileFunction,
- measureMemory,
- Script,
- [Symbol.for("CommonJS")]: 0
-};
-export {
- runInThisContext,
- runInNewContext,
- runInContext,
- measureMemory,
- isContext,
- defaultObject as default,
- createContext,
- compileFunction,
- Script
-};
-
-//# debugId=FC9E23DEAFC8A97364756e2164756e21