diff options
author | 2023-07-18 02:07:41 -0700 | |
---|---|---|
committer | 2023-07-18 02:07:41 -0700 | |
commit | df0db54c58008d2a61a0c515a8611a231ae1d541 (patch) | |
tree | d98650c81c7b71c3f1b6116319a1d72d513ae3da /src/bun.js/module_loader.zig | |
parent | 0fd493fd781cfaaa704f08751f4239dd36ec5492 (diff) | |
parent | 661355546a4658ea927bfd70698577c1db301243 (diff) | |
download | bun-df0db54c58008d2a61a0c515a8611a231ae1d541.tar.gz bun-df0db54c58008d2a61a0c515a8611a231ae1d541.tar.zst bun-df0db54c58008d2a61a0c515a8611a231ae1d541.zip |
Merge branch 'main' into jarred/brotli
Diffstat (limited to 'src/bun.js/module_loader.zig')
-rw-r--r-- | src/bun.js/module_loader.zig | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/bun.js/module_loader.zig b/src/bun.js/module_loader.zig index e7e4d700e..07e25282f 100644 --- a/src/bun.js/module_loader.zig +++ b/src/bun.js/module_loader.zig @@ -826,7 +826,7 @@ pub const ModuleLoader = struct { else null; resolved_source.commonjs_exports_len = if (commonjs_exports.len > 0) - @truncate(u32, commonjs_exports.len) + @as(u32, @truncate(commonjs_exports.len)) else if (parse_result.ast.exports_kind == .cjs) std.math.maxInt(u32) else @@ -845,7 +845,7 @@ pub const ModuleLoader = struct { else null, .commonjs_exports_len = if (commonjs_exports.len > 0) - @truncate(u32, commonjs_exports.len) + @as(u32, @truncate(commonjs_exports.len)) else if (parse_result.ast.exports_kind == .cjs) std.math.maxInt(u32) else @@ -1228,7 +1228,7 @@ pub const ModuleLoader = struct { else null; resolved_source.commonjs_exports_len = if (commonjs_exports.len > 0) - @truncate(u32, commonjs_exports.len) + @as(u32, @truncate(commonjs_exports.len)) else if (parse_result.ast.exports_kind == .cjs) std.math.maxInt(u32) else @@ -1265,7 +1265,7 @@ pub const ModuleLoader = struct { else null, .commonjs_exports_len = if (commonjs_exports.len > 0) - @truncate(u32, commonjs_exports.len) + @as(u32, @truncate(commonjs_exports.len)) else if (parse_result.ast.exports_kind == .cjs) std.math.maxInt(u32) else @@ -1330,7 +1330,7 @@ pub const ModuleLoader = struct { var encoded = JSC.EncodedJSValue{ .asPtr = globalThis, }; - const globalValue = @enumFromInt(JSC.JSValue, encoded.asInt64); + const globalValue = @as(JSC.JSValue, @enumFromInt(encoded.asInt64)); globalValue.put( globalThis, JSC.ZigString.static("wasmSourceBytes"), @@ -2204,9 +2204,11 @@ pub const HardcodedModule = enum { .{ "path/win32", .{ .path = "node:path/win32" } }, .{ "perf_hooks", .{ .path = "node:perf_hooks" } }, .{ "process", .{ .path = "node:process" } }, - .{ "readable-stream", .{ .path = "node:stream" } }, - .{ "readable-stream/consumer", .{ .path = "node:stream/consumers" } }, - .{ "readable-stream/web", .{ .path = "node:stream/web" } }, + // Older versions of `readable-stream` is incompatible with latest + // version of Node.js Stream API, which `bun` implements + // .{ "readable-stream", .{ .path = "node:stream" } }, + // .{ "readable-stream/consumer", .{ .path = "node:stream/consumers" } }, + // .{ "readable-stream/web", .{ .path = "node:stream/web" } }, .{ "readline", .{ .path = "node:readline" } }, .{ "readline/promises", .{ .path = "node:readline/promises" } }, .{ "stream", .{ .path = "node:stream" } }, |