ts-repo-utils 7.6.0 → 7.7.1

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
@@ -750,6 +750,8 @@ const configJson: string = await fs.readFile('./config.json', {
750
750
  encoding: 'utf8',
751
751
  });
752
752
 
753
+ const home = os.homedir();
754
+
753
755
  const files: readonly string[] = await glob('**/*.ts');
754
756
 
755
757
  if (isDirectlyExecuted(import.meta.url)) {
@@ -762,6 +764,7 @@ if (isDirectlyExecuted(import.meta.url)) {
762
764
  - `echo` - Equivalent to `console.log`
763
765
  - `path` - `node:path`
764
766
  - `fs` - `node:fs/promises`
767
+ - `os` - `node:os`
765
768
  - `glob` - `fast-glob`
766
769
  - `isDirectlyExecuted` - The script execution utility described above.
767
770
 
@@ -11,7 +11,7 @@ import 'node:fs/promises';
11
11
 
12
12
  const cmdDef = cmd.command({
13
13
  name: 'assert-repo-is-clean-cli',
14
- version: '7.6.0',
14
+ version: '7.7.1',
15
15
  args: {
16
16
  silent: cmd.flag({
17
17
  long: 'silent',
@@ -11,7 +11,7 @@ import { checkShouldRunTypeChecks } from '../functions/should-run.mjs';
11
11
 
12
12
  const cmdDef = cmd.command({
13
13
  name: 'check-should-run-type-checks-cli',
14
- version: '7.6.0',
14
+ version: '7.7.1',
15
15
  args: {
16
16
  pathsIgnore: cmd.multioption({
17
17
  long: 'paths-ignore',
@@ -10,7 +10,7 @@ import 'node:fs/promises';
10
10
 
11
11
  const cmdDef = cmd.command({
12
12
  name: 'format-diff-from-cli',
13
- version: '7.6.0',
13
+ version: '7.7.1',
14
14
  args: {
15
15
  base: cmd.positional({
16
16
  type: cmd.string,
@@ -10,7 +10,7 @@ import 'node:fs/promises';
10
10
 
11
11
  const cmdDef = cmd.command({
12
12
  name: 'format-uncommitted-cli',
13
- version: '7.6.0',
13
+ version: '7.7.1',
14
14
  args: {
15
15
  excludeUntracked: cmd.flag({
16
16
  long: 'exclude-untracked',
@@ -29,7 +29,7 @@ const nonEmptyArray = (t, commandName) => cmd.extendType(cmd.array(t), {
29
29
  });
30
30
  const cmdDef = cmd.command({
31
31
  name: 'gen-index-ts-cli',
32
- version: '7.6.0',
32
+ version: '7.7.1',
33
33
  args: {
34
34
  // required args
35
35
  targetDirectory: cmd.positional({
@@ -1,17 +1,19 @@
1
1
  import glob_ from 'fast-glob';
2
2
  import * as fs_ from 'node:fs/promises';
3
+ import * as os_ from 'node:os';
3
4
  import * as path_ from 'node:path';
4
5
  import { Result as Result_ } from 'ts-data-forge';
5
6
  import { $ as $_ } from './functions/exec-async.mjs';
6
7
  import { isDirectlyExecuted as isDirectlyExecuted_ } from './functions/is-directly-executed.mjs';
7
8
  declare global {
8
- const $: typeof $_;
9
- const echo: typeof console.log;
10
9
  const path: typeof path_;
11
10
  const fs: typeof fs_;
11
+ const os: typeof os_;
12
12
  const glob: typeof glob_;
13
- const isDirectlyExecuted: typeof isDirectlyExecuted_;
13
+ const $: typeof $_;
14
14
  const Result: typeof Result_;
15
15
  type Result<S, E> = Result_<S, E>;
16
+ const echo: typeof console.log;
17
+ const isDirectlyExecuted: typeof isDirectlyExecuted_;
16
18
  }
17
19
  //# sourceMappingURL=node-global.d.mts.map
@@ -1 +1 @@
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,M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,kBAAkB,EAAE,OAAO,mBAAmB,CAAC;CACtD"}
@@ -1,5 +1,6 @@
1
1
  import glob_ from 'fast-glob';
2
2
  import * as fs from 'node:fs/promises';
3
+ import * as os_ from 'node:os';
3
4
  import * as path_ from 'node:path';
4
5
  import { Result } from 'ts-data-forge';
5
6
  import { $ } from './functions/exec-async.mjs';
@@ -7,15 +8,17 @@ import { isDirectlyExecuted } from './functions/is-directly-executed.mjs';
7
8
 
8
9
  /* eslint-disable import/no-internal-modules */
9
10
  const globalsDef = {
10
- $: $,
11
- echo: console.log,
12
11
  // eslint-disable-next-line tree-shakable/import-star
13
12
  path: path_,
14
13
  // eslint-disable-next-line tree-shakable/import-star
15
14
  fs: fs,
15
+ // eslint-disable-next-line tree-shakable/import-star
16
+ os: os_,
16
17
  glob: glob_,
17
- isDirectlyExecuted: isDirectlyExecuted,
18
+ $: $,
18
19
  Result: Result,
20
+ echo: console.log,
21
+ isDirectlyExecuted: isDirectlyExecuted,
19
22
  };
20
23
  // eslint-disable-next-line functional/immutable-data
21
24
  Object.assign(globalThis, globalsDef);
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"node-global.mjs","sources":["../src/node-global.mts"],"sourcesContent":[null],"names":["fs_","$_","Result_","isDirectlyExecuted_"],"mappings":";;;;;;;;AAAA;AASA,MAAM,UAAU,GAAG;;AAEjB,IAAA,IAAI,EAAE,KAAK;;AAEX,IAAA,EAAE,EAAEA,EAAG;;AAEP,IAAA,EAAE,EAAE,GAAG;AACP,IAAA,IAAI,EAAE,KAAK;AAEX,IAAA,CAAC,EAAEC,CAAE;AACL,IAAA,MAAM,EAAEC,MAAO;IACf,IAAI,EAAE,OAAO,CAAC,GAAG;AACjB,IAAA,kBAAkB,EAAEC,kBAAmB;CAC/B;AAEV;AACA,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ts-repo-utils",
3
- "version": "7.6.0",
3
+ "version": "7.7.1",
4
4
  "private": false,
5
5
  "keywords": [
6
6
  "typescript"
@@ -78,7 +78,7 @@
78
78
  "fast-glob": "^3.3.3",
79
79
  "micromatch": "^4.0.8",
80
80
  "prettier": "^3.6.2",
81
- "ts-data-forge": "^3.2.0",
81
+ "ts-data-forge": "^3.3.0",
82
82
  "tsx": "^4.20.5"
83
83
  },
84
84
  "devDependencies": {
@@ -93,29 +93,29 @@
93
93
  "@semantic-release/github": "^11.0.6",
94
94
  "@semantic-release/npm": "^12.0.2",
95
95
  "@semantic-release/release-notes-generator": "^14.1.0",
96
- "@types/node": "^24.3.3",
96
+ "@types/node": "^24.5.2",
97
97
  "@vitest/coverage-v8": "^3.2.4",
98
98
  "@vitest/ui": "^3.2.4",
99
99
  "conventional-changelog-conventionalcommits": "^9.1.0",
100
100
  "cspell": "^9.2.1",
101
101
  "dedent": "^1.7.0",
102
- "eslint": "^9.35.0",
102
+ "eslint": "^9.36.0",
103
103
  "eslint-config-typed": "^1.2.2",
104
104
  "fast-glob": "^3.3.3",
105
105
  "markdownlint-cli2": "^0.18.1",
106
106
  "npm-run-all2": "^8.0.4",
107
107
  "octokit-safe-types": "^1.0.0",
108
108
  "prettier": "^3.6.2",
109
- "prettier-plugin-organize-imports": "^4.2.0",
109
+ "prettier-plugin-organize-imports": "^4.3.0",
110
110
  "prettier-plugin-packagejson": "^2.5.19",
111
- "rollup": "^4.50.1",
112
- "semantic-release": "^24.2.8",
111
+ "rollup": "^4.52.3",
112
+ "semantic-release": "^24.2.9",
113
113
  "ts-fortress": "^4.3.0",
114
114
  "ts-repo-utils": "^7.5.0",
115
115
  "ts-type-forge": "^2.2.0",
116
116
  "tslib": "^2.8.1",
117
117
  "typedoc": "^0.28.13",
118
- "typedoc-plugin-markdown": "^4.8.1",
118
+ "typedoc-plugin-markdown": "^4.9.0",
119
119
  "typescript": "^5.9.2",
120
120
  "vitest": "^3.2.4"
121
121
  },
@@ -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: '7.6.0',
8
+ version: '7.7.1',
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: '7.6.0',
8
+ version: '7.7.1',
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: '7.6.0',
9
+ version: '7.7.1',
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: '7.6.0',
9
+ version: '7.7.1',
10
10
  args: {
11
11
  excludeUntracked: cmd.flag({
12
12
  long: 'exclude-untracked',
@@ -40,7 +40,7 @@ const nonEmptyArray = <T extends cmd.Type<any, any>>(
40
40
 
41
41
  const cmdDef = cmd.command({
42
42
  name: 'gen-index-ts-cli',
43
- version: '7.6.0',
43
+ version: '7.7.1',
44
44
  args: {
45
45
  // required args
46
46
  targetDirectory: cmd.positional({
@@ -1,35 +1,39 @@
1
1
  /* eslint-disable import/no-internal-modules */
2
2
  import glob_ from 'fast-glob';
3
3
  import * as fs_ from 'node:fs/promises';
4
+ import * as os_ from 'node:os';
4
5
  import * as path_ from 'node:path';
5
6
  import { Result as Result_ } from 'ts-data-forge';
6
7
  import { $ as $_ } from './functions/exec-async.mjs';
7
8
  import { isDirectlyExecuted as isDirectlyExecuted_ } from './functions/is-directly-executed.mjs';
8
9
 
9
10
  const globalsDef = {
10
- $: $_,
11
- echo: console.log,
12
-
13
11
  // eslint-disable-next-line tree-shakable/import-star
14
12
  path: path_,
15
13
  // eslint-disable-next-line tree-shakable/import-star
16
14
  fs: fs_,
15
+ // eslint-disable-next-line tree-shakable/import-star
16
+ os: os_,
17
17
  glob: glob_,
18
- isDirectlyExecuted: isDirectlyExecuted_,
18
+
19
+ $: $_,
19
20
  Result: Result_,
21
+ echo: console.log,
22
+ isDirectlyExecuted: isDirectlyExecuted_,
20
23
  } as const;
21
24
 
22
25
  // eslint-disable-next-line functional/immutable-data
23
26
  Object.assign(globalThis, globalsDef);
24
27
 
25
28
  declare global {
26
- const $: typeof $_;
27
- const echo: typeof console.log;
28
-
29
29
  const path: typeof path_;
30
30
  const fs: typeof fs_;
31
+ const os: typeof os_;
31
32
  const glob: typeof glob_;
32
- const isDirectlyExecuted: typeof isDirectlyExecuted_;
33
+
34
+ const $: typeof $_;
33
35
  const Result: typeof Result_;
34
36
  type Result<S, E> = Result_<S, E>;
37
+ const echo: typeof console.log;
38
+ const isDirectlyExecuted: typeof isDirectlyExecuted_;
35
39
  }