Commit 4cd0980

Anton Golub <antongolub@antongolub.com>
2025-07-30 06:57:48
fix: make `ProcessPromise.finalize()` once called (#1294)
1 parent 0eb9895
Changed files (3)
build/core.cjs
@@ -594,6 +594,7 @@ var _ProcessPromise = class _ProcessPromise extends Promise {
     return this;
   }
   finalize(output, legacy = false) {
+    if (this.isSettled()) return;
     this._output = output;
     if (output.ok || this.isNothrow()) {
       this._stage = "fulfilled";
src/core.ts
@@ -377,6 +377,7 @@ export class ProcessPromise extends Promise<ProcessOutput> {
   }
 
   private finalize(output: ProcessOutput, legacy = false): void {
+    if (this.isSettled()) return
     this._output = output
     if (output.ok || this.isNothrow()) {
       this._stage = 'fulfilled'
.size-limit.json
@@ -15,7 +15,7 @@
       "README.md",
       "LICENSE"
     ],
-    "limit": "122.45 kB",
+    "limit": "122.50 kB",
     "brotli": false,
     "gzip": false
   },