Skip to content

Commit

Permalink
Remove redundant logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Rubilmax committed Dec 24, 2022
1 parent 2a835c7 commit 4ef6940
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -461,14 +461,14 @@ async function run() {
const formattedDiff = (0, format_1.formatDiff)(cmpDef, diff);
const title = format_1.diffTitles[formattedDiff.type];
const level = format_1.diffLevels[formattedDiff.type] || "error";
console.log(core[level](formattedDiff.message, {
core[level](formattedDiff.message, {
title,
file: cmpDef.path,
startLine: formattedDiff.loc.start.line,
endLine: formattedDiff.loc.end.line,
startColumn: formattedDiff.loc.start.column,
endColumn: formattedDiff.loc.end.column,
}));
});
return formattedDiff;
});
if (formattedDiffs.filter((diff) => format_1.diffLevels[diff.type] === "error").length > 0 ||
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

18 changes: 8 additions & 10 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,16 +146,14 @@ async function run() {

const title = diffTitles[formattedDiff.type];
const level = diffLevels[formattedDiff.type] || "error";
console.log(
core[level](formattedDiff.message, {
title,
file: cmpDef.path,
startLine: formattedDiff.loc.start.line,
endLine: formattedDiff.loc.end.line,
startColumn: formattedDiff.loc.start.column,
endColumn: formattedDiff.loc.end.column,
})
);
core[level](formattedDiff.message, {
title,
file: cmpDef.path,
startLine: formattedDiff.loc.start.line,
endLine: formattedDiff.loc.end.line,
startColumn: formattedDiff.loc.start.column,
endColumn: formattedDiff.loc.end.column,
});

return formattedDiff;
});
Expand Down

0 comments on commit 4ef6940

Please sign in to comment.