Skip to content

Commit

Permalink
update issue snapshotting
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Mar 22, 2023
1 parent 2c749c7 commit fa5934d
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 44 deletions.
14 changes: 12 additions & 2 deletions packages/next-swc/crates/next-dev-tests/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -564,9 +564,19 @@ impl Issue for NormalizedIssue {
#[turbo_tasks::function]
async fn description(&self) -> Result<StringVc> {
let str = self.0.description().await?;
let regex = Regex::new(r"\n at (.+) \((.+)\)").unwrap();
let regex1 = Regex::new(r"\n +at (.+) \((.+)\)(?: \[.+\])?").unwrap();
let regex2 = Regex::new(r"\n +at ()(.+) \[.+\]").unwrap();
let regex3 = Regex::new(r"\n +\[at .+\]").unwrap();
Ok(StringVc::cell(
regex.replace_all(&str, StackTraceReplacer).to_string(),
regex3
.replace_all(
&regex2.replace_all(
&regex1.replace_all(&str, StackTraceReplacer),
StackTraceReplacer,
),
"",
)
.to_string(),
))
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
PlainIssue {
severity: Warning,
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/hello.emit",
category: "loaders",
title: "Issue while running loader",
description: "Error: Warning!\n at readResource (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:80:11)\n at (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:58:5)\n at Module.transform (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:50:10)\n at (/turbopack/[turbopack-node]/ipc/evaluate.ts/evaluate.js:1:74)\n at Module.run (/turbopack/[turbopack-node]/ipc/evaluate.ts:45:31)",
detail: "",
documentation_link: "",
source: None,
sub_issues: [],
processing_path: Some(
[
PlainIssueProcessingPathItem {
context: Some(
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/index.js",
),
description: "Next.js pages directory",
},
],
),
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
PlainIssue {
severity: Error,
context: "[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/hello.emit",
category: "loaders",
title: "Issue while running loader",
description: "Error: Error!\n at readResource (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:80:11)\n at (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:58:5)\n at Module.transform (/turbopack/[turbopack-node]/transforms/webpack-loaders.ts:50:10)\n at (/turbopack/[turbopack-node]/ipc/evaluate.ts/evaluate.js:1:74)\n at Module.run (/turbopack/[turbopack-node]/ipc/evaluate.ts:45:31)",
detail: "",
documentation_link: "",
source: None,
sub_issues: [],
processing_path: Some(
[
PlainIssueProcessingPathItem {
context: Some(
"[project]/packages/next-swc/crates/next-dev-tests/tests/integration/next/webpack-loaders/emitted-errors/input/pages/index.js",
),
description: "Next.js pages directory",
},
],
),
}

This file was deleted.

This file was deleted.

0 comments on commit fa5934d

Please sign in to comment.