mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
feedback
This commit is contained in:
@@ -9,7 +9,7 @@ pub const Meta = extern struct {
|
||||
|
||||
arch: Npm.Architecture = .all,
|
||||
os: Npm.OperatingSystem = .all,
|
||||
libc: Npm.Libc = .all,
|
||||
libc: Npm.Libc = .none,
|
||||
_padding_after_platform: u8 = 0,
|
||||
|
||||
id: PackageID = invalid_package_id,
|
||||
|
||||
@@ -313,7 +313,7 @@ pub fn jsonStringify(this: *const Lockfile, w: anytype) !void {
|
||||
}
|
||||
}
|
||||
|
||||
if (@as(u16, @intFromEnum(pkg.meta.libc)) != Npm.Libc.all_value) {
|
||||
if (pkg.meta.libc != .none) {
|
||||
try w.objectField("libc");
|
||||
try w.beginArray();
|
||||
defer w.endArray() catch {};
|
||||
|
||||
@@ -783,15 +783,15 @@ pub const Libc = enum(u8) {
|
||||
}
|
||||
|
||||
pub fn isMatch(this: Libc) bool {
|
||||
return (@intFromEnum(this) & @intFromEnum(current)) != 0 or this == .none;
|
||||
return (@intFromEnum(this) & @intFromEnum(current)) != 0;
|
||||
}
|
||||
|
||||
pub fn isMatchWithTarget(this: Libc, target: Libc) bool {
|
||||
return (@intFromEnum(this) & @intFromEnum(target)) != 0 or this == .none;
|
||||
return (@intFromEnum(this) & @intFromEnum(target)) != 0;
|
||||
}
|
||||
|
||||
pub fn negatable(this: Libc) Negatable(Libc) {
|
||||
return .{ .added = this, .removed = .none };
|
||||
return .{ .added = .none, .removed = this };
|
||||
}
|
||||
|
||||
pub const current: Libc = switch (Environment.os) {
|
||||
|
||||
Reference in New Issue
Block a user