aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/api/bun.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js/api/bun.zig')
-rw-r--r--src/bun.js/api/bun.zig21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/bun.js/api/bun.zig b/src/bun.js/api/bun.zig
index 966c82d38..a1446831f 100644
--- a/src/bun.js/api/bun.zig
+++ b/src/bun.js/api/bun.zig
@@ -876,6 +876,19 @@ export fn Bun__resolveSync(
};
}
+export fn Bun__resolveSyncWithStrings(
+ global: *JSGlobalObject,
+ specifier: *bun.String,
+ source: *bun.String,
+ is_esm: bool,
+) JSC.JSValue {
+ var exception_ = [1]JSC.JSValueRef{null};
+ var exception = &exception_;
+ return doResolveWithArgs(global, specifier.*, source.*, exception, is_esm, true) orelse {
+ return JSC.JSValue.fromRef(exception[0]);
+ };
+}
+
export fn Bun__resolveSyncWithSource(
global: *JSGlobalObject,
specifier: JSValue,
@@ -889,14 +902,6 @@ export fn Bun__resolveSyncWithSource(
};
}
-comptime {
- if (!is_bindgen) {
- _ = Bun__resolve;
- _ = Bun__resolveSync;
- _ = Bun__resolveSyncWithSource;
- }
-}
-
pub fn getPublicPathJS(globalObject: *JSC.JSGlobalObject, callframe: *JSC.CallFrame) callconv(.C) JSC.JSValue {
const arguments = callframe.arguments(1).slice();
if (arguments.len < 1) {