virmator 1.3.8 → 1.4.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/.cspell.json CHANGED
@@ -11,32 +11,47 @@
11
11
  "version": "0.2",
12
12
  "words": [
13
13
  "accum",
14
- "adipiscing",
15
- "amet",
16
- "andymckay",
17
14
  "argb",
18
15
  "autofix",
19
16
  "autofixable",
20
17
  "autofixing",
18
+ "browserconfig",
19
+ "combinator",
20
+ "combinators",
21
21
  "config's",
22
- "consectetur",
23
22
  "cpsell",
24
23
  "derp",
25
24
  "derpy",
26
25
  "electrovir",
26
+ "entrypoint",
27
27
  "entrypoints",
28
28
  "esbenp",
29
+ "estree",
30
+ "fleek",
29
31
  "gitattributes",
32
+ "globbing",
30
33
  "globstar",
34
+ "inconsolata",
35
+ "lexend",
36
+ "lfsr",
31
37
  "locationchange",
32
38
  "marvinpinto",
39
+ "mmultiline",
40
+ "monospace",
41
+ "msapplication",
42
+ "mstile",
33
43
  "nojekyll",
44
+ "noopener",
45
+ "noreferrer",
34
46
  "npmignore",
35
47
  "packagejson",
36
48
  "parens",
37
49
  "pdfs",
50
+ "postupgrade",
38
51
  "prettierignore",
39
52
  "prettierrc",
53
+ "preupgrade",
54
+ "protobuf",
40
55
  "pushstate",
41
56
  "replacestate",
42
57
  "repo's",
@@ -44,13 +59,17 @@
44
59
  "rgba",
45
60
  "stylelint",
46
61
  "stylelintrc",
47
- "subcommand",
62
+ "tabbable",
63
+ "tabindex",
48
64
  "thingie",
49
65
  "threejs",
50
66
  "transpiled",
51
67
  "transpiling",
52
68
  "typeof",
53
69
  "virmator's",
54
- "virmator"
70
+ "virmator",
71
+ "vite",
72
+ "vitejs",
73
+ "xlink"
55
74
  ]
56
75
  }
@@ -26,18 +26,17 @@ jobs:
26
26
  id: vars
27
27
  run: |
28
28
  branchName="${GITHUB_REF#refs/*/}"
29
- echo ::set-output name=short_ref::"$branchName"
29
+ echo ::set-output name=prereleaseTagName::"$branchName-$GITHUB_SHA"
30
30
 
31
31
  originalTarName="$(npm pack)"
32
32
  packageName="$(npm -s run env echo '$npm_package_name')"
33
- timeStamp="$(date +%s)"
34
- newTarName="$packageName-$timeStamp.tgz"
33
+ newTarName="$packageName-$GITHUB_SHA.tgz"
35
34
  mv "$originalTarName" "$newTarName"
36
- echo ::set-output name=tar_name::"$newTarName"
35
+ echo ::set-output name=tarName::"$newTarName"
37
36
  - uses: 'marvinpinto/action-automatic-releases@latest'
38
37
  with:
39
38
  repo_token: '${{ secrets.GITHUB_TOKEN }}'
40
- automatic_release_tag: 'prerelease-${{ steps.vars.outputs.short_ref }}'
39
+ automatic_release_tag: 'prerelease-${{ steps.vars.outputs.prereleaseTagName }}'
41
40
  prerelease: true
42
41
  files: |
43
- ${{ steps.vars.outputs.tar_name }}
42
+ ${{ steps.vars.outputs.tarName }}
@@ -20,8 +20,19 @@ jobs:
20
20
  run: |
21
21
  npm ci
22
22
  npm run test:full
23
+ - name: pack and set vars
24
+ id: vars
25
+ run: |
26
+ tagName="${GITHUB_REF#refs/*/}"
27
+ originalTarName="$(npm pack)"
28
+ packageName="$(npm -s run env echo '$npm_package_name')"
29
+ newTarName="$packageName-$tagName.tgz"
30
+ mv "$originalTarName" "$newTarName"
31
+ echo ::set-output name=tarName::"$newTarName"
23
32
 
24
33
  - uses: 'marvinpinto/action-automatic-releases@latest'
25
34
  with:
26
35
  repo_token: '${{ secrets.GITHUB_TOKEN }}'
27
36
  prerelease: false
37
+ files: |
38
+ ${{ steps.vars.outputs.tarName }}
package/.prettierrc.js CHANGED
@@ -4,9 +4,11 @@ const path = require('path');
4
4
  const plugins = [
5
5
  'prettier-plugin-sort-json',
6
6
  'prettier-plugin-packagejson',
7
+ 'prettier-plugin-multiline-arrays',
7
8
  'prettier-plugin-organize-imports',
8
9
  'prettier-plugin-jsdoc',
9
10
  ].map((pluginName) => {
11
+ // account for installations where deps are flattened and installations where they're nested
10
12
  const defaultPath = `./node_modules/${pluginName}`;
11
13
  if (fs.existsSync(path.resolve(__dirname, defaultPath))) {
12
14
  return defaultPath;
@@ -15,10 +17,18 @@ const plugins = [
15
17
  }
16
18
  });
17
19
 
18
- module.exports = {
20
+ /**
21
+ * @typedef {import('prettier-plugin-multiline-arrays').MultilineArrayOptions} MultilineOptions
22
+ *
23
+ * @typedef {import('prettier').Options} PrettierOptions
24
+ * @type {PrettierOptions & MultilineOptions}
25
+ */
26
+ const prettierConfig = {
19
27
  arrowParens: 'always',
20
28
  bracketSpacing: false,
21
29
  endOfLine: 'lf',
30
+ // Arrays with just a single element don't wrap. But after that, they always wrap.
31
+ multilineArrayWrapThreshold: 1,
22
32
  htmlWhitespaceSensitivity: 'ignore',
23
33
  jsonRecursiveSort: true,
24
34
  bracketSameLine: false,
@@ -28,3 +38,5 @@ module.exports = {
28
38
  tabWidth: 4,
29
39
  trailingComma: 'all',
30
40
  };
41
+
42
+ module.exports = prettierConfig;
@@ -64,7 +64,7 @@ function runHelpCommand({ stdoutCallback }) {
64
64
  })
65
65
  .join('\n ');
66
66
  const helpMessage = `${cli_color_1.Color.Info} ${package_name_1.packageName} usage:${cli_color_1.Color.Reset}
67
- [npx] ${package_name_1.packageName} [--flags] command subcommand
67
+ [npx] ${package_name_1.packageName} [--flags] command subCommand
68
68
 
69
69
  npx is needed when the command is run directly from the terminal
70
70
  (not scoped within an npm script) unless the package has been globally installed
@@ -16,7 +16,17 @@ var FormatOperation;
16
16
  exports.defaultFormatArgs = {
17
17
  operation: FormatOperation.Write,
18
18
  prettierFlags: [],
19
- fileExtensions: ['ts', 'tsx', 'json', 'html', 'css', 'md', 'js', 'yml', 'yaml'],
19
+ fileExtensions: [
20
+ 'ts',
21
+ 'tsx',
22
+ 'json',
23
+ 'html',
24
+ 'css',
25
+ 'md',
26
+ 'js',
27
+ 'yml',
28
+ 'yaml',
29
+ ],
20
30
  };
21
31
  exports.filesMarkerArg = '--format-files';
22
32
  exports.formatImplementation = {
@@ -57,7 +67,10 @@ exports.formatImplementation = {
57
67
  ${package_name_1.packageName} ${cli_command_name_1.CliCommandName.Format} --ignore-path .prettierignore
58
68
  ${package_name_1.packageName} ${cli_command_name_1.CliCommandName.Format} ${FormatOperation.Write} --ignore-path .prettierignore
59
69
  ${package_name_1.packageName} ${cli_command_name_1.CliCommandName.Format} ${FormatOperation.Write} --ignore-path .prettierignore ${exports.filesMarkerArg} md json`,
60
- configKeys: [config_key_1.ConfigKey.Prettier, config_key_1.ConfigKey.PrettierIgnore],
70
+ configKeys: [
71
+ config_key_1.ConfigKey.Prettier,
72
+ config_key_1.ConfigKey.PrettierIgnore,
73
+ ],
61
74
  implementation: runFormatCommand,
62
75
  configFlagSupport: {
63
76
  [cli_flags_1.CliFlagName.NoWriteConfig]: true,
@@ -7,7 +7,10 @@ const cli_command_name_1 = require("../../cli-util/cli-command-name");
7
7
  const cli_flags_1 = require("../../cli-util/cli-flags");
8
8
  const update_configs_1 = require("../../cli-util/update-configs");
9
9
  const config_key_1 = require("../../config/config-key");
10
- const exampleFlags = [config_key_1.ConfigKey.Cspell, config_key_1.ConfigKey.GitIgnore];
10
+ const exampleFlags = [
11
+ config_key_1.ConfigKey.Cspell,
12
+ config_key_1.ConfigKey.GitIgnore,
13
+ ];
11
14
  exports.updateAllConfigsCommandImplementation = {
12
15
  commandName: cli_command_name_1.CliCommandName.UpdateAllConfigs,
13
16
  description: `Update all config files.
@@ -7,7 +7,10 @@ const cli_command_name_1 = require("../../cli-util/cli-command-name");
7
7
  const cli_flags_1 = require("../../cli-util/cli-flags");
8
8
  const update_configs_1 = require("../../cli-util/update-configs");
9
9
  const config_key_1 = require("../../config/config-key");
10
- const exampleFlags = [config_key_1.BareConfigKey.GitIgnore, config_key_1.BareConfigKey.NpmIgnore];
10
+ const exampleFlags = [
11
+ config_key_1.BareConfigKey.GitIgnore,
12
+ config_key_1.BareConfigKey.NpmIgnore,
13
+ ];
11
14
  exports.updateBareConfigsCommandImplementation = {
12
15
  commandName: cli_command_name_1.CliCommandName.UpdateBareConfigs,
13
16
  description: `Update config files that aren't used in any ${package_name_1.packageName} commands,
@@ -58,7 +58,10 @@ async function updateVirmatorConfig(configKey, repoDir, extendable) {
58
58
  const repoFileLines = repoConfigContents.split('\n');
59
59
  const virmatorFileLines = virmatorConfigContents.split('\n');
60
60
  const filteredRepoFileLines = repoFileLines.filter((repoLine) => !virmatorFileLines.includes(repoLine));
61
- return [...virmatorFileLines, ...filteredRepoFileLines].join('\n');
61
+ return [
62
+ ...virmatorFileLines,
63
+ ...filteredRepoFileLines,
64
+ ].join('\n');
62
65
  }
63
66
  }
64
67
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "virmator",
3
- "version": "1.3.8",
3
+ "version": "1.4.3",
4
4
  "description": "Handle all the stuffs in one package.",
5
5
  "keywords": [
6
6
  "automation",
@@ -38,23 +38,24 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "ansi-styles": "5.2.0",
41
- "augment-vir": "^1.4.3",
42
- "cspell": "^5.17.0",
41
+ "augment-vir": "^1.5.1",
42
+ "cspell": "^5.18.5",
43
43
  "fs-extra": "^10.0.0",
44
44
  "markdown-code-example-inserter": "^0.1.5",
45
45
  "prettier": "^2.5.1",
46
46
  "prettier-plugin-jsdoc": "^0.3.30",
47
+ "prettier-plugin-multiline-arrays": "^0.0.2",
47
48
  "prettier-plugin-organize-imports": "^2.3.4",
48
49
  "prettier-plugin-packagejson": "^2.2.15",
49
50
  "prettier-plugin-sort-json": "^0.0.2",
50
- "simple-git": "^3.1.1",
51
+ "simple-git": "^3.2.6",
51
52
  "test-vir": "^0.2.3",
52
53
  "typescript": "^4.5.5"
53
54
  },
54
55
  "devDependencies": {
55
56
  "@types/fs-extra": "^9.0.13",
56
- "@types/node": "^17.0.12",
57
- "ts-node": "^10.4.0"
57
+ "@types/node": "^17.0.19",
58
+ "ts-node": "^10.5.0"
58
59
  },
59
60
  "engines": {
60
61
  "node": ">=12",
package/tsconfig.json CHANGED
@@ -19,5 +19,10 @@
19
19
  "target": "ES2018",
20
20
  "useUnknownInCatchVariables": true
21
21
  },
22
- "exclude": ["node_modules", "dist", "test-repos", "scripts"]
22
+ "exclude": [
23
+ "node_modules",
24
+ "dist",
25
+ "test-repos",
26
+ "scripts"
27
+ ]
23
28
  }