Browse Source

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

update express and other dependencies

GitOrigin-RevId: 22107eab0fa95d534ab07360548ae2b2123776db
Liangjun Song 2 years ago
parent
commit
cfd0b39b96

+ 2 - 2
libraries/fetch-utils/package.json

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

File diff suppressed because it is too large
+ 206 - 383
package-lock.json


+ 0 - 0
patches/body-parser+1.20.2.patch → patches/body-parser+1.20.3.patch


+ 0 - 13
patches/express++finalhandler+1.2.0.patch

@@ -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
-     }
- 

+ 0 - 61
patches/send+0.17.2.patch

@@ -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')
-+  // })
- }
- 
- /**

+ 5 - 5
patches/express++send+0.18.0.patch → patches/send+0.19.0.patch

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

+ 2 - 2
services/chat/package.json

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

+ 3 - 3
services/clsi/package.json

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

+ 2 - 2
services/contacts/package.json

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

+ 2 - 2
services/docstore/package.json

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

+ 2 - 2
services/document-updater/package.json

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

+ 2 - 2
services/filestore/package.json

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

+ 2 - 2
services/history-v1/package.json

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

+ 2 - 2
services/notifications/package.json

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

+ 2 - 2
services/project-history/package.json

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

+ 2 - 2
services/real-time/package.json

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

+ 2 - 2
services/spelling/package.json

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

+ 2 - 2
services/web/package.json

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

Some files were not shown because too many files changed in this diff