Commit c06d3c6

Anton Golub <antongolub@antongolub.com>
2025-07-28 20:46:53
chore: minor code imprs (#1289)
1 parent 95b844d
build/core.cjs
@@ -888,17 +888,15 @@ var _ProcessOutput = class _ProcessOutput extends Error {
       stdout: { get: (0, import_util.once)(() => (0, import_util.bufArrJoin)(dto.store.stdout)) },
       stderr: { get: (0, import_util.once)(() => (0, import_util.bufArrJoin)(dto.store.stderr)) },
       stdall: { get: (0, import_util.once)(() => (0, import_util.bufArrJoin)(dto.store.stdall)) },
-      message: {
-        get: (0, import_util.once)(
-          () => message || dto.error ? _ProcessOutput.getErrorMessage(dto.error || new Error(message), dto.from) : _ProcessOutput.getExitMessage(
-            dto.code,
-            dto.signal,
-            this.stderr,
-            dto.from,
-            this.stderr.trim() ? "" : _ProcessOutput.getErrorDetails(this.lines())
-          )
+      message: { get: (0, import_util.once)(
+        () => dto.error || message ? _ProcessOutput.getErrorMessage(dto.error || new Error(message), dto.from) : _ProcessOutput.getExitMessage(
+          dto.code,
+          dto.signal,
+          this.stderr,
+          dto.from,
+          this.stderr.trim() ? "" : _ProcessOutput.getErrorDetails(this.lines())
         )
-      }
+      ) }
     });
   }
   get exitCode() {
build/util.cjs
@@ -101,9 +101,7 @@ var getLines = (chunk, next, delimiter) => {
 var iteratorToArray = (it) => {
   const arr = [];
   let entry;
-  while (!(entry = it.next()).done) {
-    arr.push(entry.value);
-  }
+  while (!(entry = it.next()).done) arr.push(entry.value);
   return arr;
 };
 /* c8 ignore next 100 */
src/core.ts
@@ -775,17 +775,16 @@ export class ProcessOutput extends Error {
       stderr: { get: once(() => bufArrJoin(dto.store.stderr)) },
       stdall: { get: once(() => bufArrJoin(dto.store.stdall)) },
       message: { get: once(() =>
-          message || dto.error
-            ? ProcessOutput.getErrorMessage(dto.error || new Error(message), dto.from)
-            : ProcessOutput.getExitMessage(
-              dto.code,
-              dto.signal,
-              this.stderr,
-              dto.from,
-              this.stderr.trim() ? '' : ProcessOutput.getErrorDetails(this.lines())
-            )
-        ),
-      },
+        dto.error || message
+          ? ProcessOutput.getErrorMessage(dto.error || new Error(message), dto.from)
+          : ProcessOutput.getExitMessage(
+            dto.code,
+            dto.signal,
+            this.stderr,
+            dto.from,
+            this.stderr.trim() ? '' : ProcessOutput.getErrorDetails(this.lines())
+          )
+      )},
     })
   }
 
src/util.ts
@@ -158,8 +158,6 @@ export const getLines = (
 export const iteratorToArray = <T>(it: Iterator<T>): T[] => {
   const arr = []
   let entry
-  while (!(entry = it.next()).done) {
-    arr.push(entry.value)
-  }
+  while (!(entry = it.next()).done) arr.push(entry.value)
   return arr
 }
.size-limit.json
@@ -15,7 +15,7 @@
       "README.md",
       "LICENSE"
     ],
-    "limit": "122.50 kB",
+    "limit": "122.45 kB",
     "brotli": false,
     "gzip": false
   },