ts-repo-utils 8.0.2 → 8.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.
package/README.md CHANGED
@@ -190,10 +190,10 @@ npm exec -- check-should-run-type-checks \
190
190
  **Options:**
191
191
 
192
192
  - `--paths-ignore` - Patterns to ignore when checking if type checks should run (optional, can be specified multiple times)
193
- - Supports exact file matches: `.cspell.json`
193
+ - Supports exact file matches: `.cspell.config.yaml`
194
194
  - Directory prefixes: `docs/` (matches any file in docs directory)
195
195
  - File extensions: `**.md` (matches any markdown file)
196
- - Default: `['LICENSE', '.editorconfig', '.gitignore', '.cspell.json', '.markdownlint-cli2.mjs', '.npmignore', '.prettierignore', '.prettierrc', 'docs/', '**.md', '**.txt']`
196
+ - Default: `['LICENSE', '.editorconfig', '.gitignore', '.cspell.config.yaml', '.markdownlint-cli2.mjs', '.npmignore', '.prettierignore', '.prettierrc', 'docs/', '**.md', '**.txt']`
197
197
  - `--base-branch` - Base branch to compare against for determining changed files (default: `origin/main`)
198
198
 
199
199
  **GitHub Actions Integration:**
@@ -494,10 +494,10 @@ await formatUncommittedFiles({
494
494
  **Options:**
495
495
 
496
496
  - `pathsIgnore?` - Patterns to ignore when checking if type checks should run:
497
- - Exact file matches: `.cspell.json`
497
+ - Exact file matches: `.cspell.config.yaml`
498
498
  - Directory prefixes: `docs/` (matches any file in docs directory)
499
499
  - File extensions: `**.md` (matches any markdown file)
500
- - Default: `['LICENSE', '.editorconfig', '.gitignore', '.cspell.json', '.markdownlint-cli2.mjs', '.npmignore', '.prettierignore', '.prettierrc', 'docs/', '**.md', '**.txt']`
500
+ - Default: `['LICENSE', '.editorconfig', '.gitignore', '.cspell.config.yaml', '.markdownlint-cli2.mjs', '.npmignore', '.prettierignore', '.prettierrc', 'docs/', '**.md', '**.txt']`
501
501
  - `baseBranch?` - Base branch to compare against (default: `origin/main`)
502
502
 
503
503
  ### Code Formatting Utilities
@@ -14,7 +14,7 @@ import '@sindresorhus/is';
14
14
 
15
15
  const cmdDef = cmd.command({
16
16
  name: 'assert-repo-is-clean-cli',
17
- version: '8.0.2',
17
+ version: '8.1.0',
18
18
  args: {
19
19
  silent: cmd.flag({
20
20
  long: 'silent',
@@ -14,7 +14,7 @@ import '@sindresorhus/is';
14
14
 
15
15
  const cmdDef = cmd.command({
16
16
  name: 'check-should-run-type-checks-cli',
17
- version: '8.0.2',
17
+ version: '8.1.0',
18
18
  args: {
19
19
  pathsIgnore: cmd.multioption({
20
20
  long: 'paths-ignore',
@@ -13,7 +13,7 @@ import '@sindresorhus/is';
13
13
 
14
14
  const cmdDef = cmd.command({
15
15
  name: 'format-diff-from-cli',
16
- version: '8.0.2',
16
+ version: '8.1.0',
17
17
  args: {
18
18
  base: cmd.positional({
19
19
  type: cmd.string,
@@ -13,7 +13,7 @@ import '@sindresorhus/is';
13
13
 
14
14
  const cmdDef = cmd.command({
15
15
  name: 'format-uncommitted-cli',
16
- version: '8.0.2',
16
+ version: '8.1.0',
17
17
  args: {
18
18
  excludeUntracked: cmd.flag({
19
19
  long: 'exclude-untracked',
@@ -32,7 +32,7 @@ const nonEmptyArray = (t, commandName) => cmd.extendType(cmd.array(t), {
32
32
  });
33
33
  const cmdDef = cmd.command({
34
34
  name: 'gen-index-ts-cli',
35
- version: '8.0.2',
35
+ version: '8.1.0',
36
36
  args: {
37
37
  // required args
38
38
  targetDirectory: cmd.positional({
@@ -40,10 +40,10 @@ import '../node-global.mjs';
40
40
  * @param options.pathsIgnore - Array of patterns to ignore when determining if
41
41
  * type checks should run. Supports three pattern types:
42
42
  *
43
- * - **Exact file matches**: e.g., `.cspell.json` matches only that file
43
+ * - **Exact file matches**: e.g., `.cspell.config.yaml` matches only that file
44
44
  * - **Directory prefixes**: e.g., `docs/` matches any file in docs directory
45
45
  * - **File extensions**: e.g., `**.md` matches any markdown file Defaults to:
46
- * `['LICENSE', '.editorconfig', '.gitignore', '.cspell.json',
46
+ * `['LICENSE', '.editorconfig', '.gitignore', '.cspell.json', '.cspell.config.yaml',
47
47
  * '.markdownlint-cli2.mjs', '.npmignore', '.prettierignore',
48
48
  * '.prettierrc', 'docs/', '**.md', '**.txt']`
49
49
  *
@@ -1 +1 @@
1
- {"version":3,"file":"should-run.d.mts","sourceRoot":"","sources":["../../src/functions/should-run.mts"],"names":[],"mappings":"AACA,OAAO,oBAAoB,CAAC;AAG5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,eAAO,MAAM,wBAAwB,GACnC,UAAU,QAAQ,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC,KACD,OAAO,CAAC,OAAO,CAuDjB,CAAC"}
1
+ {"version":3,"file":"should-run.d.mts","sourceRoot":"","sources":["../../src/functions/should-run.mts"],"names":[],"mappings":"AACA,OAAO,oBAAoB,CAAC;AAG5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,eAAO,MAAM,wBAAwB,GACnC,UAAU,QAAQ,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC,KACD,OAAO,CAAC,OAAO,CAwDjB,CAAC"}
@@ -43,10 +43,10 @@ import { getDiffFrom } from './diff.mjs';
43
43
  * @param options.pathsIgnore - Array of patterns to ignore when determining if
44
44
  * type checks should run. Supports three pattern types:
45
45
  *
46
- * - **Exact file matches**: e.g., `.cspell.json` matches only that file
46
+ * - **Exact file matches**: e.g., `.cspell.config.yaml` matches only that file
47
47
  * - **Directory prefixes**: e.g., `docs/` matches any file in docs directory
48
48
  * - **File extensions**: e.g., `**.md` matches any markdown file Defaults to:
49
- * `['LICENSE', '.editorconfig', '.gitignore', '.cspell.json',
49
+ * `['LICENSE', '.editorconfig', '.gitignore', '.cspell.json', '.cspell.config.yaml',
50
50
  * '.markdownlint-cli2.mjs', '.npmignore', '.prettierignore',
51
51
  * '.prettierrc', 'docs/', '**.md', '**.txt']`
52
52
  *
@@ -62,6 +62,7 @@ const checkShouldRunTypeChecks = async (options) => {
62
62
  '.editorconfig',
63
63
  '.gitignore',
64
64
  '.cspell.json',
65
+ '.cspell.config.yaml',
65
66
  '.markdownlint-cli2.mjs',
66
67
  '.npmignore',
67
68
  '.prettierignore',
@@ -1 +1 @@
1
- {"version":3,"file":"should-run.mjs","sources":["../../src/functions/should-run.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDG;MACU,wBAAwB,GAAG,OACtC,OAGE,KACkB;AACpB,IAAA,MAAM,WAAW,GAAG,OAAO,EAAE,WAAW,IAAI;QAC1C,SAAS;QACT,eAAe;QACf,YAAY;QACZ,cAAc;QACd,wBAAwB;QACxB,YAAY;QACZ,iBAAiB;QACjB,aAAa;QACb,OAAO;QACP,OAAO;QACP,QAAQ;KACT;AAED,IAAA,MAAM,UAAU,GAAG,OAAO,EAAE,UAAU,IAAI,aAAa;IAEvD,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;AAElD,IAAA,MAAM,KAAK,GAAG,MAAM,WAAW,CAAC,UAAU,CAAC;AAE3C,IAAA,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE;QACvB,OAAO,CAAC,KAAK,CAAC,qBAAqB,EAAE,KAAK,CAAC,KAAK,CAAC;AAEjD,QAAA,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACjB;IAEA,MAAM,iBAAiB,GAAY,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,KACzD,WAAW,CAAC,IAAI,CAAC,CAAC,OAAO,KAAI;;AAE3B,QAAA,IAAI,OAAO,KAAK,IAAI,EAAE;AACpB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AK,CAAC,EAAE;QACvB,OAAO,CAAC,KAAK,CAAC,qBAAqB,EAAE,KAAK,CAAC,KAAK,CAAC;AAEjD,QAAA,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACjB;IAEA,MAAM,iBAAiB,GAAY,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,KACzD,WAAW,CAAC,IAAI,CAAC,CAAC,OAAO,KAAI;;AAE3B,QAAA,IAAI,OAAO,KAAK,IAAI,EAAE;AACpB,YAAA,OAAO,IAAI;QACb;;AAGA,QAAA,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;AACrD,YAAA,OAAO,IAAI;QACb;;AAGA,QAAA,IAAI,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE;YAC7B,MAAM,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAEnC,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC;QAChD;AAEA,QAAA,OAAO,KAAK;IACd,CAAC,CAAC,CACH;AAED,IAAA,IAAI,aAAa,KAAK,SAAS,EAAE;QAC/B,MAAM,EAAE,CAAC,UAAU,CAAC,aAAa,EAAE,CAAA,WAAA,EAAc,iBAAiB,CAAA,EAAA,CAAI,CAAC;IACzE;AAEA,IAAA,OAAO,iBAAiB;AAC1B;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-repo-utils",
3
- "version": "8.0.2",
3
+ "version": "8.1.0",
4
4
  "private": false,
5
5
  "keywords": [
6
6
  "typescript"
@@ -39,8 +39,8 @@
39
39
  "scripts": {
40
40
  "build": "tsx ./scripts/cmd/build.mts",
41
41
  "build:min": "tsx ./scripts/cmd/build.mts --skip-check",
42
- "check-all": "tsx ./scripts/cmd/check-all.mts",
43
42
  "check:ext": "tsx ./scripts/cmd/check-ext.mts",
43
+ "check-all": "tsx ./scripts/cmd/check-all.mts",
44
44
  "cspell": "cspell \"**\" --gitignore --gitignore-root ./ --no-progress",
45
45
  "doc": "tsx ./scripts/cmd/gen-docs.mts",
46
46
  "doc:embed": "tsx ./scripts/cmd/embed-samples.mts",
@@ -78,7 +78,7 @@
78
78
  "z:format-uncommitted": "tsx ./src/cmd/format-uncommitted.mts",
79
79
  "z:gen-index-ts": "tsx ./src/cmd/gen-index-ts.mts",
80
80
  "z:vitest": "vitest --config ./configs/vitest.config.mts",
81
- "z:vitest:node": "vitest --config ./configs/vitest.config.mts --project='Node.js'"
81
+ "z:vitest:node": "pnpm run z:vitest --project='Node.js'"
82
82
  },
83
83
  "dependencies": {
84
84
  "@nodelib/fs.walk": "^3.0.1",
@@ -87,7 +87,7 @@
87
87
  "cmd-ts": "^0.14.3",
88
88
  "fast-glob": "^3.3.3",
89
89
  "micromatch": "^4.0.8",
90
- "ts-data-forge": "^6.1.1",
90
+ "ts-data-forge": "^6.3.0",
91
91
  "tsx": "^4.21.0"
92
92
  },
93
93
  "devDependencies": {
@@ -101,38 +101,38 @@
101
101
  "@semantic-release/github": "12.0.2",
102
102
  "@semantic-release/npm": "13.1.3",
103
103
  "@semantic-release/release-notes-generator": "14.1.0",
104
- "@types/node": "25.0.3",
105
- "@vitest/coverage-v8": "4.0.16",
106
- "@vitest/ui": "4.0.16",
104
+ "@types/node": "25.0.10",
105
+ "@vitest/coverage-v8": "4.0.17",
106
+ "@vitest/ui": "4.0.17",
107
107
  "conventional-changelog-conventionalcommits": "9.1.0",
108
- "cspell": "9.4.0",
108
+ "cspell": "9.6.0",
109
109
  "dedent": "1.7.1",
110
110
  "eslint": "9.39.2",
111
- "eslint-config-typed": "4.3.0",
112
- "github-settings-as-code": "1.0.6",
111
+ "eslint-config-typed": "4.6.0",
112
+ "github-settings-as-code": "1.0.11",
113
113
  "jiti": "2.6.1",
114
114
  "markdownlint": "0.40.0",
115
115
  "markdownlint-cli2": "0.20.0",
116
116
  "npm-run-all2": "8.0.4",
117
- "prettier": "3.7.4",
117
+ "prettier": "3.8.0",
118
118
  "prettier-plugin-organize-imports": "4.3.0",
119
- "prettier-plugin-packagejson": "2.5.20",
120
- "rollup": "4.54.0",
119
+ "prettier-plugin-packagejson": "3.0.0",
120
+ "rollup": "4.55.2",
121
121
  "semantic-release": "25.0.2",
122
122
  "ts-type-forge": "2.3.0",
123
123
  "tslib": "2.8.1",
124
- "typedoc": "0.28.15",
124
+ "typedoc": "0.28.16",
125
125
  "typedoc-github-theme": "0.3.1",
126
126
  "typescript": "5.9.3",
127
- "vite": "7.3.0",
128
- "vitest": "4.0.16"
127
+ "vite": "7.3.1",
128
+ "vitest": "4.0.17"
129
129
  },
130
130
  "peerDependencies": {
131
131
  "prettier": ">=3.0.0"
132
132
  },
133
133
  "packageManager": "pnpm@10.24.0",
134
134
  "engines": {
135
- "node": ">=22",
135
+ "node": ">=20.11.0",
136
136
  "pnpm": ">=8.0.0"
137
137
  },
138
138
  "volta": {
@@ -5,7 +5,7 @@ import { assertRepoIsClean } from '../functions/index.mjs';
5
5
 
6
6
  const cmdDef = cmd.command({
7
7
  name: 'assert-repo-is-clean-cli',
8
- version: '8.0.2',
8
+ version: '8.1.0',
9
9
  args: {
10
10
  silent: cmd.flag({
11
11
  long: 'silent',
@@ -5,7 +5,7 @@ import { checkShouldRunTypeChecks } from '../functions/index.mjs';
5
5
 
6
6
  const cmdDef = cmd.command({
7
7
  name: 'check-should-run-type-checks-cli',
8
- version: '8.0.2',
8
+ version: '8.1.0',
9
9
  args: {
10
10
  pathsIgnore: cmd.multioption({
11
11
  long: 'paths-ignore',
@@ -6,7 +6,7 @@ import { formatDiffFrom } from '../functions/index.mjs';
6
6
 
7
7
  const cmdDef = cmd.command({
8
8
  name: 'format-diff-from-cli',
9
- version: '8.0.2',
9
+ version: '8.1.0',
10
10
  args: {
11
11
  base: cmd.positional({
12
12
  type: cmd.string,
@@ -6,7 +6,7 @@ import { formatUncommittedFiles } from '../functions/index.mjs';
6
6
 
7
7
  const cmdDef = cmd.command({
8
8
  name: 'format-uncommitted-cli',
9
- version: '8.0.2',
9
+ version: '8.1.0',
10
10
  args: {
11
11
  excludeUntracked: cmd.flag({
12
12
  long: 'exclude-untracked',
@@ -39,7 +39,7 @@ const nonEmptyArray = <T extends cmd.Type<any, any>>(
39
39
 
40
40
  const cmdDef = cmd.command({
41
41
  name: 'gen-index-ts-cli',
42
- version: '8.0.2',
42
+ version: '8.1.0',
43
43
  args: {
44
44
  // required args
45
45
  targetDirectory: cmd.positional({
@@ -512,7 +512,7 @@ describe('exec-async', () => {
512
512
  const stderrWriteSpy = vi
513
513
  // eslint-disable-next-line vitest/no-restricted-vi-methods
514
514
  .spyOn(process.stderr, 'write')
515
- .mockImplementation(() => true);
515
+ .mockReturnValue(true);
516
516
 
517
517
  try {
518
518
  await withSilentEcho(async () => {
@@ -43,10 +43,10 @@ import { getDiffFrom } from './diff.mjs';
43
43
  * @param options.pathsIgnore - Array of patterns to ignore when determining if
44
44
  * type checks should run. Supports three pattern types:
45
45
  *
46
- * - **Exact file matches**: e.g., `.cspell.json` matches only that file
46
+ * - **Exact file matches**: e.g., `.cspell.config.yaml` matches only that file
47
47
  * - **Directory prefixes**: e.g., `docs/` matches any file in docs directory
48
48
  * - **File extensions**: e.g., `**.md` matches any markdown file Defaults to:
49
- * `['LICENSE', '.editorconfig', '.gitignore', '.cspell.json',
49
+ * `['LICENSE', '.editorconfig', '.gitignore', '.cspell.json', '.cspell.config.yaml',
50
50
  * '.markdownlint-cli2.mjs', '.npmignore', '.prettierignore',
51
51
  * '.prettierrc', 'docs/', '**.md', '**.txt']`
52
52
  *
@@ -67,6 +67,7 @@ export const checkShouldRunTypeChecks = async (
67
67
  '.editorconfig',
68
68
  '.gitignore',
69
69
  '.cspell.json',
70
+ '.cspell.config.yaml',
70
71
  '.markdownlint-cli2.mjs',
71
72
  '.npmignore',
72
73
  '.prettierignore',
@@ -36,7 +36,7 @@ describe(runCmdInStagesAcrossWorkspaces, () => {
36
36
  const processExitSpy = vi
37
37
  .spyOn(process, 'exit')
38
38
  // eslint-disable-next-line total-functions/no-unsafe-type-assertion
39
- .mockImplementation((): never => undefined as never);
39
+ .mockReturnValue(undefined as never);
40
40
 
41
41
  return { consoleLogSpy, consoleErrorSpy, processExitSpy };
42
42
  };