@@ -41,15 +41,6 @@ export async function getTurbopackJsConfig(
41
41
42
42
class ModuleBuildError extends Error { }
43
43
44
- function getIssueKey ( issue : Issue ) : string {
45
- return [
46
- issue . severity ,
47
- issue . filePath ,
48
- JSON . stringify ( issue . title ) ,
49
- JSON . stringify ( issue . description ) ,
50
- ] . join ( '-' )
51
- }
52
-
53
44
export function formatIssue ( issue : Issue ) {
54
45
const { filePath, title, description, source } = issue
55
46
let { documentationLink } = issue
@@ -124,15 +115,23 @@ export function formatIssue(issue: Issue) {
124
115
return message
125
116
}
126
117
127
- export type EntryIssuesMap = Map < EntryKey , Map < string , Issue > >
118
+ type IssueKey = `${Issue [ 'severity' ] } -${Issue [ 'filePath' ] } -${string } -${string } `
119
+ type IssuesMap = Map < IssueKey , Issue >
120
+ export type EntryIssuesMap = Map < EntryKey , IssuesMap >
121
+
122
+ function getIssueKey ( issue : Issue ) : IssueKey {
123
+ return `${ issue . severity } -${ issue . filePath } -${ JSON . stringify (
124
+ issue . title
125
+ ) } -${ JSON . stringify ( issue . description ) } `
126
+ }
128
127
129
128
export function processIssues (
130
129
currentEntryIssues : EntryIssuesMap ,
131
130
key : EntryKey ,
132
131
result : TurbopackResult ,
133
132
throwIssue = false
134
133
) {
135
- const newIssues = new Map < string , Issue > ( )
134
+ const newIssues = new Map < IssueKey , Issue > ( )
136
135
currentEntryIssues . set ( key , newIssues )
137
136
138
137
const relevantIssues = new Set ( )
0 commit comments