File tree 2 files changed +27
-5
lines changed
2 files changed +27
-5
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ function NYC (config) {
99
99
100
100
NYC . prototype . _createTransform = function ( ext ) {
101
101
var opts = {
102
- salt : Hash . salt ,
102
+ salt : Hash . salt ( this . config ) ,
103
103
hashData : ( input , metadata ) => [ metadata . filename ] ,
104
104
onHash : ( input , metadata , hash ) => {
105
105
this . hashCache [ metadata . filename ] = hash
Original file line number Diff line number Diff line change 1
1
'use strict'
2
2
3
+ function getInvalidatingOptions ( config ) {
4
+ return [
5
+ 'compact' ,
6
+ 'esModules' ,
7
+ 'ignoreClassMethods' ,
8
+ 'instrument' ,
9
+ 'instrumenter' ,
10
+ 'plugins' ,
11
+ 'preserveComments' ,
12
+ 'produceSourceMap' ,
13
+ 'sourceMap'
14
+ ] . reduce ( ( acc , optName ) => {
15
+ acc [ optName ] = config [ optName ]
16
+ return acc
17
+ } , { } )
18
+ }
19
+
3
20
module . exports = {
4
- salt : JSON . stringify ( {
5
- istanbul : require ( 'istanbul-lib-coverage/package.json' ) . version ,
6
- nyc : require ( '../package.json' ) . version
7
- } )
21
+ salt ( config ) {
22
+ return JSON . stringify ( {
23
+ modules : {
24
+ 'istanbul-lib-instrument' : require ( 'istanbul-lib-instrument/package.json' ) . version ,
25
+ nyc : require ( '../package.json' ) . version
26
+ } ,
27
+ nycrc : getInvalidatingOptions ( config )
28
+ } )
29
+ }
8
30
}
You can’t perform that action at this time.
0 commit comments