virmator 12.0.2 → 12.0.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/README.md +1 -1
- package/base-configs/base-cspell.js +1 -0
- package/base-configs/base-web-test-runner.mjs +2 -3
- package/configs/configs/{mocha.config.js → mocha.config.cjs} +1 -1
- package/dist/api/run-command/check-npm-deps.js +3 -3
- package/dist/commands/test.command.js +4 -4
- package/{mocha.config.js → mocha.config.cjs} +1 -1
- package/package.json +18 -18
- /package/base-configs/{base-mocharc.js → base-mocharc.cjs} +0 -0
package/README.md
CHANGED
|
@@ -172,7 +172,7 @@ Spellcheck code with cspell. By default this spellchecks every file in the entir
|
|
|
172
172
|
|
|
173
173
|
## test
|
|
174
174
|
|
|
175
|
-
Test all .test.ts files with Mocha and Chai. By default this command tests all ".test.ts" files in the current directory (recursively) that are not ".type.test.ts" files. To override this behavior, override the "spec" property in .mocharc.
|
|
175
|
+
Test all .test.ts files with Mocha and Chai. By default this command tests all ".test.ts" files in the current directory (recursively) that are not ".type.test.ts" files. To override this behavior, override the "spec" property in .mocharc.cjs.
|
|
176
176
|
|
|
177
177
|
This command is meant to run Node.js tests. For running web-based testing, see the test-web command.
|
|
178
178
|
|
|
@@ -7,7 +7,6 @@ import {join, relative} from 'path';
|
|
|
7
7
|
import testFiles from './test-files-glob.js';
|
|
8
8
|
|
|
9
9
|
const oneMinuteMs = 60_000;
|
|
10
|
-
const minutesTwenty = 20 * oneMinuteMs;
|
|
11
10
|
|
|
12
11
|
function getTestFileName(args, repoDir, type) {
|
|
13
12
|
const screenshotDir = relative(repoDir, args.testFile.replace(/\.[jt]sx?$/, ''));
|
|
@@ -89,7 +88,7 @@ export function getWebTestRunnerConfigWithCoveragePercent({
|
|
|
89
88
|
summaryReporter(),
|
|
90
89
|
defaultReporter({reportTestResults: true, reportTestProgress: false}),
|
|
91
90
|
],
|
|
92
|
-
browserStartTimeout:
|
|
91
|
+
browserStartTimeout: process.env.CI ? 10 * oneMinuteMs : oneMinuteMs,
|
|
93
92
|
/** Reduce concurrency in CI environments to improve stability. */
|
|
94
93
|
concurrentBrowsers: process.env.ci ? 1 : 3,
|
|
95
94
|
/** Reduce concurrency in CI environments to improve stability. */
|
|
@@ -104,7 +103,7 @@ export function getWebTestRunnerConfigWithCoveragePercent({
|
|
|
104
103
|
],
|
|
105
104
|
testFramework: {
|
|
106
105
|
config: {
|
|
107
|
-
timeout:
|
|
106
|
+
timeout: process.env.CI ? 20 * oneMinuteMs : 5 * oneMinuteMs,
|
|
108
107
|
},
|
|
109
108
|
},
|
|
110
109
|
coverageConfig: {
|
|
@@ -53,9 +53,9 @@ function cleanDepVersion(input) {
|
|
|
53
53
|
if (input === '*') {
|
|
54
54
|
return '*';
|
|
55
55
|
}
|
|
56
|
-
return input ? semver.clean(input) ?? semver.minVersion(input)?.raw ?? undefined : undefined;
|
|
56
|
+
return input ? (semver.clean(input) ?? semver.minVersion(input)?.raw ?? undefined) : undefined;
|
|
57
57
|
}
|
|
58
|
-
async function getVersionsToUpgradeTo({ repoDir, packageDir, npmDeps
|
|
58
|
+
async function getVersionsToUpgradeTo({ repoDir, packageDir, npmDeps, packageBinName, }) {
|
|
59
59
|
const packageName = (await (0, node_js_1.runShellCommand)(`cut -d "=" -f 2 <<< $(npm run env | grep "npm_package_name")`, {
|
|
60
60
|
cwd: repoDir,
|
|
61
61
|
rejectOnError: true,
|
|
@@ -66,7 +66,7 @@ async function getVersionsToUpgradeTo({ repoDir, packageDir, npmDeps: neededNpmD
|
|
|
66
66
|
...virmatorPackageJson.devDependencies,
|
|
67
67
|
...virmatorPackageJson.dependencies,
|
|
68
68
|
};
|
|
69
|
-
return
|
|
69
|
+
return npmDeps.map((npmDep) => {
|
|
70
70
|
try {
|
|
71
71
|
const currentRepoVersion = cleanDepVersion(currentRepoDepVersions[npmDep.name]);
|
|
72
72
|
const virmatorDepVersion = packageDepVersions[npmDep.name];
|
|
@@ -12,8 +12,8 @@ exports.testCommandDefinition = (0, define_command_1.defineCommand)({
|
|
|
12
12
|
},
|
|
13
13
|
configFiles: {
|
|
14
14
|
mochaConfig: {
|
|
15
|
-
copyFromInternalPath: (0, path_1.join)(package_paths_1.virmatorConfigsDir, 'configs', 'mocha.config.
|
|
16
|
-
copyToPathRelativeToRepoDir: (0, path_1.join)('configs', 'mocha.config.
|
|
15
|
+
copyFromInternalPath: (0, path_1.join)(package_paths_1.virmatorConfigsDir, 'configs', 'mocha.config.cjs'),
|
|
16
|
+
copyToPathRelativeToRepoDir: (0, path_1.join)('configs', 'mocha.config.cjs'),
|
|
17
17
|
},
|
|
18
18
|
nycConfig: {
|
|
19
19
|
copyFromInternalPath: (0, path_1.join)(package_paths_1.virmatorConfigsDir, 'configs', 'nyc.config.js'),
|
|
@@ -36,7 +36,7 @@ exports.testCommandDefinition = (0, define_command_1.defineCommand)({
|
|
|
36
36
|
sections: [
|
|
37
37
|
{
|
|
38
38
|
title: '',
|
|
39
|
-
content: `Test all .test.ts files with Mocha and Chai. By default this command tests all ".test.ts" files in the current directory (recursively) that are not ".type.test.ts" files. To override this behavior, override the "spec" property in .mocharc.
|
|
39
|
+
content: `Test all .test.ts files with Mocha and Chai. By default this command tests all ".test.ts" files in the current directory (recursively) that are not ".type.test.ts" files. To override this behavior, override the "spec" property in .mocharc.cjs.`,
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
title: '',
|
|
@@ -78,7 +78,7 @@ exports.testCommandDefinition = (0, define_command_1.defineCommand)({
|
|
|
78
78
|
? [
|
|
79
79
|
await (0, package_paths_1.getNpmBinPath)({
|
|
80
80
|
repoDir: inputs.repoDir,
|
|
81
|
-
command: '
|
|
81
|
+
command: 'vir-nyc',
|
|
82
82
|
packageDirPath: inputs.packageDir,
|
|
83
83
|
}),
|
|
84
84
|
// force colors in nyc
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "virmator",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.3",
|
|
4
4
|
"description": "Handle common package configs, commands, and dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"automation",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"format": "npm run format:base -- --write --list-different",
|
|
36
36
|
"format:base": "prettier \"./**/*.+(ts|json|html|css|md|js)\" --config .prettierrc.js",
|
|
37
37
|
"publish": "npm run compile && npm ci && virmator publish \"npm run test:all\"",
|
|
38
|
-
"test": "npm run compile && test-as-package mocha --config mocha.config.
|
|
38
|
+
"test": "npm run compile && test-as-package mocha --config mocha.config.cjs",
|
|
39
39
|
"test:all": "npm ci && concurrently --color --kill-others-on-fail -c auto --names tests,spelling,format,docs \"npm run compile && npm run test\" \"npm run test:spelling -- --no-progress\" \"npm run test:format\" \"npm run docs:check\"",
|
|
40
40
|
"test:format": "npm run format:base -- --check",
|
|
41
41
|
"test:help": "ts-node src/cli/cli.ts --help",
|
|
@@ -43,27 +43,27 @@
|
|
|
43
43
|
"test:types": "tsc --noEmit"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@augment-vir/common": "^29.
|
|
47
|
-
"@augment-vir/node-js": "^29.
|
|
46
|
+
"@augment-vir/common": "^29.3.0",
|
|
47
|
+
"@augment-vir/node-js": "^29.3.0",
|
|
48
48
|
"ansi-colors": "^4.1.3",
|
|
49
49
|
"concurrently": "^8.2.2",
|
|
50
50
|
"fs-extra": "^11.2.0",
|
|
51
51
|
"glob": "^8.1.0",
|
|
52
52
|
"glob-promise": "^6.0.7",
|
|
53
53
|
"mono-vir": "^1.0.1",
|
|
54
|
-
"semver": "^7.6.
|
|
54
|
+
"semver": "^7.6.3",
|
|
55
55
|
"simple-git": "^3.25.0",
|
|
56
|
-
"type-fest": "^4.
|
|
56
|
+
"type-fest": "^4.22.1"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@electrovir/nyc": "
|
|
59
|
+
"@electrovir/nyc": "17.0.0",
|
|
60
60
|
"@istanbuljs/nyc-config-typescript": "^1.0.2",
|
|
61
61
|
"@open-wc/testing": "^4.0.0",
|
|
62
62
|
"@types/chai": "^4.3.16",
|
|
63
63
|
"@types/fs-extra": "^11.0.4",
|
|
64
64
|
"@types/glob": "^8.1.0",
|
|
65
65
|
"@types/mocha": "^10.0.7",
|
|
66
|
-
"@types/node": "^20.14.
|
|
66
|
+
"@types/node": "^20.14.11",
|
|
67
67
|
"@types/semver": "^7.5.8",
|
|
68
68
|
"@web/dev-server-esbuild": "^1.0.2",
|
|
69
69
|
"@web/test-runner": "^0.18.2",
|
|
@@ -71,30 +71,30 @@
|
|
|
71
71
|
"@web/test-runner-playwright": "^0.11.0",
|
|
72
72
|
"@web/test-runner-visual-regression": "^0.9.0",
|
|
73
73
|
"chai": "^4.3.10",
|
|
74
|
-
"cspell": "^8.
|
|
75
|
-
"dependency-cruiser": "^16.3.
|
|
74
|
+
"cspell": "^8.11.0",
|
|
75
|
+
"dependency-cruiser": "^16.3.7",
|
|
76
76
|
"element-vir": "^22.2.2",
|
|
77
|
-
"esbuild": "^0.
|
|
77
|
+
"esbuild": "^0.23.0",
|
|
78
78
|
"istanbul-smart-text-reporter": "^1.1.4",
|
|
79
79
|
"markdown-code-example-inserter": "^1.0.0",
|
|
80
|
-
"mocha": "^10.
|
|
80
|
+
"mocha": "^10.6.0",
|
|
81
81
|
"mocha-spec-reporter-with-file-names": "^0.0.3",
|
|
82
82
|
"npm-check-updates": "~16.12.3",
|
|
83
|
-
"prettier": "^3.3.
|
|
83
|
+
"prettier": "^3.3.3",
|
|
84
84
|
"prettier-plugin-interpolated-html-tags": "^1.0.5",
|
|
85
85
|
"prettier-plugin-jsdoc": "^1.3.0",
|
|
86
86
|
"prettier-plugin-multiline-arrays": "^3.0.6",
|
|
87
|
-
"prettier-plugin-organize-imports": "^
|
|
88
|
-
"prettier-plugin-packagejson": "^2.5.
|
|
87
|
+
"prettier-plugin-organize-imports": "^4.0.0",
|
|
88
|
+
"prettier-plugin-packagejson": "^2.5.1",
|
|
89
89
|
"prettier-plugin-sort-json": "^4.0.0",
|
|
90
90
|
"prettier-plugin-toml": "^2.0.1",
|
|
91
91
|
"test-as-package": "^1.0.0",
|
|
92
92
|
"test-established-expectations": "^1.0.0",
|
|
93
93
|
"ts-node": "^10.9.2",
|
|
94
94
|
"tsconfig-paths": "^4.2.0",
|
|
95
|
-
"typedoc": "^0.26.
|
|
96
|
-
"typescript": "^5.5.
|
|
97
|
-
"virmator": "
|
|
95
|
+
"typedoc": "^0.26.4",
|
|
96
|
+
"typescript": "^5.5.3",
|
|
97
|
+
"virmator": "^12.0.2",
|
|
98
98
|
"vite": "^4.5.0",
|
|
99
99
|
"vite-tsconfig-paths": "^4.3.2"
|
|
100
100
|
},
|
|
File without changes
|