virmator 1.4.5 → 2.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 (57) hide show
  1. package/.cspell.json +1 -0
  2. package/.github/workflows/virmator-prerelease.yml +9 -4
  3. package/.github/workflows/virmator-tests.yml +1 -1
  4. package/.prettierignore +3 -2
  5. package/README.md +161 -1
  6. package/dist/augments/ansi-regex.d.ts +1 -0
  7. package/dist/augments/ansi-regex.js +27 -0
  8. package/dist/augments/string.d.ts +1 -0
  9. package/dist/augments/string.js +8 -0
  10. package/dist/cli/cli-util/cli-flags.js +7 -10
  11. package/dist/cli/cli-util/get-all-command-output.d.ts +4 -3
  12. package/dist/cli/cli-util/shell-command-wrapper.d.ts +1 -1
  13. package/dist/cli/cli-util/shell-command-wrapper.js +2 -2
  14. package/dist/cli/cli-util/update-configs.js +6 -5
  15. package/dist/cli/cli.js +1 -1
  16. package/dist/cli/commands/all-cli-commands.d.ts +2 -0
  17. package/dist/cli/commands/all-cli-commands.js +31 -27
  18. package/dist/cli/commands/cli-command.d.ts +10 -1
  19. package/dist/cli/commands/cli-command.js +1 -1
  20. package/dist/cli/commands/description-printing.d.ts +10 -0
  21. package/dist/cli/commands/description-printing.js +149 -0
  22. package/dist/cli/commands/implementations/code-in-markdown.command.js +29 -22
  23. package/dist/cli/commands/implementations/compile.command.js +20 -8
  24. package/dist/cli/commands/implementations/format.command.js +54 -40
  25. package/dist/cli/commands/implementations/init.command.js +13 -4
  26. package/dist/cli/commands/implementations/spellcheck.command.js +10 -1
  27. package/dist/cli/commands/implementations/test.command.js +30 -27
  28. package/dist/cli/commands/implementations/update-all-configs.command.js +23 -14
  29. package/dist/cli/commands/implementations/update-bare-configs.command.js +23 -15
  30. package/dist/cli/commands/run-command.js +2 -3
  31. package/dist/cli/config/config-key.d.ts +13 -9
  32. package/dist/cli/config/config-key.js +6 -4
  33. package/dist/cli/config/config-paths.js +11 -1
  34. package/dist/cli/config/config-read.js +1 -2
  35. package/dist/cli/config/copy-config.js +3 -3
  36. package/dist/cli/config/create-default-package-json.js +2 -2
  37. package/dist/cli/config/extendable-config.js +3 -3
  38. package/dist/errors/cli-command-error.js +3 -3
  39. package/dist/errors/cli-flag-error.js +3 -3
  40. package/dist/errors/config-file-error.js +1 -4
  41. package/dist/exportable-jest-config/jest-config.d.ts +3 -0
  42. package/dist/exportable-jest-config/jest-config.js +23 -0
  43. package/dist/exportable-jest-config/jest-setup.d.ts +1 -0
  44. package/dist/exportable-jest-config/jest-setup.js +11 -0
  45. package/dist/file-paths/virmator-repo-paths.js +4 -4
  46. package/dist/file-paths/{virmator-test-repos-paths.d.ts → virmator-test-file-paths.d.ts} +2 -0
  47. package/dist/index.d.ts +2 -0
  48. package/dist/index.js +6 -0
  49. package/dist/jest/jest-config.d.ts +3 -0
  50. package/dist/jest/jest-config.js +13 -0
  51. package/package.json +29 -23
  52. package/separate-configs/gitignore.txt +2 -0
  53. package/separate-configs/jest/jest-config.ts +24 -0
  54. package/separate-configs/jest/jest-setup.ts +12 -0
  55. package/separate-configs/npmignore.txt +7 -4
  56. package/tsconfig.json +13 -6
  57. package/dist/file-paths/virmator-test-repos-paths.js +0 -56
@@ -1,56 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateAllConfigsTestPaths = exports.updateBareConfigsTestPaths = exports.spellcheckTestPaths = exports.testTestPaths = exports.testCompilePaths = exports.testFormatPaths = exports.getCommandTestRepoDir = exports.createNodeModulesSymLinkForTests = void 0;
4
- const node_1 = require("augment-vir/dist/node");
5
- const path_1 = require("path");
6
- const cli_command_name_1 = require("../cli/cli-util/cli-command-name");
7
- const virmator_repo_paths_1 = require("./virmator-repo-paths");
8
- async function createNodeModulesSymLinkForTests(dir) {
9
- const symlinkPath = (0, path_1.join)(dir, 'node_modules');
10
- await (0, node_1.createSymLink)((0, path_1.join)(virmator_repo_paths_1.virmatorRootDir, 'node_modules'), symlinkPath);
11
- return symlinkPath;
12
- }
13
- exports.createNodeModulesSymLinkForTests = createNodeModulesSymLinkForTests;
14
- const testRepos = (0, path_1.join)(virmator_repo_paths_1.virmatorRootDir, 'test-repos');
15
- function getCommandTestRepoDir(command) {
16
- return (0, path_1.join)(testRepos, command);
17
- }
18
- exports.getCommandTestRepoDir = getCommandTestRepoDir;
19
- const formatTestRepos = getCommandTestRepoDir(cli_command_name_1.CliCommandName.Format);
20
- const invalidFormatRepo = (0, path_1.join)(formatTestRepos, 'invalid-format-repo');
21
- exports.testFormatPaths = {
22
- validRepo: (0, path_1.join)(formatTestRepos, 'valid-format-repo'),
23
- invalidRepo: invalidFormatRepo,
24
- invalidSourceFile: (0, path_1.join)(invalidFormatRepo, 'invalid-format.ts'),
25
- };
26
- const compileTestRepos = getCommandTestRepoDir(cli_command_name_1.CliCommandName.Compile);
27
- const validCompileRepo = (0, path_1.join)(compileTestRepos, 'valid-compile-repo');
28
- const invalidCompileRepo = (0, path_1.join)(compileTestRepos, 'invalid-compile-repo');
29
- exports.testCompilePaths = {
30
- validRepo: validCompileRepo,
31
- validSourceFile: (0, path_1.join)(validCompileRepo, 'blah.ts'),
32
- compiledValidSourceFile: (0, path_1.join)(validCompileRepo, 'blah.js'),
33
- invalidRepo: invalidCompileRepo,
34
- invalidSourceFile: (0, path_1.join)(invalidCompileRepo, 'bad-blah.ts'),
35
- compiledInvalidSourceFile: (0, path_1.join)(invalidCompileRepo, 'bad-blah.js'),
36
- };
37
- const testTestRepos = getCommandTestRepoDir(cli_command_name_1.CliCommandName.Test);
38
- exports.testTestPaths = {
39
- validRepo: (0, path_1.join)(testTestRepos, 'valid-test-repo'),
40
- invalidRepo: (0, path_1.join)(testTestRepos, 'invalid-test-repo'),
41
- multiRepo: (0, path_1.join)(testTestRepos, 'multi-test-repo'),
42
- };
43
- const spellcheckTestRepos = getCommandTestRepoDir(cli_command_name_1.CliCommandName.SpellCheck);
44
- exports.spellcheckTestPaths = {
45
- validRepo: (0, path_1.join)(spellcheckTestRepos, 'valid-spellcheck-repo'),
46
- invalidRepo: (0, path_1.join)(spellcheckTestRepos, 'invalid-spellcheck-repo'),
47
- hiddenStuffRepo: (0, path_1.join)(spellcheckTestRepos, 'hidden-stuff-spellcheck-repo'),
48
- };
49
- const updateBareConfigsTestRepos = getCommandTestRepoDir(cli_command_name_1.CliCommandName.UpdateBareConfigs);
50
- exports.updateBareConfigsTestPaths = {
51
- emptyRepo: (0, path_1.join)(updateBareConfigsTestRepos, 'empty-update-bare-configs-repo'),
52
- };
53
- const updateAllConfigsTestRepos = getCommandTestRepoDir(cli_command_name_1.CliCommandName.UpdateAllConfigs);
54
- exports.updateAllConfigsTestPaths = {
55
- fullPackageJsonRepo: (0, path_1.join)(updateAllConfigsTestRepos, 'full-package-json-repo'),
56
- };