Explorar o código

Merge pull request #14138 from overleaf/bg-em-jpa-mj-node-18

Upgrade all services to Node 18

GitOrigin-RevId: c53cd1aaab2fe99b51186911bb068f9fe31a9469
Jakob Ackermann %!s(int64=3) %!d(string=hai) anos
pai
achega
a797fb2be7
Modificáronse 95 ficheiros con 112 adicións e 111 borrados
  1. 0 1
      libraries/access-token-encryptor/.gitignore
  2. 1 1
      libraries/access-token-encryptor/.nvmrc
  3. 1 1
      libraries/access-token-encryptor/buildscript.txt
  4. 0 5
      libraries/fetch-utils/Dockerfile
  5. 0 1
      libraries/logger/.gitignore
  6. 1 1
      libraries/logger/.nvmrc
  7. 1 1
      libraries/logger/buildscript.txt
  8. 0 1
      libraries/metrics/.gitignore
  9. 1 1
      libraries/metrics/.nvmrc
  10. 1 1
      libraries/metrics/buildscript.txt
  11. 0 1
      libraries/o-error/.gitignore
  12. 1 1
      libraries/o-error/.nvmrc
  13. 1 1
      libraries/o-error/buildscript.txt
  14. 0 1
      libraries/object-persistor/.gitignore
  15. 1 1
      libraries/object-persistor/.nvmrc
  16. 1 1
      libraries/object-persistor/buildscript.txt
  17. 1 1
      libraries/overleaf-editor-core/.nvmrc
  18. 1 1
      libraries/overleaf-editor-core/buildscript.txt
  19. 0 1
      libraries/ranges-tracker/.gitignore
  20. 1 1
      libraries/ranges-tracker/.nvmrc
  21. 1 1
      libraries/ranges-tracker/buildscript.txt
  22. 0 1
      libraries/redis-wrapper/.gitignore
  23. 1 1
      libraries/redis-wrapper/.nvmrc
  24. 1 1
      libraries/redis-wrapper/buildscript.txt
  25. 0 1
      libraries/settings/.gitignore
  26. 1 1
      libraries/settings/.nvmrc
  27. 1 1
      libraries/settings/buildscript.txt
  28. 1 1
      libraries/stream-utils/.nvmrc
  29. 0 5
      libraries/stream-utils/Dockerfile
  30. 1 1
      libraries/stream-utils/buildscript.txt
  31. 1 1
      services/chat/.nvmrc
  32. 1 1
      services/chat/Dockerfile
  33. 1 1
      services/chat/Makefile
  34. 1 1
      services/chat/buildscript.txt
  35. 2 2
      services/chat/docker-compose.yml
  36. 1 1
      services/clsi/.nvmrc
  37. 1 1
      services/clsi/Dockerfile
  38. 1 1
      services/clsi/Makefile
  39. 1 1
      services/clsi/buildscript.txt
  40. 1 1
      services/contacts/.nvmrc
  41. 1 1
      services/contacts/Dockerfile
  42. 1 1
      services/contacts/Makefile
  43. 1 1
      services/contacts/buildscript.txt
  44. 2 2
      services/contacts/docker-compose.yml
  45. 1 1
      services/docstore/.nvmrc
  46. 1 1
      services/docstore/Dockerfile
  47. 1 1
      services/docstore/Makefile
  48. 3 0
      services/docstore/app.js
  49. 1 1
      services/docstore/buildscript.txt
  50. 2 2
      services/docstore/docker-compose.yml
  51. 1 1
      services/document-updater/.nvmrc
  52. 1 1
      services/document-updater/Dockerfile
  53. 1 1
      services/document-updater/Makefile
  54. 1 1
      services/document-updater/buildscript.txt
  55. 2 2
      services/document-updater/docker-compose.yml
  56. 1 1
      services/filestore/.nvmrc
  57. 1 1
      services/filestore/Dockerfile
  58. 1 1
      services/filestore/Makefile
  59. 14 0
      services/filestore/app.js
  60. 1 1
      services/filestore/buildscript.txt
  61. 1 1
      services/history-v1/.nvmrc
  62. 1 1
      services/history-v1/Dockerfile
  63. 1 1
      services/history-v1/Makefile
  64. 2 0
      services/history-v1/app.js
  65. 1 1
      services/history-v1/buildscript.txt
  66. 2 2
      services/history-v1/docker-compose.yml
  67. 1 1
      services/notifications/.nvmrc
  68. 1 1
      services/notifications/Dockerfile
  69. 1 1
      services/notifications/Makefile
  70. 1 1
      services/notifications/buildscript.txt
  71. 2 2
      services/notifications/docker-compose.yml
  72. 1 1
      services/project-history/.nvmrc
  73. 1 1
      services/project-history/Dockerfile
  74. 1 1
      services/project-history/Makefile
  75. 1 1
      services/project-history/buildscript.txt
  76. 2 2
      services/project-history/docker-compose.yml
  77. 1 1
      services/real-time/.nvmrc
  78. 1 1
      services/real-time/Dockerfile
  79. 1 1
      services/real-time/Makefile
  80. 2 2
      services/real-time/buildscript.txt
  81. 2 2
      services/real-time/docker-compose.yml
  82. 1 1
      services/spelling/.nvmrc
  83. 1 1
      services/spelling/Dockerfile
  84. 1 1
      services/spelling/Makefile
  85. 1 1
      services/spelling/buildscript.txt
  86. 1 1
      services/track-changes/.nvmrc
  87. 1 1
      services/track-changes/Dockerfile
  88. 1 1
      services/track-changes/Makefile
  89. 1 1
      services/track-changes/buildscript.txt
  90. 2 2
      services/track-changes/docker-compose.yml
  91. 1 1
      services/web/.nvmrc
  92. 1 1
      services/web/Dockerfile
  93. 1 1
      services/web/Dockerfile.frontend
  94. 2 2
      services/web/docker-compose.yml
  95. 1 1
      services/web/scripts/translations/Dockerfile

+ 0 - 1
libraries/access-token-encryptor/.gitignore

@@ -44,4 +44,3 @@ data/*/*
 hash_folder
 
 .npmrc
-Dockerfile

+ 1 - 1
libraries/access-token-encryptor/.nvmrc

@@ -1 +1 @@
-16.17.1
+18.16.1

+ 1 - 1
libraries/access-token-encryptor/buildscript.txt

@@ -6,6 +6,6 @@ access-token-encryptor
 --esmock-loader=False
 --has-custom-nodemon=False
 --is-library=True
---node-version=16.17.1
+--node-version=18.16.1
 --public-repo=False
 --script-version=4.3.0

+ 0 - 5
libraries/fetch-utils/Dockerfile

@@ -1,5 +0,0 @@
-FROM node:18.16.1
-
-WORKDIR /app
-
-USER node

+ 0 - 1
libraries/logger/.gitignore

@@ -1,4 +1,3 @@
 node_modules
 
 .npmrc
-Dockerfile

+ 1 - 1
libraries/logger/.nvmrc

@@ -1 +1 @@
-16.17.1
+18.16.1

+ 1 - 1
libraries/logger/buildscript.txt

@@ -6,6 +6,6 @@ logger
 --esmock-loader=False
 --has-custom-nodemon=False
 --is-library=True
---node-version=16.17.1
+--node-version=18.16.1
 --public-repo=False
 --script-version=4.3.0

+ 0 - 1
libraries/metrics/.gitignore

@@ -1,4 +1,3 @@
 node_modules
 
 .npmrc
-Dockerfile

+ 1 - 1
libraries/metrics/.nvmrc

@@ -1 +1 @@
-16.17.1
+18.16.1

+ 1 - 1
libraries/metrics/buildscript.txt

@@ -6,6 +6,6 @@ metrics
 --esmock-loader=False
 --has-custom-nodemon=False
 --is-library=True
---node-version=16.17.1
+--node-version=18.16.1
 --public-repo=False
 --script-version=4.3.0

+ 0 - 1
libraries/o-error/.gitignore

@@ -3,4 +3,3 @@ coverage
 node_modules/
 
 .npmrc
-Dockerfile

+ 1 - 1
libraries/o-error/.nvmrc

@@ -1 +1 @@
-16.17.1
+18.16.1

+ 1 - 1
libraries/o-error/buildscript.txt

@@ -6,6 +6,6 @@ o-error
 --esmock-loader=False
 --has-custom-nodemon=False
 --is-library=True
---node-version=16.17.1
+--node-version=18.16.1
 --public-repo=False
 --script-version=4.3.0

+ 0 - 1
libraries/object-persistor/.gitignore

@@ -2,4 +2,3 @@
 *.swp
 
 .npmrc
-Dockerfile

+ 1 - 1
libraries/object-persistor/.nvmrc

@@ -1 +1 @@
-16.17.1
+18.16.1

+ 1 - 1
libraries/object-persistor/buildscript.txt

@@ -6,6 +6,6 @@ object-persistor
 --esmock-loader=False
 --has-custom-nodemon=False
 --is-library=True
---node-version=16.17.1
+--node-version=18.16.1
 --public-repo=False
 --script-version=4.3.0

+ 1 - 1
libraries/overleaf-editor-core/.nvmrc

@@ -1 +1 @@
-16.17.1
+18.16.1

+ 1 - 1
libraries/overleaf-editor-core/buildscript.txt

@@ -6,6 +6,6 @@ overleaf-editor-core
 --esmock-loader=False
 --has-custom-nodemon=False
 --is-library=True
---node-version=16.17.1
+--node-version=18.16.1
 --public-repo=False
 --script-version=4.3.0

+ 0 - 1
libraries/ranges-tracker/.gitignore

@@ -11,4 +11,3 @@ node_modules/
 plato/
 
 .npmrc
-Dockerfile

+ 1 - 1
libraries/ranges-tracker/.nvmrc

@@ -1 +1 @@
-16.17.1
+18.16.1

+ 1 - 1
libraries/ranges-tracker/buildscript.txt

@@ -6,6 +6,6 @@ ranges-tracker
 --esmock-loader=False
 --has-custom-nodemon=False
 --is-library=True
---node-version=16.17.1
+--node-version=18.16.1
 --public-repo=False
 --script-version=4.3.0

+ 0 - 1
libraries/redis-wrapper/.gitignore

@@ -11,4 +11,3 @@ node_modules/
 plato/
 
 .npmrc
-Dockerfile

+ 1 - 1
libraries/redis-wrapper/.nvmrc

@@ -1 +1 @@
-16.17.1
+18.16.1

+ 1 - 1
libraries/redis-wrapper/buildscript.txt

@@ -6,6 +6,6 @@ redis-wrapper
 --esmock-loader=False
 --has-custom-nodemon=False
 --is-library=True
---node-version=16.17.1
+--node-version=18.16.1
 --public-repo=False
 --script-version=4.3.0

+ 0 - 1
libraries/settings/.gitignore

@@ -1,5 +1,4 @@
 /.npmrc
-/Dockerfile
 /node_modules
 
 # managed by monorepo$ bin/update_build_scripts

+ 1 - 1
libraries/settings/.nvmrc

@@ -1 +1 @@
-16.17.1
+18.16.1

+ 1 - 1
libraries/settings/buildscript.txt

@@ -6,6 +6,6 @@ settings
 --esmock-loader=False
 --has-custom-nodemon=False
 --is-library=True
---node-version=16.17.1
+--node-version=18.16.1
 --public-repo=False
 --script-version=4.3.0

+ 1 - 1
libraries/stream-utils/.nvmrc

@@ -1 +1 @@
-16.17.1
+18.16.1

+ 0 - 5
libraries/stream-utils/Dockerfile

@@ -1,5 +0,0 @@
-FROM node:16.17.1
-
-WORKDIR /app
-
-USER node

+ 1 - 1
libraries/stream-utils/buildscript.txt

@@ -6,6 +6,6 @@ stream-utils
 --esmock-loader=False
 --has-custom-nodemon=False
 --is-library=True
---node-version=16.17.1
+--node-version=18.16.1
 --public-repo=False
 --script-version=4.3.0

+ 1 - 1
services/chat/.nvmrc

@@ -1 +1 @@
-16.17.1
+18.16.1

+ 1 - 1
services/chat/Dockerfile

@@ -2,7 +2,7 @@
 # Instead run bin/update_build_scripts from
 # https://github.com/overleaf/internal/
 
-FROM node:16.17.1 as base
+FROM node:18.16.1 as base
 
 WORKDIR /overleaf/services/chat
 

+ 1 - 1
services/chat/Makefile

@@ -30,7 +30,7 @@ HERE=$(shell pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 # Run the linting commands in the scope of the monorepo.
 # Eslint and prettier (plus some configs) are on the root.
-RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:16.17.1 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.16.1 npm run --silent
 
 format:
 	$(RUN_LINTING) format

+ 1 - 1
services/chat/buildscript.txt

@@ -5,6 +5,6 @@ chat
 --env-pass-through=
 --esmock-loader=False
 --has-custom-nodemon=True
---node-version=16.17.1
+--node-version=18.16.1
 --public-repo=False
 --script-version=4.3.0

+ 2 - 2
services/chat/docker-compose.yml

@@ -6,7 +6,7 @@ version: "2.3"
 
 services:
   test_unit:
-    image: node:16.17.1
+    image: node:18.16.1
     volumes:
       - .:/overleaf/services/chat
       - ../../node_modules:/overleaf/node_modules
@@ -20,7 +20,7 @@ services:
     user: node
 
   test_acceptance:
-    image: node:16.17.1
+    image: node:18.16.1
     volumes:
       - .:/overleaf/services/chat
       - ../../node_modules:/overleaf/node_modules

+ 1 - 1
services/clsi/.nvmrc

@@ -1 +1 @@
-16.17.1
+18.16.1

+ 1 - 1
services/clsi/Dockerfile

@@ -2,7 +2,7 @@
 # Instead run bin/update_build_scripts from
 # https://github.com/overleaf/internal/
 
-FROM node:16.17.1 as base
+FROM node:18.16.1 as base
 
 WORKDIR /overleaf/services/clsi
 COPY services/clsi/install_deps.sh /overleaf/services/clsi/

+ 1 - 1
services/clsi/Makefile

@@ -30,7 +30,7 @@ HERE=$(shell pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 # Run the linting commands in the scope of the monorepo.
 # Eslint and prettier (plus some configs) are on the root.
-RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:16.17.1 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.16.1 npm run --silent
 
 format:
 	$(RUN_LINTING) format

+ 1 - 1
services/clsi/buildscript.txt

@@ -7,6 +7,6 @@ clsi
 --esmock-loader=False
 --has-custom-cloudbuild=True
 --has-custom-nodemon=False
---node-version=16.17.1
+--node-version=18.16.1
 --public-repo=True
 --script-version=4.3.0

+ 1 - 1
services/contacts/.nvmrc

@@ -1 +1 @@
-16.17.1
+18.16.1

+ 1 - 1
services/contacts/Dockerfile

@@ -2,7 +2,7 @@
 # Instead run bin/update_build_scripts from
 # https://github.com/overleaf/internal/
 
-FROM node:16.17.1 as base
+FROM node:18.16.1 as base
 
 WORKDIR /overleaf/services/contacts
 

+ 1 - 1
services/contacts/Makefile

@@ -30,7 +30,7 @@ HERE=$(shell pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 # Run the linting commands in the scope of the monorepo.
 # Eslint and prettier (plus some configs) are on the root.
-RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:16.17.1 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.16.1 npm run --silent
 
 format:
 	$(RUN_LINTING) format

+ 1 - 1
services/contacts/buildscript.txt

@@ -5,6 +5,6 @@ contacts
 --env-pass-through=
 --esmock-loader=True
 --has-custom-nodemon=True
---node-version=16.17.1
+--node-version=18.16.1
 --public-repo=False
 --script-version=4.3.0

+ 2 - 2
services/contacts/docker-compose.yml

@@ -6,7 +6,7 @@ version: "2.3"
 
 services:
   test_unit:
-    image: node:16.17.1
+    image: node:18.16.1
     volumes:
       - .:/overleaf/services/contacts
       - ../../node_modules:/overleaf/node_modules
@@ -20,7 +20,7 @@ services:
     user: node
 
   test_acceptance:
-    image: node:16.17.1
+    image: node:18.16.1
     volumes:
       - .:/overleaf/services/contacts
       - ../../node_modules:/overleaf/node_modules

+ 1 - 1
services/docstore/.nvmrc

@@ -1 +1 @@
-16.17.1
+18.16.1

+ 1 - 1
services/docstore/Dockerfile

@@ -2,7 +2,7 @@
 # Instead run bin/update_build_scripts from
 # https://github.com/overleaf/internal/
 
-FROM node:16.17.1 as base
+FROM node:18.16.1 as base
 
 WORKDIR /overleaf/services/docstore
 

+ 1 - 1
services/docstore/Makefile

@@ -30,7 +30,7 @@ HERE=$(shell pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 # Run the linting commands in the scope of the monorepo.
 # Eslint and prettier (plus some configs) are on the root.
-RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:16.17.1 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.16.1 npm run --silent
 
 format:
 	$(RUN_LINTING) format

+ 3 - 0
services/docstore/app.js

@@ -4,6 +4,7 @@
  * DS207: Consider shorter variations of null checks
  * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
  */
+const Events = require('events')
 const Metrics = require('@overleaf/metrics')
 Metrics.initialize('docstore')
 const Settings = require('@overleaf/settings')
@@ -19,6 +20,8 @@ const { mongoClient } = require('./app/js/mongodb')
 const Errors = require('./app/js/Errors')
 const HttpController = require('./app/js/HttpController')
 
+Events.setMaxListeners(20)
+
 logger.initialize('docstore')
 if (Metrics.event_loop != null) {
   Metrics.event_loop.monitor(logger)

+ 1 - 1
services/docstore/buildscript.txt

@@ -5,6 +5,6 @@ docstore
 --env-pass-through=
 --esmock-loader=False
 --has-custom-nodemon=True
---node-version=16.17.1
+--node-version=18.16.1
 --public-repo=True
 --script-version=4.3.0

+ 2 - 2
services/docstore/docker-compose.yml

@@ -6,7 +6,7 @@ version: "2.3"
 
 services:
   test_unit:
-    image: node:16.17.1
+    image: node:18.16.1
     volumes:
       - .:/overleaf/services/docstore
       - ../../node_modules:/overleaf/node_modules
@@ -20,7 +20,7 @@ services:
     user: node
 
   test_acceptance:
-    image: node:16.17.1
+    image: node:18.16.1
     volumes:
       - .:/overleaf/services/docstore
       - ../../node_modules:/overleaf/node_modules

+ 1 - 1
services/document-updater/.nvmrc

@@ -1 +1 @@
-16.17.1
+18.16.1

+ 1 - 1
services/document-updater/Dockerfile

@@ -2,7 +2,7 @@
 # Instead run bin/update_build_scripts from
 # https://github.com/overleaf/internal/
 
-FROM node:16.17.1 as base
+FROM node:18.16.1 as base
 
 WORKDIR /overleaf/services/document-updater
 

+ 1 - 1
services/document-updater/Makefile

@@ -30,7 +30,7 @@ HERE=$(shell pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 # Run the linting commands in the scope of the monorepo.
 # Eslint and prettier (plus some configs) are on the root.
-RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:16.17.1 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.16.1 npm run --silent
 
 format:
 	$(RUN_LINTING) format

+ 1 - 1
services/document-updater/buildscript.txt

@@ -5,6 +5,6 @@ document-updater
 --env-pass-through=
 --esmock-loader=False
 --has-custom-nodemon=True
---node-version=16.17.1
+--node-version=18.16.1
 --public-repo=True
 --script-version=4.3.0

+ 2 - 2
services/document-updater/docker-compose.yml

@@ -6,7 +6,7 @@ version: "2.3"
 
 services:
   test_unit:
-    image: node:16.17.1
+    image: node:18.16.1
     volumes:
       - .:/overleaf/services/document-updater
       - ../../node_modules:/overleaf/node_modules
@@ -20,7 +20,7 @@ services:
     user: node
 
   test_acceptance:
-    image: node:16.17.1
+    image: node:18.16.1
     volumes:
       - .:/overleaf/services/document-updater
       - ../../node_modules:/overleaf/node_modules

+ 1 - 1
services/filestore/.nvmrc

@@ -1 +1 @@
-16.17.1
+18.16.1

+ 1 - 1
services/filestore/Dockerfile

@@ -2,7 +2,7 @@
 # Instead run bin/update_build_scripts from
 # https://github.com/overleaf/internal/
 
-FROM node:16.17.1 as base
+FROM node:18.16.1 as base
 
 WORKDIR /overleaf/services/filestore
 COPY services/filestore/install_deps.sh /overleaf/services/filestore/

+ 1 - 1
services/filestore/Makefile

@@ -30,7 +30,7 @@ HERE=$(shell pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 # Run the linting commands in the scope of the monorepo.
 # Eslint and prettier (plus some configs) are on the root.
-RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:16.17.1 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.16.1 npm run --silent
 
 format:
 	$(RUN_LINTING) format

+ 14 - 0
services/filestore/app.js

@@ -1,3 +1,4 @@
+const Events = require('events')
 const Metrics = require('@overleaf/metrics')
 Metrics.initialize(process.env.METRICS_APP_NAME || 'filestore')
 
@@ -14,8 +15,21 @@ const healthCheckController = require('./app/js/HealthCheckController')
 
 const RequestLogger = require('./app/js/RequestLogger')
 
+Events.setMaxListeners(20)
+
 const app = express()
 
+process.on('warning', warning => {
+  logger.warn(
+    {
+      name: warning.name,
+      message: warning.message,
+      stack: warning.stack,
+    },
+    'Warning details'
+  )
+})
+
 app.use(RequestLogger.middleware)
 
 if (settings.sentry && settings.sentry.dsn) {

+ 1 - 1
services/filestore/buildscript.txt

@@ -6,6 +6,6 @@ filestore
 --env-pass-through=
 --esmock-loader=False
 --has-custom-nodemon=False
---node-version=16.17.1
+--node-version=18.16.1
 --public-repo=True
 --script-version=4.3.0

+ 1 - 1
services/history-v1/.nvmrc

@@ -1 +1 @@
-16.20.1
+18.16.1

+ 1 - 1
services/history-v1/Dockerfile

@@ -2,7 +2,7 @@
 # Instead run bin/update_build_scripts from
 # https://github.com/overleaf/internal/
 
-FROM node:16.20.1 as base
+FROM node:18.16.1 as base
 
 WORKDIR /overleaf/services/history-v1
 

+ 1 - 1
services/history-v1/Makefile

@@ -30,7 +30,7 @@ HERE=$(shell pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 # Run the linting commands in the scope of the monorepo.
 # Eslint and prettier (plus some configs) are on the root.
-RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:16.20.1 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.16.1 npm run --silent
 
 format:
 	$(RUN_LINTING) format

+ 2 - 0
services/history-v1/app.js

@@ -7,6 +7,7 @@
 const Metrics = require('@overleaf/metrics')
 Metrics.initialize('history-v1')
 
+const Events = require('events')
 const BPromise = require('bluebird')
 const express = require('express')
 const cors = require('cors')
@@ -22,6 +23,7 @@ const healthChecks = require('./api/controllers/health_checks')
 const { mongodb, loadGlobalBlobs } = require('./storage')
 const path = require('path')
 
+Events.setMaxListeners(20)
 const app = express()
 module.exports = app
 

+ 1 - 1
services/history-v1/buildscript.txt

@@ -5,6 +5,6 @@ history-v1
 --env-pass-through=
 --esmock-loader=False
 --has-custom-nodemon=True
---node-version=16.20.1
+--node-version=18.16.1
 --public-repo=False
 --script-version=4.3.0

+ 2 - 2
services/history-v1/docker-compose.yml

@@ -6,7 +6,7 @@ version: "2.3"
 
 services:
   test_unit:
-    image: node:16.20.1
+    image: node:18.16.1
     volumes:
       - .:/overleaf/services/history-v1
       - ../../node_modules:/overleaf/node_modules
@@ -20,7 +20,7 @@ services:
     user: node
 
   test_acceptance:
-    image: node:16.20.1
+    image: node:18.16.1
     volumes:
       - .:/overleaf/services/history-v1
       - ../../node_modules:/overleaf/node_modules

+ 1 - 1
services/notifications/.nvmrc

@@ -1 +1 @@
-16.17.1
+18.16.1

+ 1 - 1
services/notifications/Dockerfile

@@ -2,7 +2,7 @@
 # Instead run bin/update_build_scripts from
 # https://github.com/overleaf/internal/
 
-FROM node:16.17.1 as base
+FROM node:18.16.1 as base
 
 WORKDIR /overleaf/services/notifications
 

+ 1 - 1
services/notifications/Makefile

@@ -30,7 +30,7 @@ HERE=$(shell pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 # Run the linting commands in the scope of the monorepo.
 # Eslint and prettier (plus some configs) are on the root.
-RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:16.17.1 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.16.1 npm run --silent
 
 format:
 	$(RUN_LINTING) format

+ 1 - 1
services/notifications/buildscript.txt

@@ -5,6 +5,6 @@ notifications
 --env-pass-through=
 --esmock-loader=False
 --has-custom-nodemon=True
---node-version=16.17.1
+--node-version=18.16.1
 --public-repo=True
 --script-version=4.3.0

+ 2 - 2
services/notifications/docker-compose.yml

@@ -6,7 +6,7 @@ version: "2.3"
 
 services:
   test_unit:
-    image: node:16.17.1
+    image: node:18.16.1
     volumes:
       - .:/overleaf/services/notifications
       - ../../node_modules:/overleaf/node_modules
@@ -20,7 +20,7 @@ services:
     user: node
 
   test_acceptance:
-    image: node:16.17.1
+    image: node:18.16.1
     volumes:
       - .:/overleaf/services/notifications
       - ../../node_modules:/overleaf/node_modules

+ 1 - 1
services/project-history/.nvmrc

@@ -1 +1 @@
-16.17.1
+18.16.1

+ 1 - 1
services/project-history/Dockerfile

@@ -2,7 +2,7 @@
 # Instead run bin/update_build_scripts from
 # https://github.com/overleaf/internal/
 
-FROM node:16.17.1 as base
+FROM node:18.16.1 as base
 
 WORKDIR /overleaf/services/project-history
 

+ 1 - 1
services/project-history/Makefile

@@ -30,7 +30,7 @@ HERE=$(shell pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 # Run the linting commands in the scope of the monorepo.
 # Eslint and prettier (plus some configs) are on the root.
-RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:16.17.1 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.16.1 npm run --silent
 
 format:
 	$(RUN_LINTING) format

+ 1 - 1
services/project-history/buildscript.txt

@@ -5,6 +5,6 @@ project-history
 --env-pass-through=
 --esmock-loader=True
 --has-custom-nodemon=True
---node-version=16.17.1
+--node-version=18.16.1
 --public-repo=False
 --script-version=4.3.0

+ 2 - 2
services/project-history/docker-compose.yml

@@ -6,7 +6,7 @@ version: "2.3"
 
 services:
   test_unit:
-    image: node:16.17.1
+    image: node:18.16.1
     volumes:
       - .:/overleaf/services/project-history
       - ../../node_modules:/overleaf/node_modules
@@ -20,7 +20,7 @@ services:
     user: node
 
   test_acceptance:
-    image: node:16.17.1
+    image: node:18.16.1
     volumes:
       - .:/overleaf/services/project-history
       - ../../node_modules:/overleaf/node_modules

+ 1 - 1
services/real-time/.nvmrc

@@ -1 +1 @@
-16.20.1
+18.16.1

+ 1 - 1
services/real-time/Dockerfile

@@ -2,7 +2,7 @@
 # Instead run bin/update_build_scripts from
 # https://github.com/overleaf/internal/
 
-FROM node:16.20.1 as base
+FROM node:18.16.1 as base
 
 WORKDIR /overleaf/services/real-time
 

+ 1 - 1
services/real-time/Makefile

@@ -30,7 +30,7 @@ HERE=$(shell pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 # Run the linting commands in the scope of the monorepo.
 # Eslint and prettier (plus some configs) are on the root.
-RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:16.20.1 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.16.1 npm run --silent
 
 format:
 	$(RUN_LINTING) format

+ 2 - 2
services/real-time/buildscript.txt

@@ -5,6 +5,6 @@ real-time
 --env-pass-through=
 --esmock-loader=False
 --has-custom-nodemon=False
---node-version=16.20.1
---public-repo=True
+--node-version=18.16.1
+--public-repo=False
 --script-version=4.3.0

+ 2 - 2
services/real-time/docker-compose.yml

@@ -6,7 +6,7 @@ version: "2.3"
 
 services:
   test_unit:
-    image: node:16.20.1
+    image: node:18.16.1
     volumes:
       - .:/overleaf/services/real-time
       - ../../node_modules:/overleaf/node_modules
@@ -20,7 +20,7 @@ services:
     user: node
 
   test_acceptance:
-    image: node:16.20.1
+    image: node:18.16.1
     volumes:
       - .:/overleaf/services/real-time
       - ../../node_modules:/overleaf/node_modules

+ 1 - 1
services/spelling/.nvmrc

@@ -1 +1 @@
-16.17.1
+18.16.1

+ 1 - 1
services/spelling/Dockerfile

@@ -2,7 +2,7 @@
 # Instead run bin/update_build_scripts from
 # https://github.com/overleaf/internal/
 
-FROM node:16.17.1 as base
+FROM node:18.16.1-buster as base
 
 WORKDIR /overleaf/services/spelling
 COPY services/spelling/install_deps.sh /overleaf/services/spelling/

+ 1 - 1
services/spelling/Makefile

@@ -30,7 +30,7 @@ HERE=$(shell pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 # Run the linting commands in the scope of the monorepo.
 # Eslint and prettier (plus some configs) are on the root.
-RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:16.17.1 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.16.1 npm run --silent
 
 format:
 	$(RUN_LINTING) format

+ 1 - 1
services/spelling/buildscript.txt

@@ -6,6 +6,6 @@ spelling
 --env-pass-through=
 --esmock-loader=True
 --has-custom-nodemon=False
---node-version=16.17.1
+--node-version=18.16.1
 --public-repo=False
 --script-version=4.3.0

+ 1 - 1
services/track-changes/.nvmrc

@@ -1 +1 @@
-16.17.1
+18.16.1

+ 1 - 1
services/track-changes/Dockerfile

@@ -2,7 +2,7 @@
 # Instead run bin/update_build_scripts from
 # https://github.com/overleaf/internal/
 
-FROM node:16.17.1 as base
+FROM node:18.16.1 as base
 
 WORKDIR /overleaf/services/track-changes
 

+ 1 - 1
services/track-changes/Makefile

@@ -30,7 +30,7 @@ HERE=$(shell pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 # Run the linting commands in the scope of the monorepo.
 # Eslint and prettier (plus some configs) are on the root.
-RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:16.17.1 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.16.1 npm run --silent
 
 format:
 	$(RUN_LINTING) format

+ 1 - 1
services/track-changes/buildscript.txt

@@ -5,6 +5,6 @@ track-changes
 --env-pass-through=
 --esmock-loader=False
 --has-custom-nodemon=True
---node-version=16.17.1
+--node-version=18.16.1
 --public-repo=True
 --script-version=4.3.0

+ 2 - 2
services/track-changes/docker-compose.yml

@@ -6,7 +6,7 @@ version: "2.3"
 
 services:
   test_unit:
-    image: node:16.17.1
+    image: node:18.16.1
     volumes:
       - .:/overleaf/services/track-changes
       - ../../node_modules:/overleaf/node_modules
@@ -20,7 +20,7 @@ services:
     user: node
 
   test_acceptance:
-    image: node:16.17.1
+    image: node:18.16.1
     volumes:
       - .:/overleaf/services/track-changes
       - ../../node_modules:/overleaf/node_modules

+ 1 - 1
services/web/.nvmrc

@@ -1 +1 @@
-16.17.1
+18.16.1

+ 1 - 1
services/web/Dockerfile

@@ -1,6 +1,6 @@
 # the base image is suitable for running web with /overleaf/services/web bind
 # mounted
-FROM node:16.20.1 as base
+FROM node:18.16.1 as base
 
 WORKDIR /overleaf/services/web
 

+ 1 - 1
services/web/Dockerfile.frontend

@@ -1,4 +1,4 @@
-FROM node:16.20.1
+FROM node:18.16.1
 
 # Install Google Chrome
 RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -

+ 2 - 2
services/web/docker-compose.yml

@@ -6,7 +6,7 @@ volumes:
 services:
 
   test_unit:
-    image: node:16.20.1
+    image: node:18.16.1
     volumes:
       - .:/overleaf/services/web
       - ../../node_modules:/overleaf/node_modules
@@ -21,7 +21,7 @@ services:
     user: node
 
   test_acceptance:
-    image: node:16.20.1
+    image: node:18.16.1
     volumes:
       - .:/overleaf/services/web
       - ../../node_modules:/overleaf/node_modules

+ 1 - 1
services/web/scripts/translations/Dockerfile

@@ -1,4 +1,4 @@
-FROM node:16.17.1
+FROM node:18.16.1
 
 WORKDIR /app/scripts/translations