File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 42
42
"@babel/runtime" : " ^7.10.3" ,
43
43
"@types/aria-query" : " ^4.2.0" ,
44
44
"aria-query" : " ^4.2.2" ,
45
+ "chalk" : " ^4.1.0" ,
45
46
"dom-accessibility-api" : " ^0.5.0" ,
46
47
"pretty-format" : " ^25.5.0"
47
48
},
Original file line number Diff line number Diff line change 1
1
// We try to load node dependencies
2
+ let chalk = null
2
3
let readFileSync = null
3
4
let codeFrameColumns = null
4
5
5
6
try {
6
7
const nodeRequire = module && module . require
8
+
7
9
readFileSync = nodeRequire . call ( module , 'fs' ) . readFileSync
8
10
codeFrameColumns = nodeRequire . call ( module , '@babel/code-frame' )
9
11
. codeFrameColumns
12
+ chalk = nodeRequire . call ( module , 'chalk' )
10
13
} catch {
11
14
// We're in a browser environment
12
15
/* istanbul ignore next */
@@ -46,7 +49,7 @@ function getCodeFrame(frame) {
46
49
linesBelow : 0 ,
47
50
} ,
48
51
)
49
- return `${ frameLocation } \n${ codeFrame } \n`
52
+ return `${ chalk . dim ( frameLocation ) } \n${ codeFrame } \n`
50
53
}
51
54
52
55
function getUserCodeFrame ( ) {
You can’t perform that action at this time.
0 commit comments