diff options
author | 2022-07-11 04:53:45 -0400 | |
---|---|---|
committer | 2022-07-11 01:53:45 -0700 | |
commit | 3abfc3566be8730c9c9d6e57cb355f57e0acb303 (patch) | |
tree | 869c3b388395b8740fa25d2c7d258252001b2037 /src/bun.js/javascript.zig | |
parent | 71992634a641337483d391a552d047bd7f281738 (diff) | |
download | bun-3abfc3566be8730c9c9d6e57cb355f57e0acb303.tar.gz bun-3abfc3566be8730c9c9d6e57cb355f57e0acb303.tar.zst bun-3abfc3566be8730c9c9d6e57cb355f57e0acb303.zip |
add depd browser polyfill (#517)
Diffstat (limited to '')
-rw-r--r-- | src/bun.js/javascript.zig | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/bun.js/javascript.zig b/src/bun.js/javascript.zig index 90356fafa..d295d6c8e 100644 --- a/src/bun.js/javascript.zig +++ b/src/bun.js/javascript.zig @@ -952,6 +952,17 @@ pub const VirtualMachine = struct { .hash = 0, }; }, + @"depd" => { + return ResolvedSource{ + .allocator = null, + .source_code = ZigString.init( + @as(string, @embedFile("./depd.exports.js")), + ), + .specifier = ZigString.init("depd"), + .source_url = ZigString.init("depd"), + .hash = 0, + }; + }, } } else if (_specifier.len > js_ast.Macro.namespaceWithColon.len and strings.eqlComptimeIgnoreLen(_specifier[0..js_ast.Macro.namespaceWithColon.len], js_ast.Macro.namespaceWithColon)) @@ -2707,6 +2718,7 @@ pub const HardcodedModule = enum { @"bun:jsc", @"bun:main", @"bun:sqlite", + @"depd", @"detect-libc", @"node:fs", @"node:fs/promises", @@ -2728,6 +2740,7 @@ pub const HardcodedModule = enum { .{ "bun:jsc", HardcodedModule.@"bun:jsc" }, .{ "bun:main", HardcodedModule.@"bun:main" }, .{ "bun:sqlite", HardcodedModule.@"bun:sqlite" }, + .{ "depd", HardcodedModule.@"depd" }, .{ "detect-libc", HardcodedModule.@"detect-libc" }, .{ "ffi", HardcodedModule.@"bun:ffi" }, .{ "fs", HardcodedModule.@"node:fs" }, @@ -2757,6 +2770,7 @@ pub const HardcodedModule = enum { .{ "bun:jsc", "bun:jsc" }, .{ "bun:sqlite", "bun:sqlite" }, .{ "bun:wrap", "bun:wrap" }, + .{ "depd", "depd" }, .{ "detect-libc", "detect-libc" }, .{ "detect-libc/lib/detect-libc.js", "detect-libc" }, .{ "ffi", "bun:ffi" }, |