Compare commits

...

3 Commits

Author SHA1 Message Date
Jarred Sumner
db04688674 Merge branch 'main' into dylan/_write-return-undefined 2025-07-14 04:15:31 -07:00
Jarred Sumner
5b70d1f767 Merge branch 'main' into dylan/_write-return-undefined 2025-05-23 18:35:48 -07:00
Dylan Conway
b18cc5c2c7 dont return boolean 2025-04-05 00:53:01 -07:00

View File

@@ -567,10 +567,8 @@ function _write(data, encoding, cb) {
cb(null);
})
.catch(cb);
return false; // Indicate backpressure
} else {
cb(null);
return true; // No backpressure
}
} else {
writeAll.$call(this, data, data.length, this.pos, er => {
@@ -607,14 +605,11 @@ function underscoreWriteFast(this: FSStream, data: any, encoding: any, cb: any)
cb(null);
this.emit("drain");
}, cb);
return false;
} else {
if (cb) process.nextTick(cb, null);
return true;
}
} catch (e) {
if (cb) process.nextTick(cb, e);
return false;
}
}
@@ -642,19 +637,16 @@ function writeFast(this: FSStream, data: any, encoding: any, cb: any) {
cb(null);
})
.catch(cb);
return false; // Indicate backpressure
} else {
cb(null);
return true; // No backpressure
}
} else {
const result: any = this._write(data, encoding, cb);
this._write(data, encoding, cb);
if (this.write === writeFast) {
this.write = writablePrototypeWrite;
} else {
this[kWriteMonkeyPatchDefense] = true;
}
return result;
}
}
@@ -679,10 +671,8 @@ writeStreamPrototype._writev = function (data, cb) {
cb(null);
})
.catch(cb);
return false;
} else {
cb(null);
return true;
}
} else {
writevAll.$call(this, chunks, size, this.pos, er => {