feat: load sourcemaps at runtime when using a bun build --target=bun bundle (#10998)

Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
This commit is contained in:
dave caruso
2024-05-21 14:41:53 -07:00
committed by GitHub
parent c03b35ecfc
commit e98c235e30
23 changed files with 1110 additions and 164 deletions

View File

@@ -266,10 +266,22 @@ pub const StringImplAllocator = struct {
};
pub const Tag = enum(u8) {
/// String is not valid. Observed on some failed operations.
/// To prevent crashes, this value acts similarly to .Empty (such as length = 0)
Dead = 0,
/// String is backed by a WTF::StringImpl from JavaScriptCore.
/// Can be in either `latin1` or `utf16le` encodings.
WTFStringImpl = 1,
/// Memory has an unknown owner, likely in Bun's Zig codebase. If `isGloballyAllocated`
/// is set, then it is owned by mimalloc. When converted to JSValue it has to be cloned
/// into a WTF::String.
/// Can be in either `utf8` or `utf16le` encodings.
ZigString = 2,
/// Static memory that is guarenteed to never be freed. When converted to WTF::String,
/// the memory is not cloned, but instead referenced with WTF::ExternalStringImpl.
/// Can be in either `utf8` or `utf16le` encodings.
StaticZigString = 3,
/// String is ""
Empty = 4,
};