virmator 4.2.1 → 4.2.3
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
CHANGED
|
@@ -12,6 +12,7 @@ const baseConfig = {
|
|
|
12
12
|
'html',
|
|
13
13
|
'text',
|
|
14
14
|
],
|
|
15
|
+
skipEmpty: true,
|
|
15
16
|
/** Don't show files that meet 100% test coverage. */
|
|
16
17
|
skipFull: true,
|
|
17
18
|
tempDir: './node_modules/.nyc-output/',
|
|
@@ -21,6 +22,8 @@ const baseConfig = {
|
|
|
21
22
|
functions: 100,
|
|
22
23
|
lines: 100,
|
|
23
24
|
statements: 100,
|
|
25
|
+
|
|
26
|
+
exclude: ['test-files'],
|
|
24
27
|
};
|
|
25
28
|
|
|
26
29
|
module.exports = baseConfig;
|
|
@@ -24,7 +24,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.updateDepsAsNeeded = void 0;
|
|
27
|
-
const ansi_colors_1 = require("ansi-colors");
|
|
28
27
|
const augment_vir_1 = require("augment-vir");
|
|
29
28
|
const node_only_1 = require("augment-vir/dist/cjs/node-only");
|
|
30
29
|
const promises_1 = require("fs/promises");
|
|
@@ -58,7 +57,7 @@ async function updateDepsAsNeeded(inputs) {
|
|
|
58
57
|
}
|
|
59
58
|
exports.updateDepsAsNeeded = updateDepsAsNeeded;
|
|
60
59
|
async function getVersionsToUpgradeTo({ repoDir, packageDir, npmDeps, packageBinName, }) {
|
|
61
|
-
const listedDeps = await (0, node_only_1.runShellCommand)(`npm list --depth=0 2>&1`, { cwd: repoDir });
|
|
60
|
+
const listedDeps = await (0, node_only_1.runShellCommand)(`npm list --depth=0 2>&1 -json`, { cwd: repoDir });
|
|
62
61
|
const currentRepoDepVersions = parseCurrentDeps(listedDeps.stdout);
|
|
63
62
|
const packageJson = JSON.parse((await (0, promises_1.readFile)((0, path_1.join)(packageDir, 'package.json'))).toString());
|
|
64
63
|
const packageDepVersions = {
|
|
@@ -83,27 +82,18 @@ async function getVersionsToUpgradeTo({ repoDir, packageDir, npmDeps, packageBin
|
|
|
83
82
|
});
|
|
84
83
|
}
|
|
85
84
|
function parseCurrentDeps(stdout) {
|
|
86
|
-
const
|
|
87
|
-
const
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
85
|
+
const parsedListOutput = JSON.parse(stdout);
|
|
86
|
+
const deps = parsedListOutput.dependencies;
|
|
87
|
+
const depsAndVersions = {};
|
|
88
|
+
Object.keys(deps).forEach((depName) => {
|
|
89
|
+
const depValue = deps[depName];
|
|
90
|
+
if (
|
|
91
|
+
// ignore sub packages
|
|
92
|
+
!(depValue === null || depValue === void 0 ? void 0 : depValue.dependencies) &&
|
|
93
|
+
// just a quick check that .version also exists
|
|
94
|
+
!!(depValue === null || depValue === void 0 ? void 0 : depValue.version)) {
|
|
95
|
+
depsAndVersions[depName] = depValue.version;
|
|
92
96
|
}
|
|
93
|
-
return nameAndVersion;
|
|
94
97
|
});
|
|
95
|
-
|
|
96
|
-
const [, depName, depVersion,] = (0, augment_vir_1.safeMatch)(nameVersion, /(.+)@(.+)/);
|
|
97
|
-
const cleanedVersion = semver.clean(depVersion !== null && depVersion !== void 0 ? depVersion : '');
|
|
98
|
-
if (!depName || !cleanedVersion) {
|
|
99
|
-
console.error({ depLines, namesAndVersions });
|
|
100
|
-
throw new Error(`Failed to extract dep name and version from "${nameVersion}"`);
|
|
101
|
-
}
|
|
102
|
-
if (!semver.valid(cleanedVersion)) {
|
|
103
|
-
throw new Error(`Extracted dependency version is not valid: "${cleanedVersion}"`);
|
|
104
|
-
}
|
|
105
|
-
accum[depName] = cleanedVersion;
|
|
106
|
-
return accum;
|
|
107
|
-
}, {});
|
|
108
|
-
return nameToVersionMap;
|
|
98
|
+
return depsAndVersions;
|
|
109
99
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getNpmBinPath = exports.virmatorConfigs = exports.virmatorConfigsDir = exports.virmatorPackageDir = void 0;
|
|
4
4
|
const augment_vir_1 = require("augment-vir");
|
|
5
5
|
const node_only_1 = require("augment-vir/dist/cjs/node-only");
|
|
6
6
|
const fs_1 = require("fs");
|
|
@@ -35,7 +35,3 @@ async function getNpmBinPath(command) {
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
exports.getNpmBinPath = getNpmBinPath;
|
|
38
|
-
function relativeToVirmatorRoot(fullPath) {
|
|
39
|
-
return (0, path_1.relative)(exports.virmatorPackageDir, fullPath);
|
|
40
|
-
}
|
|
41
|
-
exports.relativeToVirmatorRoot = relativeToVirmatorRoot;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "virmator",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.3",
|
|
4
4
|
"description": "Handle all the stuffs in one package.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"automation",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@types/chai": "4.3.3",
|
|
52
52
|
"@types/fs-extra": "^9.0.13",
|
|
53
53
|
"@types/mocha": "10.0.0",
|
|
54
|
-
"@types/node": "18.8.
|
|
54
|
+
"@types/node": "18.8.4",
|
|
55
55
|
"@types/semver": "7.3.12",
|
|
56
56
|
"@web/dev-server-esbuild": "0.3.2",
|
|
57
57
|
"@web/test-runner": "0.14.0",
|
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
"prettier-plugin-toml": "0.3.1",
|
|
76
76
|
"ts-node": "10.9.1",
|
|
77
77
|
"tsconfig-paths": "4.1.0",
|
|
78
|
-
"typescript": "4.8.4",
|
|
79
|
-
"vite": "3.1.
|
|
78
|
+
"typescript": "^4.8.4",
|
|
79
|
+
"vite": "3.1.7"
|
|
80
80
|
},
|
|
81
81
|
"engines": {
|
|
82
82
|
"node": ">=16",
|