ts-repo-utils 7.5.0 → 7.6.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 +54 -40
- package/dist/cmd/assert-repo-is-clean.mjs +2 -2
- package/dist/cmd/check-should-run-type-checks.mjs +2 -2
- package/dist/cmd/format-diff-from.mjs +2 -2
- package/dist/cmd/format-uncommitted.mjs +2 -2
- package/dist/cmd/gen-index-ts.mjs +4 -4
- package/dist/cmd/gen-index-ts.mjs.map +1 -1
- package/dist/entry-point.d.mts +3 -0
- package/dist/entry-point.d.mts.map +1 -0
- package/dist/entry-point.mjs +16 -0
- package/dist/entry-point.mjs.map +1 -0
- package/dist/functions/format.mjs.map +1 -1
- package/dist/functions/gen-index.mjs +1 -1
- package/dist/functions/gen-index.mjs.map +1 -1
- package/dist/functions/index.d.mts +1 -0
- package/dist/functions/index.d.mts.map +1 -1
- package/dist/functions/index.mjs +1 -0
- package/dist/functions/index.mjs.map +1 -1
- package/dist/functions/make-empty-dir.d.mts +2 -0
- package/dist/functions/make-empty-dir.d.mts.map +1 -0
- package/dist/functions/make-empty-dir.mjs +10 -0
- package/dist/functions/make-empty-dir.mjs.map +1 -0
- package/dist/functions/workspace-utils/execute-parallel.d.mts.map +1 -1
- package/dist/functions/workspace-utils/execute-parallel.mjs +9 -5
- package/dist/functions/workspace-utils/execute-parallel.mjs.map +1 -1
- package/dist/functions/workspace-utils/run-cmd-in-parallel.d.mts.map +1 -1
- package/dist/functions/workspace-utils/run-cmd-in-parallel.mjs +3 -1
- package/dist/functions/workspace-utils/run-cmd-in-parallel.mjs.map +1 -1
- package/dist/functions/workspace-utils/run-cmd-in-stages.d.mts.map +1 -1
- package/dist/functions/workspace-utils/run-cmd-in-stages.mjs +3 -1
- package/dist/functions/workspace-utils/run-cmd-in-stages.mjs.map +1 -1
- package/dist/globals.d.mts +0 -1
- package/dist/index.d.mts +0 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/node-global.d.mts +1 -1
- package/dist/node-global.d.mts.map +1 -1
- package/dist/node-global.mjs +4 -2
- package/dist/node-global.mjs.map +1 -1
- package/dist/types.d.mts +1 -1
- package/package.json +31 -29
- 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 +5 -3
- package/src/entry-point.mts +2 -0
- package/src/functions/diff.test.mts +1 -0
- package/src/functions/exec-async.test.mts +9 -5
- package/src/functions/format.mts +1 -1
- package/src/functions/format.test.mts +5 -2
- package/src/functions/gen-index.mts +1 -0
- package/src/functions/index.mts +1 -0
- package/src/functions/make-empty-dir.mts +8 -0
- package/src/functions/workspace-utils/execute-parallel.mts +13 -11
- package/src/functions/workspace-utils/run-cmd-in-parallel.mts +3 -2
- package/src/functions/workspace-utils/run-cmd-in-stages.mts +3 -2
- package/src/functions/workspace-utils/run-cmd-in-stages.test.mts +4 -2
- package/src/globals.d.mts +0 -1
- package/src/index.mts +0 -2
- package/src/node-global.mts +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"execute-parallel.mjs","sources":["../../../src/functions/workspace-utils/execute-parallel.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;AAeA;;;;;;;;;;;AAWG;AACI,MAAM,eAAe,GAAG,OAC7B,QAA4B,EAC5B,UAAkB,EAClB,WAAA,GAAsB,CAAC,KAC+C;IACtE,MAAM,kBAAkB,GAElB,EAAE;AAER,IAAA,MAAM,aAAa,GAAG,IAAI,GAAG,EAAoB;IACjD,IAAI,UAAU,GAAG,KAAgB;AAEjC,IAAA,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE;;QAE1B,IAAI,UAAU,EAAE;YACd;QACF;;AAGA,QAAA,MAAM,OAAO,GAAG,aAAa,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,IAAI,C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Ae,CAAC,KAAK,EAAE,UAAU,EAAE,WAAW,CAAC;;;AAIrE,gBAAA,OAAO,CAAC,GAAG,CACT,CAAA,QAAA,EAAW,CAAC,GAAG,CAAC,CAAA,yBAAA,EAA4B,OAAO,CAAC,MAAM,CAAA,CAAA,EAAI,KAAK,CAAC,MAAM,CAAA,UAAA,CAAY,CACvF;YACH;YAAE,OAAO,KAAK,EAAE;;AAEd,gBAAA,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"execute-parallel.mjs","sources":["../../../src/functions/workspace-utils/execute-parallel.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA;AAeA;;;;;;;;;;;AAWG;AACI,MAAM,eAAe,GAAG,OAC7B,QAA4B,EAC5B,UAAkB,EAClB,WAAA,GAAsB,CAAC,KAC+C;IACtE,MAAM,kBAAkB,GAElB,EAAE;AAER,IAAA,MAAM,aAAa,GAAG,IAAI,GAAG,EAAoB;IACjD,IAAI,UAAU,GAAG,KAAgB;AAEjC,IAAA,KAAK,MAAM,GAAG,IAAI,QAAQ,EAAE;;QAE1B,IAAI,UAAU,EAAE;YACd;QACF;;AAGA,QAAA,MAAM,OAAO,GAAG,aAAa,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,KAAI;;AAE7D,YAAA,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;gBACxB,UAAU,GAAG,IAAI;AACjB,gBAAA,MAAM,MAAM,CAAC,KAAK,CAAC;YACrB;AACA,YAAA,OAAO,MAAM,CAAC,KAAK,CAAC;AACtB,QAAA,CAAC,CAAC;AAEF,QAAA,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC;QAEhC,MAAM,cAAc,GAAG;;AAEpB,aAAA,KAAK,CAAC,CAAC,KAAK,KAAI;YACf,UAAU,GAAG,IAAI;YACjB,MAAM,KAAK,CAAC;AACd,QAAA,CAAC;aACA,OAAO,CAAC,MAAK;AACZ,YAAA,aAAa,CAAC,MA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C,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC,OAAO,KACxD,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,CACxB;QACD,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC;IAC/B;AAEA,IAAA,OAAO,SAAS;AAClB,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-cmd-in-parallel.d.mts","sourceRoot":"","sources":["../../../src/functions/workspace-utils/run-cmd-in-parallel.mts"],"names":[],"mappings":";AAKA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gCAAgC,GAAU,mEAKpD,QAAQ,CAAC;IACV,kBAAkB,EAAE,MAAM,CAAC;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sBAAsB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC;CAC3D,CAAC,KAAG,OAAO,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"run-cmd-in-parallel.d.mts","sourceRoot":"","sources":["../../../src/functions/workspace-utils/run-cmd-in-parallel.mts"],"names":[],"mappings":";AAKA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gCAAgC,GAAU,mEAKpD,QAAQ,CAAC;IACV,kBAAkB,EAAE,MAAM,CAAC;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sBAAsB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC;CAC3D,CAAC,KAAG,OAAO,CAAC,IAAI,CAsBhB,CAAC"}
|
|
@@ -28,7 +28,9 @@ const runCmdInParallelAcrossWorkspaces = async ({ rootPackageJsonDir, cmd, concu
|
|
|
28
28
|
console.log(`\n✅ ${cmd} completed successfully (all packages)`);
|
|
29
29
|
}
|
|
30
30
|
catch (error) {
|
|
31
|
-
const errorMessage =
|
|
31
|
+
const errorMessage = Error.isError(error)
|
|
32
|
+
? error.message
|
|
33
|
+
: (error?.toString() ?? '');
|
|
32
34
|
console.error(`\n❌ ${cmd} failed (fail-fast mode stopped execution):`);
|
|
33
35
|
console.error(errorMessage);
|
|
34
36
|
process.exit(1);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-cmd-in-parallel.mjs","sources":["../../../src/functions/workspace-utils/run-cmd-in-parallel.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAKA;;;;;;;;;;;;;;AAcG;AACI,MAAM,gCAAgC,GAAG,OAAO,EACrD,kBAAkB,EAClB,GAAG,EACH,WAAW,GAAG,CAAC,EACf,sBAAsB,GAMtB,KAAmB;AACnB,IAAA,IAAI;AACF,QAAA,MAAM,QAAQ,GAAG,MAAM,oBAAoB,CAAC,kBAAkB,CAAC;AAE/D,QAAA,MAAM,gBAAgB,GACpB,sBAAsB,KAAK;AACzB,cAAE;AACF,cAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,sBAAsB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAEhE,OAAO,CAAC,GAAG,CACT,CAAA,WAAA,EAAc,GAAG,CAAA,QAAA,EAAW,gBAAgB,CAAC,MAAM,CAAA,sCAAA,CAAwC,CAC5F;QACD,MAAM,eAAe,CAAC,gBAAgB,EAAE,GAAG,EAAE,WAAW,CAAC;AACzD,QAAA,OAAO,CAAC,GAAG,CAAC,OAAO,GAAG,CAAA,sCAAA,CAAwC,CAAC;IACjE;IAAE,OAAO,KAAK,EAAE;
|
|
1
|
+
{"version":3,"file":"run-cmd-in-parallel.mjs","sources":["../../../src/functions/workspace-utils/run-cmd-in-parallel.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAKA;;;;;;;;;;;;;;AAcG;AACI,MAAM,gCAAgC,GAAG,OAAO,EACrD,kBAAkB,EAClB,GAAG,EACH,WAAW,GAAG,CAAC,EACf,sBAAsB,G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,CAAC;CAC3D,CAAC,KAAG,OAAO,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"run-cmd-in-stages.d.mts","sourceRoot":"","sources":["../../../src/functions/workspace-utils/run-cmd-in-stages.mts"],"names":[],"mappings":";AAKA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,8BAA8B,GAAU,mEAKlD,QAAQ,CAAC;IACV,kBAAkB,EAAE,MAAM,CAAC;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sBAAsB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC;CAC3D,CAAC,KAAG,OAAO,CAAC,IAAI,CAsBhB,CAAC"}
|
|
@@ -30,7 +30,9 @@ const runCmdInStagesAcrossWorkspaces = async ({ rootPackageJsonDir, cmd, concurr
|
|
|
30
30
|
console.log(`\n✅ ${cmd} completed successfully (all stages)`);
|
|
31
31
|
}
|
|
32
32
|
catch (error) {
|
|
33
|
-
const errorMessage =
|
|
33
|
+
const errorMessage = Error.isError(error)
|
|
34
|
+
? error.message
|
|
35
|
+
: (error?.toString() ?? '');
|
|
34
36
|
console.error(`\n❌ ${cmd} failed (fail-fast mode stopped execution):`);
|
|
35
37
|
console.error(errorMessage);
|
|
36
38
|
process.exit(1);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-cmd-in-stages.mjs","sources":["../../../src/functions/workspace-utils/run-cmd-in-stages.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAKA;;;;;;;;;;;;;;;;AAgBG;AACI,MAAM,8BAA8B,GAAG,OAAO,EACnD,kBAAkB,EAClB,GAAG,EACH,WAAW,GAAG,CAAC,EACf,sBAAsB,GAMtB,KAAmB;AACnB,IAAA,IAAI;AACF,QAAA,MAAM,QAAQ,GAAG,MAAM,oBAAoB,CAAC,kBAAkB,CAAC;AAE/D,QAAA,MAAM,gBAAgB,GACpB,sBAAsB,KAAK;AACzB,cAAE;AACF,cAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,sBAAsB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAEhE,OAAO,CAAC,GAAG,CACT,CAAA,WAAA,EAAc,GAAG,CAAA,QAAA,EAAW,gBAAgB,CAAC,MAAM,CAAA,6BAAA,CAA+B,CACnF;QACD,MAAM,aAAa,CAAC,gBAAgB,EAAE,GAAG,EAAE,WAAW,CAAC;AACvD,QAAA,OAAO,CAAC,GAAG,CAAC,OAAO,GAAG,CAAA,oCAAA,CAAsC,CAAC;IAC/D;IAAE,OAAO,KAAK,EAAE;
|
|
1
|
+
{"version":3,"file":"run-cmd-in-stages.mjs","sources":["../../../src/functions/workspace-utils/run-cmd-in-stages.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAKA;;;;;;;;;;;;;;;;AAgBG;AACI,MAAM,8BAA8B,GAAG,OAAO,EACnD,kBAAkB,EAClB,GAAG,EACH,WAAW,GAAG,CAAC,EACf,sBAAsB,GAMtB,KAAmB;AACnB,IAAA,IAAI;AACF,QAAA,MAAM,QAAQ,GAAG,MAAM,oBAAoB,CAAC,kBAAkB,CAAC;AAE/D,QAAA,MAAM,gBAAgB,GACpB,sBAAsB,KAAK;AACzB,cAAE;AACF,cAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,sBAAsB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAEhE,OAAO,CAAC,GAAG,CACT,CAAA,WAAA,EAAc,GAAG,CAAA,QAAA,EAAW,gBAAgB,CAAC,MAAM,CAAA,6BAAA,CAA+B,CACnF;QACD,MAAM,aAAa,CAAC,gBAAgB,EAAE,GAAG,EAAE,WAAW,CAAC;AACvD,QAAA,OAAO,CAAC,GAAG,CAAC,OAAO,GAAG,CAAA,oCAAA,CAAsC,CAAC;IAC/D;IAAE,OAAO,KAAK,EAAE;AACd,QAAA,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK;cACpC,KAAK,CAAC;eACL,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAC7B,QAAA,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,CAAA,2CAAA,CAA6C,CAAC;AACtE,QAAA,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC;AAC3B,QAAA,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACjB;AACF;;;;"}
|
package/dist/globals.d.mts
CHANGED
package/dist/index.d.mts
CHANGED
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.mts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.mts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
package/dist/index.mjs
CHANGED
|
@@ -6,10 +6,10 @@ export { $ } from './functions/exec-async.mjs';
|
|
|
6
6
|
export { formatDiffFrom, formatFiles, formatFilesGlob, formatUncommittedFiles } from './functions/format.mjs';
|
|
7
7
|
export { genIndex } from './functions/gen-index.mjs';
|
|
8
8
|
export { isDirectlyExecuted } from './functions/is-directly-executed.mjs';
|
|
9
|
+
export { makeEmptyDir } from './functions/make-empty-dir.mjs';
|
|
9
10
|
export { checkShouldRunTypeChecks } from './functions/should-run.mjs';
|
|
10
11
|
export { executeParallel, executeStages } from './functions/workspace-utils/execute-parallel.mjs';
|
|
11
12
|
export { getWorkspacePackages } from './functions/workspace-utils/get-workspace-packages.mjs';
|
|
12
13
|
export { runCmdInParallelAcrossWorkspaces } from './functions/workspace-utils/run-cmd-in-parallel.mjs';
|
|
13
14
|
export { runCmdInStagesAcrossWorkspaces } from './functions/workspace-utils/run-cmd-in-stages.mjs';
|
|
14
|
-
export { Result } from 'ts-data-forge';
|
|
15
15
|
//# sourceMappingURL=index.mjs.map
|
package/dist/node-global.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-global.d.mts","sourceRoot":"","sources":["../src/node-global.mts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"node-global.d.mts","sourceRoot":"","sources":["../src/node-global.mts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,WAAW,CAAC;AAC9B,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,kBAAkB,IAAI,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAkBjG,OAAO,CAAC,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC;IACnB,MAAM,IAAI,EAAE,OAAO,OAAO,CAAC,GAAG,CAAC;IAE/B,MAAM,IAAI,EAAE,OAAO,KAAK,CAAC;IACzB,MAAM,EAAE,EAAE,OAAO,GAAG,CAAC;IACrB,MAAM,IAAI,EAAE,OAAO,KAAK,CAAC;IACzB,MAAM,kBAAkB,EAAE,OAAO,mBAAmB,CAAC;IACrD,MAAM,MAAM,EAAE,OAAO,OAAO,CAAC;IAC7B,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CACnC"}
|
package/dist/node-global.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import glob_ from 'fast-glob';
|
|
2
|
-
import * as
|
|
2
|
+
import * as fs from 'node:fs/promises';
|
|
3
3
|
import * as path_ from 'node:path';
|
|
4
4
|
import { Result } from 'ts-data-forge';
|
|
5
5
|
import { $ } from './functions/exec-async.mjs';
|
|
@@ -9,8 +9,10 @@ import { isDirectlyExecuted } from './functions/is-directly-executed.mjs';
|
|
|
9
9
|
const globalsDef = {
|
|
10
10
|
$: $,
|
|
11
11
|
echo: console.log,
|
|
12
|
+
// eslint-disable-next-line tree-shakable/import-star
|
|
12
13
|
path: path_,
|
|
13
|
-
|
|
14
|
+
// eslint-disable-next-line tree-shakable/import-star
|
|
15
|
+
fs: fs,
|
|
14
16
|
glob: glob_,
|
|
15
17
|
isDirectlyExecuted: isDirectlyExecuted,
|
|
16
18
|
Result: Result,
|
package/dist/node-global.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-global.mjs","sources":["../src/node-global.mts"],"sourcesContent":[null],"names":["$_","isDirectlyExecuted_","Result_"],"mappings":";;;;;;;AAAA;AAQA,MAAM,UAAU,GAAG;AACjB,IAAA,CAAC,EAAEA,CAAE;IACL,IAAI,EAAE,OAAO,CAAC,GAAG
|
|
1
|
+
{"version":3,"file":"node-global.mjs","sources":["../src/node-global.mts"],"sourcesContent":[null],"names":["$_","fs_","isDirectlyExecuted_","Result_"],"mappings":";;;;;;;AAAA;AAQA,MAAM,UAAU,GAAG;AACjB,IAAA,CAAC,EAAEA,CAAE;IACL,IAAI,EAAE,OAAO,CAAC,GAAG;;AAGjB,IAAA,IAAI,EAAE,KAAK;;AAEX,IAAA,EAAE,EAAEC,EAAG;AACP,IAAA,IAAI,EAAE,KAAK;AACX,IAAA,kBAAkB,EAAEC,kBAAmB;AACvC,IAAA,MAAM,EAAEC,MAAO;CACP;AAEV;AACA,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC"}
|
package/dist/types.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import './globals.d.mts';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './entry-point.mjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ts-repo-utils",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.6.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript"
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
".": {
|
|
18
18
|
"import": {
|
|
19
19
|
"types": "./dist/types.d.mts",
|
|
20
|
-
"default": "./dist/
|
|
20
|
+
"default": "./dist/entry-point.mjs"
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
|
-
"module": "./dist/
|
|
24
|
+
"module": "./dist/entry-point.mjs",
|
|
25
25
|
"types": "./dist/types.d.mts",
|
|
26
26
|
"bin": {
|
|
27
27
|
"assert-repo-is-clean": "./src/cmd/assert-repo-is-clean.mts",
|
|
@@ -37,14 +37,25 @@
|
|
|
37
37
|
"LICENSE"
|
|
38
38
|
],
|
|
39
39
|
"scripts": {
|
|
40
|
-
"build": "tsx ./scripts/cmd/build.
|
|
41
|
-
"check-all": "tsx ./scripts/cmd/check-all.
|
|
42
|
-
"check:ext": "tsx ./scripts/cmd/check-ext.
|
|
40
|
+
"build": "tsx ./scripts/cmd/build.mts",
|
|
41
|
+
"check-all": "tsx ./scripts/cmd/check-all.mts",
|
|
42
|
+
"check:ext": "tsx ./scripts/cmd/check-ext.mts",
|
|
43
43
|
"cspell": "cspell \"**\" --gitignore --gitignore-root ./ --no-progress",
|
|
44
|
-
"doc": "tsx ./scripts/cmd/gen-docs.
|
|
45
|
-
"
|
|
44
|
+
"doc": "tsx ./scripts/cmd/gen-docs.mts",
|
|
45
|
+
"doc:embed": "tsx ./scripts/cmd/embed-samples.mts",
|
|
46
|
+
"fmt": "format-uncommitted",
|
|
47
|
+
"fmt:diff": "format-diff-from origin/main",
|
|
46
48
|
"fmt:full": "prettier --write .",
|
|
47
|
-
"
|
|
49
|
+
"gh:apply-all": "run-s gh:apply-variables gh:apply-rulesets gh:apply-repository-settings",
|
|
50
|
+
"gh:apply-repository-settings": "tsx --env-file=.env scripts/github/repository/apply.mts",
|
|
51
|
+
"gh:apply-rulesets": "tsx --env-file=.env scripts/github/ruleset/apply.mts",
|
|
52
|
+
"gh:apply-variables": "tsx --env-file=.env scripts/github/variables/apply.mts",
|
|
53
|
+
"gh:backup-all": "run-s gh:backup-rulesets gh:backup-repository-settings",
|
|
54
|
+
"gh:backup-repository-settings": "tsx --env-file=.env scripts/github/repository/backup.mts",
|
|
55
|
+
"gh:backup-rulesets": "tsx --env-file=.env scripts/github/ruleset/backup.mts",
|
|
56
|
+
"gi": "run-s gi:scripts gi:src fmt",
|
|
57
|
+
"gi:scripts": "gen-index-ts ./scripts/github --index-ext .mts --export-ext .mjs --target-ext .mts --exclude cmd --exclude apply.mts --exclude octokit.mts",
|
|
58
|
+
"gi:src": "gen-index-ts ./src --index-ext .mts --export-ext .mjs --target-ext .mts --target-ext .tsx --exclude entry-point.mts --exclude cmd --exclude node-global.mts",
|
|
48
59
|
"lint": "eslint .",
|
|
49
60
|
"lint:fix": "eslint . --fix",
|
|
50
61
|
"md": "markdownlint-cli2",
|
|
@@ -71,7 +82,7 @@
|
|
|
71
82
|
"tsx": "^4.20.5"
|
|
72
83
|
},
|
|
73
84
|
"devDependencies": {
|
|
74
|
-
"@
|
|
85
|
+
"@octokit/core": "^7.0.3",
|
|
75
86
|
"@rollup/plugin-replace": "^6.0.2",
|
|
76
87
|
"@rollup/plugin-strip": "^3.0.4",
|
|
77
88
|
"@rollup/plugin-typescript": "^12.1.4",
|
|
@@ -86,38 +97,29 @@
|
|
|
86
97
|
"@vitest/coverage-v8": "^3.2.4",
|
|
87
98
|
"@vitest/ui": "^3.2.4",
|
|
88
99
|
"conventional-changelog-conventionalcommits": "^9.1.0",
|
|
89
|
-
"cspell": "^9.2.
|
|
100
|
+
"cspell": "^9.2.1",
|
|
90
101
|
"dedent": "^1.7.0",
|
|
91
102
|
"eslint": "^9.35.0",
|
|
92
|
-
"eslint-
|
|
93
|
-
"
|
|
94
|
-
"eslint-plugin-functional": "9.0.2",
|
|
95
|
-
"eslint-plugin-import": "2.32.0",
|
|
96
|
-
"eslint-plugin-prefer-arrow-functions": "3.6.2",
|
|
97
|
-
"eslint-plugin-promise": "7.2.1",
|
|
98
|
-
"eslint-plugin-security": "3.0.1",
|
|
99
|
-
"eslint-plugin-unicorn": "61.0.2",
|
|
100
|
-
"eslint-plugin-vitest": "0.5.4",
|
|
103
|
+
"eslint-config-typed": "^1.2.2",
|
|
104
|
+
"fast-glob": "^3.3.3",
|
|
101
105
|
"markdownlint-cli2": "^0.18.1",
|
|
102
106
|
"npm-run-all2": "^8.0.4",
|
|
107
|
+
"octokit-safe-types": "^1.0.0",
|
|
103
108
|
"prettier": "^3.6.2",
|
|
104
|
-
"prettier-plugin-jsdoc": "^1.3.3",
|
|
105
109
|
"prettier-plugin-organize-imports": "^4.2.0",
|
|
106
110
|
"prettier-plugin-packagejson": "^2.5.19",
|
|
107
|
-
"rollup": "^4.
|
|
108
|
-
"semantic-release": "^24.2.
|
|
109
|
-
"ts-
|
|
111
|
+
"rollup": "^4.50.1",
|
|
112
|
+
"semantic-release": "^24.2.8",
|
|
113
|
+
"ts-fortress": "^4.3.0",
|
|
114
|
+
"ts-repo-utils": "^7.5.0",
|
|
115
|
+
"ts-type-forge": "^2.2.0",
|
|
110
116
|
"tslib": "^2.8.1",
|
|
111
|
-
"typedoc": "^0.28.
|
|
117
|
+
"typedoc": "^0.28.13",
|
|
112
118
|
"typedoc-plugin-markdown": "^4.8.1",
|
|
113
119
|
"typescript": "^5.9.2",
|
|
114
|
-
"typescript-eslint": "^8.43.0",
|
|
115
120
|
"vitest": "^3.2.4"
|
|
116
121
|
},
|
|
117
122
|
"peerDependencies": {
|
|
118
123
|
"prettier": "^3.6.2"
|
|
119
|
-
},
|
|
120
|
-
"engines": {
|
|
121
|
-
"node": ">=20.11.0"
|
|
122
124
|
}
|
|
123
125
|
}
|
package/src/cmd/gen-index-ts.mts
CHANGED
|
@@ -14,7 +14,8 @@ const extensionType = cmd.extendType(cmd.string, {
|
|
|
14
14
|
if (!s.startsWith('.')) {
|
|
15
15
|
throw new Error(`ext should start with '.'`);
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
|
|
18
|
+
// eslint-disable-next-line total-functions/no-unsafe-type-assertion
|
|
18
19
|
return Promise.resolve(s as Ext);
|
|
19
20
|
},
|
|
20
21
|
});
|
|
@@ -31,14 +32,15 @@ const nonEmptyArray = <T extends cmd.Type<any, any>>(
|
|
|
31
32
|
`No value provided for --${commandName}. At least one value is required.`,
|
|
32
33
|
);
|
|
33
34
|
}
|
|
34
|
-
|
|
35
|
+
|
|
36
|
+
// eslint-disable-next-line total-functions/no-unsafe-type-assertion
|
|
35
37
|
return Promise.resolve(arr as unknown as NonEmptyArray<OutputOf<T>>);
|
|
36
38
|
},
|
|
37
39
|
});
|
|
38
40
|
|
|
39
41
|
const cmdDef = cmd.command({
|
|
40
42
|
name: 'gen-index-ts-cli',
|
|
41
|
-
version: '7.
|
|
43
|
+
version: '7.6.0',
|
|
42
44
|
args: {
|
|
43
45
|
// required args
|
|
44
46
|
targetDirectory: cmd.positional({
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable vitest/expect-expect */
|
|
2
|
+
/* eslint-disable vitest/no-conditional-expect */
|
|
1
3
|
import { exec, type ExecException } from 'node:child_process';
|
|
2
4
|
import { expectType, Result } from 'ts-data-forge';
|
|
3
5
|
import '../node-global.mjs';
|
|
@@ -6,16 +8,16 @@ import { $ } from './exec-async.mjs';
|
|
|
6
8
|
describe('exec-async', () => {
|
|
7
9
|
// Helper to suppress echo output during tests
|
|
8
10
|
const withSilentEcho = async <T,>(fn: () => Promise<T>): Promise<T> => {
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
10
12
|
const originalEcho = (globalThis as any).echo;
|
|
11
|
-
// eslint-disable-next-line functional/immutable-data, @typescript-eslint/no-unsafe-
|
|
13
|
+
// eslint-disable-next-line functional/immutable-data, @typescript-eslint/no-unsafe-member-access
|
|
12
14
|
(globalThis as any).echo = () => {
|
|
13
15
|
// Silent implementation - no output
|
|
14
16
|
};
|
|
15
17
|
try {
|
|
16
18
|
return await fn();
|
|
17
19
|
} finally {
|
|
18
|
-
// eslint-disable-next-line functional/immutable-data, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-
|
|
20
|
+
// eslint-disable-next-line functional/immutable-data, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
|
|
19
21
|
(globalThis as any).echo = originalEcho;
|
|
20
22
|
}
|
|
21
23
|
};
|
|
@@ -479,9 +481,11 @@ describe('exec-async', () => {
|
|
|
479
481
|
): ExecCallbackParams<T> => {
|
|
480
482
|
const emptyParams: ExecCallbackParams<T> = {
|
|
481
483
|
error: null,
|
|
482
|
-
|
|
484
|
+
|
|
485
|
+
// eslint-disable-next-line total-functions/no-unsafe-type-assertion
|
|
483
486
|
stdout: undefined as unknown as T,
|
|
484
|
-
|
|
487
|
+
|
|
488
|
+
// eslint-disable-next-line total-functions/no-unsafe-type-assertion
|
|
485
489
|
stderr: undefined as unknown as T,
|
|
486
490
|
};
|
|
487
491
|
return emptyParams;
|
package/src/functions/format.mts
CHANGED
|
@@ -114,7 +114,7 @@ export const formatFiles = async (
|
|
|
114
114
|
} else {
|
|
115
115
|
const errors: readonly unknown[] = results
|
|
116
116
|
.filter((r) => r.status === 'rejected')
|
|
117
|
-
.map((r) => r.reason
|
|
117
|
+
.map((r): unknown => r.reason);
|
|
118
118
|
|
|
119
119
|
return Result.err(errors);
|
|
120
120
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable vitest/no-conditional-expect */
|
|
1
2
|
import dedent from 'dedent';
|
|
2
3
|
import { Result } from 'ts-data-forge';
|
|
3
4
|
import '../node-global.mjs';
|
|
@@ -517,10 +518,12 @@ describe('formatUncommittedFiles', () => {
|
|
|
517
518
|
vi.mocked(getModifiedFiles).mockResolvedValue(Result.ok([]));
|
|
518
519
|
vi.mocked(getStagedFiles).mockResolvedValue(Result.ok([]));
|
|
519
520
|
|
|
520
|
-
await formatUncommittedFiles({ silent: false });
|
|
521
|
+
const result1 = await formatUncommittedFiles({ silent: false });
|
|
522
|
+
expect(Result.isOk(result1)).toBe(true);
|
|
521
523
|
// With silent: false, console output may occur
|
|
522
524
|
|
|
523
|
-
await formatUncommittedFiles({ silent: true });
|
|
525
|
+
const result2 = await formatUncommittedFiles({ silent: true });
|
|
526
|
+
expect(Result.isOk(result2)).toBe(true);
|
|
524
527
|
// With silent: true, console output should be suppressed
|
|
525
528
|
|
|
526
529
|
vi.unstubAllGlobals();
|
package/src/functions/index.mts
CHANGED
|
@@ -6,5 +6,6 @@ export * from './exec-async.mjs';
|
|
|
6
6
|
export * from './format.mjs';
|
|
7
7
|
export * from './gen-index.mjs';
|
|
8
8
|
export * from './is-directly-executed.mjs';
|
|
9
|
+
export * from './make-empty-dir.mjs';
|
|
9
10
|
export * from './should-run.mjs';
|
|
10
11
|
export * from './workspace-utils/index.mjs';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as fs from 'node:fs/promises';
|
|
2
|
+
|
|
3
|
+
export const makeEmptyDir = async (dir: string): Promise<void> => {
|
|
4
|
+
await fs.rm(dir, { recursive: true, force: true });
|
|
5
|
+
|
|
6
|
+
// eslint-disable-next-line security/detect-non-literal-fs-filename
|
|
7
|
+
await fs.mkdir(dir, { recursive: true });
|
|
8
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable require-atomic-updates */
|
|
2
|
-
import { spawn } from 'child_process';
|
|
2
|
+
import { spawn } from 'node:child_process';
|
|
3
3
|
import {
|
|
4
4
|
createPromise,
|
|
5
5
|
hasKey,
|
|
@@ -160,11 +160,14 @@ export const executeStages = async (
|
|
|
160
160
|
);
|
|
161
161
|
} catch (error) {
|
|
162
162
|
// executeParallel will throw immediately on any failure (fail-fast)
|
|
163
|
-
const errorMessage =
|
|
164
|
-
|
|
163
|
+
const errorMessage = Error.isError(error)
|
|
164
|
+
? error.message
|
|
165
|
+
: String(error);
|
|
165
166
|
console.error(`\n❌ Stage ${i + 1} failed (fail-fast):`);
|
|
166
167
|
console.error(errorMessage);
|
|
167
|
-
throw new Error(`Stage ${i + 1} failed: ${errorMessage}
|
|
168
|
+
throw new Error(`Stage ${i + 1} failed: ${errorMessage}`, {
|
|
169
|
+
cause: error,
|
|
170
|
+
});
|
|
168
171
|
}
|
|
169
172
|
}
|
|
170
173
|
}
|
|
@@ -237,15 +240,14 @@ const executeScript = (
|
|
|
237
240
|
).map((result) =>
|
|
238
241
|
result.then(
|
|
239
242
|
Result.mapErr((err) => {
|
|
240
|
-
const errorMessage: string =
|
|
241
|
-
err
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
: 'Unknown error';
|
|
243
|
+
const errorMessage: string = Error.isError(err)
|
|
244
|
+
? err.message
|
|
245
|
+
: isRecord(err) && hasKey(err, 'message')
|
|
246
|
+
? (err.message?.toString() ?? 'Unknown error message')
|
|
247
|
+
: 'Unknown error';
|
|
246
248
|
|
|
247
249
|
console.error(`\nError in ${pkg.name}:`, errorMessage);
|
|
248
|
-
return err
|
|
250
|
+
return Error.isError(err) ? err : new Error(errorMessage);
|
|
249
251
|
}),
|
|
250
252
|
),
|
|
251
253
|
).value;
|
|
@@ -43,8 +43,9 @@ export const runCmdInParallelAcrossWorkspaces = async ({
|
|
|
43
43
|
await executeParallel(filteredPackages, cmd, concurrency);
|
|
44
44
|
console.log(`\n✅ ${cmd} completed successfully (all packages)`);
|
|
45
45
|
} catch (error) {
|
|
46
|
-
const errorMessage =
|
|
47
|
-
|
|
46
|
+
const errorMessage = Error.isError(error)
|
|
47
|
+
? error.message
|
|
48
|
+
: (error?.toString() ?? '');
|
|
48
49
|
console.error(`\n❌ ${cmd} failed (fail-fast mode stopped execution):`);
|
|
49
50
|
console.error(errorMessage);
|
|
50
51
|
process.exit(1);
|
|
@@ -45,8 +45,9 @@ export const runCmdInStagesAcrossWorkspaces = async ({
|
|
|
45
45
|
await executeStages(filteredPackages, cmd, concurrency);
|
|
46
46
|
console.log(`\n✅ ${cmd} completed successfully (all stages)`);
|
|
47
47
|
} catch (error) {
|
|
48
|
-
const errorMessage =
|
|
49
|
-
|
|
48
|
+
const errorMessage = Error.isError(error)
|
|
49
|
+
? error.message
|
|
50
|
+
: (error?.toString() ?? '');
|
|
50
51
|
console.error(`\n❌ ${cmd} failed (fail-fast mode stopped execution):`);
|
|
51
52
|
console.error(errorMessage);
|
|
52
53
|
process.exit(1);
|
|
@@ -29,10 +29,12 @@ describe('runCmdInStagesAcrossWorkspaces', () => {
|
|
|
29
29
|
const consoleErrorSpy = vi
|
|
30
30
|
.spyOn(console, 'error')
|
|
31
31
|
.mockImplementation((): void => {});
|
|
32
|
-
|
|
32
|
+
|
|
33
|
+
// eslint-disable-next-line total-functions/no-unsafe-type-assertion
|
|
33
34
|
const processExitSpy = vi
|
|
34
35
|
.spyOn(process, 'exit')
|
|
35
|
-
|
|
36
|
+
|
|
37
|
+
// eslint-disable-next-line total-functions/no-unsafe-type-assertion
|
|
36
38
|
.mockImplementation((): never => undefined as never) as ReturnType<
|
|
37
39
|
typeof vi.spyOn
|
|
38
40
|
>;
|
package/src/globals.d.mts
CHANGED
package/src/index.mts
CHANGED
package/src/node-global.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable import/no-internal-modules */
|
|
2
|
-
import
|
|
2
|
+
import glob_ from 'fast-glob';
|
|
3
3
|
import * as fs_ from 'node:fs/promises';
|
|
4
4
|
import * as path_ from 'node:path';
|
|
5
5
|
import { Result as Result_ } from 'ts-data-forge';
|
|
@@ -10,7 +10,9 @@ const globalsDef = {
|
|
|
10
10
|
$: $_,
|
|
11
11
|
echo: console.log,
|
|
12
12
|
|
|
13
|
+
// eslint-disable-next-line tree-shakable/import-star
|
|
13
14
|
path: path_,
|
|
15
|
+
// eslint-disable-next-line tree-shakable/import-star
|
|
14
16
|
fs: fs_,
|
|
15
17
|
glob: glob_,
|
|
16
18
|
isDirectlyExecuted: isDirectlyExecuted_,
|