build: update to yarn v4 (#48994)

* build: update to yarn v4

(cherry picked from commit 6adec744f3411240a63fd194a319b510872eca93)

* chore: fixup types after yarn v4 migration

* chore: update nan yarn.lock patch

* build: automatically install git for dugite
This commit is contained in:
John Kleinschmidt 2025-11-19 17:32:30 -05:00 committed by GitHub
commit b2e73d28e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
48 changed files with 18341 additions and 11314 deletions

View file

@ -119,7 +119,10 @@ export function fetchWithSession (input: RequestInfo, init: (RequestInit & {bypa
p.reject(err);
});
if (!req.body?.pipeTo(Writable.toWeb(r as unknown as Writable)).then(() => r.end())) { r.end(); }
// pipeTo expects a WritableStream<Uint8Array>. Node.js' Writable.toWeb returns WritableStream<any>,
// which causes a TS structural mismatch.
const writable = Writable.toWeb(r as unknown as Writable) as unknown as WritableStream<Uint8Array>;
if (!req.body?.pipeTo(writable).then(() => r.end())) { r.end(); }
return p.promise;
}