Reduce log level for loading tsconfig.json extends message

This commit is contained in:
Jarred Sumner
2023-09-15 00:15:22 -07:00
parent 29a6ece6c6
commit f2a8575e4d
2 changed files with 13 additions and 1 deletions

View File

@@ -703,7 +703,19 @@ pub const Log = struct {
};
}
pub fn addVerboseFmt(log: *Log, source: ?*const Source, l: Loc, allocator: std.mem.Allocator, comptime text: string, args: anytype) !void {
if (!Kind.shouldPrint(.verbose, log.level)) return;
@setCold(true);
try log.addMsg(.{
.kind = .verbose,
.data = try rangeData(source, Range{ .loc = l }, allocPrint(allocator, text, args) catch unreachable).cloneLineText(log.clone_line_text, log.msgs.allocator),
});
}
pub fn addVerbose(log: *Log, source: ?*const Source, loc: Loc, text: string) !void {
if (!Kind.shouldPrint(.verbose, log.level)) return;
@setCold(true);
try log.addMsg(.{
.kind = .verbose,

View File

@@ -3887,7 +3887,7 @@ pub const Resolver = struct {
// not sure why this needs cwd but we'll just pass in the dir of the tsconfig...
var abs_path = ResolvePath.joinAbsStringBuf(ts_dir_name, bufs(.tsconfig_path_abs), &[_]string{ ts_dir_name, current.extends }, .auto);
var parent_config_maybe = r.parseTSConfig(abs_path, 0) catch |err| {
r.log.addWarningFmt(null, logger.Loc.Empty, r.allocator, "{s} loading tsconfig.json extends {}", .{ @errorName(err), strings.QuotedFormatter{
r.log.addVerboseFmt(null, logger.Loc.Empty, r.allocator, "{s} loading tsconfig.json extends {}", .{ @errorName(err), strings.QuotedFormatter{
.text = abs_path,
} }) catch {};
break;