1- import picocolors from 'picocolors' ;
21import { ISSUE_TYPE_TITLE , SYMBOL_TYPE } from '../../constants.ts' ;
32import type { Issue , IssueRecords , IssueSeverity , IssueSymbol , IssueType } from '../../types/issues.ts' ;
3+ import st from '../../util/colors.ts' ;
44import { relative } from '../../util/path.ts' ;
55import { Table } from '../../util/table.ts' ;
66
77const plain = ( text : string ) => text ;
8- export const dim = picocolors . gray ;
9- export const bright = picocolors . whiteBright ;
10- const yellow = picocolors . yellow ;
8+ export const dim = st . gray ;
9+ export const bright = st . whiteBright ;
1110
1211export const getIssueTypeTitle = ( reportType : keyof typeof ISSUE_TYPE_TITLE ) => ISSUE_TYPE_TITLE [ reportType ] ;
1312
1413export const getColoredTitle = ( title : string , count : number ) =>
15- `${ picocolors . yellowBright ( picocolors . underline ( title ) ) } (${ count } )` ;
14+ `${ st . style ( [ 'yellowBright' , ' underline' ] , title ) } (${ count } )` ;
1615
17- export const getDimmedTitle = ( title : string , count : number ) =>
18- `${ yellow ( `${ picocolors . underline ( title ) } (${ count } )` ) } ` ;
16+ export const getDimmedTitle = ( title : string , count : number ) => `${ st . yellow ( `${ st . underline ( title ) } (${ count } )` ) } ` ;
1917
2018type LogIssueLine = {
2119 owner ?: string ;
@@ -29,7 +27,7 @@ export const getIssueLine = ({ owner, filePath, symbols, parentSymbol, severity
2927 const symbol = symbols ? `: ${ symbols . map ( s => s . symbol ) . join ( ', ' ) } ` : '' ;
3028 const parent = parentSymbol ? ` (${ parentSymbol } )` : '' ;
3129 const print = severity === 'warn' ? dim : plain ;
32- return `${ owner ? `${ picocolors . cyan ( owner ) } ` : '' } ${ print ( `${ relative ( cwd , filePath ) } ${ symbol } ${ parent } ` ) } ` ;
30+ return `${ owner ? `${ st . cyan ( owner ) } ` : '' } ${ print ( `${ relative ( cwd , filePath ) } ${ symbol } ${ parent } ` ) } ` ;
3331} ;
3432
3533export const convert = ( issue : Issue | IssueSymbol ) => ( {
0 commit comments