@jcoreio/toolchain-mocha 5.7.0 → 5.8.0
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 +3 -10
- package/package.json +2 -2
- package/plugins/scripts.cjs +3 -1
package/.mocharc.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const getPluginsArraySync = require('@jcoreio/toolchain/util/getPluginsArraySync.cjs')
|
|
2
2
|
const extensions = getPluginsArraySync('sourceExtensions')
|
|
3
3
|
const getSpecs = require('./getSpecs.cjs')
|
|
4
|
-
const
|
|
4
|
+
const { toolchainPackages } = require('@jcoreio/toolchain/util/findUps.cjs')
|
|
5
5
|
|
|
6
6
|
module.exports = {
|
|
7
7
|
require: [require.resolve('./util/configureMocha.cjs')],
|
|
@@ -9,15 +9,8 @@ module.exports = {
|
|
|
9
9
|
recursive: true,
|
|
10
10
|
spec: getSpecs(getPluginsArraySync('mochaSpecs')),
|
|
11
11
|
watchIgnore: ['**/node_modules', '**/.git'],
|
|
12
|
-
...(
|
|
13
|
-
{
|
|
14
|
-
'node-option': [
|
|
15
|
-
...(semver.lt(process.version, '23.0.0') ?
|
|
16
|
-
['experimental-default-type=module']
|
|
17
|
-
: []),
|
|
18
|
-
`import=@jcoreio/toolchain-esnext/util/esmLoader.cjs`,
|
|
19
|
-
],
|
|
20
|
-
}
|
|
12
|
+
...(toolchainPackages.includes('@jcoreio/toolchain-esnext') ?
|
|
13
|
+
{ 'node-option': [`import=@jcoreio/toolchain-esnext/util/esmLoader.cjs`] }
|
|
21
14
|
: {}),
|
|
22
15
|
...(process.env.CI ? { forbidOnly: true } : {}),
|
|
23
16
|
extension: extensions,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jcoreio/toolchain-mocha",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.8.0",
|
|
4
4
|
"description": "Mocha build toolchain",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"nyc": "^15.1.0",
|
|
24
24
|
"resolve-bin": "^1.0.0",
|
|
25
25
|
"semver": "^7.5.3",
|
|
26
|
-
"@jcoreio/toolchain": "5.
|
|
26
|
+
"@jcoreio/toolchain": "5.8.0"
|
|
27
27
|
},
|
|
28
28
|
"toolchainManaged": {
|
|
29
29
|
"devDependencies": {
|
package/plugins/scripts.cjs
CHANGED
|
@@ -5,6 +5,7 @@ const {
|
|
|
5
5
|
isMonorepoRoot,
|
|
6
6
|
monorepoSubpackageDirs,
|
|
7
7
|
projectDir,
|
|
8
|
+
packageJson,
|
|
8
9
|
} = require('@jcoreio/toolchain/util/findUps.cjs')
|
|
9
10
|
const fs = require('@jcoreio/toolchain/util/projectFs.cjs')
|
|
10
11
|
const path = require('path')
|
|
@@ -118,6 +119,7 @@ if (
|
|
|
118
119
|
module.exports = [
|
|
119
120
|
{
|
|
120
121
|
...makeScripts({
|
|
122
|
+
suffix: packageJson.type === 'module' ? ':cjs' : undefined,
|
|
121
123
|
descriptionSuffix: ' in CJS mode',
|
|
122
124
|
env: {
|
|
123
125
|
...process.env,
|
|
@@ -126,7 +128,7 @@ if (
|
|
|
126
128
|
},
|
|
127
129
|
}),
|
|
128
130
|
...makeScripts({
|
|
129
|
-
suffix: ':esm',
|
|
131
|
+
suffix: packageJson.type === 'module' ? undefined : ':esm',
|
|
130
132
|
descriptionSuffix: ' in ESM mode',
|
|
131
133
|
env: {
|
|
132
134
|
...process.env,
|