Skip to content

Commit

Permalink
move details limiting back to factory
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Mar 8, 2022
1 parent c14f187 commit 4cca965
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/stats/DefaultStatsFactoryPlugin.js
Expand Up @@ -1824,7 +1824,7 @@ const errorsSpaceLimit = (errors, max) => {
result = i > 0 ? errors.slice(0, i) : [];
const overlimit = fullLength - max + 1;
result.push({
...errors[i++],
...errors[i++].split("\n").slice(0, -overlimit).join("\n"),
filteredDetails: overlimit
});
filtered = errors.length - i;
Expand Down
7 changes: 1 addition & 6 deletions lib/stats/DefaultStatsPrinterPlugin.js
Expand Up @@ -588,12 +588,7 @@ const SIMPLE_PRINTERS = {
"error.loc": (loc, { green }) => green(loc),
"error.message": (message, { bold, formatError }) =>
message.includes("\u001b[") ? message : bold(formatError(message)),
"error.details": (details, { formatError, error }) => {
if (!error.filteredDetails) return formatError(details);
return formatError(
details.split("\n").slice(0, -error.filteredDetails).join("\n")
);
},
"error.details": (details, { formatError }) => formatError(details),
"error.filteredDetails": filteredDetails =>
filteredDetails ? `+ ${filteredDetails} hidden lines` : undefined,
"error.stack": stack => stack,
Expand Down

0 comments on commit 4cca965

Please sign in to comment.