Skip to content

Commit 78cee8b

Browse files
committed
simplify regexp
[^()]+\(?.*\)? is equal to .*
1 parent 4d87fff commit 78cee8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/Errors.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const webpack = require("..");
77
const prettyFormat = require("pretty-format");
88

99
const CWD_PATTERN = new RegExp(process.cwd().replace(/\\/g, "/"), "gm");
10-
const ERROR_STACK_PATTERN = /(?:\n\s+at[^()]+\(?.*\)?)+/gm;
10+
const ERROR_STACK_PATTERN = /(?:\n\s+at\s.*)+/gm;
1111

1212
function cleanError(err) {
1313
const result = Object.getOwnPropertyNames(err).reduce((result, key) => {

0 commit comments

Comments
 (0)