virmator 4.0.3 → 4.1.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.
@@ -1,4 +1,5 @@
1
1
  const testFiles = require('./test-files-glob.js');
2
+ const SpecReporterWithFileNames = require('mocha-spec-reporter-with-file-names');
2
3
 
3
4
  /** @type {import('mocha').MochaOptions} */
4
5
  const mochaConfig = {
@@ -8,6 +9,7 @@ const mochaConfig = {
8
9
  require: 'ts-node/register',
9
10
  slow: 1_500, // ms
10
11
  timeout: 60_000, // 1 minute in ms
12
+ reporter: SpecReporterWithFileNames.pathToThisReporter,
11
13
  ...testFiles,
12
14
  };
13
15
 
@@ -66,9 +66,11 @@ async function getVersionsToUpgradeTo({ repoDir, packageDir, npmDeps, packageBin
66
66
  ...packageJson.dependencies,
67
67
  };
68
68
  return npmDeps.map((npmDep) => {
69
- var _a;
69
+ var _a, _b, _c;
70
70
  const currentRepoVersion = currentRepoDepVersions[npmDep];
71
- const packageDepVersion = semver.clean((_a = packageDepVersions[npmDep]) !== null && _a !== void 0 ? _a : '');
71
+ const packageDepVersion = packageDepVersions[npmDep]
72
+ ? (_c = (_a = semver.clean(packageDepVersions[npmDep])) !== null && _a !== void 0 ? _a : (_b = semver.minVersion(packageDepVersions[npmDep])) === null || _b === void 0 ? void 0 : _b.raw) !== null && _c !== void 0 ? _c : undefined
73
+ : undefined;
72
74
  if (!packageDepVersion) {
73
75
  throw new Error(`No npm dep version listed for "${npmDep}" in ${packageBinName}'s dependencies.`);
74
76
  }
@@ -42,12 +42,6 @@ exports.nonCommandConfigs = [
42
42
  updateExistingConfigFileCallback: combine_json_config_1.combineJsonConfig,
43
43
  required: true,
44
44
  },
45
- {
46
- copyFromInternalPath: (0, path_1.join)(package_paths_1.virmatorConfigsDir, 'src', 'index.d.ts'),
47
- copyToPathRelativeToRepoDir: (0, path_1.join)('src', 'index.d.ts'),
48
- updateExistingConfigFileCallback: combine_text_config_1.combineTextConfig,
49
- required: true,
50
- },
51
45
  {
52
46
  copyFromInternalPath: (0, path_1.join)(package_paths_1.virmatorConfigsDir, '.github', 'workflows', 'build-for-gh-pages.yml'),
53
47
  copyToPathRelativeToRepoDir: (0, path_1.join)('.github', 'workflows', 'build-for-gh-pages.yml'),
@@ -8,5 +8,5 @@ export declare const testCommandDefinition: import("../api/command/define-comman
8
8
  readonly required: true;
9
9
  };
10
10
  };
11
- npmDeps: readonly ["@types/chai", "@types/mocha", "chai", "mocha", "ts-node"];
11
+ npmDeps: readonly ["@types/chai", "@types/mocha", "chai", "mocha-spec-reporter-with-file-names", "mocha", "ts-node"];
12
12
  }>;
@@ -18,6 +18,7 @@ exports.testCommandDefinition = (0, define_command_1.defineCommand)({
18
18
  '@types/chai',
19
19
  '@types/mocha',
20
20
  'chai',
21
+ 'mocha-spec-reporter-with-file-names',
21
22
  'mocha',
22
23
  'ts-node',
23
24
  ],
package/dist/index.d.ts CHANGED
@@ -96,7 +96,7 @@ export declare const virmator: Readonly<{
96
96
  readonly required: true;
97
97
  };
98
98
  };
99
- npmDeps: readonly ["@types/chai", "@types/mocha", "chai", "mocha", "ts-node"];
99
+ npmDeps: readonly ["@types/chai", "@types/mocha", "chai", "mocha-spec-reporter-with-file-names", "mocha", "ts-node"];
100
100
  }> | import("./api/command/define-command").CommandDefinition<{
101
101
  commandName: "test-web";
102
102
  subCommandDescriptions: {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "virmator",
3
- "version": "4.0.3",
3
+ "version": "4.1.0",
4
4
  "description": "Handle all the stuffs in one package.",
5
5
  "keywords": [
6
6
  "automation",
@@ -64,6 +64,7 @@
64
64
  "fs-extra": "^10.1.0",
65
65
  "markdown-code-example-inserter": "0.1.11",
66
66
  "mocha": "10.0.0",
67
+ "mocha-spec-reporter-with-file-names": "^0.0.0",
67
68
  "prettier": "2.7.1",
68
69
  "prettier-plugin-jsdoc": "0.4.2",
69
70
  "prettier-plugin-multiline-arrays": "1.1.1",
@@ -1,5 +0,0 @@
1
- /** This file helps ensure that test calls are imported from the correct package. */
2
-
3
- declare var it: 'Don\'t use it directly: import "it" from Mocha.';
4
- declare var expect: 'Don\'t use expect directly: import "expect" from Chai.';
5
- declare var describe: 'Don\'t use describe directly: import "describe" from Mocha.';