You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
630 B
30 lines
630 B
'use strict'
|
|
|
|
function getInvalidatingOptions (config) {
|
|
return [
|
|
'compact',
|
|
'esModules',
|
|
'ignoreClassMethods',
|
|
'instrument',
|
|
'instrumenter',
|
|
'parserPlugins',
|
|
'preserveComments',
|
|
'produceSourceMap',
|
|
'sourceMap'
|
|
].reduce((acc, optName) => {
|
|
acc[optName] = config[optName]
|
|
return acc
|
|
}, {})
|
|
}
|
|
|
|
module.exports = {
|
|
salt (config) {
|
|
return JSON.stringify({
|
|
modules: {
|
|
'istanbul-lib-instrument': require('istanbul-lib-instrument/package.json').version,
|
|
nyc: require('../package.json').version
|
|
},
|
|
nycrc: getInvalidatingOptions(config)
|
|
})
|
|
}
|
|
}
|
|
|