Use better function names for bun.String (#20999)

This commit is contained in:
Zack Radisic
2025-07-12 18:19:16 -07:00
committed by GitHub
parent 0feddf716a
commit ac61b1d471
62 changed files with 214 additions and 195 deletions

View File

@@ -491,12 +491,12 @@ pub const Mapping = struct {
const name = source_map.external_source_names[@intCast(lookup.mapping.source_index)];
if (source_map.is_standalone_module_graph) {
return bun.String.createUTF8(name);
return bun.String.cloneUTF8(name);
}
if (std.fs.path.isAbsolute(base_filename)) {
const dir = bun.path.dirname(base_filename, .auto);
return bun.String.createUTF8(bun.path.joinAbs(dir, .auto, name));
return bun.String.cloneUTF8(bun.path.joinAbs(dir, .auto, name));
}
return bun.String.init(name);