mirror of
https://github.com/oven-sh/bun
synced 2026-02-13 04:18:58 +00:00
fix(npmrc): handle BOM conversion (#18878)
This commit is contained in:
@@ -53,7 +53,7 @@ pub fn getCandidatePackagePatterns(allocator: std.mem.Allocator, log: *bun.logge
|
||||
log.errors = 0;
|
||||
log.warnings = 0;
|
||||
|
||||
const json_source = switch (bun.sys.File.toSource(json_path, allocator)) {
|
||||
const json_source = switch (bun.sys.File.toSource(json_path, allocator, .{})) {
|
||||
.err => |err| {
|
||||
switch (err.getErrno()) {
|
||||
.NOENT, .ACCES, .PERM => continue,
|
||||
|
||||
@@ -706,7 +706,7 @@ pub const PackCommand = struct {
|
||||
if (strings.eqlComptime(entry_name, "package.json")) {
|
||||
if (entry.kind != .file) break :root_depth;
|
||||
// find more dependencies to bundle
|
||||
const source = File.toSourceAt(dir, entryNameZ(entry_name, entry_subpath), ctx.allocator).unwrap() catch |err| {
|
||||
const source = File.toSourceAt(dir, entryNameZ(entry_name, entry_subpath), ctx.allocator, .{}).unwrap() catch |err| {
|
||||
Output.err(err, "failed to read package.json: \"{s}\"", .{entry_subpath});
|
||||
Global.crash();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user