virmator 12.0.2 → 12.0.4

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 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.js.
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
 
@@ -96,6 +96,7 @@ const baseConfig = {
96
96
  'fleek',
97
97
  'fontawesome',
98
98
  'fontsource',
99
+ 'gamepad',
99
100
  'gitattributes',
100
101
  'globbing',
101
102
  'globby',
@@ -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: minutesTwenty,
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: minutesTwenty,
106
+ timeout: process.env.CI ? 20 * oneMinuteMs : 5 * oneMinuteMs,
108
107
  },
109
108
  },
110
109
  coverageConfig: {
@@ -1,4 +1,4 @@
1
- const baseOptions = require('virmator/base-configs/base-mocharc.js');
1
+ const baseOptions = require('virmator/base-configs/base-mocharc.cjs');
2
2
 
3
3
  /** @type {import('mocha').MochaOptions} */
4
4
  const mochaConfig = {
@@ -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: neededNpmDeps, packageBinName, }) {
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 neededNpmDeps.map((npmDep) => {
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.js'),
16
- copyToPathRelativeToRepoDir: (0, path_1.join)('configs', 'mocha.config.js'),
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.js.`,
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: '',
@@ -1,4 +1,4 @@
1
- const baseOptions = require('./base-configs/base-mocharc.js');
1
+ const baseOptions = require('./base-configs/base-mocharc.cjs');
2
2
  const SpecReporterWithFileNames = require('mocha-spec-reporter-with-file-names');
3
3
 
4
4
  const oneMinuteMs = 60_000;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "virmator",
3
- "version": "12.0.2",
3
+ "version": "12.0.4",
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.js",
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,17 +43,17 @@
43
43
  "test:types": "tsc --noEmit"
44
44
  },
45
45
  "dependencies": {
46
- "@augment-vir/common": "^29.1.2",
47
- "@augment-vir/node-js": "^29.1.2",
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.2",
54
+ "semver": "^7.6.3",
55
55
  "simple-git": "^3.25.0",
56
- "type-fest": "^4.20.1"
56
+ "type-fest": "^4.22.1"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@electrovir/nyc": "15.1.0-fix0",
@@ -63,7 +63,7 @@
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.8",
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.9.1",
75
- "dependency-cruiser": "^16.3.3",
74
+ "cspell": "^8.11.0",
75
+ "dependency-cruiser": "^16.3.7",
76
76
  "element-vir": "^22.2.2",
77
- "esbuild": "^0.21.5",
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.4.0",
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.2",
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": "^3.2.4",
88
- "prettier-plugin-packagejson": "^2.5.0",
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.0",
96
- "typescript": "^5.5.2",
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
  },