Upgrade node-fetch to 2.7.0 (#20165)
* Set `node-fetch` to `^2.7.0`
* Update package-lock.json
```
# root
bin/npm update node-fetch
bin/npm update cross-fetch
# in other path in docker
npm update node-fetch
```
* Update node-fetch patch
* [fetch-utils] Skip the test: destroys the request body if it doesn't get consumed
```
1) fetch-utils
fetchJson
destroys the request body if it doesn't get consumed:
FetchError: Invalid response body while trying to fetch http://example.com:30001/json/ignore-request: write EPIPE
at PassThrough.<anonymous> (/overleaf/node_modules/node-fetch/lib/index.js:400:12)
at PassThrough.emit (node:events:529:35)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
```
* [fetch-utils] Delete the test: destroys the request body if it doesn't get consumed
* Remove the `setTimeout` in the node-fetch patch
Fixes a test and doesn't break filestore acceptance tests
* Update node-fetch patch again: bring changes from https://github.com/node-fetch/node-fetch/blob/e87b093/src/index.js
* Update node-fetch patch again: bring changes from https://github.com/node-fetch/node-fetch/blob/e87b093/src/index.js
* Update node-fetch patches back to single lines
Per https://github.com/overleaf/internal/pull/20165#discussion_r1739035513
GitOrigin-RevId: 945e5a12e838673b7bc87b588b7aca1bcd9109e2
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
"chai-as-promised": "^7.1.1",
|
||||
"mocha": "^10.2.0",
|
||||
"mock-fs": "^5.1.2",
|
||||
"node-fetch": "^2.6.7",
|
||||
"node-fetch": "^2.7.0",
|
||||
"sandboxed-module": "^2.0.4",
|
||||
"sinon": "~9.0.1",
|
||||
"sinon-chai": "^3.7.0",
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"express": "^4.19.2",
|
||||
"glob": "^7.1.6",
|
||||
"lodash.once": "^4.1.1",
|
||||
"node-fetch": "^2.6.7",
|
||||
"node-fetch": "^2.7.0",
|
||||
"range-parser": "^1.2.1",
|
||||
"tiny-async-pool": "^1.1.0"
|
||||
},
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"chai": "^4.3.6",
|
||||
"chai-as-promised": "^7.1.1",
|
||||
"mocha": "^10.2.0",
|
||||
"node-fetch": "^2.6.7",
|
||||
"node-fetch": "^2.7.0",
|
||||
"sinon": "^9.0.2",
|
||||
"swagger-client": "^3.10.0",
|
||||
"typescript": "^5.0.4",
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
"mongoose": "^7.8.0",
|
||||
"multer": "overleaf/multer#e1df247fbf8e7590520d20ae3601eaef9f3d2e9e",
|
||||
"nocache": "^2.1.0",
|
||||
"node-fetch": "^2.6.7",
|
||||
"node-fetch": "^2.7.0",
|
||||
"nodemailer": "^6.7.0",
|
||||
"nodemailer-ses-transport": "^1.5.1",
|
||||
"on-headers": "^1.0.2",
|
||||
@@ -320,7 +320,6 @@
|
||||
"mocha": "^10.2.0",
|
||||
"mocha-each": "^2.0.1",
|
||||
"mock-fs": "^5.1.2",
|
||||
"node-fetch": "^2.6.7",
|
||||
"nvd3": "^1.8.6",
|
||||
"overleaf-editor-core": "*",
|
||||
"pdfjs-dist213": "npm:pdfjs-dist@2.13.216",
|
||||
|
||||
+8
-8
@@ -6,8 +6,8 @@
|
||||
"": {
|
||||
"dependencies": {
|
||||
"@brainly/onesky-utils": "https://github.com/overleaf/nodejs-onesky-utils/archive/main.tar.gz",
|
||||
"node-fetch": "^2.6.7",
|
||||
"sanitize-html": "^2.7.0",
|
||||
"node-fetch": "^2.7.0",
|
||||
"sanitize-html": "^2.12.1",
|
||||
"yargs": "^17.7.2"
|
||||
}
|
||||
},
|
||||
@@ -524,9 +524,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/node-fetch": {
|
||||
"version": "2.6.7",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
|
||||
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
|
||||
"integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
|
||||
"dependencies": {
|
||||
"whatwg-url": "^5.0.0"
|
||||
},
|
||||
@@ -1291,9 +1291,9 @@
|
||||
"integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA=="
|
||||
},
|
||||
"node-fetch": {
|
||||
"version": "2.6.7",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
|
||||
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
|
||||
"integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
|
||||
"requires": {
|
||||
"whatwg-url": "^5.0.0"
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"@brainly/onesky-utils": "https://github.com/overleaf/nodejs-onesky-utils/archive/main.tar.gz",
|
||||
"node-fetch": "^2.6.7",
|
||||
"node-fetch": "^2.7.0",
|
||||
"sanitize-html": "^2.12.1",
|
||||
"yargs": "^17.7.2"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user