ts-repo-utils 5.0.2 → 5.2.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/dist/functions/assert-ext.d.mts +12 -7
- package/dist/functions/assert-ext.d.mts.map +1 -1
- package/dist/functions/assert-ext.mjs +17 -12
- package/dist/functions/assert-ext.mjs.map +1 -1
- package/dist/functions/assert-path-exists.d.mts +2 -0
- package/dist/functions/assert-path-exists.d.mts.map +1 -1
- package/dist/functions/assert-path-exists.mjs +2 -0
- package/dist/functions/assert-path-exists.mjs.map +1 -1
- package/dist/functions/assert-repo-is-clean.d.mts +3 -2
- package/dist/functions/assert-repo-is-clean.d.mts.map +1 -1
- package/dist/functions/assert-repo-is-clean.mjs +4 -2
- package/dist/functions/assert-repo-is-clean.mjs.map +1 -1
- package/dist/functions/diff.d.mts +2 -6
- package/dist/functions/diff.d.mts.map +1 -1
- package/dist/functions/diff.mjs +2 -6
- package/dist/functions/diff.mjs.map +1 -1
- package/dist/functions/exec-async.d.mts +1 -0
- package/dist/functions/exec-async.d.mts.map +1 -1
- package/dist/functions/exec-async.mjs +2 -0
- package/dist/functions/exec-async.mjs.map +1 -1
- package/dist/functions/format.d.mts +10 -3
- package/dist/functions/format.d.mts.map +1 -1
- package/dist/functions/format.mjs +10 -3
- package/dist/functions/format.mjs.map +1 -1
- package/dist/functions/gen-index.d.mts +19 -6
- package/dist/functions/gen-index.d.mts.map +1 -1
- package/dist/functions/gen-index.mjs +63 -42
- package/dist/functions/gen-index.mjs.map +1 -1
- package/dist/functions/should-run.d.mts +8 -5
- package/dist/functions/should-run.d.mts.map +1 -1
- package/dist/functions/should-run.mjs +8 -5
- package/dist/functions/should-run.mjs.map +1 -1
- package/dist/functions/workspace-utils/execute-parallel.d.mts +11 -6
- package/dist/functions/workspace-utils/execute-parallel.d.mts.map +1 -1
- package/dist/functions/workspace-utils/execute-parallel.mjs +50 -38
- package/dist/functions/workspace-utils/execute-parallel.mjs.map +1 -1
- package/dist/functions/workspace-utils/get-workspace-packages.d.mts +7 -4
- package/dist/functions/workspace-utils/get-workspace-packages.d.mts.map +1 -1
- package/dist/functions/workspace-utils/get-workspace-packages.mjs +7 -4
- package/dist/functions/workspace-utils/get-workspace-packages.mjs.map +1 -1
- package/dist/functions/workspace-utils/run-cmd-in-parallel.d.mts +7 -3
- package/dist/functions/workspace-utils/run-cmd-in-parallel.d.mts.map +1 -1
- package/dist/functions/workspace-utils/run-cmd-in-parallel.mjs +9 -5
- package/dist/functions/workspace-utils/run-cmd-in-parallel.mjs.map +1 -1
- package/dist/functions/workspace-utils/run-cmd-in-stages.d.mts +10 -6
- package/dist/functions/workspace-utils/run-cmd-in-stages.d.mts.map +1 -1
- package/dist/functions/workspace-utils/run-cmd-in-stages.mjs +12 -8
- package/dist/functions/workspace-utils/run-cmd-in-stages.mjs.map +1 -1
- package/dist/globals.d.mts +1 -0
- package/dist/node-global.d.mts.map +1 -1
- package/dist/node-global.mjs +1 -0
- package/dist/node-global.mjs.map +1 -1
- package/package.json +19 -8
- package/src/functions/assert-ext.mts +38 -19
- package/src/functions/assert-path-exists.mts +2 -0
- package/src/functions/assert-repo-is-clean.mts +4 -2
- package/src/functions/diff.mts +2 -6
- package/src/functions/diff.test.mts +31 -24
- package/src/functions/exec-async.mts +2 -0
- package/src/functions/format.mts +10 -3
- package/src/functions/format.test.mts +8 -4
- package/src/functions/gen-index.mts +146 -62
- package/src/functions/should-run.mts +8 -5
- package/src/functions/workspace-utils/execute-parallel.mts +52 -39
- package/src/functions/workspace-utils/get-workspace-packages.mts +7 -4
- package/src/functions/workspace-utils/run-cmd-in-parallel.mts +9 -5
- package/src/functions/workspace-utils/run-cmd-in-stages.mts +12 -8
- package/src/globals.d.mts +1 -0
- package/src/node-global.mts +3 -0
- package/src/functions/gen-index.test.mts +0 -18
package/src/node-global.mts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { default as glob_ } from 'fast-glob';
|
|
2
2
|
import * as fs_ from 'node:fs/promises';
|
|
3
3
|
import * as path_ from 'node:path';
|
|
4
|
+
|
|
5
|
+
// eslint-disable-next-line import/no-internal-modules
|
|
4
6
|
import { $ as $_ } from './functions/exec-async.mjs';
|
|
5
7
|
|
|
6
8
|
const globalsDef = {
|
|
@@ -12,6 +14,7 @@ const globalsDef = {
|
|
|
12
14
|
glob: glob_,
|
|
13
15
|
} as const;
|
|
14
16
|
|
|
17
|
+
// eslint-disable-next-line functional/immutable-data
|
|
15
18
|
Object.assign(globalThis, globalsDef);
|
|
16
19
|
|
|
17
20
|
declare global {
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
describe('index file regex', () => {
|
|
2
|
-
const reg = /^index\.[cm]?[jt]s[x]?$/u;
|
|
3
|
-
|
|
4
|
-
test.each([
|
|
5
|
-
['index.ts', true],
|
|
6
|
-
['index.js', true],
|
|
7
|
-
['index.mts', true],
|
|
8
|
-
['index.mjs', true],
|
|
9
|
-
['index.cts', true],
|
|
10
|
-
['index.cjs', true],
|
|
11
|
-
['index.tsx', true],
|
|
12
|
-
['index.jsx', true],
|
|
13
|
-
['not-index.ts', false],
|
|
14
|
-
['index.txt', false],
|
|
15
|
-
] as const)('reg.test($0) to be $1', (fileName, expected) => {
|
|
16
|
-
expect(reg.test(fileName)).toBe(expected);
|
|
17
|
-
});
|
|
18
|
-
});
|