diff --git a/libraries/access-token-encryptor/.nvmrc b/libraries/access-token-encryptor/.nvmrc
index 5ab50cd8e9..d9f880069d 100644
--- a/libraries/access-token-encryptor/.nvmrc
+++ b/libraries/access-token-encryptor/.nvmrc
@@ -1 +1 @@
-14.18.3
+16.14.2
diff --git a/libraries/access-token-encryptor/buildscript.txt b/libraries/access-token-encryptor/buildscript.txt
index 0ace91fa1a..1d82d3537f 100644
--- a/libraries/access-token-encryptor/buildscript.txt
+++ b/libraries/access-token-encryptor/buildscript.txt
@@ -4,7 +4,6 @@ access-token-encryptor
--env-add=
--env-pass-through=
--is-library=True
---node-image=gcr.io/overleaf-ops/node
---node-version=14.18.3
+--node-version=16.14.2
--public-repo=False
--script-version=4.1.0
diff --git a/libraries/logger/.nvmrc b/libraries/logger/.nvmrc
index 5ab50cd8e9..d9f880069d 100644
--- a/libraries/logger/.nvmrc
+++ b/libraries/logger/.nvmrc
@@ -1 +1 @@
-14.18.3
+16.14.2
diff --git a/libraries/logger/buildscript.txt b/libraries/logger/buildscript.txt
index 91a30a9e88..6ce762d6b4 100644
--- a/libraries/logger/buildscript.txt
+++ b/libraries/logger/buildscript.txt
@@ -4,7 +4,6 @@ logger
--env-add=
--env-pass-through=
--is-library=True
---node-image=gcr.io/overleaf-ops/node
---node-version=14.18.3
+--node-version=16.14.2
--public-repo=False
--script-version=4.1.0
diff --git a/libraries/metrics/.nvmrc b/libraries/metrics/.nvmrc
index 5ab50cd8e9..d9f880069d 100644
--- a/libraries/metrics/.nvmrc
+++ b/libraries/metrics/.nvmrc
@@ -1 +1 @@
-14.18.3
+16.14.2
diff --git a/libraries/metrics/buildscript.txt b/libraries/metrics/buildscript.txt
index 2b916f4613..d06cdd68f1 100644
--- a/libraries/metrics/buildscript.txt
+++ b/libraries/metrics/buildscript.txt
@@ -4,7 +4,6 @@ metrics
--env-add=
--env-pass-through=
--is-library=True
---node-image=gcr.io/overleaf-ops/node
---node-version=14.18.3
+--node-version=16.14.2
--public-repo=False
--script-version=4.1.0
diff --git a/libraries/o-error/.nvmrc b/libraries/o-error/.nvmrc
index 5ab50cd8e9..d9f880069d 100644
--- a/libraries/o-error/.nvmrc
+++ b/libraries/o-error/.nvmrc
@@ -1 +1 @@
-14.18.3
+16.14.2
diff --git a/libraries/o-error/buildscript.txt b/libraries/o-error/buildscript.txt
index 7b62a7893e..db6c598a6c 100644
--- a/libraries/o-error/buildscript.txt
+++ b/libraries/o-error/buildscript.txt
@@ -4,7 +4,6 @@ o-error
--env-add=
--env-pass-through=
--is-library=True
---node-image=gcr.io/overleaf-ops/node
---node-version=14.18.3
+--node-version=16.14.2
--public-repo=False
--script-version=4.1.0
diff --git a/libraries/object-persistor/.nvmrc b/libraries/object-persistor/.nvmrc
index 5ab50cd8e9..d9f880069d 100644
--- a/libraries/object-persistor/.nvmrc
+++ b/libraries/object-persistor/.nvmrc
@@ -1 +1 @@
-14.18.3
+16.14.2
diff --git a/libraries/object-persistor/buildscript.txt b/libraries/object-persistor/buildscript.txt
index 2278980ed5..c360c6bd81 100644
--- a/libraries/object-persistor/buildscript.txt
+++ b/libraries/object-persistor/buildscript.txt
@@ -4,7 +4,6 @@ object-persistor
--env-add=
--env-pass-through=
--is-library=True
---node-image=gcr.io/overleaf-ops/node
---node-version=14.18.3
+--node-version=16.14.2
--public-repo=False
--script-version=4.1.0
diff --git a/libraries/redis-wrapper/.nvmrc b/libraries/redis-wrapper/.nvmrc
index 5ab50cd8e9..d9f880069d 100644
--- a/libraries/redis-wrapper/.nvmrc
+++ b/libraries/redis-wrapper/.nvmrc
@@ -1 +1 @@
-14.18.3
+16.14.2
diff --git a/libraries/redis-wrapper/buildscript.txt b/libraries/redis-wrapper/buildscript.txt
index 034751b08c..35e9fba8a8 100644
--- a/libraries/redis-wrapper/buildscript.txt
+++ b/libraries/redis-wrapper/buildscript.txt
@@ -4,7 +4,6 @@ redis-wrapper
--env-add=
--env-pass-through=
--is-library=True
---node-image=gcr.io/overleaf-ops/node
---node-version=14.18.3
+--node-version=16.14.2
--public-repo=False
--script-version=4.1.0
diff --git a/libraries/settings/.nvmrc b/libraries/settings/.nvmrc
index 5ab50cd8e9..d9f880069d 100644
--- a/libraries/settings/.nvmrc
+++ b/libraries/settings/.nvmrc
@@ -1 +1 @@
-14.18.3
+16.14.2
diff --git a/libraries/settings/buildscript.txt b/libraries/settings/buildscript.txt
index 80480a1ed0..28d91cffd4 100644
--- a/libraries/settings/buildscript.txt
+++ b/libraries/settings/buildscript.txt
@@ -4,7 +4,6 @@ settings
--env-add=
--env-pass-through=
--is-library=True
---node-image=gcr.io/overleaf-ops/node
---node-version=14.18.3
+--node-version=16.14.2
--public-repo=False
--script-version=4.1.0
diff --git a/services/chat/.nvmrc b/services/chat/.nvmrc
index 5ab50cd8e9..d9f880069d 100644
--- a/services/chat/.nvmrc
+++ b/services/chat/.nvmrc
@@ -1 +1 @@
-14.18.3
+16.14.2
diff --git a/services/chat/Dockerfile b/services/chat/Dockerfile
index 31827db6c6..b9cc7f6a51 100644
--- a/services/chat/Dockerfile
+++ b/services/chat/Dockerfile
@@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment
-FROM gcr.io/overleaf-ops/node:14.18.3 as base
+FROM node:16.14.2 as base
WORKDIR /overleaf/services/chat
diff --git a/services/chat/Makefile b/services/chat/Makefile
index e9cbc19f5d..3f4d55c0b9 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) gcr.io/overleaf-ops/node:14.18.3 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:16.14.2 npm run --silent
format:
$(RUN_LINTING) format
diff --git a/services/chat/buildscript.txt b/services/chat/buildscript.txt
index 9b001052e7..65b2b1613c 100644
--- a/services/chat/buildscript.txt
+++ b/services/chat/buildscript.txt
@@ -3,7 +3,6 @@ chat
--docker-repos=gcr.io/overleaf-ops
--env-add=
--env-pass-through=
---node-image=gcr.io/overleaf-ops/node
---node-version=14.18.3
+--node-version=16.14.2
--public-repo=False
--script-version=4.1.0
diff --git a/services/chat/docker-compose.yml b/services/chat/docker-compose.yml
index 39ebfe1c5e..590f14fb77 100644
--- a/services/chat/docker-compose.yml
+++ b/services/chat/docker-compose.yml
@@ -6,7 +6,7 @@ version: "2.3"
services:
test_unit:
- image: gcr.io/overleaf-ops/node:14.18.3
+ image: node:16.14.2
volumes:
- .:/overleaf/services/chat
- ../../node_modules:/overleaf/node_modules
@@ -20,7 +20,7 @@ services:
user: node
test_acceptance:
- image: gcr.io/overleaf-ops/node:14.18.3
+ image: node:16.14.2
volumes:
- .:/overleaf/services/chat
- ../../node_modules:/overleaf/node_modules
diff --git a/services/clsi/.nvmrc b/services/clsi/.nvmrc
index 5ab50cd8e9..d9f880069d 100644
--- a/services/clsi/.nvmrc
+++ b/services/clsi/.nvmrc
@@ -1 +1 @@
-14.18.3
+16.14.2
diff --git a/services/clsi/Dockerfile b/services/clsi/Dockerfile
index e70a021cdb..c09324ed35 100644
--- a/services/clsi/Dockerfile
+++ b/services/clsi/Dockerfile
@@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment
-FROM gcr.io/overleaf-ops/node:14.18.3 as base
+FROM node:16.14.2 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 91f68a766c..876c8fbc62 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) gcr.io/overleaf-ops/node:14.18.3 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:16.14.2 npm run --silent
format:
$(RUN_LINTING) format
diff --git a/services/clsi/buildscript.txt b/services/clsi/buildscript.txt
index bca2d00bdb..edd1bad3f3 100644
--- a/services/clsi/buildscript.txt
+++ b/services/clsi/buildscript.txt
@@ -5,7 +5,6 @@ clsi
--env-add=ENABLE_PDF_CACHING="true",PDF_CACHING_ENABLE_WORKER_POOL="true"
--env-pass-through=TEXLIVE_IMAGE
--has-custom-cloudbuild=True
---node-image=gcr.io/overleaf-ops/node
---node-version=14.18.3
+--node-version=16.14.2
--public-repo=True
--script-version=4.1.0
diff --git a/services/clsi/install_deps.sh b/services/clsi/install_deps.sh
index bcddc2d8e1..07711b2033 100755
--- a/services/clsi/install_deps.sh
+++ b/services/clsi/install_deps.sh
@@ -8,3 +8,17 @@ apt-get install -y \
ghostscript \
rm -rf /var/lib/apt/lists/*
+
+# Allow ImageMagick to process PDF files. This is for tests only, but since we
+# use the production images for tests, this will apply to production as well.
+patch /etc/ImageMagick-6/policy.xml <
+
+
+-
+
+
+EOF
diff --git a/services/clsi/test/bench/hashbench.js b/services/clsi/test/bench/hashbench.js
index 787a4e2280..652ad39c7d 100644
--- a/services/clsi/test/bench/hashbench.js
+++ b/services/clsi/test/bench/hashbench.js
@@ -28,7 +28,7 @@ function test(hashType, filePath, callback) {
ContentCacheManager.update(dir, filePath, x => {
const t2 = process.hrtime.bigint()
const warm = Number(t2 - t1) / 1e6
- fs.rmdir(dir, { recursive: true }, err => {
+ fs.rm(dir, { recursive: true, force: true }, err => {
if (err) {
return callback(err)
}
diff --git a/services/clsi/test/unit/js/ContentCacheManagerTests.js b/services/clsi/test/unit/js/ContentCacheManagerTests.js
index fc806bc482..bfb7179587 100644
--- a/services/clsi/test/unit/js/ContentCacheManagerTests.js
+++ b/services/clsi/test/unit/js/ContentCacheManagerTests.js
@@ -40,7 +40,7 @@ describe('ContentCacheManager', function () {
})
before(async function () {
- await fs.promises.rmdir(contentDir, { recursive: true })
+ await fs.promises.rm(contentDir, { recursive: true, force: true })
await fs.promises.mkdir(contentDir, { recursive: true })
await fs.promises.mkdir(Path.dirname(pdfPath), { recursive: true })
})
diff --git a/services/contacts/.nvmrc b/services/contacts/.nvmrc
index 5ab50cd8e9..d9f880069d 100644
--- a/services/contacts/.nvmrc
+++ b/services/contacts/.nvmrc
@@ -1 +1 @@
-14.18.3
+16.14.2
diff --git a/services/contacts/Dockerfile b/services/contacts/Dockerfile
index 92da7718ec..1bf436b430 100644
--- a/services/contacts/Dockerfile
+++ b/services/contacts/Dockerfile
@@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment
-FROM gcr.io/overleaf-ops/node:14.18.3 as base
+FROM node:16.14.2 as base
WORKDIR /overleaf/services/contacts
diff --git a/services/contacts/Makefile b/services/contacts/Makefile
index 9f36b9555c..4f89afb502 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) gcr.io/overleaf-ops/node:14.18.3 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:16.14.2 npm run --silent
format:
$(RUN_LINTING) format
diff --git a/services/contacts/buildscript.txt b/services/contacts/buildscript.txt
index c94c634ab5..e0f883f9b3 100644
--- a/services/contacts/buildscript.txt
+++ b/services/contacts/buildscript.txt
@@ -3,7 +3,6 @@ contacts
--docker-repos=gcr.io/overleaf-ops
--env-add=
--env-pass-through=
---node-image=gcr.io/overleaf-ops/node
---node-version=14.18.3
+--node-version=16.14.2
--public-repo=False
--script-version=4.1.0
diff --git a/services/contacts/docker-compose.yml b/services/contacts/docker-compose.yml
index adb4968ba5..7ced69a758 100644
--- a/services/contacts/docker-compose.yml
+++ b/services/contacts/docker-compose.yml
@@ -6,7 +6,7 @@ version: "2.3"
services:
test_unit:
- image: gcr.io/overleaf-ops/node:14.18.3
+ image: node:16.14.2
volumes:
- .:/overleaf/services/contacts
- ../../node_modules:/overleaf/node_modules
@@ -20,7 +20,7 @@ services:
user: node
test_acceptance:
- image: gcr.io/overleaf-ops/node:14.18.3
+ image: node:16.14.2
volumes:
- .:/overleaf/services/contacts
- ../../node_modules:/overleaf/node_modules
diff --git a/services/docstore/.nvmrc b/services/docstore/.nvmrc
index 5ab50cd8e9..d9f880069d 100644
--- a/services/docstore/.nvmrc
+++ b/services/docstore/.nvmrc
@@ -1 +1 @@
-14.18.3
+16.14.2
diff --git a/services/docstore/Dockerfile b/services/docstore/Dockerfile
index 6c29b4dd62..dca56dff24 100644
--- a/services/docstore/Dockerfile
+++ b/services/docstore/Dockerfile
@@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment
-FROM gcr.io/overleaf-ops/node:14.18.3 as base
+FROM node:16.14.2 as base
WORKDIR /overleaf/services/docstore
diff --git a/services/docstore/Makefile b/services/docstore/Makefile
index bb7db64bee..246b4b5101 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) gcr.io/overleaf-ops/node:14.18.3 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:16.14.2 npm run --silent
format:
$(RUN_LINTING) format
diff --git a/services/docstore/buildscript.txt b/services/docstore/buildscript.txt
index 88370c48ab..85c0e4bc07 100644
--- a/services/docstore/buildscript.txt
+++ b/services/docstore/buildscript.txt
@@ -3,7 +3,6 @@ docstore
--docker-repos=gcr.io/overleaf-ops
--env-add=
--env-pass-through=
---node-image=gcr.io/overleaf-ops/node
---node-version=14.18.3
+--node-version=16.14.2
--public-repo=True
--script-version=4.1.0
diff --git a/services/docstore/docker-compose.yml b/services/docstore/docker-compose.yml
index 0d8493ab3a..877f233885 100644
--- a/services/docstore/docker-compose.yml
+++ b/services/docstore/docker-compose.yml
@@ -6,7 +6,7 @@ version: "2.3"
services:
test_unit:
- image: gcr.io/overleaf-ops/node:14.18.3
+ image: node:16.14.2
volumes:
- .:/overleaf/services/docstore
- ../../node_modules:/overleaf/node_modules
@@ -20,7 +20,7 @@ services:
user: node
test_acceptance:
- image: gcr.io/overleaf-ops/node:14.18.3
+ image: node:16.14.2
volumes:
- .:/overleaf/services/docstore
- ../../node_modules:/overleaf/node_modules
diff --git a/services/document-updater/.nvmrc b/services/document-updater/.nvmrc
index 5ab50cd8e9..d9f880069d 100644
--- a/services/document-updater/.nvmrc
+++ b/services/document-updater/.nvmrc
@@ -1 +1 @@
-14.18.3
+16.14.2
diff --git a/services/document-updater/Dockerfile b/services/document-updater/Dockerfile
index d98d98d95b..96919d919a 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/sharelatex/sharelatex-dev-environment
-FROM gcr.io/overleaf-ops/node:14.18.3 as base
+FROM node:16.14.2 as base
WORKDIR /overleaf/services/document-updater
diff --git a/services/document-updater/Makefile b/services/document-updater/Makefile
index 68beececd7..8e61e2a70c 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) gcr.io/overleaf-ops/node:14.18.3 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:16.14.2 npm run --silent
format:
$(RUN_LINTING) format
diff --git a/services/document-updater/buildscript.txt b/services/document-updater/buildscript.txt
index c34d80fd23..fc0cae570c 100644
--- a/services/document-updater/buildscript.txt
+++ b/services/document-updater/buildscript.txt
@@ -3,7 +3,6 @@ document-updater
--docker-repos=gcr.io/overleaf-ops
--env-add=
--env-pass-through=
---node-image=gcr.io/overleaf-ops/node
---node-version=14.18.3
+--node-version=16.14.2
--public-repo=True
--script-version=4.1.0
diff --git a/services/document-updater/docker-compose.yml b/services/document-updater/docker-compose.yml
index b8aca3cdee..3f4995c28c 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: gcr.io/overleaf-ops/node:14.18.3
+ image: node:16.14.2
volumes:
- .:/overleaf/services/document-updater
- ../../node_modules:/overleaf/node_modules
@@ -20,7 +20,7 @@ services:
user: node
test_acceptance:
- image: gcr.io/overleaf-ops/node:14.18.3
+ image: node:16.14.2
volumes:
- .:/overleaf/services/document-updater
- ../../node_modules:/overleaf/node_modules
diff --git a/services/filestore/.nvmrc b/services/filestore/.nvmrc
index 5ab50cd8e9..d9f880069d 100644
--- a/services/filestore/.nvmrc
+++ b/services/filestore/.nvmrc
@@ -1 +1 @@
-14.18.3
+16.14.2
diff --git a/services/filestore/Dockerfile b/services/filestore/Dockerfile
index 15c3017006..70d65cd190 100644
--- a/services/filestore/Dockerfile
+++ b/services/filestore/Dockerfile
@@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment
-FROM gcr.io/overleaf-ops/node:14.18.3 as base
+FROM node:16.14.2 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 efdc9a6d95..939b330922 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) gcr.io/overleaf-ops/node:14.18.3 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:16.14.2 npm run --silent
format:
$(RUN_LINTING) format
diff --git a/services/filestore/buildscript.txt b/services/filestore/buildscript.txt
index d3f3f19079..d13d125897 100644
--- a/services/filestore/buildscript.txt
+++ b/services/filestore/buildscript.txt
@@ -4,7 +4,6 @@ filestore
--docker-repos=gcr.io/overleaf-ops
--env-add=ENABLE_CONVERSIONS="true",USE_PROM_METRICS="true",AWS_S3_USER_FILES_BUCKET_NAME=fake_user_files,AWS_S3_TEMPLATE_FILES_BUCKET_NAME=fake_template_files,AWS_S3_PUBLIC_FILES_BUCKET_NAME=fake_public_files,GCS_USER_FILES_BUCKET_NAME=fake_userfiles,GCS_TEMPLATE_FILES_BUCKET_NAME=fake_templatefiles,GCS_PUBLIC_FILES_BUCKET_NAME=fake_publicfiles
--env-pass-through=
---node-image=gcr.io/overleaf-ops/node
---node-version=14.18.3
+--node-version=16.14.2
--public-repo=True
--script-version=4.1.0
diff --git a/services/filestore/install_deps.sh b/services/filestore/install_deps.sh
index 105e3a0bff..f31d3ee726 100755
--- a/services/filestore/install_deps.sh
+++ b/services/filestore/install_deps.sh
@@ -7,3 +7,17 @@ apt-get update
apt-get install ghostscript imagemagick optipng --yes
rm -rf /var/lib/apt/lists/*
+
+# Allow ImageMagick to process PDF files. Filestore does pdf to image
+# conversion for the templates service.
+patch /etc/ImageMagick-6/policy.xml <
+
+
+-
+
+
+EOF
diff --git a/services/notifications/.nvmrc b/services/notifications/.nvmrc
index 5ab50cd8e9..d9f880069d 100644
--- a/services/notifications/.nvmrc
+++ b/services/notifications/.nvmrc
@@ -1 +1 @@
-14.18.3
+16.14.2
diff --git a/services/notifications/Dockerfile b/services/notifications/Dockerfile
index 7fe1184fd6..b7c0ead6ea 100644
--- a/services/notifications/Dockerfile
+++ b/services/notifications/Dockerfile
@@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment
-FROM gcr.io/overleaf-ops/node:14.18.3 as base
+FROM node:16.14.2 as base
WORKDIR /overleaf/services/notifications
diff --git a/services/notifications/Makefile b/services/notifications/Makefile
index 91e65d84cf..4a8a625d1f 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) gcr.io/overleaf-ops/node:14.18.3 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:16.14.2 npm run --silent
format:
$(RUN_LINTING) format
diff --git a/services/notifications/buildscript.txt b/services/notifications/buildscript.txt
index f3db5bf0c9..45a91611bd 100644
--- a/services/notifications/buildscript.txt
+++ b/services/notifications/buildscript.txt
@@ -3,7 +3,6 @@ notifications
--docker-repos=gcr.io/overleaf-ops
--env-add=
--env-pass-through=
---node-image=gcr.io/overleaf-ops/node
---node-version=14.18.3
+--node-version=16.14.2
--public-repo=True
--script-version=4.1.0
diff --git a/services/notifications/docker-compose.yml b/services/notifications/docker-compose.yml
index d815de7211..2fb3afab9d 100644
--- a/services/notifications/docker-compose.yml
+++ b/services/notifications/docker-compose.yml
@@ -6,7 +6,7 @@ version: "2.3"
services:
test_unit:
- image: gcr.io/overleaf-ops/node:14.18.3
+ image: node:16.14.2
volumes:
- .:/overleaf/services/notifications
- ../../node_modules:/overleaf/node_modules
@@ -20,7 +20,7 @@ services:
user: node
test_acceptance:
- image: gcr.io/overleaf-ops/node:14.18.3
+ image: node:16.14.2
volumes:
- .:/overleaf/services/notifications
- ../../node_modules:/overleaf/node_modules
diff --git a/services/real-time/.nvmrc b/services/real-time/.nvmrc
index 5ab50cd8e9..d9f880069d 100644
--- a/services/real-time/.nvmrc
+++ b/services/real-time/.nvmrc
@@ -1 +1 @@
-14.18.3
+16.14.2
diff --git a/services/real-time/Dockerfile b/services/real-time/Dockerfile
index ed883fb584..94c589dea2 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/sharelatex/sharelatex-dev-environment
-FROM gcr.io/overleaf-ops/node:14.18.3 as base
+FROM node:16.14.2 as base
WORKDIR /overleaf/services/real-time
diff --git a/services/real-time/Makefile b/services/real-time/Makefile
index 5991bddeee..05333b3b4b 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) gcr.io/overleaf-ops/node:14.18.3 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:16.14.2 npm run --silent
format:
$(RUN_LINTING) format
diff --git a/services/real-time/buildscript.txt b/services/real-time/buildscript.txt
index 7894471894..3ad7113b41 100644
--- a/services/real-time/buildscript.txt
+++ b/services/real-time/buildscript.txt
@@ -3,7 +3,6 @@ real-time
--docker-repos=gcr.io/overleaf-ops
--env-add=
--env-pass-through=
---node-image=gcr.io/overleaf-ops/node
---node-version=14.18.3
+--node-version=16.14.2
--public-repo=True
--script-version=4.1.0
diff --git a/services/real-time/docker-compose.yml b/services/real-time/docker-compose.yml
index 1e3f7c7e0d..979d9df408 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: gcr.io/overleaf-ops/node:14.18.3
+ image: node:16.14.2
volumes:
- .:/overleaf/services/real-time
- ../../node_modules:/overleaf/node_modules
@@ -20,7 +20,7 @@ services:
user: node
test_acceptance:
- image: gcr.io/overleaf-ops/node:14.18.3
+ image: node:16.14.2
volumes:
- .:/overleaf/services/real-time
- ../../node_modules:/overleaf/node_modules
diff --git a/services/spelling/.nvmrc b/services/spelling/.nvmrc
index 5ab50cd8e9..d9f880069d 100644
--- a/services/spelling/.nvmrc
+++ b/services/spelling/.nvmrc
@@ -1 +1 @@
-14.18.3
+16.14.2
diff --git a/services/spelling/Dockerfile b/services/spelling/Dockerfile
index 0a946d9ace..3a2268800d 100644
--- a/services/spelling/Dockerfile
+++ b/services/spelling/Dockerfile
@@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment
-FROM gcr.io/overleaf-ops/node:14.18.3 as base
+FROM node:16.14.2 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 9ddeeedd76..db6411fa4c 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) gcr.io/overleaf-ops/node:14.18.3 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:16.14.2 npm run --silent
format:
$(RUN_LINTING) format
diff --git a/services/spelling/buildscript.txt b/services/spelling/buildscript.txt
index 47ddd8a0cb..7043696cda 100644
--- a/services/spelling/buildscript.txt
+++ b/services/spelling/buildscript.txt
@@ -4,7 +4,6 @@ spelling
--docker-repos=gcr.io/overleaf-ops
--env-add=
--env-pass-through=
---node-image=gcr.io/overleaf-ops/node
---node-version=14.18.3
+--node-version=16.14.2
--public-repo=False
--script-version=4.1.0
diff --git a/services/spelling/install_deps.sh b/services/spelling/install_deps.sh
index 77dc28693d..c88135e9ba 100644
--- a/services/spelling/install_deps.sh
+++ b/services/spelling/install_deps.sh
@@ -2,19 +2,11 @@
set -ex
-echo 'APT::Default-Release "stretch";' >/etc/apt/apt.conf.d/default-release
-
# The following aspell packages exist in Ubuntu but not Debian:
# aspell-af, aspell-id, aspell-nr, aspell-ns, aspell-st, aspell-tn, aspell-ts, aspell-xhu
echo "deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal main universe" > /etc/apt/sources.list.d/focal-amd.list
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ focal main universe" > /etc/apt/sources.list.d/focal-ports-arm.list
apt-key adv --no-tty --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
-# Need to install aspell-no from testing (buster) as broken in stable (stretch).
-echo "deb http://deb.debian.org/debian/ unstable main" > /etc/apt/sources.list.d/unstable.list
apt-get update
-apt-get install -y aspell aspell-en aspell-af aspell-ar aspell-ar-large aspell-bg aspell-br aspell-ca aspell-cs aspell-cy aspell-da aspell-de aspell-de-alt aspell-el aspell-eo aspell-es aspell-et aspell-eu-es aspell-fa aspell-fo aspell-fr aspell-ga aspell-gl-minimos aspell-hr aspell-hsb aspell-id aspell-it aspell-kk aspell-ku aspell-lt aspell-lv aspell-nl aspell-nr aspell-ns aspell-pa aspell-pl aspell-pt aspell-pt-br aspell-ro aspell-ru aspell-sk aspell-sl aspell-st aspell-sv aspell-tl aspell-tn aspell-ts aspell-xh
-
-printf 'Package: aspell-*\nPin: release a=unstable\nPin-Priority: 1337\n' \
- > /etc/apt/preferences.d/aspell-from-unstable
-apt-get install aspell-no
+apt-get install -y aspell aspell-en aspell-af aspell-ar aspell-ar-large aspell-bg aspell-br aspell-ca aspell-cs aspell-cy aspell-da aspell-de aspell-de-1901 aspell-el aspell-eo aspell-es aspell-et aspell-eu-es aspell-fa aspell-fo aspell-fr aspell-ga aspell-gl-minimos aspell-hr aspell-hsb aspell-id aspell-it aspell-kk aspell-ku aspell-lt aspell-lv aspell-nl aspell-no aspell-nr aspell-ns aspell-pa aspell-pl aspell-pt aspell-pt-br aspell-ro aspell-ru aspell-sk aspell-sl aspell-st aspell-sv aspell-tl aspell-tn aspell-ts aspell-xh
diff --git a/services/spelling/test/acceptance/js/CheckTest.js b/services/spelling/test/acceptance/js/CheckTest.js
index 76cb4f1774..1204f831b4 100644
--- a/services/spelling/test/acceptance/js/CheckTest.js
+++ b/services/spelling/test/acceptance/js/CheckTest.js
@@ -27,7 +27,26 @@ describe('checking words', function () {
it('should return the list of misspellings', async function () {
const body = JSON.parse(response.body)
expect(body).to.deep.equal({
- misspellings: [{ index: 0, suggestions: ['anther', 'another'] }],
+ misspellings: [
+ {
+ index: 0,
+ suggestions: [
+ 'anther',
+ 'another',
+ 'anthers',
+ 'panther',
+ 'anathema',
+ 'anthem',
+ 'nether',
+ "anther's",
+ 'ante',
+ 'neither',
+ 'norther',
+ 'ether',
+ 'other',
+ ],
+ },
+ ],
})
})
})
diff --git a/services/track-changes/.nvmrc b/services/track-changes/.nvmrc
index 5ab50cd8e9..d9f880069d 100644
--- a/services/track-changes/.nvmrc
+++ b/services/track-changes/.nvmrc
@@ -1 +1 @@
-14.18.3
+16.14.2
diff --git a/services/track-changes/Dockerfile b/services/track-changes/Dockerfile
index 656e4dc047..e63a6eab66 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/sharelatex/sharelatex-dev-environment
-FROM gcr.io/overleaf-ops/node:14.18.3 as base
+FROM node:16.14.2 as base
WORKDIR /overleaf/services/track-changes
diff --git a/services/track-changes/Makefile b/services/track-changes/Makefile
index 732caa178b..3bb89dba6c 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) gcr.io/overleaf-ops/node:14.18.3 npm run --silent
+RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) node:16.14.2 npm run --silent
format:
$(RUN_LINTING) format
diff --git a/services/track-changes/app/js/HttpController.js b/services/track-changes/app/js/HttpController.js
index 3fd093ee47..5194d7bcd7 100644
--- a/services/track-changes/app/js/HttpController.js
+++ b/services/track-changes/app/js/HttpController.js
@@ -238,7 +238,7 @@ module.exports = HttpController = {
UpdatesManager.exportProject(
project_id,
function (err, { updates, userIds }, confirmWrite) {
- const abortStreaming = req.aborted || res.finished || res.destroyed
+ const abortStreaming = req.destroyed || res.finished || res.destroyed
if (abortStreaming) {
// Tell the producer to stop emitting data
if (confirmWrite) confirmWrite(new Error('stop'))
diff --git a/services/track-changes/app/js/ZipManager.js b/services/track-changes/app/js/ZipManager.js
index 3310e9c28d..b302cede97 100644
--- a/services/track-changes/app/js/ZipManager.js
+++ b/services/track-changes/app/js/ZipManager.js
@@ -162,7 +162,7 @@ async function makeTempDirectory() {
* Clean up a temporary directory made with makeTempDirectory()
*/
function cleanupTempDirectory(tmpdir) {
- fs.promises.rmdir(tmpdir, { recursive: true }).catch(err => {
+ fs.promises.rm(tmpdir, { recursive: true, force: true }).catch(err => {
if (err) {
logger.warn({ err, tmpdir }, 'Failed to clean up temp directory')
}
diff --git a/services/track-changes/buildscript.txt b/services/track-changes/buildscript.txt
index f3509b7b92..29a7d32576 100644
--- a/services/track-changes/buildscript.txt
+++ b/services/track-changes/buildscript.txt
@@ -3,7 +3,6 @@ track-changes
--docker-repos=gcr.io/overleaf-ops
--env-add=AWS_BUCKET=bucket
--env-pass-through=
---node-image=gcr.io/overleaf-ops/node
---node-version=14.18.3
+--node-version=16.14.2
--public-repo=True
--script-version=4.1.0
diff --git a/services/track-changes/docker-compose.yml b/services/track-changes/docker-compose.yml
index 90cd52ac6e..3c19f637a5 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: gcr.io/overleaf-ops/node:14.18.3
+ image: node:16.14.2
volumes:
- .:/overleaf/services/track-changes
- ../../node_modules:/overleaf/node_modules
@@ -20,7 +20,7 @@ services:
user: node
test_acceptance:
- image: gcr.io/overleaf-ops/node:14.18.3
+ image: node:16.14.2
volumes:
- .:/overleaf/services/track-changes
- ../../node_modules:/overleaf/node_modules
diff --git a/services/web/Dockerfile b/services/web/Dockerfile
index c4d3e6f77e..c86eb3dda4 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 gcr.io/overleaf-ops/node:14.18.3 as base
+FROM node:16.14.2 as base
WORKDIR /overleaf/services/web
diff --git a/services/web/Dockerfile.frontend b/services/web/Dockerfile.frontend
index 707df05b9a..7d0fd9b174 100644
--- a/services/web/Dockerfile.frontend
+++ b/services/web/Dockerfile.frontend
@@ -1,4 +1,4 @@
-FROM gcr.io/overleaf-ops/node:14.18.3
+FROM node:16.14.2
# 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/app/src/Features/HealthCheck/HealthCheckController.js b/services/web/app/src/Features/HealthCheck/HealthCheckController.js
index 7f742d932e..278f04bb76 100644
--- a/services/web/app/src/Features/HealthCheck/HealthCheckController.js
+++ b/services/web/app/src/Features/HealthCheck/HealthCheckController.js
@@ -93,7 +93,7 @@ module.exports = {
async function runSmokeTestsDetached(req, res) {
function isAborted() {
- return req.aborted
+ return req.destroyed
}
const stats = { start: new Date(), steps: [] }
let status, response
diff --git a/services/web/app/src/Features/History/HistoryController.js b/services/web/app/src/Features/History/HistoryController.js
index 2fd6364acd..13af24f352 100644
--- a/services/web/app/src/Features/History/HistoryController.js
+++ b/services/web/app/src/Features/History/HistoryController.js
@@ -329,7 +329,7 @@ module.exports = HistoryController = {
},
_pipeHistoryZipToResponse(v1ProjectId, version, name, req, res, next) {
- if (req.aborted) {
+ if (req.destroyed) {
// client has disconnected -- skip project history api call and download
return
}
@@ -365,7 +365,7 @@ module.exports = HistoryController = {
)
}
}
- if (req.aborted) {
+ if (req.destroyed) {
// client has disconnected -- skip delayed s3 download
return
}
@@ -385,7 +385,7 @@ module.exports = HistoryController = {
40,
callback =>
setTimeout(function () {
- if (req.aborted) {
+ if (req.destroyed) {
// client has disconnected -- skip s3 download
return callback() // stop async.retry loop
}
@@ -400,10 +400,10 @@ module.exports = HistoryController = {
sendImmediately: true,
})
const abortS3Request = () => getReq.abort()
- req.on('aborted', abortS3Request)
+ req.on('close', abortS3Request)
res.on('timeout', abortS3Request)
function cleanupAbortTrigger() {
- req.off('aborted', abortS3Request)
+ req.off('close', abortS3Request)
res.off('timeout', abortS3Request)
}
getReq.on('response', function (response) {
diff --git a/services/web/app/src/infrastructure/Server.js b/services/web/app/src/infrastructure/Server.js
index 5407e92a4a..1863284770 100644
--- a/services/web/app/src/infrastructure/Server.js
+++ b/services/web/app/src/infrastructure/Server.js
@@ -100,7 +100,7 @@ Object.defineProperty(app.request, 'ip', {
},
})
app.use(function (req, res, next) {
- if (req.aborted) {
+ if (req.destroyed) {
// Request has been aborted already.
return
}
diff --git a/services/web/docker-compose.yml b/services/web/docker-compose.yml
index 621916a2d1..8301750553 100644
--- a/services/web/docker-compose.yml
+++ b/services/web/docker-compose.yml
@@ -6,7 +6,7 @@ volumes:
services:
test_unit:
- image: gcr.io/overleaf-ops/node:14.18.3
+ image: node:16.14.2
volumes:
- .:/overleaf/services/web
- ../../node_modules:/overleaf/node_modules
@@ -21,7 +21,7 @@ services:
user: node
test_acceptance:
- image: gcr.io/overleaf-ops/node:14.18.3
+ image: node:16.14.2
volumes:
- .:/overleaf/services/web
- ../../node_modules:/overleaf/node_modules
diff --git a/services/web/scripts/translations/Dockerfile b/services/web/scripts/translations/Dockerfile
index ac7312880c..c9bcfbcc91 100644
--- a/services/web/scripts/translations/Dockerfile
+++ b/services/web/scripts/translations/Dockerfile
@@ -1,4 +1,4 @@
-FROM gcr.io/overleaf-ops/node:14.18.3
+FROM node:16.14.2
WORKDIR /app/scripts/translations
diff --git a/services/web/test/acceptance/src/mocks/MockV1HistoryApi.js b/services/web/test/acceptance/src/mocks/MockV1HistoryApi.js
index 4d550a8988..32b2edbc7d 100644
--- a/services/web/test/acceptance/src/mocks/MockV1HistoryApi.js
+++ b/services/web/test/acceptance/src/mocks/MockV1HistoryApi.js
@@ -43,12 +43,12 @@ class MockV1HistoryApi extends AbstractMockApi {
res.write('chunk' + this.sentChunks++)
}
const writeEvery = interval => {
- if (req.aborted) return
+ if (req.destroyed) return
// setInterval delays the first run
writeChunk()
const periodicWrite = setInterval(writeChunk, interval)
- req.on('aborted', () => clearInterval(periodicWrite))
+ req.on('close', () => clearInterval(periodicWrite))
const deadLine = setTimeout(() => {
clearInterval(periodicWrite)