Unverified Commit 9e7d9cea authored by OJ Kwon's avatar OJ Kwon Committed by GitHub

fix(turbopack): loosen warning log guards (#63880)

### What

issue's filepath can be outside of turbopack root (`[project]/..`).
Loosening check to include any node_modules path.


Closes PACK-2876
parent ff1db77f
...@@ -67,7 +67,7 @@ export function printNonFatalIssue(issue: Issue) { ...@@ -67,7 +67,7 @@ export function printNonFatalIssue(issue: Issue) {
// Currently only warnings will be printed, excluding if the error source // Currently only warnings will be printed, excluding if the error source
// is coming from foreign (node_modules) codes. // is coming from foreign (node_modules) codes.
if (issue.severity === 'warning') { if (issue.severity === 'warning') {
if (!issue.filePath.match(/\[project\].+\/node_modules\//g)) { if (!issue.filePath.match(/^(?:.*[\\/])?node_modules(?:[\\/].*)?$/)) {
Log.warn(formatIssue(issue)) Log.warn(formatIssue(issue))
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment