@jcoreio/toolchain-mocha 5.2.0 → 5.3.1
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
CHANGED
|
@@ -8,14 +8,14 @@ module.exports = {
|
|
|
8
8
|
recursive: true,
|
|
9
9
|
spec: getSpecs(getPluginsArraySync('mochaSpecs')),
|
|
10
10
|
watchIgnore: ['**/node_modules', '**/.git'],
|
|
11
|
-
...(process.env.JCOREIO_TOOLCHAIN_ESM
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
...(process.env.JCOREIO_TOOLCHAIN_ESM ?
|
|
12
|
+
{
|
|
13
|
+
'node-option': [
|
|
14
|
+
'experimental-default-type=module',
|
|
15
|
+
`import=@jcoreio/toolchain-esnext/util/esmLoader.cjs`,
|
|
16
|
+
],
|
|
17
|
+
}
|
|
18
|
+
: {}),
|
|
19
19
|
...(process.env.CI ? { forbidOnly: true } : {}),
|
|
20
20
|
extension: extensions,
|
|
21
21
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jcoreio/toolchain-mocha",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.1",
|
|
4
4
|
"description": "Mocha build toolchain",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,17 +21,17 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"babel-plugin-istanbul": "^7.0.0",
|
|
23
23
|
"dedent-js": "^1.0.1",
|
|
24
|
+
"eslint": "^9.24.0",
|
|
24
25
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
25
26
|
"mocha": "^10.2.0",
|
|
26
27
|
"nyc": "^15.1.0",
|
|
27
28
|
"resolve-bin": "^1.0.0",
|
|
28
29
|
"semver": "^7.5.3",
|
|
29
|
-
"@jcoreio/toolchain": "5.
|
|
30
|
+
"@jcoreio/toolchain": "5.3.1"
|
|
30
31
|
},
|
|
31
32
|
"toolchainManaged": {
|
|
32
33
|
"devDependencies": {
|
|
33
|
-
"mocha": "*"
|
|
34
|
-
"eslint-plugin-no-only-tests": "*"
|
|
34
|
+
"mocha": "*"
|
|
35
35
|
},
|
|
36
36
|
"optionalDevDependencies": {
|
|
37
37
|
"@types/chai": "^4.3.5",
|
|
@@ -7,16 +7,16 @@ module.exports = [
|
|
|
7
7
|
async function getConfigFiles({ fromVersion }) {
|
|
8
8
|
return {
|
|
9
9
|
'nyc.config.cjs': async (existing) =>
|
|
10
|
-
existing && fromVersion
|
|
11
|
-
|
|
12
|
-
: dedent`
|
|
10
|
+
existing && fromVersion ? existing : (
|
|
11
|
+
dedent`
|
|
13
12
|
/* eslint-env node, es2018 */
|
|
14
13
|
const base = require('${name}/nyc.config.cjs')
|
|
15
14
|
module.exports = {
|
|
16
15
|
...base,
|
|
17
16
|
}
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
`
|
|
19
|
+
),
|
|
20
20
|
'.mocharc.cjs': async (existing) => {
|
|
21
21
|
if (existing && fromVersion) return existing
|
|
22
22
|
const specs = []
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const { defineConfig } = require('eslint/config')
|
|
2
|
+
const noOnlyTests = require('eslint-plugin-no-only-tests')
|
|
3
|
+
|
|
4
|
+
module.exports = [
|
|
5
|
+
() =>
|
|
6
|
+
defineConfig([
|
|
7
|
+
{
|
|
8
|
+
files: ['**/*.{js,jsx,cjs,cjsx,mjs,mjsx,ts,tsx,mts,mtsx,cts,ctsx'],
|
|
9
|
+
plugins: { 'no-only-tests': noOnlyTests },
|
|
10
|
+
rules: {
|
|
11
|
+
'no-only-tests/no-only-tests': 'error',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
]),
|
|
15
|
+
]
|
package/plugins/scripts.cjs
CHANGED
|
@@ -29,9 +29,9 @@ const makeScripts = ({
|
|
|
29
29
|
`coverage${name.substring(4)}${suffix}`,
|
|
30
30
|
{
|
|
31
31
|
description: `${
|
|
32
|
-
typeof value.description === 'string'
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
typeof value.description === 'string' ?
|
|
33
|
+
value.description
|
|
34
|
+
: `run ${name}`
|
|
35
35
|
}${descriptionSuffix} with code coverage`,
|
|
36
36
|
run: async (args = []) => {
|
|
37
37
|
await execa('nyc', ['tc', name, ...args], {
|
package/eslint.extends.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = [() => [require.resolve('../eslint.extends.cjs')]]
|