mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Yarn 4 Migration (#32253)
Migrates the Overleaf monorepo package manager from npm (v11) to Yarn 4 (v4.9.1) using node-modules linker mode. GitOrigin-RevId: 50d32ab01955c15e29679eff9e9e9cfb897fab2d
This commit is contained in:
committed by
Copybot
parent
ed0fb0110a
commit
0d64a88a46
76
.yarn/patches/node-fetch-npm-2.7.0.patch
Normal file
76
.yarn/patches/node-fetch-npm-2.7.0.patch
Normal file
@@ -0,0 +1,76 @@
|
||||
diff --git a/lib/index.js b/lib/index.js
|
||||
index 567ff5d..8eb45f7 100644
|
||||
--- a/lib/index.js
|
||||
+++ b/lib/index.js
|
||||
@@ -545,8 +545,8 @@ function clone(instance) {
|
||||
// tee instance body
|
||||
p1 = new PassThrough();
|
||||
p2 = new PassThrough();
|
||||
- body.pipe(p1);
|
||||
- body.pipe(p2);
|
||||
+ Stream.pipeline(body, p1, () => {});
|
||||
+ Stream.pipeline(body, p2, () => {});
|
||||
// set instance body to teed body and return the other teed body
|
||||
instance[INTERNALS].body = p1;
|
||||
body = p2;
|
||||
@@ -648,14 +648,14 @@ function writeToStream(dest, instance) {
|
||||
// body is null
|
||||
dest.end();
|
||||
} else if (isBlob(body)) {
|
||||
- body.stream().pipe(dest);
|
||||
+ Stream.pipeline(body.stream(), dest, () => {});
|
||||
} else if (Buffer.isBuffer(body)) {
|
||||
// body is buffer
|
||||
dest.write(body);
|
||||
dest.end();
|
||||
} else {
|
||||
// body is stream
|
||||
- body.pipe(dest);
|
||||
+ Stream.pipeline(body, dest, () => {});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1638,7 +1638,7 @@ function fetch(url, opts) {
|
||||
res.once('end', function () {
|
||||
if (signal) signal.removeEventListener('abort', abortAndFinalize);
|
||||
});
|
||||
- let body = res.pipe(new PassThrough$1());
|
||||
+ let body = Stream.pipeline(res, new PassThrough(), error => { if (error) reject(error); });
|
||||
|
||||
const response_options = {
|
||||
url: request.url,
|
||||
@@ -1679,7 +1679,7 @@ function fetch(url, opts) {
|
||||
|
||||
// for gzip
|
||||
if (codings == 'gzip' || codings == 'x-gzip') {
|
||||
- body = body.pipe(zlib.createGunzip(zlibOptions));
|
||||
+ body = Stream.pipeline(body, zlib.createGunzip(zlibOptions), error => { if (error) reject(error); });
|
||||
response = new Response(body, response_options);
|
||||
resolve(response);
|
||||
return;
|
||||
@@ -1689,13 +1689,13 @@ function fetch(url, opts) {
|
||||
if (codings == 'deflate' || codings == 'x-deflate') {
|
||||
// handle the infamous raw deflate response from old servers
|
||||
// a hack for old IIS and Apache servers
|
||||
- const raw = res.pipe(new PassThrough$1());
|
||||
+ const raw = Stream.pipeline(res, new PassThrough(), error => { if (error) reject(error); });
|
||||
raw.once('data', function (chunk) {
|
||||
// see http://stackoverflow.com/questions/37519828
|
||||
if ((chunk[0] & 0x0F) === 0x08) {
|
||||
- body = body.pipe(zlib.createInflate());
|
||||
+ body = Stream.pipeline(body, zlib.createInflate(), error => { if (error) reject(error); });
|
||||
} else {
|
||||
- body = body.pipe(zlib.createInflateRaw());
|
||||
+ body = Stream.pipeline(body, zlib.createInflateRaw(), error => { if (error) reject(error); });
|
||||
}
|
||||
response = new Response(body, response_options);
|
||||
resolve(response);
|
||||
@@ -1712,7 +1712,7 @@ function fetch(url, opts) {
|
||||
|
||||
// for br
|
||||
if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') {
|
||||
- body = body.pipe(zlib.createBrotliDecompress());
|
||||
+ body = Stream.pipeline(body, zlib.createBrotliDecompress(), error => { if (error) reject(error); });
|
||||
response = new Response(body, response_options);
|
||||
resolve(response);
|
||||
return;
|
||||
Reference in New Issue
Block a user