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

Function normalizeStdout

test/utils/test-utils.js:253–268  ·  view source on GitHub ↗
(stdout)

Source from the content-addressed store, hash-verified

251 .replaceAll(/\s+at .+(}|\)|\d)/gs, "\n at stack");
252
253const normalizeStdout = (stdout) => {
254 if (typeof stdout !== "string") {
255 return stdout;
256 }
257
258 if (stdout.length === 0) {
259 return stdout;
260 }
261
262 let normalizedStdout = stripVTControlCharacters(stdout);
263 normalizedStdout = normalizeCwd(normalizedStdout);
264 normalizedStdout = normalizeVersions(normalizedStdout);
265 normalizedStdout = normalizeError(normalizedStdout);
266
267 return normalizedStdout;
268};
269
270const IPV4 = /(25[0-5]|2[0-4][0-9]|1?[0-9][0-9]{1,2})(\.(25[0-5]|2[0-4][0-9]|1?[0-9]{1,2})){3}/g;
271const IPV6 = /([0-9a-f]){1,4}(:([0-9a-f]){1,4}){7}/gi;

Calls 3

normalizeCwdFunction · 0.85
normalizeVersionsFunction · 0.85
normalizeErrorFunction · 0.85

Tested by

no test coverage detected