fix: get bun build working on window (#8712)

* work on bundler

* a

* YAAAAYYAYAYAYYAYA

* get some more bundler tests working

* Update src/bundler/bundle_v2.zig

* rev

* ok

* i converted the cmakelists into LF

* personal review

* we didnt win

* okey they pass

* revert :(

* a

---------

Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
This commit is contained in:
dave caruso
2024-02-08 17:56:26 -08:00
committed by GitHub
parent 1ccf0c2e9c
commit 2d7df726fd
32 changed files with 1617 additions and 1479 deletions

View File

@@ -735,7 +735,7 @@ pub fn withoutTrailingSlashWindowsPath(this: string) []const u8 {
}
pub fn withTrailingSlash(dir: string, in: string) []const u8 {
if (comptime Environment.allow_assert) std.debug.assert(bun.isSliceInBuffer(dir, in));
if (comptime Environment.allow_assert) std.debug.assert(bun.isSliceInBuffer(u8, dir, in));
return in[0..@min(strings.withoutTrailingSlash(in[0..@min(dir.len + 1, in.len)]).len + 1, in.len)];
}
@@ -869,10 +869,6 @@ pub fn hasPrefixComptime(self: string, comptime alt: anytype) bool {
return self.len >= alt.len and eqlComptimeCheckLenWithType(u8, self[0..alt.len], alt, false);
}
pub fn isBunStandaloneFilePath(self: string) bool {
return hasPrefixComptime(self, "/$bunfs/");
}
pub fn hasPrefixComptimeUTF16(self: []const u16, comptime alt: []const u8) bool {
return self.len >= alt.len and eqlComptimeCheckLenWithType(u16, self[0..alt.len], comptime toUTF16Literal(alt), false);
}