diff options
author | 2023-06-03 00:36:05 -0400 | |
---|---|---|
committer | 2023-06-02 21:36:05 -0700 | |
commit | cfd73cec816cb73e0017cf306e133a7b0e5ae4eb (patch) | |
tree | b628d48e6962f9e71e3b9b75884f684d8297e180 /src/js/out/modules/node/async_hooks.js | |
parent | 3e437a6ae0d4a68f8f29c60276918d662ad7bbc7 (diff) | |
download | bun-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/node/async_hooks.js')
-rw-r--r-- | src/js/out/modules/node/async_hooks.js | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/js/out/modules/node/async_hooks.js b/src/js/out/modules/node/async_hooks.js index 31f769d74..5e7abe8e9 100644 --- a/src/js/out/modules/node/async_hooks.js +++ b/src/js/out/modules/node/async_hooks.js @@ -16,7 +16,7 @@ var createHook = function() { }, drainMicrotasks = () => { ({ drainMicrotasks } = import.meta.require("bun:jsc")), drainMicrotasks(); }, notImplemented = () => { - console.warn("[bun]: async_hooks has not been implemented yet. See https://github.com/oven-sh/bun/issues/1832"), notImplemented = () => { + console.warn("[bun] Warning: async_hooks has not been implemented yet. See https://github.com/oven-sh/bun/issues/1832"), notImplemented = () => { }; }; @@ -120,9 +120,9 @@ class AsyncResource { if (this.type = type, this.triggerAsyncId = triggerAsyncId2, AsyncResource.allowedRunInAsyncScope.has(type)) this.runInAsyncScope = this.#runInAsyncScope; } + static allowedRunInAsyncScope = new Set(["prisma-client-request"]); type; triggerAsyncId; - static allowedRunInAsyncScope = new Set(["prisma-client-request"]); emitBefore() { return !0; } @@ -133,17 +133,7 @@ class AsyncResource { } runInAsyncScope; #runInAsyncScope(fn, ...args) { - notImplemented(); - var result, err; - if (process.nextTick((fn2) => { - try { - result = fn2(...args); - } catch (err2) { - err = err2; - } - }, fn), drainMicrotasks(), err) - throw err; - return result; + return fn(...args); } asyncId() { return 0; |