mirror of
https://github.com/overleaf/overleaf.git
synced 2024-09-16 02:52:31 -04:00
2dae2780c1
* Update `@google-cloud/storage` and remove its patches * Re-add patch on `@google-cloud/storage/retry-request` Replace mentions of `.pipe()` and run `patch-package @google-cloud/storage/retry-request` It was very hard to test whether the package could still cause bugs, so I'd rather put the patch back GitOrigin-RevId: be83b54b6d55849995ac131bfcf3c9acd9b6dd8e
30 lines
1.3 KiB
Diff
30 lines
1.3 KiB
Diff
diff --git a/node_modules/@google-cloud/storage/node_modules/retry-request/index.js b/node_modules/@google-cloud/storage/node_modules/retry-request/index.js
|
|
index 2fae107..32ec707 100644
|
|
--- a/node_modules/@google-cloud/storage/node_modules/retry-request/index.js
|
|
+++ b/node_modules/@google-cloud/storage/node_modules/retry-request/index.js
|
|
@@ -1,6 +1,6 @@
|
|
'use strict';
|
|
|
|
-const {PassThrough} = require('stream');
|
|
+const {PassThrough, pipeline} = require('stream');
|
|
const extend = require('extend');
|
|
|
|
let debug = () => {};
|
|
@@ -185,7 +185,7 @@ function retryRequest(requestOpts, opts, callback) {
|
|
.on('complete', (...params) => handleFinish(params))
|
|
.on('finish', (...params) => handleFinish(params));
|
|
|
|
- requestStream.pipe(delayStream);
|
|
+ pipeline(requestStream, delayStream, () => {});
|
|
} else {
|
|
activeRequest = opts.request(requestOpts, onResponse);
|
|
}
|
|
@@ -251,7 +251,7 @@ function retryRequest(requestOpts, opts, callback) {
|
|
// No more attempts need to be made, just continue on.
|
|
if (streamMode) {
|
|
retryStream.emit('response', response);
|
|
- delayStream.pipe(retryStream);
|
|
+ pipeline(delayStream, retryStream, () => {});
|
|
requestStream.on('error', err => {
|
|
retryStream.destroy(err);
|
|
});
|