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 +4 -4
- package/dist/cmd/assert-repo-is-clean.mjs +1 -1
- package/dist/cmd/check-should-run-type-checks.mjs +1 -1
- package/dist/cmd/format-diff-from.mjs +1 -1
- package/dist/cmd/format-uncommitted.mjs +1 -1
- package/dist/cmd/gen-index-ts.mjs +1 -1
- package/dist/functions/should-run.d.mts +2 -2
- package/dist/functions/should-run.d.mts.map +1 -1
- package/dist/functions/should-run.mjs +3 -2
- package/dist/functions/should-run.mjs.map +1 -1
- package/package.json +17 -17
- package/src/cmd/assert-repo-is-clean.mts +1 -1
- package/src/cmd/check-should-run-type-checks.mts +1 -1
- package/src/cmd/format-diff-from.mts +1 -1
- package/src/cmd/format-uncommitted.mts +1 -1
- package/src/cmd/gen-index-ts.mts +1 -1
- package/src/functions/exec-async.test.mts +1 -1
- package/src/functions/should-run.mts +3 -2
- package/src/functions/workspace-utils/run-cmd-in-stages.test.mts +1 -1
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
@@ -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.
|
|
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,
|
|
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.
|
|
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,YAAA,OAAO,IAAI;QACb;;AAGA,QAAA,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,IAA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;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
|
|
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": "
|
|
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.
|
|
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.
|
|
105
|
-
"@vitest/coverage-v8": "4.0.
|
|
106
|
-
"@vitest/ui": "4.0.
|
|
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.
|
|
108
|
+
"cspell": "9.6.0",
|
|
109
109
|
"dedent": "1.7.1",
|
|
110
110
|
"eslint": "9.39.2",
|
|
111
|
-
"eslint-config-typed": "4.
|
|
112
|
-
"github-settings-as-code": "1.0.
|
|
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.
|
|
117
|
+
"prettier": "3.8.0",
|
|
118
118
|
"prettier-plugin-organize-imports": "4.3.0",
|
|
119
|
-
"prettier-plugin-packagejson": "
|
|
120
|
-
"rollup": "4.
|
|
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.
|
|
124
|
+
"typedoc": "0.28.16",
|
|
125
125
|
"typedoc-github-theme": "0.3.1",
|
|
126
126
|
"typescript": "5.9.3",
|
|
127
|
-
"vite": "7.3.
|
|
128
|
-
"vitest": "4.0.
|
|
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": ">=
|
|
135
|
+
"node": ">=20.11.0",
|
|
136
136
|
"pnpm": ">=8.0.0"
|
|
137
137
|
},
|
|
138
138
|
"volta": {
|
package/src/cmd/gen-index-ts.mts
CHANGED
|
@@ -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
|
-
.
|
|
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.
|
|
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
|
-
.
|
|
39
|
+
.mockReturnValue(undefined as never);
|
|
40
40
|
|
|
41
41
|
return { consoleLogSpy, consoleErrorSpy, processExitSpy };
|
|
42
42
|
};
|