Преглед изворни кода

Merge pull request #21627 from overleaf/ar-node-20

[all] node 20 upgrade v2

GitOrigin-RevId: aed13a800894717a796062e3dd4050e045040258
Andrew Rumble пре 1 година
родитељ
комит
73b17dd694
85 измењених фајлова са 112 додато и 104 уклоњено
  1. 1 1
      libraries/access-token-encryptor/.nvmrc
  2. 1 1
      libraries/access-token-encryptor/buildscript.txt
  3. 1 1
      libraries/fetch-utils/.nvmrc
  4. 1 1
      libraries/fetch-utils/buildscript.txt
  5. 5 1
      libraries/fetch-utils/test/unit/FetchUtilsTests.js
  6. 1 1
      libraries/logger/.nvmrc
  7. 1 1
      libraries/logger/buildscript.txt
  8. 1 1
      libraries/metrics/.nvmrc
  9. 1 1
      libraries/metrics/buildscript.txt
  10. 1 1
      libraries/o-error/.nvmrc
  11. 1 1
      libraries/o-error/buildscript.txt
  12. 1 1
      libraries/object-persistor/.nvmrc
  13. 1 1
      libraries/object-persistor/buildscript.txt
  14. 1 1
      libraries/overleaf-editor-core/.nvmrc
  15. 1 1
      libraries/overleaf-editor-core/buildscript.txt
  16. 1 1
      libraries/promise-utils/.nvmrc
  17. 1 1
      libraries/promise-utils/buildscript.txt
  18. 1 1
      libraries/ranges-tracker/.nvmrc
  19. 1 1
      libraries/ranges-tracker/buildscript.txt
  20. 1 1
      libraries/redis-wrapper/.nvmrc
  21. 1 1
      libraries/redis-wrapper/buildscript.txt
  22. 1 1
      libraries/settings/.nvmrc
  23. 1 1
      libraries/settings/buildscript.txt
  24. 1 1
      libraries/stream-utils/.nvmrc
  25. 1 1
      libraries/stream-utils/buildscript.txt
  26. 1 1
      server-ce/Dockerfile-base
  27. 1 1
      server-ce/test/Dockerfile
  28. 1 1
      services/chat/.nvmrc
  29. 1 1
      services/chat/Dockerfile
  30. 2 2
      services/chat/Makefile
  31. 1 1
      services/chat/buildscript.txt
  32. 2 2
      services/chat/docker-compose.yml
  33. 1 1
      services/clsi/.nvmrc
  34. 1 1
      services/clsi/Dockerfile
  35. 2 2
      services/clsi/Makefile
  36. 1 1
      services/clsi/buildscript.txt
  37. 1 1
      services/contacts/.nvmrc
  38. 1 1
      services/contacts/Dockerfile
  39. 2 2
      services/contacts/Makefile
  40. 1 1
      services/contacts/buildscript.txt
  41. 2 1
      services/contacts/config/settings.defaults.cjs
  42. 2 2
      services/contacts/docker-compose.yml
  43. 1 1
      services/docstore/.nvmrc
  44. 1 1
      services/docstore/Dockerfile
  45. 2 2
      services/docstore/Makefile
  46. 1 1
      services/docstore/buildscript.txt
  47. 1 0
      services/docstore/config/settings.defaults.js
  48. 2 2
      services/docstore/docker-compose.yml
  49. 1 1
      services/document-updater/.nvmrc
  50. 1 1
      services/document-updater/Dockerfile
  51. 2 2
      services/document-updater/Makefile
  52. 1 1
      services/document-updater/buildscript.txt
  53. 2 2
      services/document-updater/docker-compose.yml
  54. 1 1
      services/filestore/.nvmrc
  55. 1 1
      services/filestore/Dockerfile
  56. 2 2
      services/filestore/Makefile
  57. 1 1
      services/filestore/buildscript.txt
  58. 1 1
      services/history-v1/.nvmrc
  59. 1 1
      services/history-v1/Dockerfile
  60. 2 2
      services/history-v1/Makefile
  61. 1 1
      services/history-v1/buildscript.txt
  62. 2 2
      services/history-v1/docker-compose.yml
  63. 1 1
      services/notifications/.nvmrc
  64. 1 1
      services/notifications/Dockerfile
  65. 2 2
      services/notifications/Makefile
  66. 1 1
      services/notifications/buildscript.txt
  67. 2 2
      services/notifications/docker-compose.yml
  68. 1 1
      services/project-history/.nvmrc
  69. 1 1
      services/project-history/Dockerfile
  70. 2 2
      services/project-history/Makefile
  71. 1 1
      services/project-history/buildscript.txt
  72. 2 2
      services/project-history/docker-compose.yml
  73. 1 1
      services/real-time/.nvmrc
  74. 1 1
      services/real-time/Dockerfile
  75. 2 2
      services/real-time/Makefile
  76. 1 1
      services/real-time/buildscript.txt
  77. 2 2
      services/real-time/docker-compose.yml
  78. 1 1
      services/web/.nvmrc
  79. 1 1
      services/web/Dockerfile
  80. 1 1
      services/web/Dockerfile.frontend
  81. 2 0
      services/web/app.mjs
  82. 3 3
      services/web/cloudbuild-storybook.yaml
  83. 1 1
      services/web/docker-compose.common.env
  84. 2 2
      services/web/docker-compose.yml
  85. 1 1
      services/web/scripts/translations/Dockerfile

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

@@ -1 +1 @@
-18.20.4
+20.18.0

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

@@ -5,6 +5,6 @@ access-token-encryptor
 --env-pass-through=
 --env-pass-through=
 --esmock-loader=False
 --esmock-loader=False
 --is-library=True
 --is-library=True
---node-version=18.20.4
+--node-version=20.18.0
 --public-repo=False
 --public-repo=False
 --script-version=4.5.0
 --script-version=4.5.0

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

@@ -1 +1 @@
-18.20.4
+20.18.0

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

@@ -5,6 +5,6 @@ fetch-utils
 --env-pass-through=
 --env-pass-through=
 --esmock-loader=False
 --esmock-loader=False
 --is-library=True
 --is-library=True
---node-version=18.20.4
+--node-version=20.18.0
 --public-repo=False
 --public-repo=False
 --script-version=4.5.0
 --script-version=4.5.0

+ 5 - 1
libraries/fetch-utils/test/unit/FetchUtilsTests.js

@@ -30,7 +30,11 @@ const _originalLookup = dns.lookup
 dns.lookup = (hostname, options, callback) => {
 dns.lookup = (hostname, options, callback) => {
   if (hostname === 'example.com') {
   if (hostname === 'example.com') {
     // If the hostname is our test case, return the ip address for the test server
     // If the hostname is our test case, return the ip address for the test server
-    callback(null, '127.0.0.1', 4)
+    if (options?.all) {
+      callback(null, [{ address: '127.0.0.1', family: 4 }])
+    } else {
+      callback(null, '127.0.0.1', 4)
+    }
   } else {
   } else {
     // Otherwise, use the default lookup
     // Otherwise, use the default lookup
     _originalLookup(hostname, options, callback)
     _originalLookup(hostname, options, callback)

+ 1 - 1
libraries/logger/.nvmrc

@@ -1 +1 @@
-18.20.4
+20.18.0

+ 1 - 1
libraries/logger/buildscript.txt

@@ -5,6 +5,6 @@ logger
 --env-pass-through=
 --env-pass-through=
 --esmock-loader=False
 --esmock-loader=False
 --is-library=True
 --is-library=True
---node-version=18.20.4
+--node-version=20.18.0
 --public-repo=False
 --public-repo=False
 --script-version=4.5.0
 --script-version=4.5.0

+ 1 - 1
libraries/metrics/.nvmrc

@@ -1 +1 @@
-18.20.4
+20.18.0

+ 1 - 1
libraries/metrics/buildscript.txt

@@ -5,6 +5,6 @@ metrics
 --env-pass-through=
 --env-pass-through=
 --esmock-loader=False
 --esmock-loader=False
 --is-library=True
 --is-library=True
---node-version=18.20.4
+--node-version=20.18.0
 --public-repo=False
 --public-repo=False
 --script-version=4.5.0
 --script-version=4.5.0

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

@@ -1 +1 @@
-18.20.4
+20.18.0

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

@@ -5,6 +5,6 @@ o-error
 --env-pass-through=
 --env-pass-through=
 --esmock-loader=False
 --esmock-loader=False
 --is-library=True
 --is-library=True
---node-version=18.20.4
+--node-version=20.18.0
 --public-repo=False
 --public-repo=False
 --script-version=4.5.0
 --script-version=4.5.0

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

@@ -1 +1 @@
-18.20.4
+20.18.0

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

@@ -5,6 +5,6 @@ object-persistor
 --env-pass-through=
 --env-pass-through=
 --esmock-loader=False
 --esmock-loader=False
 --is-library=True
 --is-library=True
---node-version=18.20.4
+--node-version=20.18.0
 --public-repo=False
 --public-repo=False
 --script-version=4.5.0
 --script-version=4.5.0

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

@@ -1 +1 @@
-18.20.4
+20.18.0

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

@@ -5,6 +5,6 @@ overleaf-editor-core
 --env-pass-through=
 --env-pass-through=
 --esmock-loader=False
 --esmock-loader=False
 --is-library=True
 --is-library=True
---node-version=18.20.4
+--node-version=20.18.0
 --public-repo=False
 --public-repo=False
 --script-version=4.5.0
 --script-version=4.5.0

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

@@ -1 +1 @@
-18.20.4
+20.18.0

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

@@ -5,6 +5,6 @@ promise-utils
 --env-pass-through=
 --env-pass-through=
 --esmock-loader=False
 --esmock-loader=False
 --is-library=True
 --is-library=True
---node-version=18.20.4
+--node-version=20.18.0
 --public-repo=False
 --public-repo=False
 --script-version=4.5.0
 --script-version=4.5.0

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

@@ -1 +1 @@
-18.20.4
+20.18.0

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

@@ -5,6 +5,6 @@ ranges-tracker
 --env-pass-through=
 --env-pass-through=
 --esmock-loader=False
 --esmock-loader=False
 --is-library=True
 --is-library=True
---node-version=18.20.4
+--node-version=20.18.0
 --public-repo=False
 --public-repo=False
 --script-version=4.5.0
 --script-version=4.5.0

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

@@ -1 +1 @@
-18.20.4
+20.18.0

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

@@ -5,6 +5,6 @@ redis-wrapper
 --env-pass-through=
 --env-pass-through=
 --esmock-loader=False
 --esmock-loader=False
 --is-library=True
 --is-library=True
---node-version=18.20.4
+--node-version=20.18.0
 --public-repo=False
 --public-repo=False
 --script-version=4.5.0
 --script-version=4.5.0

+ 1 - 1
libraries/settings/.nvmrc

@@ -1 +1 @@
-18.20.4
+20.18.0

+ 1 - 1
libraries/settings/buildscript.txt

@@ -5,6 +5,6 @@ settings
 --env-pass-through=
 --env-pass-through=
 --esmock-loader=False
 --esmock-loader=False
 --is-library=True
 --is-library=True
---node-version=18.20.4
+--node-version=20.18.0
 --public-repo=False
 --public-repo=False
 --script-version=4.5.0
 --script-version=4.5.0

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

@@ -1 +1 @@
-18.20.4
+20.18.0

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

@@ -5,6 +5,6 @@ stream-utils
 --env-pass-through=
 --env-pass-through=
 --esmock-loader=False
 --esmock-loader=False
 --is-library=True
 --is-library=True
---node-version=18.20.4
+--node-version=20.18.0
 --public-repo=False
 --public-repo=False
 --script-version=4.5.0
 --script-version=4.5.0

+ 1 - 1
server-ce/Dockerfile-base

@@ -31,7 +31,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
 # install Node.js https://github.com/nodesource/distributions#nodejs
 # install Node.js https://github.com/nodesource/distributions#nodejs
 &&  mkdir -p /etc/apt/keyrings \
 &&  mkdir -p /etc/apt/keyrings \
 &&  curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
 &&  curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
-&&  echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
+&&  echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
 &&  apt-get update \
 &&  apt-get update \
 &&  apt-get install -y nodejs \
 &&  apt-get install -y nodejs \
     \
     \

+ 1 - 1
server-ce/test/Dockerfile

@@ -1,4 +1,4 @@
-FROM node:18.20.4
+FROM node:20.18.0
 RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - \
 RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - \
 &&  echo \
 &&  echo \
       "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" \
       "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" \

+ 1 - 1
services/chat/.nvmrc

@@ -1 +1 @@
-18.20.4
+20.18.0

+ 1 - 1
services/chat/Dockerfile

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

+ 2 - 2
services/chat/Makefile

@@ -32,12 +32,12 @@ HERE=$(shell pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 # Run the linting commands in the scope of the monorepo.
 # Run the linting commands in the scope of the monorepo.
 # Eslint and prettier (plus some configs) are on the root.
 # Eslint and prettier (plus some configs) are on the root.
-RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.20.4 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:20.18.0 npm run --silent
 
 
 RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) npm run --silent
 RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) npm run --silent
 
 
 # Same but from the top of the monorepo
 # Same but from the top of the monorepo
-RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:18.20.4 npm run --silent
+RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:20.18.0 npm run --silent
 
 
 format:
 format:
 	$(RUN_LINTING) format
 	$(RUN_LINTING) format

+ 1 - 1
services/chat/buildscript.txt

@@ -4,6 +4,6 @@ chat
 --env-add=
 --env-add=
 --env-pass-through=
 --env-pass-through=
 --esmock-loader=False
 --esmock-loader=False
---node-version=18.20.4
+--node-version=20.18.0
 --public-repo=False
 --public-repo=False
 --script-version=4.5.0
 --script-version=4.5.0

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

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

+ 1 - 1
services/clsi/.nvmrc

@@ -1 +1 @@
-18.20.4
+20.18.0

+ 1 - 1
services/clsi/Dockerfile

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

+ 2 - 2
services/clsi/Makefile

@@ -33,12 +33,12 @@ HERE=$(shell pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 # Run the linting commands in the scope of the monorepo.
 # Run the linting commands in the scope of the monorepo.
 # Eslint and prettier (plus some configs) are on the root.
 # Eslint and prettier (plus some configs) are on the root.
-RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.20.4 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:20.18.0 npm run --silent
 
 
 RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) npm run --silent
 RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) npm run --silent
 
 
 # Same but from the top of the monorepo
 # Same but from the top of the monorepo
-RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:18.20.4 npm run --silent
+RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:20.18.0 npm run --silent
 
 
 format:
 format:
 	$(RUN_LINTING) format
 	$(RUN_LINTING) format

+ 1 - 1
services/clsi/buildscript.txt

@@ -5,7 +5,7 @@ clsi
 --env-add=ENABLE_PDF_CACHING="true",PDF_CACHING_ENABLE_WORKER_POOL="true",ALLOWED_IMAGES=quay.io/sharelatex/texlive-full:2017.1,TEXLIVE_IMAGE=quay.io/sharelatex/texlive-full:2017.1,TEX_LIVE_IMAGE_NAME_OVERRIDE=gcr.io/overleaf-ops,TEXLIVE_IMAGE_USER="tex",DOCKER_RUNNER="true",COMPILES_HOST_DIR=$PWD/compiles
 --env-add=ENABLE_PDF_CACHING="true",PDF_CACHING_ENABLE_WORKER_POOL="true",ALLOWED_IMAGES=quay.io/sharelatex/texlive-full:2017.1,TEXLIVE_IMAGE=quay.io/sharelatex/texlive-full:2017.1,TEX_LIVE_IMAGE_NAME_OVERRIDE=gcr.io/overleaf-ops,TEXLIVE_IMAGE_USER="tex",DOCKER_RUNNER="true",COMPILES_HOST_DIR=$PWD/compiles
 --env-pass-through=
 --env-pass-through=
 --esmock-loader=False
 --esmock-loader=False
---node-version=18.20.4
+--node-version=20.18.0
 --public-repo=True
 --public-repo=True
 --script-version=4.5.0
 --script-version=4.5.0
 --use-large-ci-runner=True
 --use-large-ci-runner=True

+ 1 - 1
services/contacts/.nvmrc

@@ -1 +1 @@
-18.20.4
+20.18.0

+ 1 - 1
services/contacts/Dockerfile

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

+ 2 - 2
services/contacts/Makefile

@@ -32,12 +32,12 @@ HERE=$(shell pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 # Run the linting commands in the scope of the monorepo.
 # Run the linting commands in the scope of the monorepo.
 # Eslint and prettier (plus some configs) are on the root.
 # Eslint and prettier (plus some configs) are on the root.
-RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.20.4 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:20.18.0 npm run --silent
 
 
 RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) npm run --silent
 RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) npm run --silent
 
 
 # Same but from the top of the monorepo
 # Same but from the top of the monorepo
-RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:18.20.4 npm run --silent
+RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:20.18.0 npm run --silent
 
 
 format:
 format:
 	$(RUN_LINTING) format
 	$(RUN_LINTING) format

+ 1 - 1
services/contacts/buildscript.txt

@@ -4,6 +4,6 @@ contacts
 --env-add=
 --env-add=
 --env-pass-through=
 --env-pass-through=
 --esmock-loader=True
 --esmock-loader=True
---node-version=18.20.4
+--node-version=20.18.0
 --public-repo=False
 --public-repo=False
 --script-version=4.5.0
 --script-version=4.5.0

+ 2 - 1
services/contacts/config/settings.defaults.cjs

@@ -1,5 +1,6 @@
-const http = require('http')
+const http = require('node:http')
 http.globalAgent.maxSockets = 300
 http.globalAgent.maxSockets = 300
+http.globalAgent.keepAlive = false
 
 
 module.exports = {
 module.exports = {
   internal: {
   internal: {

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

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

+ 1 - 1
services/docstore/.nvmrc

@@ -1 +1 @@
-18.20.4
+20.18.0

+ 1 - 1
services/docstore/Dockerfile

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

+ 2 - 2
services/docstore/Makefile

@@ -32,12 +32,12 @@ HERE=$(shell pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 # Run the linting commands in the scope of the monorepo.
 # Run the linting commands in the scope of the monorepo.
 # Eslint and prettier (plus some configs) are on the root.
 # Eslint and prettier (plus some configs) are on the root.
-RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.20.4 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:20.18.0 npm run --silent
 
 
 RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) npm run --silent
 RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) npm run --silent
 
 
 # Same but from the top of the monorepo
 # Same but from the top of the monorepo
-RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:18.20.4 npm run --silent
+RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:20.18.0 npm run --silent
 
 
 format:
 format:
 	$(RUN_LINTING) format
 	$(RUN_LINTING) format

+ 1 - 1
services/docstore/buildscript.txt

@@ -4,6 +4,6 @@ docstore
 --env-add=
 --env-add=
 --env-pass-through=
 --env-pass-through=
 --esmock-loader=False
 --esmock-loader=False
---node-version=18.20.4
+--node-version=20.18.0
 --public-repo=True
 --public-repo=True
 --script-version=4.5.0
 --script-version=4.5.0

+ 1 - 0
services/docstore/config/settings.defaults.js

@@ -1,5 +1,6 @@
 const http = require('node:http')
 const http = require('node:http')
 http.globalAgent.maxSockets = 300
 http.globalAgent.maxSockets = 300
+http.globalAgent.keepAlive = false
 
 
 const Settings = {
 const Settings = {
   internal: {
   internal: {

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

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

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

@@ -1 +1 @@
-18.20.4
+20.18.0

+ 1 - 1
services/document-updater/Dockerfile

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

+ 2 - 2
services/document-updater/Makefile

@@ -32,12 +32,12 @@ HERE=$(shell pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 # Run the linting commands in the scope of the monorepo.
 # Run the linting commands in the scope of the monorepo.
 # Eslint and prettier (plus some configs) are on the root.
 # Eslint and prettier (plus some configs) are on the root.
-RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.20.4 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:20.18.0 npm run --silent
 
 
 RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) npm run --silent
 RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) npm run --silent
 
 
 # Same but from the top of the monorepo
 # Same but from the top of the monorepo
-RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:18.20.4 npm run --silent
+RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:20.18.0 npm run --silent
 
 
 format:
 format:
 	$(RUN_LINTING) format
 	$(RUN_LINTING) format

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

@@ -4,6 +4,6 @@ document-updater
 --env-add=
 --env-add=
 --env-pass-through=
 --env-pass-through=
 --esmock-loader=False
 --esmock-loader=False
---node-version=18.20.4
+--node-version=20.18.0
 --public-repo=True
 --public-repo=True
 --script-version=4.5.0
 --script-version=4.5.0

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

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

+ 1 - 1
services/filestore/.nvmrc

@@ -1 +1 @@
-18.20.4
+20.18.0

+ 1 - 1
services/filestore/Dockerfile

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

+ 2 - 2
services/filestore/Makefile

@@ -32,12 +32,12 @@ HERE=$(shell pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 # Run the linting commands in the scope of the monorepo.
 # Run the linting commands in the scope of the monorepo.
 # Eslint and prettier (plus some configs) are on the root.
 # Eslint and prettier (plus some configs) are on the root.
-RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.20.4 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:20.18.0 npm run --silent
 
 
 RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) npm run --silent
 RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) npm run --silent
 
 
 # Same but from the top of the monorepo
 # Same but from the top of the monorepo
-RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:18.20.4 npm run --silent
+RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:20.18.0 npm run --silent
 
 
 format:
 format:
 	$(RUN_LINTING) format
 	$(RUN_LINTING) format

+ 1 - 1
services/filestore/buildscript.txt

@@ -5,7 +5,7 @@ filestore
 --env-add=ENABLE_CONVERSIONS="true",USE_PROM_METRICS="true",AWS_S3_USER_FILES_BUCKET_NAME=fake-user-files,AWS_S3_USER_FILES_DEK_BUCKET_NAME=fake-user-files-dek,AWS_S3_TEMPLATE_FILES_BUCKET_NAME=fake-template-files,GCS_USER_FILES_BUCKET_NAME=fake-gcs-user-files,GCS_TEMPLATE_FILES_BUCKET_NAME=fake-gcs-template-files
 --env-add=ENABLE_CONVERSIONS="true",USE_PROM_METRICS="true",AWS_S3_USER_FILES_BUCKET_NAME=fake-user-files,AWS_S3_USER_FILES_DEK_BUCKET_NAME=fake-user-files-dek,AWS_S3_TEMPLATE_FILES_BUCKET_NAME=fake-template-files,GCS_USER_FILES_BUCKET_NAME=fake-gcs-user-files,GCS_TEMPLATE_FILES_BUCKET_NAME=fake-gcs-template-files
 --env-pass-through=
 --env-pass-through=
 --esmock-loader=False
 --esmock-loader=False
---node-version=18.20.4
+--node-version=20.18.0
 --public-repo=True
 --public-repo=True
 --script-version=4.5.0
 --script-version=4.5.0
 --test-acceptance-shards=SHARD_01_,SHARD_02_,SHARD_03_
 --test-acceptance-shards=SHARD_01_,SHARD_02_,SHARD_03_

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

@@ -1 +1 @@
-18.20.4
+20.18.0

+ 1 - 1
services/history-v1/Dockerfile

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

+ 2 - 2
services/history-v1/Makefile

@@ -32,12 +32,12 @@ HERE=$(shell pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 # Run the linting commands in the scope of the monorepo.
 # Run the linting commands in the scope of the monorepo.
 # Eslint and prettier (plus some configs) are on the root.
 # Eslint and prettier (plus some configs) are on the root.
-RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.20.4 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:20.18.0 npm run --silent
 
 
 RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) npm run --silent
 RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) npm run --silent
 
 
 # Same but from the top of the monorepo
 # Same but from the top of the monorepo
-RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:18.20.4 npm run --silent
+RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:20.18.0 npm run --silent
 
 
 format:
 format:
 	$(RUN_LINTING) format
 	$(RUN_LINTING) format

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

@@ -4,7 +4,7 @@ history-v1
 --env-add=
 --env-add=
 --env-pass-through=
 --env-pass-through=
 --esmock-loader=False
 --esmock-loader=False
---node-version=18.20.4
+--node-version=20.18.0
 --public-repo=False
 --public-repo=False
 --script-version=4.5.0
 --script-version=4.5.0
 --tsconfig-extra-includes=api/**/*,migrations/**/*,storage/**/*
 --tsconfig-extra-includes=api/**/*,migrations/**/*,storage/**/*

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

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

+ 1 - 1
services/notifications/.nvmrc

@@ -1 +1 @@
-18.20.4
+20.18.0

+ 1 - 1
services/notifications/Dockerfile

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

+ 2 - 2
services/notifications/Makefile

@@ -32,12 +32,12 @@ HERE=$(shell pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 # Run the linting commands in the scope of the monorepo.
 # Run the linting commands in the scope of the monorepo.
 # Eslint and prettier (plus some configs) are on the root.
 # Eslint and prettier (plus some configs) are on the root.
-RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.20.4 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:20.18.0 npm run --silent
 
 
 RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) npm run --silent
 RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) npm run --silent
 
 
 # Same but from the top of the monorepo
 # Same but from the top of the monorepo
-RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:18.20.4 npm run --silent
+RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:20.18.0 npm run --silent
 
 
 format:
 format:
 	$(RUN_LINTING) format
 	$(RUN_LINTING) format

+ 1 - 1
services/notifications/buildscript.txt

@@ -4,6 +4,6 @@ notifications
 --env-add=
 --env-add=
 --env-pass-through=
 --env-pass-through=
 --esmock-loader=False
 --esmock-loader=False
---node-version=18.20.4
+--node-version=20.18.0
 --public-repo=True
 --public-repo=True
 --script-version=4.5.0
 --script-version=4.5.0

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

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

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

@@ -1 +1 @@
-18.20.4
+20.18.0

+ 1 - 1
services/project-history/Dockerfile

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

+ 2 - 2
services/project-history/Makefile

@@ -32,12 +32,12 @@ HERE=$(shell pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 # Run the linting commands in the scope of the monorepo.
 # Run the linting commands in the scope of the monorepo.
 # Eslint and prettier (plus some configs) are on the root.
 # Eslint and prettier (plus some configs) are on the root.
-RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.20.4 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:20.18.0 npm run --silent
 
 
 RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/document-updater/app/js/types.ts:/overleaf/services/document-updater/app/js/types.ts ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) npm run --silent
 RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json --volume $(MONOREPO)/services/document-updater/app/js/types.ts:/overleaf/services/document-updater/app/js/types.ts ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) npm run --silent
 
 
 # Same but from the top of the monorepo
 # Same but from the top of the monorepo
-RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:18.20.4 npm run --silent
+RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:20.18.0 npm run --silent
 
 
 format:
 format:
 	$(RUN_LINTING) format
 	$(RUN_LINTING) format

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

@@ -4,6 +4,6 @@ project-history
 --env-add=
 --env-add=
 --env-pass-through=
 --env-pass-through=
 --esmock-loader=True
 --esmock-loader=True
---node-version=18.20.4
+--node-version=20.18.0
 --public-repo=False
 --public-repo=False
 --script-version=4.5.0
 --script-version=4.5.0

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

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

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

@@ -1 +1 @@
-18.20.4
+20.18.0

+ 1 - 1
services/real-time/Dockerfile

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

+ 2 - 2
services/real-time/Makefile

@@ -32,12 +32,12 @@ HERE=$(shell pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 MONOREPO=$(shell cd ../../ && pwd)
 # Run the linting commands in the scope of the monorepo.
 # Run the linting commands in the scope of the monorepo.
 # Eslint and prettier (plus some configs) are on the root.
 # Eslint and prettier (plus some configs) are on the root.
-RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:18.20.4 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:20.18.0 npm run --silent
 
 
 RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) npm run --silent
 RUN_LINTING_CI = docker run --rm --volume $(MONOREPO)/.editorconfig:/overleaf/.editorconfig --volume $(MONOREPO)/.eslintignore:/overleaf/.eslintignore --volume $(MONOREPO)/.eslintrc:/overleaf/.eslintrc --volume $(MONOREPO)/.prettierignore:/overleaf/.prettierignore --volume $(MONOREPO)/.prettierrc:/overleaf/.prettierrc --volume $(MONOREPO)/tsconfig.backend.json:/overleaf/tsconfig.backend.json ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) npm run --silent
 
 
 # Same but from the top of the monorepo
 # Same but from the top of the monorepo
-RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:18.20.4 npm run --silent
+RUN_LINTING_MONOREPO = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(MONOREPO) node:20.18.0 npm run --silent
 
 
 format:
 format:
 	$(RUN_LINTING) format
 	$(RUN_LINTING) format

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

@@ -4,6 +4,6 @@ real-time
 --env-add=
 --env-add=
 --env-pass-through=
 --env-pass-through=
 --esmock-loader=False
 --esmock-loader=False
---node-version=18.20.4
+--node-version=20.18.0
 --public-repo=False
 --public-repo=False
 --script-version=4.5.0
 --script-version=4.5.0

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

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

+ 1 - 1
services/web/.nvmrc

@@ -1 +1 @@
-18.20.4
+20.18.0

+ 1 - 1
services/web/Dockerfile

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

+ 1 - 1
services/web/Dockerfile.frontend

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

+ 2 - 0
services/web/app.mjs

@@ -26,7 +26,9 @@ logger.logger.serializers.project = Serializers.project
 if (Settings.sentry?.dsn != null) {
 if (Settings.sentry?.dsn != null) {
   logger.initializeErrorReporting(Settings.sentry.dsn)
   logger.initializeErrorReporting(Settings.sentry.dsn)
 }
 }
+http.globalAgent.keepAlive = false
 http.globalAgent.maxSockets = Settings.limits.httpGlobalAgentMaxSockets
 http.globalAgent.maxSockets = Settings.limits.httpGlobalAgentMaxSockets
+https.globalAgent.keepAlive = false
 https.globalAgent.maxSockets = Settings.limits.httpsGlobalAgentMaxSockets
 https.globalAgent.maxSockets = Settings.limits.httpsGlobalAgentMaxSockets
 
 
 metrics.memory.monitor(logger)
 metrics.memory.monitor(logger)

+ 3 - 3
services/web/cloudbuild-storybook.yaml

@@ -1,13 +1,13 @@
 steps:
 steps:
   - id: npm_ci
   - id: npm_ci
-    name: "node:18.20.4"
+    name: "node:20.18.0"
     entrypoint: /bin/bash
     entrypoint: /bin/bash
     args:
     args:
       - '-c'
       - '-c'
       - 'bin/npm_install_subset . libraries/* services/web'
       - 'bin/npm_install_subset . libraries/* services/web'
 
 
   - id: build-storybook
   - id: build-storybook
-    name: 'node:18.20.4'
+    name: 'node:20.18.0'
     env:
     env:
       - 'BRANCH_NAME=$BRANCH_NAME'
       - 'BRANCH_NAME=$BRANCH_NAME'
       - 'BUILD_ID=$BUILD_ID'
       - 'BUILD_ID=$BUILD_ID'
@@ -49,7 +49,7 @@ steps:
       - deploy-storybook
       - deploy-storybook
 
 
   - id: create-storybook-index
   - id: create-storybook-index
-    name: 'node:18.20.4'
+    name: 'node:20.18.0'
     dir: services/web
     dir: services/web
     env:
     env:
       - 'BRANCH_NAME=$BRANCH_NAME'
       - 'BRANCH_NAME=$BRANCH_NAME'

+ 1 - 1
services/web/docker-compose.common.env

@@ -41,6 +41,6 @@ OVERLEAF_SAML_UPDATE_USER_DETAILS_ON_LOGIN=true
 OVERLEAF_SAML_CERT=MIIDXTCCAkWgAwIBAgIJAOvOeQ4xFTzsMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNVBAYTAkdCMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwHhcNMTYxMTE1MTQxMjU5WhcNMjYxMTE1MTQxMjU5WjBFMQswCQYDVQQGEwJHQjETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxCT6MBe5G9VoLU8MfztOEbUhnwLp17ak8eFUqxqeXkkqtWB0b/cmIBU3xoQoO3dIF8PBzfqehqfYVhrNt/TFgcmDfmJnPJRL1RJWMW3VmiP5odJ3LwlkKbZpkeT3wZ8HEJIR1+zbpxiBNkbd2GbdR1iumcsHzMYX1A2CBj+ZMV5VijC+K4P0e9c05VsDEUtLmfeAasJAiumQoVVgAe/BpiXjICGGewa6EPFI7mKkifIRKOGxdRESwZZjxP30bI31oDN0cgKqIgSJtJ9nfCn9jgBMBkQHu42WMuaWD4jrGd7+vYdX+oIfArs9aKgAH5kUGhGdew2R9SpBefrhbNxG8QIDAQABo1AwTjAdBgNVHQ4EFgQU+aSojSyyLChP/IpZcafvSdhj7KkwHwYDVR0jBBgwFoAU+aSojSyyLChP/IpZcafvSdhj7KkwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEABl3+OOVLBWMKs6PjA8lPuloWDNzSr3v76oUcHqAb+cfbucjXrOVsS9RJ0X9yxvCQyfM9FfY43DbspnN3izYhdvbJD8kKLNf0LA5st+ZxLfy0ACyL2iyAwICaqndqxAjQYplFAHmpUiu1DiHckyBPekokDJd+ze95urHMOsaGS5RWPoKJVE0bkaAeZCmEu0NNpXRSBiuxXSTeSAJfv6kyE/rkdhzUKyUl/cGQFrsVYfAFQVA+W6CKOh74ErSEzSHQQYndl7nD33snD/YqdU1ROxV6aJzLKCg+sdj+wRXSP2u/UHnM4jW9TGJfhO42jzL6WVuEvr9q4l7zWzUQKKKhtQ==
 OVERLEAF_SAML_CERT=MIIDXTCCAkWgAwIBAgIJAOvOeQ4xFTzsMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNVBAYTAkdCMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQwHhcNMTYxMTE1MTQxMjU5WhcNMjYxMTE1MTQxMjU5WjBFMQswCQYDVQQGEwJHQjETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxCT6MBe5G9VoLU8MfztOEbUhnwLp17ak8eFUqxqeXkkqtWB0b/cmIBU3xoQoO3dIF8PBzfqehqfYVhrNt/TFgcmDfmJnPJRL1RJWMW3VmiP5odJ3LwlkKbZpkeT3wZ8HEJIR1+zbpxiBNkbd2GbdR1iumcsHzMYX1A2CBj+ZMV5VijC+K4P0e9c05VsDEUtLmfeAasJAiumQoVVgAe/BpiXjICGGewa6EPFI7mKkifIRKOGxdRESwZZjxP30bI31oDN0cgKqIgSJtJ9nfCn9jgBMBkQHu42WMuaWD4jrGd7+vYdX+oIfArs9aKgAH5kUGhGdew2R9SpBefrhbNxG8QIDAQABo1AwTjAdBgNVHQ4EFgQU+aSojSyyLChP/IpZcafvSdhj7KkwHwYDVR0jBBgwFoAU+aSojSyyLChP/IpZcafvSdhj7KkwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEABl3+OOVLBWMKs6PjA8lPuloWDNzSr3v76oUcHqAb+cfbucjXrOVsS9RJ0X9yxvCQyfM9FfY43DbspnN3izYhdvbJD8kKLNf0LA5st+ZxLfy0ACyL2iyAwICaqndqxAjQYplFAHmpUiu1DiHckyBPekokDJd+ze95urHMOsaGS5RWPoKJVE0bkaAeZCmEu0NNpXRSBiuxXSTeSAJfv6kyE/rkdhzUKyUl/cGQFrsVYfAFQVA+W6CKOh74ErSEzSHQQYndl7nD33snD/YqdU1ROxV6aJzLKCg+sdj+wRXSP2u/UHnM4jW9TGJfhO42jzL6WVuEvr9q4l7zWzUQKKKhtQ==
 # DEVICE_HISTORY_SECRET has been generated using:
 # DEVICE_HISTORY_SECRET has been generated using:
 # NOTE: crypto.generateKeySync was added in v15, v16 is the next LTS release.
 # NOTE: crypto.generateKeySync was added in v15, v16 is the next LTS release.
-# $ docker run --rm node:18.20.4 --print 'require("crypto").generateKeySync("aes", { length: 256 }).export().toString("hex")'
+# $ docker run --rm node:20.18.0 --print 'require("crypto").generateKeySync("aes", { length: 256 }).export().toString("hex")'
 DEVICE_HISTORY_SECRET=1b46e6cdf72db02845da06c9517c9cfbbfa0d87357479f4e1df3ce160bd54807
 DEVICE_HISTORY_SECRET=1b46e6cdf72db02845da06c9517c9cfbbfa0d87357479f4e1df3ce160bd54807
 QUEUE_PROCESSING_ENABLED=true
 QUEUE_PROCESSING_ENABLED=true

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

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

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

@@ -1,4 +1,4 @@
-FROM node:18.20.4
+FROM node:20.18.0
 
 
 WORKDIR /app/scripts/translations
 WORKDIR /app/scripts/translations