chore(libuv): Update to 1.51.0 (#22942)

### What does this PR do?

Uprevs `libuv` to version `1.51.0`.

### How did you verify your code works?

CI passes.

---------

Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
This commit is contained in:
Marko Vejnovic
2025-09-24 20:55:25 -07:00
committed by GitHub
parent fee28ca66f
commit e3783c244f
5 changed files with 20 additions and 11 deletions

View File

@@ -4,7 +4,8 @@ register_repository(
REPOSITORY
libuv/libuv
COMMIT
da527d8d2a908b824def74382761566371439003
# Corresponds to v1.51.0
5152db2cbfeb5582e9c27c5ea1dba2cd9e10759b
)
if(WIN32)

View File

@@ -31,10 +31,10 @@
*/
#define UV_VERSION_MAJOR 1
#define UV_VERSION_MINOR 50
#define UV_VERSION_PATCH 1
#define UV_VERSION_IS_RELEASE 0
#define UV_VERSION_SUFFIX "dev"
#define UV_VERSION_MINOR 51
#define UV_VERSION_PATCH 0
#define UV_VERSION_IS_RELEASE 1
#define UV_VERSION_SUFFIX ""
#define UV_VERSION_HEX ((UV_VERSION_MAJOR << 16) | \
(UV_VERSION_MINOR << 8) | \

View File

@@ -351,6 +351,14 @@ pub fn onReadChunk(this: *@This(), init_buf: []const u8, state: bun.io.ReadState
else => @panic("Invalid state"),
}
} else if (this.pending.state == .pending) {
// Certain readers (such as pipes) may return 0-byte reads even when
// not at EOF. Consequently, we need to check whether the reader is
// actually done or not.
if (buf.len == 0 and state == .drained) {
// If the reader is not done, we still want to keep reading.
return true;
}
defer {
this.pending_value.clearWithoutDeallocation();
this.pending_view = &.{};

View File

@@ -143,10 +143,10 @@ pub const UV__ENODATA = -@as(c_int, 4024);
pub const UV__EUNATCH = -@as(c_int, 4023);
pub const UV_VERSION_H = "";
pub const UV_VERSION_MAJOR = @as(c_int, 1);
pub const UV_VERSION_MINOR = @as(c_int, 46);
pub const UV_VERSION_PATCH = @as(c_int, 1);
pub const UV_VERSION_IS_RELEASE = @as(c_int, 0);
pub const UV_VERSION_SUFFIX = "dev";
pub const UV_VERSION_MINOR = @as(c_int, 51);
pub const UV_VERSION_PATCH = @as(c_int, 0);
pub const UV_VERSION_IS_RELEASE = @as(c_int, 1);
pub const UV_VERSION_SUFFIX = "";
pub const UV_VERSION_HEX = ((UV_VERSION_MAJOR << @as(c_int, 16)) | (UV_VERSION_MINOR << @as(c_int, 8))) | UV_VERSION_PATCH;
pub const UV_THREADPOOL_H_ = "";
@@ -2981,7 +2981,7 @@ fn StreamMixin(comptime Type: type) type {
req.readStop();
error_cb(context_data, ReturnCodeI64.init(nreads).errEnum() orelse bun.sys.E.CANCELED);
} else {
read_cb(context_data, buffer.slice());
read_cb(context_data, buffer.base[0..@intCast(nreads)]);
}
}
};

View File

@@ -448,7 +448,7 @@ for (let [gcTick, label] of [
for (const [callback, fixture] of fixtures) {
describe(fixture.slice(0, 12), () => {
describe("should should allow reading stdout", () => {
describe("should allow reading stdout", () => {
it("before exit", async () => {
const process = callback();
const output = await process.stdout.text();