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

Upgrade all services to Node 18

GitOrigin-RevId: c53cd1aaab2fe99b51186911bb068f9fe31a9469
This commit is contained in:
Jakob Ackermann 2023-08-02 16:09:11 +02:00 committed by Copybot
parent 013d42d03b
commit a797fb2be7
95 changed files with 112 additions and 111 deletions

View file

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

View file

@ -1 +1 @@
16.17.1
18.16.1

View file

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

View file

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

View file

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

View file

@ -1 +1 @@
16.17.1
18.16.1

View file

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

View file

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

View file

@ -1 +1 @@
16.17.1
18.16.1

View file

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

View file

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

View file

@ -1 +1 @@
16.17.1
18.16.1

View file

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

View file

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

View file

@ -1 +1 @@
16.17.1
18.16.1

View file

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

View file

@ -1 +1 @@
16.17.1
18.16.1

View file

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

View file

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

View file

@ -1 +1 @@
16.17.1
18.16.1

View file

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

View file

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

View file

@ -1 +1 @@
16.17.1
18.16.1

View file

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

View file

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

View file

@ -1 +1 @@
16.17.1
18.16.1

View file

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

View file

@ -1 +1 @@
16.17.1
18.16.1

View file

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

View file

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

View file

@ -1 +1 @@
16.17.1
18.16.1

View file

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

View file

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

View file

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

View file

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

View file

@ -1 +1 @@
16.17.1
18.16.1

View file

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

View file

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

View file

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

View file

@ -1 +1 @@
16.17.1
18.16.1

View file

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

View file

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

View file

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

View file

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

View file

@ -1 +1 @@
16.17.1
18.16.1

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1 +1 @@
16.17.1
18.16.1

View file

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

View file

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

View file

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

View file

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

View file

@ -1 +1 @@
16.17.1
18.16.1

View file

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

View file

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

View file

@ -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) {

View file

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

View file

@ -1 +1 @@
16.20.1
18.16.1

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1 +1 @@
16.17.1
18.16.1

View file

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

View file

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

View file

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

View file

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

View file

@ -1 +1 @@
16.17.1
18.16.1

View file

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

View file

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

View file

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

View file

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

View file

@ -1 +1 @@
16.20.1
18.16.1

View file

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

View file

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

View file

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

View file

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

View file

@ -1 +1 @@
16.17.1
18.16.1

View file

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

View file

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

View file

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

View file

@ -1 +1 @@
16.17.1
18.16.1

View file

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

View file

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

View file

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

View file

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

View file

@ -1 +1 @@
16.17.1
18.16.1

View file

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

View file

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

View file

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

View file

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