virmator 12.0.4 → 13.0.2

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.
Files changed (158) hide show
  1. package/README.md +224 -129
  2. package/dist/cli.d.ts +1 -1
  3. package/dist/cli.js +21 -5
  4. package/dist/index.d.ts +1416 -1310
  5. package/dist/index.js +25 -63
  6. package/dist/tests/test-virmator.mock.d.ts +3 -0
  7. package/dist/tests/test-virmator.mock.js +5 -0
  8. package/package.json +25 -69
  9. package/src/cli.ts +29 -0
  10. package/src/index.ts +26 -0
  11. package/src/tests/test-virmator.mock.ts +13 -0
  12. package/base-configs/base-cspell.js +0 -272
  13. package/base-configs/base-mocharc.cjs +0 -20
  14. package/base-configs/base-nyc.js +0 -40
  15. package/base-configs/base-prettierrc.js +0 -32
  16. package/base-configs/base-web-test-runner.mjs +0 -137
  17. package/base-configs/test-files-glob.js +0 -13
  18. package/base-configs/tsconfig.base.json +0 -32
  19. package/configs/.gitattributes +0 -2
  20. package/configs/.github/workflows/build-for-gh-pages.yml +0 -24
  21. package/configs/.github/workflows/tagged-release.yml +0 -41
  22. package/configs/.github/workflows/tests.yml +0 -25
  23. package/configs/.nvmrc +0 -1
  24. package/configs/.prettierignore +0 -11
  25. package/configs/.prettierrc.js +0 -13
  26. package/configs/.vscode/settings.json +0 -50
  27. package/configs/LICENSE-CC0 +0 -121
  28. package/configs/LICENSE-MIT +0 -21
  29. package/configs/configs/dep-cruiser.config.ts +0 -22
  30. package/configs/configs/mocha.config.cjs +0 -8
  31. package/configs/configs/ncu.config.ts +0 -12
  32. package/configs/configs/nyc.config.js +0 -7
  33. package/configs/configs/typedoc.config.ts +0 -20
  34. package/configs/configs/vite.config.ts +0 -14
  35. package/configs/configs/web-test-runner.config.mjs +0 -21
  36. package/configs/cspell.config.cjs +0 -11
  37. package/configs/dep-cruiser.config.ts +0 -22
  38. package/configs/gitignore.txt +0 -13
  39. package/configs/ncu.config.ts +0 -13
  40. package/configs/npmignore.txt +0 -26
  41. package/configs/package.json +0 -23
  42. package/configs/src/index.html +0 -12
  43. package/configs/src/ui/elements/vir-app.element.ts +0 -10
  44. package/configs/tsconfig.json +0 -16
  45. package/configs/www-static/_redirects +0 -1
  46. package/configs/www-static/index.css +0 -7
  47. package/cspell.config.cjs +0 -13
  48. package/dist/api/command/command-configs.d.ts +0 -3
  49. package/dist/api/command/command-configs.js +0 -10
  50. package/dist/api/command/command-description.d.ts +0 -8
  51. package/dist/api/command/command-description.js +0 -2
  52. package/dist/api/command/command-executor.d.ts +0 -30
  53. package/dist/api/command/command-executor.js +0 -6
  54. package/dist/api/command/command-help.d.ts +0 -8
  55. package/dist/api/command/command-help.js +0 -2
  56. package/dist/api/command/command-logging.d.ts +0 -11
  57. package/dist/api/command/command-logging.js +0 -17
  58. package/dist/api/command/command-mapping.d.ts +0 -7
  59. package/dist/api/command/command-mapping.js +0 -9
  60. package/dist/api/command/command-messages.d.ts +0 -1
  61. package/dist/api/command/command-messages.js +0 -9
  62. package/dist/api/command/command-to-help-message.d.ts +0 -9
  63. package/dist/api/command/command-to-help-message.js +0 -175
  64. package/dist/api/command/define-command-inputs.d.ts +0 -22
  65. package/dist/api/command/define-command-inputs.js +0 -8
  66. package/dist/api/command/define-command.d.ts +0 -22
  67. package/dist/api/command/define-command.js +0 -41
  68. package/dist/api/config/config-file-definition.d.ts +0 -15
  69. package/dist/api/config/config-file-definition.js +0 -2
  70. package/dist/api/config/config-paths.d.ts +0 -7
  71. package/dist/api/config/config-paths.js +0 -7
  72. package/dist/api/config/copy-config.d.ts +0 -27
  73. package/dist/api/config/copy-config.js +0 -98
  74. package/dist/api/create-virmator.d.ts +0 -8
  75. package/dist/api/create-virmator.js +0 -67
  76. package/dist/api/run-command/check-npm-deps.d.ts +0 -8
  77. package/dist/api/run-command/check-npm-deps.js +0 -111
  78. package/dist/api/run-command/extract-arguments.d.ts +0 -6
  79. package/dist/api/run-command/extract-arguments.js +0 -36
  80. package/dist/api/run-command/run-command-executor.d.ts +0 -5
  81. package/dist/api/run-command/run-command-executor.js +0 -50
  82. package/dist/api/run-command/run-extended-virmator.d.ts +0 -10
  83. package/dist/api/run-command/run-extended-virmator.js +0 -53
  84. package/dist/api/run-command/run-shell-command.d.ts +0 -8
  85. package/dist/api/run-command/run-shell-command.js +0 -21
  86. package/dist/api/virmator-types.d.ts +0 -18
  87. package/dist/api/virmator-types.js +0 -2
  88. package/dist/augments/array.d.ts +0 -1
  89. package/dist/augments/array.js +0 -6
  90. package/dist/augments/console.d.ts +0 -9
  91. package/dist/augments/console.js +0 -43
  92. package/dist/augments/fs.d.ts +0 -11
  93. package/dist/augments/fs.js +0 -71
  94. package/dist/augments/git.d.ts +0 -1
  95. package/dist/augments/git.js +0 -12
  96. package/dist/augments/json.d.ts +0 -1
  97. package/dist/augments/json.js +0 -11
  98. package/dist/augments/npm.d.ts +0 -11
  99. package/dist/augments/npm.js +0 -52
  100. package/dist/augments/object.d.ts +0 -4
  101. package/dist/augments/object.js +0 -44
  102. package/dist/augments/path.d.ts +0 -1
  103. package/dist/augments/path.js +0 -12
  104. package/dist/augments/prettier.d.ts +0 -1
  105. package/dist/augments/prettier.js +0 -52
  106. package/dist/augments/regexp.d.ts +0 -1
  107. package/dist/augments/regexp.js +0 -6
  108. package/dist/augments/string.d.ts +0 -2
  109. package/dist/augments/string.js +0 -9
  110. package/dist/augments/type.d.ts +0 -1
  111. package/dist/augments/type.js +0 -2
  112. package/dist/augments/typescript-config-file.d.ts +0 -5
  113. package/dist/augments/typescript-config-file.js +0 -62
  114. package/dist/commands/compile.command.d.ts +0 -84
  115. package/dist/commands/compile.command.js +0 -58
  116. package/dist/commands/deps.command.d.ts +0 -144
  117. package/dist/commands/deps.command.js +0 -208
  118. package/dist/commands/docs.command.d.ts +0 -99
  119. package/dist/commands/docs.command.js +0 -192
  120. package/dist/commands/extra-configs/all-extra-configs.d.ts +0 -2
  121. package/dist/commands/extra-configs/all-extra-configs.js +0 -71
  122. package/dist/commands/extra-configs/combine-json-config.d.ts +0 -2
  123. package/dist/commands/extra-configs/combine-json-config.js +0 -21
  124. package/dist/commands/extra-configs/combine-text-config.d.ts +0 -2
  125. package/dist/commands/extra-configs/combine-text-config.js +0 -26
  126. package/dist/commands/extra-configs/create-default-package-json.d.ts +0 -1
  127. package/dist/commands/extra-configs/create-default-package-json.js +0 -86
  128. package/dist/commands/format.command.d.ts +0 -215
  129. package/dist/commands/format.command.js +0 -157
  130. package/dist/commands/frontend.command.d.ts +0 -149
  131. package/dist/commands/frontend.command.js +0 -140
  132. package/dist/commands/init.command.d.ts +0 -163
  133. package/dist/commands/init.command.js +0 -53
  134. package/dist/commands/publish.command.d.ts +0 -33
  135. package/dist/commands/publish.command.js +0 -193
  136. package/dist/commands/spellcheck.command.d.ts +0 -74
  137. package/dist/commands/spellcheck.command.js +0 -60
  138. package/dist/commands/test-web.command.d.ts +0 -189
  139. package/dist/commands/test-web.command.js +0 -125
  140. package/dist/commands/test.command.d.ts +0 -224
  141. package/dist/commands/test.command.js +0 -100
  142. package/dist/commands/update-configs.command.d.ts +0 -33
  143. package/dist/commands/update-configs.command.js +0 -35
  144. package/dist/compiled-base-configs/base-dep-cruiser.config.d.ts +0 -195
  145. package/dist/compiled-base-configs/base-dep-cruiser.config.js +0 -206
  146. package/dist/compiled-base-configs/base-ncu.d.ts +0 -6
  147. package/dist/compiled-base-configs/base-ncu.js +0 -16
  148. package/dist/compiled-base-configs/base-typedoc.d.ts +0 -3
  149. package/dist/compiled-base-configs/base-typedoc.js +0 -36
  150. package/dist/compiled-base-configs/base-vite.d.ts +0 -27
  151. package/dist/compiled-base-configs/base-vite.js +0 -74
  152. package/dist/compiled-base-configs/vite-always-reload-plugin.d.ts +0 -10
  153. package/dist/compiled-base-configs/vite-always-reload-plugin.js +0 -99
  154. package/dist/file-paths/package-paths.d.ts +0 -12
  155. package/dist/file-paths/package-paths.js +0 -46
  156. package/dist/scripts/save-help-message.d.ts +0 -1
  157. package/dist/scripts/save-help-message.js +0 -33
  158. package/mocha.config.cjs +0 -16
package/dist/index.js CHANGED
@@ -1,63 +1,25 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.virmator = exports.getNpmBinPath = void 0;
18
- const create_virmator_1 = require("./api/create-virmator");
19
- const compile_command_1 = require("./commands/compile.command");
20
- const deps_command_1 = require("./commands/deps.command");
21
- const docs_command_1 = require("./commands/docs.command");
22
- const format_command_1 = require("./commands/format.command");
23
- const frontend_command_1 = require("./commands/frontend.command");
24
- const init_command_1 = require("./commands/init.command");
25
- const publish_command_1 = require("./commands/publish.command");
26
- const spellcheck_command_1 = require("./commands/spellcheck.command");
27
- const test_web_command_1 = require("./commands/test-web.command");
28
- const test_command_1 = require("./commands/test.command");
29
- const update_configs_command_1 = require("./commands/update-configs.command");
30
- const package_paths_1 = require("./file-paths/package-paths");
31
- __exportStar(require("./api/command/command-description"), exports);
32
- __exportStar(require("./api/command/command-executor"), exports);
33
- __exportStar(require("./api/command/command-help"), exports);
34
- __exportStar(require("./api/command/command-logging"), exports);
35
- __exportStar(require("./api/command/command-mapping"), exports);
36
- __exportStar(require("./api/command/command-messages"), exports);
37
- __exportStar(require("./api/command/command-to-help-message"), exports);
38
- __exportStar(require("./api/command/define-command"), exports);
39
- __exportStar(require("./api/command/define-command-inputs"), exports);
40
- __exportStar(require("./api/config/config-file-definition"), exports);
41
- __exportStar(require("./api/config/config-paths"), exports);
42
- __exportStar(require("./api/create-virmator"), exports);
43
- __exportStar(require("./api/virmator-types"), exports);
44
- __exportStar(require("./commands/extra-configs/combine-text-config"), exports);
45
- var package_paths_2 = require("./file-paths/package-paths");
46
- Object.defineProperty(exports, "getNpmBinPath", { enumerable: true, get: function () { return package_paths_2.getNpmBinPath; } });
47
- exports.virmator = (0, create_virmator_1.createVirmator)({
48
- packageBinName: 'virmator',
49
- packageRootDir: package_paths_1.virmatorPackageDir,
50
- commandDefinitions: [
51
- compile_command_1.compileCommandDefinition,
52
- deps_command_1.depsCommandDefinition,
53
- docs_command_1.docsCommandDefinition,
54
- format_command_1.formatCommandDefinition,
55
- frontend_command_1.frontendCommandDefinition,
56
- init_command_1.initCommandDefinition,
57
- publish_command_1.publishCommandDefinition,
58
- spellcheck_command_1.spellcheckCommandDefinition,
59
- test_command_1.testCommandDefinition,
60
- test_web_command_1.testWebCommandDefinition,
61
- update_configs_command_1.updateConfigsCommandDefinition,
62
- ],
63
- });
1
+ import { virmatorCompilePlugin } from '@virmator/compile';
2
+ import { virmatorDepsPlugin } from '@virmator/deps';
3
+ import { virmatorDocsPlugin } from '@virmator/docs';
4
+ import { virmatorFormatPlugin } from '@virmator/format';
5
+ import { virmatorFrontendPlugin } from '@virmator/frontend';
6
+ import { virmatorHelpPlugin } from '@virmator/help';
7
+ import { virmatorInitPlugin } from '@virmator/init';
8
+ import { virmatorLintPlugin } from '@virmator/lint';
9
+ import { virmatorPublishPlugin } from '@virmator/publish';
10
+ import { virmatorSpellcheckPlugin } from '@virmator/spellcheck';
11
+ import { virmatorTestPlugin } from '@virmator/test';
12
+ /** Default list of plugins that the virmator npm package's CLI uses. */
13
+ export const defaultVirmatorPlugins = [
14
+ virmatorCompilePlugin,
15
+ virmatorDepsPlugin,
16
+ virmatorDocsPlugin,
17
+ virmatorFormatPlugin,
18
+ virmatorFrontendPlugin,
19
+ virmatorHelpPlugin,
20
+ virmatorInitPlugin,
21
+ virmatorLintPlugin,
22
+ virmatorPublishPlugin,
23
+ virmatorSpellcheckPlugin,
24
+ virmatorTestPlugin,
25
+ ];
@@ -0,0 +1,3 @@
1
+ import { TestPluginOptions } from '@virmator/plugin-testing';
2
+ import { TestContext } from 'node:test';
3
+ export declare function testVirmator(shouldPass: boolean, context: TestContext, command: string, cwd: string, testOptions?: TestPluginOptions): Promise<void>;
@@ -0,0 +1,5 @@
1
+ import { testPlugin } from '@virmator/plugin-testing';
2
+ import { defaultVirmatorPlugins } from '../index';
3
+ export async function testVirmator(shouldPass, context, command, cwd, testOptions = {}) {
4
+ await testPlugin(shouldPass, context, defaultVirmatorPlugins, command, cwd, testOptions);
5
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "virmator",
3
- "version": "12.0.4",
3
+ "version": "13.0.2",
4
4
  "description": "Handle common package configs, commands, and dependencies.",
5
5
  "keywords": [
6
6
  "automation",
@@ -20,85 +20,41 @@
20
20
  "type": "git",
21
21
  "url": "git+https://github.com/electrovir/virmator.git"
22
22
  },
23
- "license": "MIT",
23
+ "license": "(MIT or CC0 1.0)",
24
24
  "author": {
25
25
  "name": "electrovir",
26
26
  "url": "https://github.com/electrovir"
27
27
  },
28
+ "type": "module",
28
29
  "main": "dist/index.js",
30
+ "module": "dist/index.js",
29
31
  "types": "dist/index.d.ts",
30
- "bin": "dist/cli.js",
32
+ "bin": "src/cli.ts",
31
33
  "scripts": {
32
- "compile": "rm -rf dist && tsc",
33
- "docs": "npm run compile && ts-node src/scripts/save-help-message.ts && md-code README.md",
34
- "docs:check": "npm run compile && ts-node src/scripts/save-help-message.ts check && md-code --check README.md",
35
- "format": "npm run format:base -- --write --list-different",
36
- "format:base": "prettier \"./**/*.+(ts|json|html|css|md|js)\" --config .prettierrc.js",
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.cjs",
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
- "test:format": "npm run format:base -- --check",
41
- "test:help": "ts-node src/cli/cli.ts --help",
42
- "test:spelling": "cspell \"{*,.*,**/{.*,*}/**/{.*,*}}\" --exclude \"test-files/spellcheck/invalid-spellcheck-repo/**/*\" --exclude \"extender-configs\"",
43
- "test:types": "tsc --noEmit"
34
+ "compile": "virmator compile",
35
+ "test": "virmator test node",
36
+ "test:coverage": "npm test coverage",
37
+ "test:update": "npm test update"
44
38
  },
45
39
  "dependencies": {
46
- "@augment-vir/common": "^29.3.0",
47
40
  "@augment-vir/node-js": "^29.3.0",
48
- "ansi-colors": "^4.1.3",
49
- "concurrently": "^8.2.2",
50
- "fs-extra": "^11.2.0",
51
- "glob": "^8.1.0",
52
- "glob-promise": "^6.0.7",
53
- "mono-vir": "^1.0.1",
54
- "semver": "^7.6.3",
55
- "simple-git": "^3.25.0",
56
- "type-fest": "^4.22.1"
41
+ "@virmator/compile": "^13.0.2",
42
+ "@virmator/core": "^13.0.2",
43
+ "@virmator/deps": "^13.0.2",
44
+ "@virmator/docs": "^13.0.2",
45
+ "@virmator/format": "^13.0.2",
46
+ "@virmator/frontend": "^13.0.2",
47
+ "@virmator/help": "^13.0.2",
48
+ "@virmator/init": "^13.0.2",
49
+ "@virmator/lint": "^13.0.2",
50
+ "@virmator/publish": "^13.0.2",
51
+ "@virmator/spellcheck": "^13.0.2",
52
+ "@virmator/test": "^13.0.2",
53
+ "tsx": "^4.16.5"
57
54
  },
58
55
  "devDependencies": {
59
- "@electrovir/nyc": "15.1.0-fix0",
60
- "@istanbuljs/nyc-config-typescript": "^1.0.2",
61
- "@open-wc/testing": "^4.0.0",
62
- "@types/chai": "^4.3.16",
63
- "@types/fs-extra": "^11.0.4",
64
- "@types/glob": "^8.1.0",
65
- "@types/mocha": "^10.0.7",
66
- "@types/node": "^20.14.11",
67
- "@types/semver": "^7.5.8",
68
- "@web/dev-server-esbuild": "^1.0.2",
69
- "@web/test-runner": "^0.18.2",
70
- "@web/test-runner-commands": "^0.9.0",
71
- "@web/test-runner-playwright": "^0.11.0",
72
- "@web/test-runner-visual-regression": "^0.9.0",
73
- "chai": "^4.3.10",
74
- "cspell": "^8.11.0",
75
- "dependency-cruiser": "^16.3.7",
76
- "element-vir": "^22.2.2",
77
- "esbuild": "^0.23.0",
78
- "istanbul-smart-text-reporter": "^1.1.4",
79
- "markdown-code-example-inserter": "^1.0.0",
80
- "mocha": "^10.6.0",
81
- "mocha-spec-reporter-with-file-names": "^0.0.3",
82
- "npm-check-updates": "~16.12.3",
83
- "prettier": "^3.3.3",
84
- "prettier-plugin-interpolated-html-tags": "^1.0.5",
85
- "prettier-plugin-jsdoc": "^1.3.0",
86
- "prettier-plugin-multiline-arrays": "^3.0.6",
87
- "prettier-plugin-organize-imports": "^4.0.0",
88
- "prettier-plugin-packagejson": "^2.5.1",
89
- "prettier-plugin-sort-json": "^4.0.0",
90
- "prettier-plugin-toml": "^2.0.1",
91
- "test-as-package": "^1.0.0",
92
- "test-established-expectations": "^1.0.0",
93
- "ts-node": "^10.9.2",
94
- "tsconfig-paths": "^4.2.0",
95
- "typedoc": "^0.26.4",
96
- "typescript": "^5.5.3",
97
- "virmator": "^12.0.2",
98
- "vite": "^4.5.0",
99
- "vite-tsconfig-paths": "^4.3.2"
100
- },
101
- "overrides": {
102
- "virmator": "*"
56
+ "@types/node": "^22.1.0",
57
+ "c8": "^10.1.2",
58
+ "istanbul-smart-text-reporter": "^1.1.4"
103
59
  }
104
60
  }
package/src/cli.ts ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env -S npx tsx
2
+
3
+ import {
4
+ createPluginLogger,
5
+ executeVirmatorCommand,
6
+ hideNoTraceTraces,
7
+ VirmatorNoTraceError,
8
+ } from '@virmator/core';
9
+ import {fileURLToPath} from 'node:url';
10
+ import {defaultVirmatorPlugins} from './index';
11
+
12
+ const log = createPluginLogger(process);
13
+
14
+ executeVirmatorCommand({
15
+ cliCommand: process.argv,
16
+ plugins: defaultVirmatorPlugins,
17
+ entryPointFilePath: fileURLToPath(import.meta.url),
18
+ log,
19
+ }).catch((error: unknown) => {
20
+ if (error instanceof VirmatorNoTraceError && hideNoTraceTraces) {
21
+ if (error.message) {
22
+ log.error(error.message);
23
+ }
24
+ } else {
25
+ log.error(error);
26
+ }
27
+
28
+ process.exit(1);
29
+ });
package/src/index.ts ADDED
@@ -0,0 +1,26 @@
1
+ import {virmatorCompilePlugin} from '@virmator/compile';
2
+ import {virmatorDepsPlugin} from '@virmator/deps';
3
+ import {virmatorDocsPlugin} from '@virmator/docs';
4
+ import {virmatorFormatPlugin} from '@virmator/format';
5
+ import {virmatorFrontendPlugin} from '@virmator/frontend';
6
+ import {virmatorHelpPlugin} from '@virmator/help';
7
+ import {virmatorInitPlugin} from '@virmator/init';
8
+ import {virmatorLintPlugin} from '@virmator/lint';
9
+ import {virmatorPublishPlugin} from '@virmator/publish';
10
+ import {virmatorSpellcheckPlugin} from '@virmator/spellcheck';
11
+ import {virmatorTestPlugin} from '@virmator/test';
12
+
13
+ /** Default list of plugins that the virmator npm package's CLI uses. */
14
+ export const defaultVirmatorPlugins = [
15
+ virmatorCompilePlugin,
16
+ virmatorDepsPlugin,
17
+ virmatorDocsPlugin,
18
+ virmatorFormatPlugin,
19
+ virmatorFrontendPlugin,
20
+ virmatorHelpPlugin,
21
+ virmatorInitPlugin,
22
+ virmatorLintPlugin,
23
+ virmatorPublishPlugin,
24
+ virmatorSpellcheckPlugin,
25
+ virmatorTestPlugin,
26
+ ];
@@ -0,0 +1,13 @@
1
+ import {testPlugin, TestPluginOptions} from '@virmator/plugin-testing';
2
+ import {TestContext} from 'node:test';
3
+ import {defaultVirmatorPlugins} from '../index';
4
+
5
+ export async function testVirmator(
6
+ shouldPass: boolean,
7
+ context: TestContext,
8
+ command: string,
9
+ cwd: string,
10
+ testOptions: TestPluginOptions = {},
11
+ ) {
12
+ await testPlugin(shouldPass, context, defaultVirmatorPlugins, command, cwd, testOptions);
13
+ }
@@ -1,272 +0,0 @@
1
- const baseConfig = {
2
- ignorePaths: [
3
- '.DS_Store',
4
- '.git/',
5
- '*.docx',
6
- '*.mp4',
7
- '*.otf',
8
- '*.sqlite',
9
- '*.tgz',
10
- '**/.not-committed/',
11
- '**/build/',
12
- '**/coverage/',
13
- '**/dist-*/',
14
- '**/dist/',
15
- '**/graphics/',
16
- '**/node_modules/',
17
- 'generated-config-*',
18
- 'package-lock.json',
19
- 'tsconfig.tsbuildinfo',
20
- ],
21
- version: '0.2',
22
- words: [
23
- 'accum',
24
- 'adak',
25
- 'addis_ababa',
26
- 'anadyr',
27
- 'apca',
28
- 'aqtau',
29
- 'aqtobe',
30
- 'araguaina',
31
- 'argb',
32
- 'atikokan',
33
- 'atyrau',
34
- 'autocorrect',
35
- 'autofix',
36
- 'autofixable',
37
- 'autofixing',
38
- 'bahia_banderas',
39
- 'bazel',
40
- 'bignumber',
41
- 'blanc-sablon',
42
- 'bowser',
43
- 'browserconfig',
44
- 'browserlist',
45
- 'browserslist',
46
- 'catamarca',
47
- 'checkmark',
48
- 'choibalsan',
49
- 'chuuk',
50
- 'codegen',
51
- 'codeowners',
52
- 'colorjs',
53
- 'combinator',
54
- 'combinators',
55
- 'comodrivadavia',
56
- 'costa_rica',
57
- 'cpsell',
58
- 'creston',
59
- 'cuiaba',
60
- 'danmarkshavn',
61
- 'darkgreen',
62
- 'darkred',
63
- 'datamodel',
64
- 'datasource',
65
- 'datetime',
66
- 'deduped',
67
- 'depcruise',
68
- 'derp',
69
- 'describedby',
70
- 'devs',
71
- 'dexie',
72
- 'dili',
73
- 'dmmf',
74
- 'docgen',
75
- 'dodgerblue',
76
- 'drawio',
77
- 'dumontdurville',
78
- 'efate',
79
- 'eirunepe',
80
- 'el_aaiun',
81
- 'electrovir',
82
- 'enderbury',
83
- 'ensenada',
84
- 'entrypoint',
85
- 'entrypoints',
86
- 'esbenp',
87
- 'esbuild',
88
- 'estree',
89
- 'eucla',
90
- 'evenodd',
91
- 'evir',
92
- 'exitcrash',
93
- 'fakaofo',
94
- 'faunadb',
95
- 'firestore',
96
- 'fleek',
97
- 'fontawesome',
98
- 'fontsource',
99
- 'gamepad',
100
- 'gitattributes',
101
- 'globbing',
102
- 'globby',
103
- 'globstar',
104
- 'hardline',
105
- 'hcaptcha',
106
- 'heightmaps',
107
- 'ho_chi_minh',
108
- 'hovd',
109
- 'htmliframeelement',
110
- 'iframe',
111
- 'iframes',
112
- 'inconsolata',
113
- 'indexeddb',
114
- 'inuvik',
115
- 'jan_mayen',
116
- 'jetpack',
117
- 'jsonifiable',
118
- 'jsonify',
119
- 'jsplugin',
120
- 'jujuy',
121
- 'kanton',
122
- 'khandyga',
123
- 'kiritimati',
124
- 'kolkata',
125
- 'kosrae',
126
- 'kuala_lumpur',
127
- 'la_rioja',
128
- 'labelledby',
129
- 'lexend',
130
- 'lfsr',
131
- 'licensecheck',
132
- 'limnah',
133
- 'lindeman',
134
- 'listbox',
135
- 'localforage',
136
- 'localmodule',
137
- 'localstorage',
138
- 'locationchange',
139
- 'longterm',
140
- 'luxon',
141
- 'macquarie',
142
- 'magadan',
143
- 'mahe',
144
- 'manaus',
145
- 'marvinpinto',
146
- 'mcmurdo',
147
- 'mdast',
148
- 'mergeable',
149
- 'metlakatla',
150
- 'millis',
151
- 'minecraft',
152
- 'mmultiline',
153
- 'mocharc',
154
- 'monospace',
155
- 'mpath',
156
- 'msapplication',
157
- 'mstile',
158
- 'ncurc',
159
- 'nipigon',
160
- 'nodir',
161
- 'nojekyll',
162
- 'noopener',
163
- 'noreferrer',
164
- 'noronha',
165
- 'npmchecker',
166
- 'npmignore',
167
- 'nuuk',
168
- 'nvmrc',
169
- 'nycrc',
170
- 'observavir',
171
- 'ojinaga',
172
- 'openlogin',
173
- 'opentype',
174
- 'outfile',
175
- 'packagejson',
176
- 'pago_pago',
177
- 'pako',
178
- 'pangnirtung',
179
- 'parens',
180
- 'pdfs',
181
- 'peta',
182
- 'phnom_penh',
183
- 'pibling',
184
- 'pkgid',
185
- 'pohnpei',
186
- 'port_moresby',
187
- 'portfinder',
188
- 'porto_velho',
189
- 'postpack',
190
- 'postpublish',
191
- 'postupgrade',
192
- 'preinstall',
193
- 'premajor',
194
- 'preminor',
195
- 'prepatch',
196
- 'prettierignore',
197
- 'prettierrc',
198
- 'preupgrade',
199
- 'prismjs',
200
- 'promisable',
201
- 'protobuf',
202
- 'punta_arenas',
203
- 'pushstate',
204
- 'qostanay',
205
- 'qyzylorda',
206
- 'referrerpolicy',
207
- 'regen',
208
- 'rehype',
209
- 'replacestate',
210
- 'repos',
211
- 'revparse',
212
- 'rgba',
213
- 'rio_branco',
214
- 'roboto',
215
- 'rothera',
216
- 'santarem',
217
- 'santo_domingo',
218
- 'sao_paulo',
219
- 'scandir',
220
- 'scoresbysund',
221
- 'sigint',
222
- 'sigterm',
223
- 'skyblue',
224
- 'sonarjs',
225
- 'srednekolymsk',
226
- 'st_kitts',
227
- 'stackoverflow',
228
- 'stylelint',
229
- 'stylelintrc',
230
- 'sublicensable',
231
- 'svgr',
232
- 'svgs',
233
- 'syowa',
234
- 'tabbable',
235
- 'tabindex',
236
- 'tel_aviv',
237
- 'thingie',
238
- 'threejs',
239
- 'tiktok',
240
- 'tiraspol',
241
- 'tongatapu',
242
- 'transpiled',
243
- 'transpiling',
244
- 'truetype',
245
- 'tsbuildinfo',
246
- 'typeof',
247
- 'ulaanbaatar',
248
- 'uncompiled',
249
- 'uncomposable',
250
- 'unist',
251
- 'unlisten',
252
- 'ushuaia',
253
- 'ust-nera',
254
- 'uzhgorod',
255
- 'vevay',
256
- 'vira',
257
- 'virmator',
258
- 'vite',
259
- 'vitejs',
260
- 'websql',
261
- 'winamac',
262
- 'xlink',
263
- 'yakutat',
264
- 'yotta',
265
- 'zetta',
266
- "config's",
267
- "repo's",
268
- "virmator's",
269
- ],
270
- };
271
-
272
- module.exports = {baseConfig};
@@ -1,20 +0,0 @@
1
- const testFiles = require('./test-files-glob.js');
2
- const SpecReporterWithFileNames = require('mocha-spec-reporter-with-file-names');
3
-
4
- const oneMinuteMs = 60_000;
5
-
6
- /** @type {import('mocha').MochaOptions} */
7
- const mochaConfig = {
8
- checkLeaks: true,
9
- color: true,
10
- parallel: true,
11
- require: ['ts-node/register'],
12
- slow: oneMinuteMs,
13
- fullTrace: true,
14
- timeout: 20 * oneMinuteMs,
15
- reporter: SpecReporterWithFileNames.pathToThisReporter,
16
- watchFiles: ['src/**/*.ts'],
17
- ...testFiles,
18
- };
19
-
20
- module.exports = mochaConfig;
@@ -1,40 +0,0 @@
1
- 'use strict';
2
-
3
- function getBaseConfigWithCoveragePercent(percent = 0) {
4
- return {
5
- // only works with @electrovir/nyc
6
- failBelow: percent,
7
-
8
- branches: percent,
9
- functions: percent,
10
- lines: percent,
11
- statements: percent,
12
-
13
- extends: '@istanbuljs/nyc-config-typescript',
14
- all: true,
15
- clean: true,
16
- cache: true,
17
- instrument: true,
18
- // use the reporter (istanbul-smart-text-reporter) to fail instead of printing errors for
19
- // every message
20
- checkCoverage: false,
21
- exclude: [
22
- '**/*.test.ts',
23
- '**/*.example.ts',
24
- '**/*.type.test.ts',
25
- '**/*.test-helper.ts',
26
- ],
27
- include: ['src/**/*.ts'],
28
- // so we don't get error messages printed for every file
29
- perFile: false,
30
- reporter: [
31
- 'html',
32
- 'istanbul-smart-text-reporter',
33
- ],
34
- skipEmpty: true,
35
- skipFull: true,
36
- tempDir: './node_modules/.nyc-output/',
37
- };
38
- }
39
-
40
- module.exports = {getBaseConfigWithCoveragePercent};
@@ -1,32 +0,0 @@
1
- /**
2
- * @typedef {import('prettier-plugin-multiline-arrays').MultilineArrayOptions} MultilineOptions
3
- *
4
- * @typedef {import('prettier').Options} PrettierOptions
5
- * @type {PrettierOptions & MultilineOptions}
6
- */
7
- const basePrettierConfig = {
8
- arrowParens: 'always',
9
- bracketSameLine: false,
10
- bracketSpacing: false,
11
- endOfLine: 'lf',
12
- htmlWhitespaceSensitivity: 'ignore',
13
- jsonRecursiveSort: true,
14
- multilineArraysWrapThreshold: 1,
15
- plugins: [
16
- 'prettier-plugin-toml',
17
- 'prettier-plugin-sort-json',
18
- 'prettier-plugin-packagejson',
19
- 'prettier-plugin-multiline-arrays',
20
- 'prettier-plugin-organize-imports',
21
- 'prettier-plugin-jsdoc',
22
- 'prettier-plugin-interpolated-html-tags',
23
- ],
24
- printWidth: 100,
25
- singleQuote: true,
26
- tabWidth: 4,
27
- trailingComma: 'all',
28
- };
29
-
30
- module.exports = {
31
- basePrettierConfig,
32
- };