Merge pull request #20557 from overleaf/ls-bump-express

update express and other dependencies

GitOrigin-RevId: 22107eab0fa95d534ab07360548ae2b2123776db
This commit is contained in:
Liangjun Song 2024-09-26 11:37:04 +01:00 committed by Copybot
parent 99249a6cb1
commit cfd0b39b96
18 changed files with 417 additions and 801 deletions

View file

@ -17,10 +17,10 @@
"license": "AGPL-3.0-only", "license": "AGPL-3.0-only",
"devDependencies": { "devDependencies": {
"@types/node-fetch": "^2.6.11", "@types/node-fetch": "^2.6.11",
"body-parser": "^1.20.2", "body-parser": "^1.20.3",
"chai": "^4.3.6", "chai": "^4.3.6",
"chai-as-promised": "^7.1.1", "chai-as-promised": "^7.1.1",
"express": "^4.19.2", "express": "^4.21.0",
"mocha": "^10.2.0", "mocha": "^10.2.0",
"typescript": "^5.0.4" "typescript": "^5.0.4"
}, },

1080
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,13 +0,0 @@
diff --git a/node_modules/express/node_modules/finalhandler/index.js b/node_modules/express/node_modules/finalhandler/index.js
index f628e42..72f17d6 100644
--- a/node_modules/express/node_modules/finalhandler/index.js
+++ b/node_modules/express/node_modules/finalhandler/index.js
@@ -125,7 +125,7 @@ function finalhandler (req, res, options) {
// cannot actually respond
if (headersSent(res)) {
debug('cannot %d after headers sent', status)
- req.socket.destroy()
+ if (req.socket) req.socket.destroy()
return
}

View file

@ -1,61 +0,0 @@
diff --git a/node_modules/send/index.js b/node_modules/send/index.js
index 06d7507..8854216 100644
--- a/node_modules/send/index.js
+++ b/node_modules/send/index.js
@@ -795,31 +795,31 @@ SendStream.prototype.stream = function stream (path, options) {
// pipe
var stream = fs.createReadStream(path, options)
this.emit('stream', stream)
- stream.pipe(res)
-
- // response finished, done with the fd
- onFinished(res, function onfinished () {
- finished = true
- destroy(stream)
- })
-
- // error handling code-smell
- stream.on('error', function onerror (err) {
- // request already finished
- if (finished) return
-
- // clean up stream
- finished = true
- destroy(stream)
-
- // error
- self.onStatError(err)
- })
-
- // end
- stream.on('end', function onend () {
- self.emit('end')
- })
+ Stream.pipeline(stream, res, err => { if (err) { self.onStatError(err) } else { self.emit('end') } })
+
+ // // response finished, done with the fd
+ // onFinished(res, function onfinished () {
+ // finished = true
+ // destroy(stream)
+ // })
+ //
+ // // error handling code-smell
+ // stream.on('error', function onerror (err) {
+ // // request already finished
+ // if (finished) return
+ //
+ // // clean up stream
+ // finished = true
+ // destroy(stream)
+ //
+ // // error
+ // self.onStatError(err)
+ // })
+ //
+ // // end
+ // stream.on('end', function onend () {
+ // self.emit('end')
+ // })
}
/**

View file

@ -1,8 +1,8 @@
diff --git a/node_modules/express/node_modules/send/index.js b/node_modules/express/node_modules/send/index.js diff --git a/node_modules/send/index.js b/node_modules/send/index.js
index 89afd7e..de56daf 100644 index 768f8ca..a882f4d 100644
--- a/node_modules/express/node_modules/send/index.js --- a/node_modules/send/index.js
+++ b/node_modules/express/node_modules/send/index.js +++ b/node_modules/send/index.js
@@ -789,29 +789,29 @@ SendStream.prototype.stream = function stream (path, options) { @@ -788,29 +788,29 @@ SendStream.prototype.stream = function stream (path, options) {
// pipe // pipe
var stream = fs.createReadStream(path, options) var stream = fs.createReadStream(path, options)
this.emit('stream', stream) this.emit('stream', stream)

View file

@ -22,9 +22,9 @@
"@overleaf/metrics": "*", "@overleaf/metrics": "*",
"@overleaf/settings": "*", "@overleaf/settings": "*",
"async": "^3.2.5", "async": "^3.2.5",
"body-parser": "^1.19.0", "body-parser": "^1.20.3",
"exegesis-express": "^4.0.0", "exegesis-express": "^4.0.0",
"express": "^4.19.2", "express": "^4.21.0",
"mongodb": "^6.1.0" "mongodb": "^6.1.0"
}, },
"devDependencies": { "devDependencies": {

View file

@ -25,15 +25,15 @@
"@overleaf/settings": "*", "@overleaf/settings": "*",
"archiver": "5.3.2", "archiver": "5.3.2",
"async": "^3.2.5", "async": "^3.2.5",
"body-parser": "^1.19.0", "body-parser": "^1.20.3",
"bunyan": "^1.8.15", "bunyan": "^1.8.15",
"diskusage": "^1.1.3", "diskusage": "^1.1.3",
"dockerode": "^3.1.0", "dockerode": "^3.1.0",
"express": "^4.19.2", "express": "^4.21.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"p-limit": "^3.1.0", "p-limit": "^3.1.0",
"request": "^2.88.2", "request": "^2.88.2",
"send": "^0.17.1", "send": "^0.19.0",
"workerpool": "^6.1.5" "workerpool": "^6.1.5"
}, },
"devDependencies": { "devDependencies": {

View file

@ -22,9 +22,9 @@
"@overleaf/metrics": "*", "@overleaf/metrics": "*",
"@overleaf/settings": "*", "@overleaf/settings": "*",
"async": "^3.2.5", "async": "^3.2.5",
"body-parser": "^1.19.0", "body-parser": "^1.20.3",
"bunyan": "^1.8.15", "bunyan": "^1.8.15",
"express": "^4.19.2", "express": "^4.21.0",
"mongodb": "^6.1.0", "mongodb": "^6.1.0",
"request": "~2.88.2", "request": "~2.88.2",
"underscore": "~1.13.1" "underscore": "~1.13.1"

View file

@ -25,10 +25,10 @@
"@overleaf/settings": "*", "@overleaf/settings": "*",
"@overleaf/stream-utils": "^0.1.0", "@overleaf/stream-utils": "^0.1.0",
"async": "^3.2.5", "async": "^3.2.5",
"body-parser": "^1.19.0", "body-parser": "^1.20.3",
"bunyan": "^1.8.15", "bunyan": "^1.8.15",
"celebrate": "^15.0.3", "celebrate": "^15.0.3",
"express": "^4.19.2", "express": "^4.21.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"mongodb-legacy": "^6.0.1", "mongodb-legacy": "^6.0.1",
"p-map": "^4.0.0", "p-map": "^4.0.0",

View file

@ -27,10 +27,10 @@
"@overleaf/settings": "*", "@overleaf/settings": "*",
"@types/chai-as-promised": "^7.1.8", "@types/chai-as-promised": "^7.1.8",
"async": "^3.2.5", "async": "^3.2.5",
"body-parser": "^1.19.0", "body-parser": "^1.20.3",
"bunyan": "^1.8.15", "bunyan": "^1.8.15",
"diff-match-patch": "overleaf/diff-match-patch#89805f9c671a77a263fc53461acd62aa7498f688", "diff-match-patch": "overleaf/diff-match-patch#89805f9c671a77a263fc53461acd62aa7498f688",
"express": "^4.19.2", "express": "^4.21.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"mongodb-legacy": "^6.0.1", "mongodb-legacy": "^6.0.1",
"request": "^2.88.2", "request": "^2.88.2",

View file

@ -25,9 +25,9 @@
"@overleaf/object-persistor": "*", "@overleaf/object-persistor": "*",
"@overleaf/settings": "*", "@overleaf/settings": "*",
"@overleaf/stream-utils": "^0.1.0", "@overleaf/stream-utils": "^0.1.0",
"body-parser": "^1.19.0", "body-parser": "^1.20.3",
"bunyan": "^1.8.15", "bunyan": "^1.8.15",
"express": "^4.19.2", "express": "^4.21.0",
"glob": "^7.1.6", "glob": "^7.1.6",
"lodash.once": "^4.1.1", "lodash.once": "^4.1.1",
"node-fetch": "^2.6.7", "node-fetch": "^2.6.7",

View file

@ -16,12 +16,12 @@
"archiver": "^5.3.0", "archiver": "^5.3.0",
"basic-auth": "^2.0.1", "basic-auth": "^2.0.1",
"bluebird": "^3.7.2", "bluebird": "^3.7.2",
"body-parser": "^1.19.0", "body-parser": "^1.20.3",
"bunyan": "^1.8.12", "bunyan": "^1.8.12",
"check-types": "^11.1.2", "check-types": "^11.1.2",
"command-line-args": "^3.0.3", "command-line-args": "^3.0.3",
"config": "^1.19.0", "config": "^1.19.0",
"express": "^4.19.2", "express": "^4.21.0",
"fs-extra": "^9.0.1", "fs-extra": "^9.0.1",
"generic-pool": "^2.1.1", "generic-pool": "^2.1.1",
"helmet": "^3.22.0", "helmet": "^3.22.0",

View file

@ -23,9 +23,9 @@
"@overleaf/metrics": "*", "@overleaf/metrics": "*",
"@overleaf/settings": "*", "@overleaf/settings": "*",
"async": "^3.2.5", "async": "^3.2.5",
"body-parser": "^1.19.0", "body-parser": "^1.20.3",
"bunyan": "^1.8.15", "bunyan": "^1.8.15",
"express": "^4.19.2", "express": "^4.21.0",
"method-override": "^3.0.0", "method-override": "^3.0.0",
"mongodb-legacy": "^6.0.1", "mongodb-legacy": "^6.0.1",
"request": "^2.88.2" "request": "^2.88.2"

View file

@ -27,13 +27,13 @@
"@overleaf/settings": "*", "@overleaf/settings": "*",
"async": "^3.2.5", "async": "^3.2.5",
"aws-sdk": "^2.650.0", "aws-sdk": "^2.650.0",
"body-parser": "^1.19.0", "body-parser": "^1.20.3",
"bunyan": "^1.8.15", "bunyan": "^1.8.15",
"celebrate": "^15.0.3", "celebrate": "^15.0.3",
"cli": "^1.0.1", "cli": "^1.0.1",
"diff-match-patch": "overleaf/diff-match-patch#89805f9c671a77a263fc53461acd62aa7498f688", "diff-match-patch": "overleaf/diff-match-patch#89805f9c671a77a263fc53461acd62aa7498f688",
"esmock": "^2.6.3", "esmock": "^2.6.3",
"express": "^4.19.2", "express": "^4.21.0",
"lodash": "^4.17.20", "lodash": "^4.17.20",
"mongodb-legacy": "^6.0.1", "mongodb-legacy": "^6.0.1",
"overleaf-editor-core": "*", "overleaf-editor-core": "*",

View file

@ -24,11 +24,11 @@
"@overleaf/settings": "*", "@overleaf/settings": "*",
"async": "^3.2.5", "async": "^3.2.5",
"base64id": "0.1.0", "base64id": "0.1.0",
"body-parser": "^1.19.0", "body-parser": "^1.20.3",
"bunyan": "^1.8.15", "bunyan": "^1.8.15",
"connect-redis": "^6.1.3", "connect-redis": "^6.1.3",
"cookie-parser": "^1.4.6", "cookie-parser": "^1.4.6",
"express": "^4.19.2", "express": "^4.21.0",
"express-session": "^1.17.1", "express-session": "^1.17.1",
"joi": "^17.12.0", "joi": "^17.12.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",

View file

@ -29,9 +29,9 @@
"@overleaf/o-error": "*", "@overleaf/o-error": "*",
"@overleaf/settings": "*", "@overleaf/settings": "*",
"async": "^3.2.5", "async": "^3.2.5",
"body-parser": "^1.19.0", "body-parser": "^1.20.3",
"bunyan": "^1.8.15", "bunyan": "^1.8.15",
"express": "^4.19.2", "express": "^4.21.0",
"lru-cache": "^5.1.1", "lru-cache": "^5.1.1",
"request": "^2.88.2", "request": "^2.88.2",
"underscore": "1.13.1" "underscore": "1.13.1"

View file

@ -94,7 +94,7 @@
"base-x": "^4.0.0", "base-x": "^4.0.0",
"basic-auth": "^2.0.1", "basic-auth": "^2.0.1",
"bcrypt": "^5.0.0", "bcrypt": "^5.0.0",
"body-parser": "^1.19.0", "body-parser": "^1.20.3",
"bowser": "^2.11.0", "bowser": "^2.11.0",
"bull": "^3.18.0", "bull": "^3.18.0",
"bunyan": "^1.8.15", "bunyan": "^1.8.15",
@ -114,7 +114,7 @@
"ejs": "^3.1.10", "ejs": "^3.1.10",
"email-addresses": "^5.0.0", "email-addresses": "^5.0.0",
"eventsource-parser": "^1.1.2", "eventsource-parser": "^1.1.2",
"express": "^4.19.2", "express": "^4.21.0",
"express-bearer-token": "^2.4.0", "express-bearer-token": "^2.4.0",
"express-http-proxy": "^1.6.0", "express-http-proxy": "^1.6.0",
"express-session": "^1.17.1", "express-session": "^1.17.1",