virmator 7.1.0 → 7.2.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/README.md +4 -0
- package/base-configs/base-cspell.js +1 -0
- package/configs/configs/ncu.config.ts +2 -2
- package/dist/augments/fs.d.ts +1 -0
- package/dist/augments/fs.js +15 -1
- package/dist/commands/frontend.command.d.ts +0 -15
- package/dist/commands/frontend.command.js +0 -1
- package/dist/commands/regen-deps.command.d.ts +33 -0
- package/dist/commands/regen-deps.command.js +36 -0
- package/dist/compiled-base-configs/base-ncu.d.ts +2 -0
- package/dist/compiled-base-configs/base-ncu.js +9 -0
- package/dist/index.d.ts +32 -15
- package/dist/index.js +2 -0
- package/package.json +14 -14
package/README.md
CHANGED
|
@@ -131,6 +131,10 @@ Publish an npm package. Includes workspace support. Add test commands to run bef
|
|
|
131
131
|
- publish a package: `virmator publish`
|
|
132
132
|
- publish a package and run tests beforehand: `virmator publish npm test`
|
|
133
133
|
|
|
134
|
+
## regen-deps
|
|
135
|
+
|
|
136
|
+
Regenerates all npm deps.
|
|
137
|
+
|
|
134
138
|
## spellcheck
|
|
135
139
|
|
|
136
140
|
Spellcheck code with cspell. By default this spellchecks every file in the entire repo (except for those ignored in the config file), including .dot files. If any arguments are passed to this command, the default cspell args that this command applies are ignored, you'll have to supply them via your args.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {RunOptions} from 'npm-check-updates';
|
|
2
|
+
import {baseNcuConfig} from 'virmator/dist/compiled-base-configs/base-ncu';
|
|
2
3
|
|
|
3
4
|
export const ncuConfig: RunOptions = {
|
|
4
5
|
color: true,
|
|
@@ -6,8 +7,7 @@ export const ncuConfig: RunOptions = {
|
|
|
6
7
|
root: true,
|
|
7
8
|
// exclude these
|
|
8
9
|
reject: [
|
|
9
|
-
|
|
10
|
-
'prettier',
|
|
10
|
+
...baseNcuConfig.reject,
|
|
11
11
|
],
|
|
12
12
|
// include only these
|
|
13
13
|
filter: [],
|
package/dist/augments/fs.d.ts
CHANGED
package/dist/augments/fs.js
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.recursivelyUpwardsSearchForDir = exports.writeFiles = exports.readAllDirContents = exports.systemRootPath = void 0;
|
|
3
|
+
exports.recursivelyUpwardsSearchForDir = exports.writeFiles = exports.readAllDirContents = exports.systemRootPath = exports.removeDirectory = void 0;
|
|
4
4
|
const common_1 = require("@augment-vir/common");
|
|
5
5
|
const fs_1 = require("fs");
|
|
6
|
+
const fs_extra_1 = require("fs-extra");
|
|
6
7
|
const promises_1 = require("fs/promises");
|
|
7
8
|
const path_1 = require("path");
|
|
9
|
+
async function removeDirectory(dirPath) {
|
|
10
|
+
await (0, promises_1.rm)(dirPath, {
|
|
11
|
+
force: true,
|
|
12
|
+
recursive: true,
|
|
13
|
+
maxRetries: 3,
|
|
14
|
+
retryDelay: 100,
|
|
15
|
+
});
|
|
16
|
+
if ((0, fs_1.existsSync)(dirPath)) {
|
|
17
|
+
// try... again? Cause Windows sucks.
|
|
18
|
+
await (0, fs_extra_1.remove)(dirPath);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.removeDirectory = removeDirectory;
|
|
8
22
|
exports.systemRootPath = (0, path_1.parse)(process.cwd()).root;
|
|
9
23
|
async function readAllDirContents({ dir, recursive = false, }) {
|
|
10
24
|
const fileNames = await (0, promises_1.readdir)(dir);
|
|
@@ -14,9 +14,6 @@ export declare const frontendCommandDefinition: {
|
|
|
14
14
|
npmDeps: readonly [{
|
|
15
15
|
readonly name: "@augment-vir/node-js";
|
|
16
16
|
readonly type: NpmDepTypeEnum.Dev;
|
|
17
|
-
}, {
|
|
18
|
-
readonly name: "element-vir";
|
|
19
|
-
readonly type: NpmDepTypeEnum.Regular;
|
|
20
17
|
}, {
|
|
21
18
|
readonly name: "esbuild";
|
|
22
19
|
readonly type: NpmDepTypeEnum.Dev;
|
|
@@ -47,9 +44,6 @@ export declare const frontendCommandDefinition: {
|
|
|
47
44
|
npmDeps: readonly [{
|
|
48
45
|
readonly name: "@augment-vir/node-js";
|
|
49
46
|
readonly type: NpmDepTypeEnum.Dev;
|
|
50
|
-
}, {
|
|
51
|
-
readonly name: "element-vir";
|
|
52
|
-
readonly type: NpmDepTypeEnum.Regular;
|
|
53
47
|
}, {
|
|
54
48
|
readonly name: "esbuild";
|
|
55
49
|
readonly type: NpmDepTypeEnum.Dev;
|
|
@@ -80,9 +74,6 @@ export declare const frontendCommandDefinition: {
|
|
|
80
74
|
npmDeps: readonly [{
|
|
81
75
|
readonly name: "@augment-vir/node-js";
|
|
82
76
|
readonly type: NpmDepTypeEnum.Dev;
|
|
83
|
-
}, {
|
|
84
|
-
readonly name: "element-vir";
|
|
85
|
-
readonly type: NpmDepTypeEnum.Regular;
|
|
86
77
|
}, {
|
|
87
78
|
readonly name: "esbuild";
|
|
88
79
|
readonly type: NpmDepTypeEnum.Dev;
|
|
@@ -112,9 +103,6 @@ export declare const frontendCommandDefinition: {
|
|
|
112
103
|
npmDeps: readonly [{
|
|
113
104
|
readonly name: "@augment-vir/node-js";
|
|
114
105
|
readonly type: NpmDepTypeEnum.Dev;
|
|
115
|
-
}, {
|
|
116
|
-
readonly name: "element-vir";
|
|
117
|
-
readonly type: NpmDepTypeEnum.Regular;
|
|
118
106
|
}, {
|
|
119
107
|
readonly name: "esbuild";
|
|
120
108
|
readonly type: NpmDepTypeEnum.Dev;
|
|
@@ -144,9 +132,6 @@ export declare const frontendCommandDefinition: {
|
|
|
144
132
|
npmDeps: readonly [{
|
|
145
133
|
readonly name: "@augment-vir/node-js";
|
|
146
134
|
readonly type: NpmDepTypeEnum.Dev;
|
|
147
|
-
}, {
|
|
148
|
-
readonly name: "element-vir";
|
|
149
|
-
readonly type: NpmDepTypeEnum.Regular;
|
|
150
135
|
}, {
|
|
151
136
|
readonly name: "esbuild";
|
|
152
137
|
readonly type: NpmDepTypeEnum.Dev;
|
|
@@ -46,7 +46,6 @@ exports.frontendCommandDefinition = (0, define_command_1.defineCommand)({
|
|
|
46
46
|
},
|
|
47
47
|
npmDeps: [
|
|
48
48
|
{ name: '@augment-vir/node-js', type: define_command_inputs_1.NpmDepTypeEnum.Dev },
|
|
49
|
-
{ name: 'element-vir', type: define_command_inputs_1.NpmDepTypeEnum.Regular },
|
|
50
49
|
{ name: 'esbuild', type: define_command_inputs_1.NpmDepTypeEnum.Dev },
|
|
51
50
|
{ name: 'typescript', type: define_command_inputs_1.NpmDepTypeEnum.Dev },
|
|
52
51
|
{ name: 'vite-tsconfig-paths', type: define_command_inputs_1.NpmDepTypeEnum.Dev },
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare const regenDepsCommandDefinition: {
|
|
2
|
+
commandName: "regen-deps";
|
|
3
|
+
subCommandDescriptions: {};
|
|
4
|
+
configFiles: {};
|
|
5
|
+
npmDeps: readonly [];
|
|
6
|
+
} & {
|
|
7
|
+
allAvailableSubCommands: readonly never[];
|
|
8
|
+
subCommands: import("..").SubCommandsMap<{
|
|
9
|
+
commandName: "regen-deps";
|
|
10
|
+
subCommandDescriptions: {};
|
|
11
|
+
configFiles: {};
|
|
12
|
+
npmDeps: readonly [];
|
|
13
|
+
}>;
|
|
14
|
+
} & {
|
|
15
|
+
executor: import("..").CommandExecutor<{
|
|
16
|
+
commandName: "regen-deps";
|
|
17
|
+
subCommandDescriptions: {};
|
|
18
|
+
configFiles: {};
|
|
19
|
+
npmDeps: readonly [];
|
|
20
|
+
}>;
|
|
21
|
+
createDescription: import("..").CreateDescriptionsCallback<{
|
|
22
|
+
commandName: "regen-deps";
|
|
23
|
+
subCommandDescriptions: {};
|
|
24
|
+
configFiles: {};
|
|
25
|
+
npmDeps: readonly [];
|
|
26
|
+
}>;
|
|
27
|
+
extend: import("../api/command/define-command").ExtendCallback<{
|
|
28
|
+
commandName: "regen-deps";
|
|
29
|
+
subCommandDescriptions: {};
|
|
30
|
+
configFiles: {};
|
|
31
|
+
npmDeps: readonly [];
|
|
32
|
+
}>;
|
|
33
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.regenDepsCommandDefinition = void 0;
|
|
4
|
+
const node_js_1 = require("@augment-vir/node-js");
|
|
5
|
+
const define_command_1 = require("../api/command/define-command");
|
|
6
|
+
const fs_1 = require("../augments/fs");
|
|
7
|
+
exports.regenDepsCommandDefinition = (0, define_command_1.defineCommand)({
|
|
8
|
+
commandName: 'regen-deps',
|
|
9
|
+
subCommandDescriptions: {},
|
|
10
|
+
configFiles: {},
|
|
11
|
+
npmDeps: [],
|
|
12
|
+
}, () => {
|
|
13
|
+
return {
|
|
14
|
+
sections: [
|
|
15
|
+
{
|
|
16
|
+
title: '',
|
|
17
|
+
content: `Regenerates all npm deps.`,
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
examples: [],
|
|
21
|
+
};
|
|
22
|
+
}, async (inputs) => {
|
|
23
|
+
const allChildNodeModules = await (0, node_js_1.readDirRecursive)(inputs.repoDir);
|
|
24
|
+
const nodeModulesPaths = new Set(allChildNodeModules
|
|
25
|
+
.filter((path) => path.includes('node_modules'))
|
|
26
|
+
.map((path) => path.replace(/[\\\/]node_modules[\\\/].+$/, '')));
|
|
27
|
+
await Promise.all(Array.from(nodeModulesPaths).map(async (nodeModulesPath) => {
|
|
28
|
+
await (0, fs_1.removeDirectory)(nodeModulesPath);
|
|
29
|
+
}));
|
|
30
|
+
return {
|
|
31
|
+
args: [
|
|
32
|
+
'npm',
|
|
33
|
+
'i',
|
|
34
|
+
],
|
|
35
|
+
};
|
|
36
|
+
});
|
package/dist/index.d.ts
CHANGED
|
@@ -383,9 +383,6 @@ export declare const virmator: Readonly<{
|
|
|
383
383
|
npmDeps: readonly [{
|
|
384
384
|
readonly name: "@augment-vir/node-js";
|
|
385
385
|
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Dev;
|
|
386
|
-
}, {
|
|
387
|
-
readonly name: "element-vir";
|
|
388
|
-
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Regular;
|
|
389
386
|
}, {
|
|
390
387
|
readonly name: "esbuild";
|
|
391
388
|
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Dev;
|
|
@@ -416,9 +413,6 @@ export declare const virmator: Readonly<{
|
|
|
416
413
|
npmDeps: readonly [{
|
|
417
414
|
readonly name: "@augment-vir/node-js";
|
|
418
415
|
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Dev;
|
|
419
|
-
}, {
|
|
420
|
-
readonly name: "element-vir";
|
|
421
|
-
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Regular;
|
|
422
416
|
}, {
|
|
423
417
|
readonly name: "esbuild";
|
|
424
418
|
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Dev;
|
|
@@ -449,9 +443,6 @@ export declare const virmator: Readonly<{
|
|
|
449
443
|
npmDeps: readonly [{
|
|
450
444
|
readonly name: "@augment-vir/node-js";
|
|
451
445
|
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Dev;
|
|
452
|
-
}, {
|
|
453
|
-
readonly name: "element-vir";
|
|
454
|
-
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Regular;
|
|
455
446
|
}, {
|
|
456
447
|
readonly name: "esbuild";
|
|
457
448
|
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Dev;
|
|
@@ -481,9 +472,6 @@ export declare const virmator: Readonly<{
|
|
|
481
472
|
npmDeps: readonly [{
|
|
482
473
|
readonly name: "@augment-vir/node-js";
|
|
483
474
|
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Dev;
|
|
484
|
-
}, {
|
|
485
|
-
readonly name: "element-vir";
|
|
486
|
-
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Regular;
|
|
487
475
|
}, {
|
|
488
476
|
readonly name: "esbuild";
|
|
489
477
|
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Dev;
|
|
@@ -513,9 +501,6 @@ export declare const virmator: Readonly<{
|
|
|
513
501
|
npmDeps: readonly [{
|
|
514
502
|
readonly name: "@augment-vir/node-js";
|
|
515
503
|
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Dev;
|
|
516
|
-
}, {
|
|
517
|
-
readonly name: "element-vir";
|
|
518
|
-
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Regular;
|
|
519
504
|
}, {
|
|
520
505
|
readonly name: "esbuild";
|
|
521
506
|
readonly type: import("./api/command/define-command-inputs").NpmDepTypeEnum.Dev;
|
|
@@ -724,6 +709,38 @@ export declare const virmator: Readonly<{
|
|
|
724
709
|
configFiles: {};
|
|
725
710
|
npmDeps: readonly [];
|
|
726
711
|
}>;
|
|
712
|
+
}) | ({
|
|
713
|
+
commandName: "regen-deps";
|
|
714
|
+
subCommandDescriptions: {};
|
|
715
|
+
configFiles: {};
|
|
716
|
+
npmDeps: readonly [];
|
|
717
|
+
} & {
|
|
718
|
+
allAvailableSubCommands: readonly never[];
|
|
719
|
+
subCommands: import("./api/command/define-command-inputs").SubCommandsMap<{
|
|
720
|
+
commandName: "regen-deps";
|
|
721
|
+
subCommandDescriptions: {};
|
|
722
|
+
configFiles: {};
|
|
723
|
+
npmDeps: readonly [];
|
|
724
|
+
}>;
|
|
725
|
+
} & {
|
|
726
|
+
executor: import("./api/command/command-executor").CommandExecutor<{
|
|
727
|
+
commandName: "regen-deps";
|
|
728
|
+
subCommandDescriptions: {};
|
|
729
|
+
configFiles: {};
|
|
730
|
+
npmDeps: readonly [];
|
|
731
|
+
}>;
|
|
732
|
+
createDescription: import("./api/command/command-description").CreateDescriptionsCallback<{
|
|
733
|
+
commandName: "regen-deps";
|
|
734
|
+
subCommandDescriptions: {};
|
|
735
|
+
configFiles: {};
|
|
736
|
+
npmDeps: readonly [];
|
|
737
|
+
}>;
|
|
738
|
+
extend: import("./api/command/define-command").ExtendCallback<{
|
|
739
|
+
commandName: "regen-deps";
|
|
740
|
+
subCommandDescriptions: {};
|
|
741
|
+
configFiles: {};
|
|
742
|
+
npmDeps: readonly [];
|
|
743
|
+
}>;
|
|
727
744
|
}) | ({
|
|
728
745
|
commandName: "spellcheck";
|
|
729
746
|
subCommandDescriptions: {};
|
package/dist/index.js
CHANGED
|
@@ -22,6 +22,7 @@ const format_command_1 = require("./commands/format.command");
|
|
|
22
22
|
const frontend_command_1 = require("./commands/frontend.command");
|
|
23
23
|
const init_command_1 = require("./commands/init.command");
|
|
24
24
|
const publish_command_1 = require("./commands/publish.command");
|
|
25
|
+
const regen_deps_command_1 = require("./commands/regen-deps.command");
|
|
25
26
|
const spellcheck_command_1 = require("./commands/spellcheck.command");
|
|
26
27
|
const test_web_command_1 = require("./commands/test-web.command");
|
|
27
28
|
const test_command_1 = require("./commands/test.command");
|
|
@@ -54,6 +55,7 @@ exports.virmator = (0, create_virmator_1.createVirmator)({
|
|
|
54
55
|
frontend_command_1.frontendCommandDefinition,
|
|
55
56
|
init_command_1.initCommandDefinition,
|
|
56
57
|
publish_command_1.publishCommandDefinition,
|
|
58
|
+
regen_deps_command_1.regenDepsCommandDefinition,
|
|
57
59
|
spellcheck_command_1.spellcheckCommandDefinition,
|
|
58
60
|
test_command_1.testCommandDefinition,
|
|
59
61
|
test_web_command_1.testWebCommandDefinition,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "virmator",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"description": "Handle common package configs, commands, and dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"automation",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"glob-promise": "^6.0.3",
|
|
52
52
|
"semver": "^7.5.4",
|
|
53
53
|
"simple-git": "^3.19.1",
|
|
54
|
-
"type-fest": "^
|
|
54
|
+
"type-fest": "^4.0.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@electrovir/nyc": "15.1.0-fix0",
|
|
@@ -61,29 +61,29 @@
|
|
|
61
61
|
"@types/fs-extra": "^11.0.1",
|
|
62
62
|
"@types/glob": "^8.1.0",
|
|
63
63
|
"@types/mocha": "^10.0.1",
|
|
64
|
-
"@types/node": "^20.4.
|
|
64
|
+
"@types/node": "^20.4.2",
|
|
65
65
|
"@types/semver": "^7.5.0",
|
|
66
66
|
"@web/dev-server-esbuild": "^0.4.1",
|
|
67
|
-
"@web/test-runner": "^0.
|
|
68
|
-
"@web/test-runner-commands": "^0.
|
|
67
|
+
"@web/test-runner": "^0.17.0",
|
|
68
|
+
"@web/test-runner-commands": "^0.8.0",
|
|
69
69
|
"@web/test-runner-playwright": "^0.10.1",
|
|
70
|
-
"@web/test-runner-visual-regression": "^0.8.
|
|
70
|
+
"@web/test-runner-visual-regression": "^0.8.1",
|
|
71
71
|
"chai": "^4.3.7",
|
|
72
|
-
"cspell": "^6.31.
|
|
73
|
-
"element-vir": "^14.0.
|
|
74
|
-
"esbuild": "^0.18.
|
|
72
|
+
"cspell": "^6.31.2",
|
|
73
|
+
"element-vir": "^14.0.4",
|
|
74
|
+
"esbuild": "^0.18.13",
|
|
75
75
|
"fs-extra": "^11.1.1",
|
|
76
76
|
"istanbul-smart-text-reporter": "^1.1.2",
|
|
77
77
|
"markdown-code-example-inserter": "^0.3.1",
|
|
78
78
|
"mocha": "^10.2.0",
|
|
79
79
|
"mocha-spec-reporter-with-file-names": "^0.0.3",
|
|
80
|
-
"npm-check-updates": "^16.10.
|
|
80
|
+
"npm-check-updates": "^16.10.16",
|
|
81
81
|
"prettier": "^2.8.8",
|
|
82
82
|
"prettier-plugin-interpolated-html-tags": "^0.0.4",
|
|
83
83
|
"prettier-plugin-jsdoc": "^0.4.2",
|
|
84
84
|
"prettier-plugin-multiline-arrays": "^2.0.0",
|
|
85
|
-
"prettier-plugin-organize-imports": "^3.2.
|
|
86
|
-
"prettier-plugin-packagejson": "^2.4.
|
|
85
|
+
"prettier-plugin-organize-imports": "^3.2.3",
|
|
86
|
+
"prettier-plugin-packagejson": "^2.4.5",
|
|
87
87
|
"prettier-plugin-sort-json": "^1.0.0",
|
|
88
88
|
"prettier-plugin-toml": "^0.3.1",
|
|
89
89
|
"test-as-package": "^0.0.4",
|
|
@@ -91,8 +91,8 @@
|
|
|
91
91
|
"ts-node": "^10.9.1",
|
|
92
92
|
"tsconfig-paths": "^4.2.0",
|
|
93
93
|
"typescript": "^5.1.6",
|
|
94
|
-
"virmator": "^7.0
|
|
95
|
-
"vite": "^4.4.
|
|
94
|
+
"virmator": "^7.1.0",
|
|
95
|
+
"vite": "^4.4.4",
|
|
96
96
|
"vite-tsconfig-paths": "^4.2.0"
|
|
97
97
|
},
|
|
98
98
|
"engines": {
|