From cfd73cec816cb73e0017cf306e133a7b0e5ae4eb Mon Sep 17 00:00:00 2001 From: dave caruso Date: Sat, 3 Jun 2023 00:36:05 -0400 Subject: fixes with hardcoded modules (#3182) * fixes with hardcoded modules * add make hardcoded to make dev * adjust this message * remove debugging logs * this * restore2 --- src/js/out/modules/node/async_hooks.js | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'src/js/out/modules/node/async_hooks.js') 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; -- cgit v1.2.3