virmator 4.2.5 → 4.2.7
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-nyc.js +5 -3
- package/configs/npmignore.txt +2 -1
- package/dist/commands/code-in-markdown.command.js +1 -1
- package/dist/commands/compile.command.js +1 -1
- package/dist/commands/format.command.js +1 -1
- package/dist/commands/frontend.command.js +1 -1
- package/dist/commands/spellcheck.command.js +1 -1
- package/dist/commands/test-web.command.js +1 -1
- package/dist/commands/test.command.d.ts +1 -1
- package/dist/commands/test.command.js +5 -3
- package/dist/file-paths/package-paths.d.ts +1 -1
- package/dist/file-paths/package-paths.js +11 -5
- package/dist/index.d.ts +1 -1
- package/package.json +3 -1
package/base-configs/base-nyc.js
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const baseConfig = {
|
|
4
|
+
extends: '@istanbuljs/nyc-config-typescript',
|
|
4
5
|
all: true,
|
|
5
6
|
branches: 100,
|
|
6
7
|
cache: false,
|
|
8
|
+
instrument: true,
|
|
7
9
|
checkCoverage: true,
|
|
8
|
-
exclude:
|
|
10
|
+
exclude: '**/*.test.ts',
|
|
9
11
|
functions: 100,
|
|
10
|
-
include:
|
|
12
|
+
include: 'src/*',
|
|
11
13
|
lines: 100,
|
|
12
14
|
perFile: 100,
|
|
13
15
|
reporter: [
|
|
14
16
|
'html',
|
|
15
|
-
'text',
|
|
17
|
+
'istanbul-smart-text-reporter',
|
|
16
18
|
],
|
|
17
19
|
skipEmpty: true,
|
|
18
20
|
skipFull: true,
|
package/configs/npmignore.txt
CHANGED
|
@@ -56,7 +56,7 @@ exports.codeInMarkdownCommandDefinition = (0, define_command_1.defineCommand)({
|
|
|
56
56
|
stderr: (stderrInput) => stderrInput.replace('Run without --check to update.', 'Run without the "check" sub-command in order to update.'),
|
|
57
57
|
};
|
|
58
58
|
return {
|
|
59
|
-
mainCommand: await (0, package_paths_1.getNpmBinPath)('md-code'),
|
|
59
|
+
mainCommand: await (0, package_paths_1.getNpmBinPath)(inputs.repoDir, 'md-code'),
|
|
60
60
|
logTransforms,
|
|
61
61
|
args: [
|
|
62
62
|
subCommand,
|
|
@@ -42,7 +42,7 @@ exports.compileCommandDefinition = (0, define_command_1.defineCommand)({
|
|
|
42
42
|
inputs.inputSubCommands.includes(inputs.subCommands.check);
|
|
43
43
|
const resetCommand = shouldNotEmit ? '' : 'rm -rf dist && ';
|
|
44
44
|
const noEmit = shouldNotEmit ? '--noEmit' : '';
|
|
45
|
-
const mainCommand = `${resetCommand}${await (0, package_paths_1.getNpmBinPath)('tsc')}`;
|
|
45
|
+
const mainCommand = `${resetCommand}${await (0, package_paths_1.getNpmBinPath)(inputs.repoDir, 'tsc')}`;
|
|
46
46
|
return {
|
|
47
47
|
mainCommand,
|
|
48
48
|
args: [
|
|
@@ -110,7 +110,7 @@ exports.formatCommandDefinition = (0, define_command_1.defineCommand)({
|
|
|
110
110
|
.replace('All matched files use Prettier code style!\n', ''),
|
|
111
111
|
};
|
|
112
112
|
return {
|
|
113
|
-
mainCommand: await (0, package_paths_1.getNpmBinPath)('prettier'),
|
|
113
|
+
mainCommand: await (0, package_paths_1.getNpmBinPath)(inputs.repoDir, 'prettier'),
|
|
114
114
|
args: [
|
|
115
115
|
'--color',
|
|
116
116
|
listDifferentFlag,
|
|
@@ -42,7 +42,7 @@ exports.frontendCommandDefinition = (0, define_command_1.defineCommand)({
|
|
|
42
42
|
packageDir: package_paths_1.virmatorPackageDir,
|
|
43
43
|
})}`
|
|
44
44
|
: '';
|
|
45
|
-
const viteBinPath = await (0, package_paths_1.getNpmBinPath)('vite');
|
|
45
|
+
const viteBinPath = await (0, package_paths_1.getNpmBinPath)(inputs.repoDir, 'vite');
|
|
46
46
|
const removeOutput = needToBuild ? 'rm -rf dist' : '';
|
|
47
47
|
const mainCommand = `${removeOutput}${viteBinPath}`;
|
|
48
48
|
const subCommandArgs = needToBuild
|
|
@@ -35,7 +35,7 @@ exports.spellcheckCommandDefinition = (0, define_command_1.defineCommand)({
|
|
|
35
35
|
? ''
|
|
36
36
|
: `--config ${inputs.configFiles.cspell.copyToPathRelativeToRepoDir}`;
|
|
37
37
|
return {
|
|
38
|
-
mainCommand: await (0, package_paths_1.getNpmBinPath)('cspell'),
|
|
38
|
+
mainCommand: await (0, package_paths_1.getNpmBinPath)(inputs.repoDir, 'cspell'),
|
|
39
39
|
args: [
|
|
40
40
|
configArg,
|
|
41
41
|
'--color',
|
|
@@ -52,7 +52,7 @@ exports.testWebCommandDefinition = (0, define_command_1.defineCommand)({
|
|
|
52
52
|
? `--config ${inputs.configFiles.webTestRunner.copyToPathRelativeToRepoDir}`
|
|
53
53
|
: '';
|
|
54
54
|
return {
|
|
55
|
-
mainCommand: await (0, package_paths_1.getNpmBinPath)('web-test-runner'),
|
|
55
|
+
mainCommand: await (0, package_paths_1.getNpmBinPath)(inputs.repoDir, 'web-test-runner'),
|
|
56
56
|
logTransforms: {
|
|
57
57
|
stdout: testWebTransform,
|
|
58
58
|
},
|
|
@@ -13,5 +13,5 @@ export declare const testCommandDefinition: import("../api/command/define-comman
|
|
|
13
13
|
readonly required: true;
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
-
npmDeps: readonly ["@types/chai", "@types/mocha", "chai", "mocha-spec-reporter-with-file-names", "mocha", "
|
|
16
|
+
npmDeps: readonly ["@istanbuljs/nyc-config-typescript", "@types/chai", "@types/mocha", "chai", "istanbul-smart-text-reporter", "mocha-spec-reporter-with-file-names", "mocha", "nyc", "ts-node"];
|
|
17
17
|
}>;
|
|
@@ -20,13 +20,15 @@ exports.testCommandDefinition = (0, define_command_1.defineCommand)({
|
|
|
20
20
|
},
|
|
21
21
|
},
|
|
22
22
|
npmDeps: [
|
|
23
|
+
'@istanbuljs/nyc-config-typescript',
|
|
23
24
|
'@types/chai',
|
|
24
25
|
'@types/mocha',
|
|
25
26
|
'chai',
|
|
27
|
+
'istanbul-smart-text-reporter',
|
|
26
28
|
'mocha-spec-reporter-with-file-names',
|
|
27
29
|
'mocha',
|
|
28
|
-
'ts-node',
|
|
29
30
|
'nyc',
|
|
31
|
+
'ts-node',
|
|
30
32
|
],
|
|
31
33
|
}, ({ commandName, packageBinName }) => {
|
|
32
34
|
return {
|
|
@@ -69,12 +71,12 @@ exports.testCommandDefinition = (0, define_command_1.defineCommand)({
|
|
|
69
71
|
? `--nycrc-path '${inputs.configFiles.nycConfig.copyToPathRelativeToRepoDir}'`
|
|
70
72
|
: '';
|
|
71
73
|
return {
|
|
72
|
-
mainCommand: await (0, package_paths_1.getNpmBinPath)('nyc'),
|
|
74
|
+
mainCommand: await (0, package_paths_1.getNpmBinPath)(inputs.repoDir, 'nyc'),
|
|
73
75
|
args: [
|
|
74
76
|
// force colors in nyc
|
|
75
77
|
'--colors',
|
|
76
78
|
nycConfigFlag,
|
|
77
|
-
await (0, package_paths_1.getNpmBinPath)('mocha'),
|
|
79
|
+
await (0, package_paths_1.getNpmBinPath)(inputs.repoDir, 'mocha'),
|
|
78
80
|
configString,
|
|
79
81
|
...inputs.filteredInputArgs,
|
|
80
82
|
],
|
|
@@ -14,17 +14,23 @@ exports.virmatorConfigs = {
|
|
|
14
14
|
vsCode: (0, path_1.join)(exports.virmatorConfigsDir, '.vscode'),
|
|
15
15
|
src: (0, path_1.join)(exports.virmatorConfigsDir, 'src'),
|
|
16
16
|
};
|
|
17
|
-
async function getNpmBinPath(command) {
|
|
18
|
-
const
|
|
19
|
-
const
|
|
17
|
+
async function getNpmBinPath(repoDir, command) {
|
|
18
|
+
const topLevelBinPath = (0, path_1.join)('node_modules', '.bin', command);
|
|
19
|
+
const virmatorBinPath = (0, path_1.join)('node_modules', 'virmator', 'node_modules', '.bin', command);
|
|
20
|
+
const startSearchDirPath = repoDir;
|
|
20
21
|
try {
|
|
21
22
|
const nodeModulesWithValidBin = await (0, fs_2.recursivelyUpwardsSearchForDir)(startSearchDirPath, (dirPath) => {
|
|
22
|
-
return (0, fs_1.existsSync)((0, path_1.join)(dirPath,
|
|
23
|
+
return ((0, fs_1.existsSync)((0, path_1.join)(dirPath, topLevelBinPath)) ||
|
|
24
|
+
(0, fs_1.existsSync)((0, path_1.join)(dirPath, virmatorBinPath)));
|
|
23
25
|
});
|
|
24
26
|
if (!nodeModulesWithValidBin) {
|
|
25
27
|
throw new Error(`Search failed to find "${command}" bin path. Started in "${startSearchDirPath}".`);
|
|
26
28
|
}
|
|
27
|
-
const
|
|
29
|
+
const foundTopLevelBinPath = (0, path_1.join)(nodeModulesWithValidBin, topLevelBinPath);
|
|
30
|
+
const foundVirmatorBinPath = (0, path_1.join)(nodeModulesWithValidBin, virmatorBinPath);
|
|
31
|
+
const actualBinPath = (0, fs_1.existsSync)(foundVirmatorBinPath)
|
|
32
|
+
? foundVirmatorBinPath
|
|
33
|
+
: foundTopLevelBinPath;
|
|
28
34
|
if (!(0, fs_1.existsSync)(actualBinPath)) {
|
|
29
35
|
throw new Error(`Discovered bin path for "${command}" does not actually exist: "${actualBinPath}". Started at "${startSearchDirPath}".`);
|
|
30
36
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -101,7 +101,7 @@ export declare const virmator: Readonly<{
|
|
|
101
101
|
readonly required: true;
|
|
102
102
|
};
|
|
103
103
|
};
|
|
104
|
-
npmDeps: readonly ["@types/chai", "@types/mocha", "chai", "mocha-spec-reporter-with-file-names", "mocha", "
|
|
104
|
+
npmDeps: readonly ["@istanbuljs/nyc-config-typescript", "@types/chai", "@types/mocha", "chai", "istanbul-smart-text-reporter", "mocha-spec-reporter-with-file-names", "mocha", "nyc", "ts-node"];
|
|
105
105
|
}> | import("./api/command/define-command").CommandDefinition<{
|
|
106
106
|
commandName: "test-web";
|
|
107
107
|
subCommandDescriptions: {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "virmator",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.7",
|
|
4
4
|
"description": "Handle all the stuffs in one package.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"automation",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
"simple-git": "3.14.1"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
+
"@istanbuljs/nyc-config-typescript": "^1.0.2",
|
|
50
51
|
"@open-wc/testing": "3.1.6",
|
|
51
52
|
"@types/chai": "4.3.3",
|
|
52
53
|
"@types/fs-extra": "^9.0.13",
|
|
@@ -62,6 +63,7 @@
|
|
|
62
63
|
"chai": "4.3.6",
|
|
63
64
|
"cspell": "6.12.0",
|
|
64
65
|
"fs-extra": "^10.1.0",
|
|
66
|
+
"istanbul-smart-text-reporter": "^0.0.0",
|
|
65
67
|
"markdown-code-example-inserter": "0.1.11",
|
|
66
68
|
"mocha": "10.0.0",
|
|
67
69
|
"mocha-spec-reporter-with-file-names": "^0.0.0",
|