diff options
author | 2023-10-17 14:10:25 -0700 | |
---|---|---|
committer | 2023-10-17 14:10:25 -0700 | |
commit | 7458b969c5d9971e89d187b687e1924e78da427e (patch) | |
tree | ee3dbf95c728cf407bf49a27826b541e9264a8bd /src/runtime.zig | |
parent | d4a2c29131ec154f5e4db897d4deedab2002cbc4 (diff) | |
parent | e91436e5248d947b50f90b4a7402690be8a41f39 (diff) | |
download | bun-7458b969c5d9971e89d187b687e1924e78da427e.tar.gz bun-7458b969c5d9971e89d187b687e1924e78da427e.tar.zst bun-7458b969c5d9971e89d187b687e1924e78da427e.zip |
Merge branch 'main' into postinstall_3
Diffstat (limited to 'src/runtime.zig')
-rw-r--r-- | src/runtime.zig | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/runtime.zig b/src/runtime.zig index cf9f1d208..0c343ddff 100644 --- a/src/runtime.zig +++ b/src/runtime.zig @@ -289,6 +289,7 @@ pub const Runtime = struct { minify_syntax: bool = false, minify_identifiers: bool = false, + dead_code_elimination: bool = true, set_breakpoint_on_first_line: bool = false, @@ -328,6 +329,8 @@ pub const Runtime = struct { commonjs_at_runtime: bool = false, + emit_decorator_metadata: bool = false, + pub fn shouldUnwrapRequire(this: *const Features, package_name: string) bool { return package_name.len > 0 and strings.indexEqualAny(this.unwrap_commonjs_packages, package_name) != null; } @@ -372,8 +375,9 @@ pub const Runtime = struct { __exportDefault: ?GeneratedSymbol = null, __FastRefreshRuntime: ?GeneratedSymbol = null, __merge: ?GeneratedSymbol = null, - __decorateClass: ?GeneratedSymbol = null, - __decorateParam: ?GeneratedSymbol = null, + __legacyDecorateClassTS: ?GeneratedSymbol = null, + __legacyDecorateParamTS: ?GeneratedSymbol = null, + __legacyMetadataTS: ?GeneratedSymbol = null, @"$$typeof": ?GeneratedSymbol = null, pub const all = [_][]const u8{ @@ -395,8 +399,9 @@ pub const Runtime = struct { "__exportDefault", "__FastRefreshRuntime", "__merge", - "__decorateClass", - "__decorateParam", + "__legacyDecorateClassTS", + "__legacyDecorateParamTS", + "__legacyMetadataTS", "$$typeof", }; const all_sorted: [all.len]string = brk: { @@ -540,6 +545,11 @@ pub const Runtime = struct { return Entry{ .key = 18, .value = val.ref }; } }, + 19 => { + if (@field(this.runtime_imports, all[19])) |val| { + return Entry{ .key = 19, .value = val.ref }; + } + }, else => { return null; }, @@ -603,6 +613,7 @@ pub const Runtime = struct { 16 => (@field(imports, all[16]) orelse return null).ref, 17 => (@field(imports, all[17]) orelse return null).ref, 18 => (@field(imports, all[18]) orelse return null).ref, + 19 => (@field(imports, all[19]) orelse return null).ref, else => null, }; } |