virmator 4.2.13 → 4.2.15
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/base-configs/base-mocharc.js +1 -1
- package/base-configs/base-nyc.js +1 -0
- package/base-configs/test-files-glob.js +11 -3
- package/base-configs/web-test-runner-base.mjs +1 -3
- package/configs/npmignore.txt +1 -0
- package/configs/tsconfig.json +1 -0
- package/dist/api/command/define-command.js +1 -1
- package/dist/augments/path.d.ts +1 -1
- package/dist/augments/path.js +5 -6
- package/mocha.config.js +16 -0
- package/package.json +6 -6
package/base-configs/base-nyc.js
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
const
|
|
1
|
+
const allChildTestFilesGlob = '**/!(*.type).test.ts?(x)';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const configFileIndex = process.argv.findIndex((arg) => arg.match(/\.config\.[cm]?[tj]s$/));
|
|
4
|
+
const possibleTestFilesOrDirs = process.argv
|
|
5
|
+
.slice(configFileIndex + 1)
|
|
6
|
+
.filter((arg) => !arg.startsWith('-'));
|
|
7
|
+
const specificTests = possibleTestFilesOrDirs.map((arg) =>
|
|
8
|
+
arg.endsWith('.ts') ? arg : `${arg}/${allChildTestFilesGlob}`,
|
|
9
|
+
);
|
|
4
10
|
|
|
5
|
-
module.exports =
|
|
11
|
+
module.exports = specificTests.length
|
|
12
|
+
? {spec: specificTests}
|
|
13
|
+
: {spec: [`src/${allChildTestFilesGlob}`]};
|
package/configs/npmignore.txt
CHANGED
package/configs/tsconfig.json
CHANGED
|
@@ -4,7 +4,7 @@ exports.defineCommand = void 0;
|
|
|
4
4
|
const augment_vir_1 = require("augment-vir");
|
|
5
5
|
function defineCommand(defineCommandInputs, createDescription, inputExecutor) {
|
|
6
6
|
const allAvailableSubCommands = (0, augment_vir_1.getObjectTypedKeys)(defineCommandInputs.subCommandDescriptions);
|
|
7
|
-
const subCommands = (0, augment_vir_1.
|
|
7
|
+
const subCommands = (0, augment_vir_1.mapObjectValues)(defineCommandInputs.subCommandDescriptions, (key) => key);
|
|
8
8
|
const init = {
|
|
9
9
|
...defineCommandInputs,
|
|
10
10
|
allAvailableSubCommands,
|
package/dist/augments/path.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function
|
|
1
|
+
export declare function getFirstPartOfPath(inputPath: string): string;
|
package/dist/augments/path.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getFirstPartOfPath = void 0;
|
|
4
4
|
const path_1 = require("path");
|
|
5
|
-
function
|
|
6
|
-
const
|
|
7
|
-
const split = relativePath.split(path_1.sep);
|
|
5
|
+
function getFirstPartOfPath(inputPath) {
|
|
6
|
+
const split = inputPath.split(path_1.sep);
|
|
8
7
|
const firstPart = split[0];
|
|
9
8
|
if (!firstPart) {
|
|
10
|
-
throw new Error(`First
|
|
9
|
+
throw new Error(`First path of path was empty from "${inputPath}"`);
|
|
11
10
|
}
|
|
12
11
|
return firstPart;
|
|
13
12
|
}
|
|
14
|
-
exports.
|
|
13
|
+
exports.getFirstPartOfPath = getFirstPartOfPath;
|
package/mocha.config.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const baseOptions = require('./base-configs/base-mocharc.js');
|
|
2
|
+
const SpecReporterWithFileNames = require('mocha-spec-reporter-with-file-names');
|
|
3
|
+
|
|
4
|
+
const oneMinuteMs = 60_000;
|
|
5
|
+
|
|
6
|
+
/** @type {import('mocha').MochaOptions} */
|
|
7
|
+
const mochaConfig = {
|
|
8
|
+
...baseOptions,
|
|
9
|
+
slow: 30_000, // ms
|
|
10
|
+
timeout: 20 * oneMinuteMs,
|
|
11
|
+
// heavy modification of files requires parallel to be off
|
|
12
|
+
parallel: false,
|
|
13
|
+
reporter: SpecReporterWithFileNames.pathToThisReporter,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
module.exports = mochaConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "virmator",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.15",
|
|
4
4
|
"description": "Handle all the stuffs in one package.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"automation",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"ansi-colors": "^4.1.3",
|
|
45
|
-
"augment-vir": "^3.0
|
|
45
|
+
"augment-vir": "^3.1.0",
|
|
46
46
|
"semver": "^7.3.8",
|
|
47
47
|
"simple-git": "^3.14.1"
|
|
48
48
|
},
|
|
@@ -52,16 +52,16 @@
|
|
|
52
52
|
"@types/chai": "^4.3.3",
|
|
53
53
|
"@types/fs-extra": "^9.0.13",
|
|
54
54
|
"@types/mocha": "^10.0.0",
|
|
55
|
-
"@types/node": "^18.11.
|
|
55
|
+
"@types/node": "^18.11.9",
|
|
56
56
|
"@types/semver": "^7.3.13",
|
|
57
57
|
"@web/dev-server-esbuild": "^0.3.3",
|
|
58
58
|
"@web/test-runner": "^0.15.0",
|
|
59
59
|
"@web/test-runner-commands": "^0.6.5",
|
|
60
60
|
"@web/test-runner-playwright": "^0.9.0",
|
|
61
61
|
"ansi-colors": "^4.1.3",
|
|
62
|
-
"augment-vir": "^3.0
|
|
62
|
+
"augment-vir": "^3.1.0",
|
|
63
63
|
"chai": "^4.3.6",
|
|
64
|
-
"cspell": "^6.
|
|
64
|
+
"cspell": "^6.14.0",
|
|
65
65
|
"fs-extra": "^10.1.0",
|
|
66
66
|
"istanbul-smart-text-reporter": "^0.0.1",
|
|
67
67
|
"markdown-code-example-inserter": "^0.1.11",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"ts-node": "^10.9.1",
|
|
79
79
|
"tsconfig-paths": "^4.1.0",
|
|
80
80
|
"typescript": "^4.8.4",
|
|
81
|
-
"vite": "^3.2.
|
|
81
|
+
"vite": "^3.2.2"
|
|
82
82
|
},
|
|
83
83
|
"engines": {
|
|
84
84
|
"node": ">=16",
|