mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 02:48:50 +00:00
### What does this PR do? Two things: - we weren't adding the root package to the `pkg_map`. - `link:` dependency paths in `"snapshots"` weren't being joined with the top level dir. ### How did you verify your code works? Manually and added a test.
28 lines
1.1 KiB
Zig
28 lines
1.1 KiB
Zig
pub const Path = paths.Path;
|
|
pub const AbsPath = paths.AbsPath;
|
|
pub const AutoAbsPath = paths.AutoAbsPath;
|
|
pub const RelPath = paths.RelPath;
|
|
pub const AutoRelPath = paths.AutoRelPath;
|
|
|
|
pub const EnvPath = @import("./paths/EnvPath.zig").EnvPath;
|
|
|
|
pub const path_buffer_pool = pools.path_buffer_pool;
|
|
pub const w_path_buffer_pool = pools.w_path_buffer_pool;
|
|
pub const os_path_buffer_pool = pools.os_path_buffer_pool;
|
|
|
|
pub const MAX_PATH_BYTES: usize = if (Environment.isWasm) 1024 else std.fs.max_path_bytes;
|
|
pub const PathBuffer = [MAX_PATH_BYTES]u8;
|
|
pub const PATH_MAX_WIDE = std.os.windows.PATH_MAX_WIDE;
|
|
pub const WPathBuffer = [PATH_MAX_WIDE]u16;
|
|
pub const OSPathChar = if (Environment.isWindows) u16 else u8;
|
|
pub const OSPathSliceZ = [:0]const OSPathChar;
|
|
pub const OSPathSlice = []const OSPathChar;
|
|
pub const OSPathBuffer = if (Environment.isWindows) WPathBuffer else PathBuffer;
|
|
|
|
const paths = @import("./paths/Path.zig");
|
|
const pools = @import("./paths/path_buffer_pool.zig");
|
|
const std = @import("std");
|
|
|
|
const bun = @import("bun");
|
|
const Environment = bun.Environment;
|