We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 161ee05 commit 8015401Copy full SHA for 8015401
task-utils.js
@@ -62,13 +62,24 @@ function readNycOptions(workingDirectory) {
62
}
63
64
65
+ const nycConfigCommonJsFilename = join(workingDirectory, 'nyc.config.cjs')
66
+ let nycConfigCommonJs = {}
67
+ if (existsSync(nycConfigCommonJsFilename)) {
68
+ try {
69
+ nycConfigCommonJs = require(nycConfigCommonJsFilename)
70
+ } catch (error) {
71
+ throw new Error(`Failed to load nyc.config.cjs: ${error.message}`)
72
+ }
73
74
+
75
const nycOptions = combineNycOptions(
76
defaultNycOptions,
77
nycrc,
78
nycrcJson,
79
nycrcYaml,
80
nycrcYml,
81
nycConfig,
82
+ nycConfigCommonJs,
83
pkgNycOptions
84
)
85
debug('combined NYC options %o', nycOptions)
0 commit comments