From a797fb2be72b490e1a0ff480f6ebaccd1e946902 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Wed, 2 Aug 2023 16:09:11 +0200 Subject: [PATCH] Merge pull request #14138 from overleaf/bg-em-jpa-mj-node-18 Upgrade all services to Node 18 GitOrigin-RevId: c53cd1aaab2fe99b51186911bb068f9fe31a9469 --- libraries/access-token-encryptor/.gitignore | 1 - libraries/access-token-encryptor/.nvmrc | 2 +- libraries/access-token-encryptor/buildscript.txt | 2 +- libraries/fetch-utils/Dockerfile | 5 ----- libraries/logger/.gitignore | 1 - libraries/logger/.nvmrc | 2 +- libraries/logger/buildscript.txt | 2 +- libraries/metrics/.gitignore | 1 - libraries/metrics/.nvmrc | 2 +- libraries/metrics/buildscript.txt | 2 +- libraries/o-error/.gitignore | 1 - libraries/o-error/.nvmrc | 2 +- libraries/o-error/buildscript.txt | 2 +- libraries/object-persistor/.gitignore | 1 - libraries/object-persistor/.nvmrc | 2 +- libraries/object-persistor/buildscript.txt | 2 +- libraries/overleaf-editor-core/.nvmrc | 2 +- libraries/overleaf-editor-core/buildscript.txt | 2 +- libraries/ranges-tracker/.gitignore | 1 - libraries/ranges-tracker/.nvmrc | 2 +- libraries/ranges-tracker/buildscript.txt | 2 +- libraries/redis-wrapper/.gitignore | 1 - libraries/redis-wrapper/.nvmrc | 2 +- libraries/redis-wrapper/buildscript.txt | 2 +- libraries/settings/.gitignore | 1 - libraries/settings/.nvmrc | 2 +- libraries/settings/buildscript.txt | 2 +- libraries/stream-utils/.nvmrc | 2 +- libraries/stream-utils/Dockerfile | 5 ----- libraries/stream-utils/buildscript.txt | 2 +- services/chat/.nvmrc | 2 +- services/chat/Dockerfile | 2 +- services/chat/Makefile | 2 +- services/chat/buildscript.txt | 2 +- services/chat/docker-compose.yml | 4 ++-- services/clsi/.nvmrc | 2 +- services/clsi/Dockerfile | 2 +- services/clsi/Makefile | 2 +- services/clsi/buildscript.txt | 2 +- services/contacts/.nvmrc | 2 +- services/contacts/Dockerfile | 2 +- services/contacts/Makefile | 2 +- services/contacts/buildscript.txt | 2 +- services/contacts/docker-compose.yml | 4 ++-- services/docstore/.nvmrc | 2 +- services/docstore/Dockerfile | 2 +- services/docstore/Makefile | 2 +- services/docstore/app.js | 3 +++ services/docstore/buildscript.txt | 2 +- services/docstore/docker-compose.yml | 4 ++-- services/document-updater/.nvmrc | 2 +- services/document-updater/Dockerfile | 2 +- services/document-updater/Makefile | 2 +- services/document-updater/buildscript.txt | 2 +- services/document-updater/docker-compose.yml | 4 ++-- services/filestore/.nvmrc | 2 +- services/filestore/Dockerfile | 2 +- services/filestore/Makefile | 2 +- services/filestore/app.js | 14 ++++++++++++++ services/filestore/buildscript.txt | 2 +- services/history-v1/.nvmrc | 2 +- services/history-v1/Dockerfile | 2 +- services/history-v1/Makefile | 2 +- services/history-v1/app.js | 2 ++ services/history-v1/buildscript.txt | 2 +- services/history-v1/docker-compose.yml | 4 ++-- services/notifications/.nvmrc | 2 +- services/notifications/Dockerfile | 2 +- services/notifications/Makefile | 2 +- services/notifications/buildscript.txt | 2 +- services/notifications/docker-compose.yml | 4 ++-- services/project-history/.nvmrc | 2 +- services/project-history/Dockerfile | 2 +- services/project-history/Makefile | 2 +- services/project-history/buildscript.txt | 2 +- services/project-history/docker-compose.yml | 4 ++-- services/real-time/.nvmrc | 2 +- services/real-time/Dockerfile | 2 +- services/real-time/Makefile | 2 +- services/real-time/buildscript.txt | 4 ++-- services/real-time/docker-compose.yml | 4 ++-- services/spelling/.nvmrc | 2 +- services/spelling/Dockerfile | 2 +- services/spelling/Makefile | 2 +- services/spelling/buildscript.txt | 2 +- services/track-changes/.nvmrc | 2 +- services/track-changes/Dockerfile | 2 +- services/track-changes/Makefile | 2 +- services/track-changes/buildscript.txt | 2 +- services/track-changes/docker-compose.yml | 4 ++-- services/web/.nvmrc | 2 +- services/web/Dockerfile | 2 +- services/web/Dockerfile.frontend | 2 +- services/web/docker-compose.yml | 4 ++-- services/web/scripts/translations/Dockerfile | 2 +- 95 files changed, 112 insertions(+), 111 deletions(-) delete mode 100644 libraries/fetch-utils/Dockerfile delete mode 100644 libraries/stream-utils/Dockerfile diff --git a/libraries/access-token-encryptor/.gitignore b/libraries/access-token-encryptor/.gitignore index c470547e6f..66936c4121 100644 --- a/libraries/access-token-encryptor/.gitignore +++ b/libraries/access-token-encryptor/.gitignore @@ -44,4 +44,3 @@ data/*/* hash_folder .npmrc -Dockerfile diff --git a/libraries/access-token-encryptor/.nvmrc b/libraries/access-token-encryptor/.nvmrc index c85fa1bbef..3876fd4986 100644 --- a/libraries/access-token-encryptor/.nvmrc +++ b/libraries/access-token-encryptor/.nvmrc @@ -1 +1 @@ -16.17.1 +18.16.1 diff --git a/libraries/access-token-encryptor/buildscript.txt b/libraries/access-token-encryptor/buildscript.txt index bdce901faf..ee63dcc60d 100644 --- a/libraries/access-token-encryptor/buildscript.txt +++ b/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 diff --git a/libraries/fetch-utils/Dockerfile b/libraries/fetch-utils/Dockerfile deleted file mode 100644 index e515c7f23b..0000000000 --- a/libraries/fetch-utils/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM node:18.16.1 - -WORKDIR /app - -USER node diff --git a/libraries/logger/.gitignore b/libraries/logger/.gitignore index cbf8548194..2006c875a4 100644 --- a/libraries/logger/.gitignore +++ b/libraries/logger/.gitignore @@ -1,4 +1,3 @@ node_modules .npmrc -Dockerfile diff --git a/libraries/logger/.nvmrc b/libraries/logger/.nvmrc index c85fa1bbef..3876fd4986 100644 --- a/libraries/logger/.nvmrc +++ b/libraries/logger/.nvmrc @@ -1 +1 @@ -16.17.1 +18.16.1 diff --git a/libraries/logger/buildscript.txt b/libraries/logger/buildscript.txt index 9c337862f9..0885d47804 100644 --- a/libraries/logger/buildscript.txt +++ b/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 diff --git a/libraries/metrics/.gitignore b/libraries/metrics/.gitignore index cbf8548194..2006c875a4 100644 --- a/libraries/metrics/.gitignore +++ b/libraries/metrics/.gitignore @@ -1,4 +1,3 @@ node_modules .npmrc -Dockerfile diff --git a/libraries/metrics/.nvmrc b/libraries/metrics/.nvmrc index c85fa1bbef..3876fd4986 100644 --- a/libraries/metrics/.nvmrc +++ b/libraries/metrics/.nvmrc @@ -1 +1 @@ -16.17.1 +18.16.1 diff --git a/libraries/metrics/buildscript.txt b/libraries/metrics/buildscript.txt index f21e0c284a..45bc966040 100644 --- a/libraries/metrics/buildscript.txt +++ b/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 diff --git a/libraries/o-error/.gitignore b/libraries/o-error/.gitignore index 81748eae77..cf2f0ad3fb 100644 --- a/libraries/o-error/.gitignore +++ b/libraries/o-error/.gitignore @@ -3,4 +3,3 @@ coverage node_modules/ .npmrc -Dockerfile diff --git a/libraries/o-error/.nvmrc b/libraries/o-error/.nvmrc index c85fa1bbef..3876fd4986 100644 --- a/libraries/o-error/.nvmrc +++ b/libraries/o-error/.nvmrc @@ -1 +1 @@ -16.17.1 +18.16.1 diff --git a/libraries/o-error/buildscript.txt b/libraries/o-error/buildscript.txt index 8efbe63151..4f9ed24450 100644 --- a/libraries/o-error/buildscript.txt +++ b/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 diff --git a/libraries/object-persistor/.gitignore b/libraries/object-persistor/.gitignore index 734a044fc9..6a20893208 100644 --- a/libraries/object-persistor/.gitignore +++ b/libraries/object-persistor/.gitignore @@ -2,4 +2,3 @@ *.swp .npmrc -Dockerfile diff --git a/libraries/object-persistor/.nvmrc b/libraries/object-persistor/.nvmrc index c85fa1bbef..3876fd4986 100644 --- a/libraries/object-persistor/.nvmrc +++ b/libraries/object-persistor/.nvmrc @@ -1 +1 @@ -16.17.1 +18.16.1 diff --git a/libraries/object-persistor/buildscript.txt b/libraries/object-persistor/buildscript.txt index ae9f7dcf51..2aff1a4e2c 100644 --- a/libraries/object-persistor/buildscript.txt +++ b/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 diff --git a/libraries/overleaf-editor-core/.nvmrc b/libraries/overleaf-editor-core/.nvmrc index c85fa1bbef..3876fd4986 100644 --- a/libraries/overleaf-editor-core/.nvmrc +++ b/libraries/overleaf-editor-core/.nvmrc @@ -1 +1 @@ -16.17.1 +18.16.1 diff --git a/libraries/overleaf-editor-core/buildscript.txt b/libraries/overleaf-editor-core/buildscript.txt index 71f57652b1..2fdc5a21b4 100644 --- a/libraries/overleaf-editor-core/buildscript.txt +++ b/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 diff --git a/libraries/ranges-tracker/.gitignore b/libraries/ranges-tracker/.gitignore index a023589c70..eac200248b 100644 --- a/libraries/ranges-tracker/.gitignore +++ b/libraries/ranges-tracker/.gitignore @@ -11,4 +11,3 @@ node_modules/ plato/ .npmrc -Dockerfile diff --git a/libraries/ranges-tracker/.nvmrc b/libraries/ranges-tracker/.nvmrc index c85fa1bbef..3876fd4986 100644 --- a/libraries/ranges-tracker/.nvmrc +++ b/libraries/ranges-tracker/.nvmrc @@ -1 +1 @@ -16.17.1 +18.16.1 diff --git a/libraries/ranges-tracker/buildscript.txt b/libraries/ranges-tracker/buildscript.txt index ef826d2e63..a9ea0e0a68 100644 --- a/libraries/ranges-tracker/buildscript.txt +++ b/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 diff --git a/libraries/redis-wrapper/.gitignore b/libraries/redis-wrapper/.gitignore index a023589c70..eac200248b 100644 --- a/libraries/redis-wrapper/.gitignore +++ b/libraries/redis-wrapper/.gitignore @@ -11,4 +11,3 @@ node_modules/ plato/ .npmrc -Dockerfile diff --git a/libraries/redis-wrapper/.nvmrc b/libraries/redis-wrapper/.nvmrc index c85fa1bbef..3876fd4986 100644 --- a/libraries/redis-wrapper/.nvmrc +++ b/libraries/redis-wrapper/.nvmrc @@ -1 +1 @@ -16.17.1 +18.16.1 diff --git a/libraries/redis-wrapper/buildscript.txt b/libraries/redis-wrapper/buildscript.txt index 2728dee5c6..b8e2448ca8 100644 --- a/libraries/redis-wrapper/buildscript.txt +++ b/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 diff --git a/libraries/settings/.gitignore b/libraries/settings/.gitignore index 5fa186a3d4..06d8e1ddb2 100644 --- a/libraries/settings/.gitignore +++ b/libraries/settings/.gitignore @@ -1,5 +1,4 @@ /.npmrc -/Dockerfile /node_modules # managed by monorepo$ bin/update_build_scripts diff --git a/libraries/settings/.nvmrc b/libraries/settings/.nvmrc index c85fa1bbef..3876fd4986 100644 --- a/libraries/settings/.nvmrc +++ b/libraries/settings/.nvmrc @@ -1 +1 @@ -16.17.1 +18.16.1 diff --git a/libraries/settings/buildscript.txt b/libraries/settings/buildscript.txt index 8d4bde87bf..c2f55a0777 100644 --- a/libraries/settings/buildscript.txt +++ b/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 diff --git a/libraries/stream-utils/.nvmrc b/libraries/stream-utils/.nvmrc index c85fa1bbef..3876fd4986 100644 --- a/libraries/stream-utils/.nvmrc +++ b/libraries/stream-utils/.nvmrc @@ -1 +1 @@ -16.17.1 +18.16.1 diff --git a/libraries/stream-utils/Dockerfile b/libraries/stream-utils/Dockerfile deleted file mode 100644 index 5c971cea64..0000000000 --- a/libraries/stream-utils/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM node:16.17.1 - -WORKDIR /app - -USER node diff --git a/libraries/stream-utils/buildscript.txt b/libraries/stream-utils/buildscript.txt index ec9c4521cc..30519c165a 100644 --- a/libraries/stream-utils/buildscript.txt +++ b/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 diff --git a/services/chat/.nvmrc b/services/chat/.nvmrc index c85fa1bbef..3876fd4986 100644 --- a/services/chat/.nvmrc +++ b/services/chat/.nvmrc @@ -1 +1 @@ -16.17.1 +18.16.1 diff --git a/services/chat/Dockerfile b/services/chat/Dockerfile index bbc775360f..7f98a39bb0 100644 --- a/services/chat/Dockerfile +++ b/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 diff --git a/services/chat/Makefile b/services/chat/Makefile index 4ca99b3ed6..c51fe933b8 100644 --- a/services/chat/Makefile +++ b/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 diff --git a/services/chat/buildscript.txt b/services/chat/buildscript.txt index 15e106da49..1edf2893cd 100644 --- a/services/chat/buildscript.txt +++ b/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 diff --git a/services/chat/docker-compose.yml b/services/chat/docker-compose.yml index 91c46354db..2084eb7dca 100644 --- a/services/chat/docker-compose.yml +++ b/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 diff --git a/services/clsi/.nvmrc b/services/clsi/.nvmrc index c85fa1bbef..3876fd4986 100644 --- a/services/clsi/.nvmrc +++ b/services/clsi/.nvmrc @@ -1 +1 @@ -16.17.1 +18.16.1 diff --git a/services/clsi/Dockerfile b/services/clsi/Dockerfile index b375e988f5..eb8b6585ed 100644 --- a/services/clsi/Dockerfile +++ b/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/ diff --git a/services/clsi/Makefile b/services/clsi/Makefile index 3be1f25fc6..93d1e317f3 100644 --- a/services/clsi/Makefile +++ b/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 diff --git a/services/clsi/buildscript.txt b/services/clsi/buildscript.txt index f000af5a35..7f1483bb8d 100644 --- a/services/clsi/buildscript.txt +++ b/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 diff --git a/services/contacts/.nvmrc b/services/contacts/.nvmrc index c85fa1bbef..3876fd4986 100644 --- a/services/contacts/.nvmrc +++ b/services/contacts/.nvmrc @@ -1 +1 @@ -16.17.1 +18.16.1 diff --git a/services/contacts/Dockerfile b/services/contacts/Dockerfile index fa769a4d7e..dce694c4bf 100644 --- a/services/contacts/Dockerfile +++ b/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 diff --git a/services/contacts/Makefile b/services/contacts/Makefile index 205f4ada38..2805f91fc9 100644 --- a/services/contacts/Makefile +++ b/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 diff --git a/services/contacts/buildscript.txt b/services/contacts/buildscript.txt index 941af27ba7..bec0fa41fe 100644 --- a/services/contacts/buildscript.txt +++ b/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 diff --git a/services/contacts/docker-compose.yml b/services/contacts/docker-compose.yml index 31971da5d7..629161048e 100644 --- a/services/contacts/docker-compose.yml +++ b/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 diff --git a/services/docstore/.nvmrc b/services/docstore/.nvmrc index c85fa1bbef..3876fd4986 100644 --- a/services/docstore/.nvmrc +++ b/services/docstore/.nvmrc @@ -1 +1 @@ -16.17.1 +18.16.1 diff --git a/services/docstore/Dockerfile b/services/docstore/Dockerfile index 9dda209ef3..72861388b4 100644 --- a/services/docstore/Dockerfile +++ b/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 diff --git a/services/docstore/Makefile b/services/docstore/Makefile index 0f4976402e..5e44c0b536 100644 --- a/services/docstore/Makefile +++ b/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 diff --git a/services/docstore/app.js b/services/docstore/app.js index 1fb11d3589..70e3a6d8a0 100644 --- a/services/docstore/app.js +++ b/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) diff --git a/services/docstore/buildscript.txt b/services/docstore/buildscript.txt index 395be7decb..9fea540a58 100644 --- a/services/docstore/buildscript.txt +++ b/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 diff --git a/services/docstore/docker-compose.yml b/services/docstore/docker-compose.yml index 7ab8050de4..260456677d 100644 --- a/services/docstore/docker-compose.yml +++ b/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 diff --git a/services/document-updater/.nvmrc b/services/document-updater/.nvmrc index c85fa1bbef..3876fd4986 100644 --- a/services/document-updater/.nvmrc +++ b/services/document-updater/.nvmrc @@ -1 +1 @@ -16.17.1 +18.16.1 diff --git a/services/document-updater/Dockerfile b/services/document-updater/Dockerfile index f484c461fd..0c9b2e3e33 100644 --- a/services/document-updater/Dockerfile +++ b/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 diff --git a/services/document-updater/Makefile b/services/document-updater/Makefile index f70b4015be..cfa034d839 100644 --- a/services/document-updater/Makefile +++ b/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 diff --git a/services/document-updater/buildscript.txt b/services/document-updater/buildscript.txt index 77c1c6ffec..f851a4bfe7 100644 --- a/services/document-updater/buildscript.txt +++ b/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 diff --git a/services/document-updater/docker-compose.yml b/services/document-updater/docker-compose.yml index 118ae0a49e..c02ecdb727 100644 --- a/services/document-updater/docker-compose.yml +++ b/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 diff --git a/services/filestore/.nvmrc b/services/filestore/.nvmrc index c85fa1bbef..3876fd4986 100644 --- a/services/filestore/.nvmrc +++ b/services/filestore/.nvmrc @@ -1 +1 @@ -16.17.1 +18.16.1 diff --git a/services/filestore/Dockerfile b/services/filestore/Dockerfile index a5a8898ab2..5b8fc9aac6 100644 --- a/services/filestore/Dockerfile +++ b/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/ diff --git a/services/filestore/Makefile b/services/filestore/Makefile index 2d588e62de..f89fe5704b 100644 --- a/services/filestore/Makefile +++ b/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 diff --git a/services/filestore/app.js b/services/filestore/app.js index 807c86bcea..15b5d34f24 100644 --- a/services/filestore/app.js +++ b/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) { diff --git a/services/filestore/buildscript.txt b/services/filestore/buildscript.txt index 30daaacccf..b317cfb0d4 100644 --- a/services/filestore/buildscript.txt +++ b/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 diff --git a/services/history-v1/.nvmrc b/services/history-v1/.nvmrc index 47979412e9..3876fd4986 100644 --- a/services/history-v1/.nvmrc +++ b/services/history-v1/.nvmrc @@ -1 +1 @@ -16.20.1 +18.16.1 diff --git a/services/history-v1/Dockerfile b/services/history-v1/Dockerfile index cd07369eee..42d4bed035 100644 --- a/services/history-v1/Dockerfile +++ b/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 diff --git a/services/history-v1/Makefile b/services/history-v1/Makefile index 0280ba59c9..2e94b63e19 100644 --- a/services/history-v1/Makefile +++ b/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 diff --git a/services/history-v1/app.js b/services/history-v1/app.js index 391551f632..c942bb9e10 100644 --- a/services/history-v1/app.js +++ b/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 diff --git a/services/history-v1/buildscript.txt b/services/history-v1/buildscript.txt index 9fa75a0e35..e44fd7d0f8 100644 --- a/services/history-v1/buildscript.txt +++ b/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 diff --git a/services/history-v1/docker-compose.yml b/services/history-v1/docker-compose.yml index 9e0a63ff50..4122d4237f 100644 --- a/services/history-v1/docker-compose.yml +++ b/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 diff --git a/services/notifications/.nvmrc b/services/notifications/.nvmrc index c85fa1bbef..3876fd4986 100644 --- a/services/notifications/.nvmrc +++ b/services/notifications/.nvmrc @@ -1 +1 @@ -16.17.1 +18.16.1 diff --git a/services/notifications/Dockerfile b/services/notifications/Dockerfile index 3d2abcdd32..fcdd58548d 100644 --- a/services/notifications/Dockerfile +++ b/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 diff --git a/services/notifications/Makefile b/services/notifications/Makefile index 4379ee55d0..81c69eb708 100644 --- a/services/notifications/Makefile +++ b/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 diff --git a/services/notifications/buildscript.txt b/services/notifications/buildscript.txt index 951dd73763..9e0b22b9b6 100644 --- a/services/notifications/buildscript.txt +++ b/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 diff --git a/services/notifications/docker-compose.yml b/services/notifications/docker-compose.yml index 795e0056dc..7842314eaf 100644 --- a/services/notifications/docker-compose.yml +++ b/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 diff --git a/services/project-history/.nvmrc b/services/project-history/.nvmrc index c85fa1bbef..3876fd4986 100644 --- a/services/project-history/.nvmrc +++ b/services/project-history/.nvmrc @@ -1 +1 @@ -16.17.1 +18.16.1 diff --git a/services/project-history/Dockerfile b/services/project-history/Dockerfile index 72fcb78f9e..0fb04adeeb 100644 --- a/services/project-history/Dockerfile +++ b/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 diff --git a/services/project-history/Makefile b/services/project-history/Makefile index bdcb5faf00..07ec6f0326 100644 --- a/services/project-history/Makefile +++ b/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 diff --git a/services/project-history/buildscript.txt b/services/project-history/buildscript.txt index 600b22ebc8..2c50fc1d38 100644 --- a/services/project-history/buildscript.txt +++ b/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 diff --git a/services/project-history/docker-compose.yml b/services/project-history/docker-compose.yml index dcd84260c1..8ef767d9f9 100644 --- a/services/project-history/docker-compose.yml +++ b/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 diff --git a/services/real-time/.nvmrc b/services/real-time/.nvmrc index 47979412e9..3876fd4986 100644 --- a/services/real-time/.nvmrc +++ b/services/real-time/.nvmrc @@ -1 +1 @@ -16.20.1 +18.16.1 diff --git a/services/real-time/Dockerfile b/services/real-time/Dockerfile index 4d63797790..0865b69547 100644 --- a/services/real-time/Dockerfile +++ b/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 diff --git a/services/real-time/Makefile b/services/real-time/Makefile index 91754626a1..eea6bd8844 100644 --- a/services/real-time/Makefile +++ b/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 diff --git a/services/real-time/buildscript.txt b/services/real-time/buildscript.txt index fefa1ec275..87668efd59 100644 --- a/services/real-time/buildscript.txt +++ b/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 diff --git a/services/real-time/docker-compose.yml b/services/real-time/docker-compose.yml index a74ff61826..4866364791 100644 --- a/services/real-time/docker-compose.yml +++ b/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 diff --git a/services/spelling/.nvmrc b/services/spelling/.nvmrc index c85fa1bbef..3876fd4986 100644 --- a/services/spelling/.nvmrc +++ b/services/spelling/.nvmrc @@ -1 +1 @@ -16.17.1 +18.16.1 diff --git a/services/spelling/Dockerfile b/services/spelling/Dockerfile index 6dc47cf597..c12bd18e92 100644 --- a/services/spelling/Dockerfile +++ b/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/ diff --git a/services/spelling/Makefile b/services/spelling/Makefile index d96b1f1665..79262810ee 100644 --- a/services/spelling/Makefile +++ b/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 diff --git a/services/spelling/buildscript.txt b/services/spelling/buildscript.txt index 6f9491332d..73a0a1fe20 100644 --- a/services/spelling/buildscript.txt +++ b/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 diff --git a/services/track-changes/.nvmrc b/services/track-changes/.nvmrc index c85fa1bbef..3876fd4986 100644 --- a/services/track-changes/.nvmrc +++ b/services/track-changes/.nvmrc @@ -1 +1 @@ -16.17.1 +18.16.1 diff --git a/services/track-changes/Dockerfile b/services/track-changes/Dockerfile index f0e3d3b7df..889abe72ca 100644 --- a/services/track-changes/Dockerfile +++ b/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 diff --git a/services/track-changes/Makefile b/services/track-changes/Makefile index 652a0c37c8..0fae760272 100644 --- a/services/track-changes/Makefile +++ b/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 diff --git a/services/track-changes/buildscript.txt b/services/track-changes/buildscript.txt index a077581500..86b8b4c8ca 100644 --- a/services/track-changes/buildscript.txt +++ b/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 diff --git a/services/track-changes/docker-compose.yml b/services/track-changes/docker-compose.yml index 07bf43e18e..16b83d4ae2 100644 --- a/services/track-changes/docker-compose.yml +++ b/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 diff --git a/services/web/.nvmrc b/services/web/.nvmrc index c85fa1bbef..3876fd4986 100644 --- a/services/web/.nvmrc +++ b/services/web/.nvmrc @@ -1 +1 @@ -16.17.1 +18.16.1 diff --git a/services/web/Dockerfile b/services/web/Dockerfile index 58d60556ab..516df12d2c 100644 --- a/services/web/Dockerfile +++ b/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 diff --git a/services/web/Dockerfile.frontend b/services/web/Dockerfile.frontend index 035e619b0f..62fbaab41c 100644 --- a/services/web/Dockerfile.frontend +++ b/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 - diff --git a/services/web/docker-compose.yml b/services/web/docker-compose.yml index 28f2f06736..70a2a87be5 100644 --- a/services/web/docker-compose.yml +++ b/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 diff --git a/services/web/scripts/translations/Dockerfile b/services/web/scripts/translations/Dockerfile index b28b8b7167..c8e9668756 100644 --- a/services/web/scripts/translations/Dockerfile +++ b/services/web/scripts/translations/Dockerfile @@ -1,4 +1,4 @@ -FROM node:16.17.1 +FROM node:18.16.1 WORKDIR /app/scripts/translations