@jcoreio/toolchain-mocha 4.6.1 → 4.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.mocharc.cjs +1 -0
- package/package.json +2 -2
- package/plugins/getConfigFiles.cjs +6 -2
package/.mocharc.cjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jcoreio/toolchain-mocha",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.2",
|
|
4
4
|
"description": "Mocha build toolchain",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"nyc": "^15.1.0",
|
|
27
27
|
"resolve-bin": "^1.0.0",
|
|
28
28
|
"semver": "^7.5.3",
|
|
29
|
-
"@jcoreio/toolchain": "4.6.
|
|
29
|
+
"@jcoreio/toolchain": "4.6.2"
|
|
30
30
|
},
|
|
31
31
|
"toolchainManaged": {
|
|
32
32
|
"devDependencies": {
|
|
@@ -2,10 +2,14 @@ const { name } = require('../package.json')
|
|
|
2
2
|
const dedent = require('dedent-js')
|
|
3
3
|
|
|
4
4
|
module.exports = [
|
|
5
|
-
async function getConfigFiles() {
|
|
5
|
+
async function getConfigFiles({ fromVersion }) {
|
|
6
6
|
const files = {}
|
|
7
|
+
if (fromVersion) return files
|
|
7
8
|
for (const file of ['.mocharc.cjs', 'nyc.config.cjs']) {
|
|
8
|
-
files[file] =
|
|
9
|
+
files[file] = async (existing) =>
|
|
10
|
+
existing && fromVersion
|
|
11
|
+
? existing
|
|
12
|
+
: dedent`
|
|
9
13
|
/* eslint-env node, es2018 */
|
|
10
14
|
const base = require('${name}/${file}')
|
|
11
15
|
module.exports = {
|