| 1 |
'use strict' |
| 2 |
|
| 3 |
function getInvalidatingOptions (config) { |
| 4 |
return [ |
| 5 |
'compact', |
| 6 |
'esModules', |
| 7 |
'ignoreClassMethods', |
| 8 |
'instrument', |
| 9 |
'instrumenter', |
| 10 |
'parserPlugins', |
| 11 |
'preserveComments', |
| 12 |
'produceSourceMap', |
| 13 |
'sourceMap' |
| 14 |
].reduce((acc, optName) => { |
| 15 |
acc[optName] = config[optName] |
| 16 |
return acc |
| 17 |
}, {}) |
| 18 |
} |
| 19 |
|
| 20 |
module.exports = { |
| 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 |
} |
| 30 |
} |