MCPcopy Create free account
hub / github.com/webpack/webpack-cli / normalizeError

Function normalizeError

test/utils/test-utils.js:248–251  ·  view source on GitHub ↗
(output)

Source from the content-addressed store, hash-verified

246 .replaceAll(new RegExp(process.cwd().replaceAll("\\", "/"), "g"), "<cwd>");
247
248const normalizeError = (output) =>
249 output
250 .replace(/SyntaxError: .+/, "SyntaxError: <error-message>")
251 .replaceAll(/\s+at .+(}|\)|\d)/gs, "\n at stack");
252
253const normalizeStdout = (stdout) => {
254 if (typeof stdout !== "string") {

Callers 2

normalizeStdoutFunction · 0.85
normalizeStderrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected