difftab 0.5.1 → 0.5.2

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.
@@ -2559,12 +2559,15 @@ function fail(message) {
2559
2559
  * EPIPE 失败,而**在 Windows 上管道写是异步的**(POSIX 上同步),失败因此以一个 `'error'`
2560
2560
  * 事件到达——零监听器的流收到 `'error'` 就是整个进程带着裸栈以 1 退出。
2561
2561
  *
2562
- * 服务本身没坏(浏览器照常用得上),所以这里只是把 EPIPE 咽掉。**非 EPIPE 的错误照旧抛**:
2562
+ * **macOS 上同一件事还有第二个码**:stdio 管道在那里是 unix socket,对端刚关闭时内核偶尔回
2563
+ * EPROTOTYPE,libuv 把它翻译成 ECONNRESET——与 EPIPE 是同一个事实的两种拼法。
2564
+ *
2565
+ * 服务本身没坏(浏览器照常用得上),所以这里只是把这两个码咽掉。**别的错误照旧抛**:
2563
2566
  * 那是真出事了,不该借这条路一起被吞掉。
2564
2567
  */
2565
2568
  function ignoreBrokenPipe(stream) {
2566
2569
  stream.on("error", (cause) => {
2567
- if (cause.code !== "EPIPE") throw cause;
2570
+ if (cause.code !== "EPIPE" && cause.code !== "ECONNRESET") throw cause;
2568
2571
  });
2569
2572
  }
2570
2573
  async function main(argv) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "difftab",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "See what your AI coding agent changed — a read-only git diff viewer in one browser tab",
5
5
  "license": "MIT",
6
6
  "author": "zhangwanli",