@oh-my-pi/pi-git-tool 3.30.0 → 3.32.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/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [3.32.0] - 2026-01-08
6
+
7
+ ## [3.31.0] - 2026-01-08
8
+
5
9
  ## [3.30.0] - 2026-01-07
6
10
 
7
11
  ## [3.25.0] - 2026-01-07
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oh-my-pi/pi-git-tool",
3
- "version": "3.30.0",
3
+ "version": "3.32.0",
4
4
  "description": "Structured Git tool with safety guards and typed output",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
package/src/utils.ts CHANGED
@@ -14,22 +14,6 @@ export interface ExecOptions {
14
14
  timeout?: number;
15
15
  }
16
16
 
17
- async function readStream(stream: ReadableStream<Uint8Array> | undefined): Promise<string> {
18
- if (!stream) return "";
19
- const reader = stream.getReader();
20
- const chunks: Uint8Array[] = [];
21
- try {
22
- while (true) {
23
- const { done, value } = await reader.read();
24
- if (done) break;
25
- chunks.push(value);
26
- }
27
- } finally {
28
- reader.releaseLock();
29
- }
30
- return Buffer.concat(chunks).toString();
31
- }
32
-
33
17
  export async function exec(command: string, args: string[], options?: ExecOptions): Promise<ExecResult> {
34
18
  const cwd = options?.cwd ?? process.cwd();
35
19
  const proc: Subprocess = Bun.spawn([command, ...args], {
@@ -71,8 +55,8 @@ export async function exec(command: string, args: string[], options?: ExecOption
71
55
  }
72
56
 
73
57
  const [stdout, stderr, exitCode] = await Promise.all([
74
- readStream(proc.stdout as ReadableStream<Uint8Array>),
75
- readStream(proc.stderr as ReadableStream<Uint8Array>),
58
+ (proc.stdout as ReadableStream<Uint8Array>).text(),
59
+ (proc.stderr as ReadableStream<Uint8Array>).text(),
76
60
  proc.exited,
77
61
  ]);
78
62