Merge pull request #7228 from overleaf/em-node-16

Upgrade to Node 16

GitOrigin-RevId: 3db1ae57ffb02f8a2b9012ffbb3efecfc01d2b04
This commit is contained in:
Eric Mc Sween
2022-04-05 12:20:52 +00:00
committed by Copybot
parent ae76850d39
commit 3235119302
77 changed files with 135 additions and 113 deletions
+1 -1
View File
@@ -1 +1 @@
14.18.3 16.14.2
@@ -4,7 +4,6 @@ access-token-encryptor
--env-add= --env-add=
--env-pass-through= --env-pass-through=
--is-library=True --is-library=True
--node-image=gcr.io/overleaf-ops/node --node-version=16.14.2
--node-version=14.18.3
--public-repo=False --public-repo=False
--script-version=4.1.0 --script-version=4.1.0
+1 -1
View File
@@ -1 +1 @@
14.18.3 16.14.2
+1 -2
View File
@@ -4,7 +4,6 @@ logger
--env-add= --env-add=
--env-pass-through= --env-pass-through=
--is-library=True --is-library=True
--node-image=gcr.io/overleaf-ops/node --node-version=16.14.2
--node-version=14.18.3
--public-repo=False --public-repo=False
--script-version=4.1.0 --script-version=4.1.0
+1 -1
View File
@@ -1 +1 @@
14.18.3 16.14.2
+1 -2
View File
@@ -4,7 +4,6 @@ metrics
--env-add= --env-add=
--env-pass-through= --env-pass-through=
--is-library=True --is-library=True
--node-image=gcr.io/overleaf-ops/node --node-version=16.14.2
--node-version=14.18.3
--public-repo=False --public-repo=False
--script-version=4.1.0 --script-version=4.1.0
+1 -1
View File
@@ -1 +1 @@
14.18.3 16.14.2
+1 -2
View File
@@ -4,7 +4,6 @@ o-error
--env-add= --env-add=
--env-pass-through= --env-pass-through=
--is-library=True --is-library=True
--node-image=gcr.io/overleaf-ops/node --node-version=16.14.2
--node-version=14.18.3
--public-repo=False --public-repo=False
--script-version=4.1.0 --script-version=4.1.0
+1 -1
View File
@@ -1 +1 @@
14.18.3 16.14.2
+1 -2
View File
@@ -4,7 +4,6 @@ object-persistor
--env-add= --env-add=
--env-pass-through= --env-pass-through=
--is-library=True --is-library=True
--node-image=gcr.io/overleaf-ops/node --node-version=16.14.2
--node-version=14.18.3
--public-repo=False --public-repo=False
--script-version=4.1.0 --script-version=4.1.0
+1 -1
View File
@@ -1 +1 @@
14.18.3 16.14.2
+1 -2
View File
@@ -4,7 +4,6 @@ redis-wrapper
--env-add= --env-add=
--env-pass-through= --env-pass-through=
--is-library=True --is-library=True
--node-image=gcr.io/overleaf-ops/node --node-version=16.14.2
--node-version=14.18.3
--public-repo=False --public-repo=False
--script-version=4.1.0 --script-version=4.1.0
+1 -1
View File
@@ -1 +1 @@
14.18.3 16.14.2
+1 -2
View File
@@ -4,7 +4,6 @@ settings
--env-add= --env-add=
--env-pass-through= --env-pass-through=
--is-library=True --is-library=True
--node-image=gcr.io/overleaf-ops/node --node-version=16.14.2
--node-version=14.18.3
--public-repo=False --public-repo=False
--script-version=4.1.0 --script-version=4.1.0
+1 -1
View File
@@ -1 +1 @@
14.18.3 16.14.2
+1 -1
View File
@@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from # Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment # 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 WORKDIR /overleaf/services/chat
+1 -1
View File
@@ -30,7 +30,7 @@ HERE=$(shell pwd)
MONOREPO=$(shell cd ../../ && pwd) MONOREPO=$(shell cd ../../ && pwd)
# Run the linting commands in the scope of the monorepo. # Run the linting commands in the scope of the monorepo.
# Eslint and prettier (plus some configs) are on the root. # Eslint and prettier (plus some configs) are on the root.
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) 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: format:
$(RUN_LINTING) format $(RUN_LINTING) format
+1 -2
View File
@@ -3,7 +3,6 @@ chat
--docker-repos=gcr.io/overleaf-ops --docker-repos=gcr.io/overleaf-ops
--env-add= --env-add=
--env-pass-through= --env-pass-through=
--node-image=gcr.io/overleaf-ops/node --node-version=16.14.2
--node-version=14.18.3
--public-repo=False --public-repo=False
--script-version=4.1.0 --script-version=4.1.0
+2 -2
View File
@@ -6,7 +6,7 @@ version: "2.3"
services: services:
test_unit: test_unit:
image: gcr.io/overleaf-ops/node:14.18.3 image: node:16.14.2
volumes: volumes:
- .:/overleaf/services/chat - .:/overleaf/services/chat
- ../../node_modules:/overleaf/node_modules - ../../node_modules:/overleaf/node_modules
@@ -20,7 +20,7 @@ services:
user: node user: node
test_acceptance: test_acceptance:
image: gcr.io/overleaf-ops/node:14.18.3 image: node:16.14.2
volumes: volumes:
- .:/overleaf/services/chat - .:/overleaf/services/chat
- ../../node_modules:/overleaf/node_modules - ../../node_modules:/overleaf/node_modules
+1 -1
View File
@@ -1 +1 @@
14.18.3 16.14.2
+1 -1
View File
@@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from # Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment # 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 WORKDIR /overleaf/services/clsi
COPY services/clsi/install_deps.sh /overleaf/services/clsi/ COPY services/clsi/install_deps.sh /overleaf/services/clsi/
+1 -1
View File
@@ -30,7 +30,7 @@ HERE=$(shell pwd)
MONOREPO=$(shell cd ../../ && pwd) MONOREPO=$(shell cd ../../ && pwd)
# Run the linting commands in the scope of the monorepo. # Run the linting commands in the scope of the monorepo.
# Eslint and prettier (plus some configs) are on the root. # Eslint and prettier (plus some configs) are on the root.
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) 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: format:
$(RUN_LINTING) format $(RUN_LINTING) format
+1 -2
View File
@@ -5,7 +5,6 @@ clsi
--env-add=ENABLE_PDF_CACHING="true",PDF_CACHING_ENABLE_WORKER_POOL="true" --env-add=ENABLE_PDF_CACHING="true",PDF_CACHING_ENABLE_WORKER_POOL="true"
--env-pass-through=TEXLIVE_IMAGE --env-pass-through=TEXLIVE_IMAGE
--has-custom-cloudbuild=True --has-custom-cloudbuild=True
--node-image=gcr.io/overleaf-ops/node --node-version=16.14.2
--node-version=14.18.3
--public-repo=True --public-repo=True
--script-version=4.1.0 --script-version=4.1.0
+14
View File
@@ -8,3 +8,17 @@ apt-get install -y \
ghostscript \ ghostscript \
rm -rf /var/lib/apt/lists/* 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
--- old.xml 2022-03-23 09:16:03.985433900 -0400
+++ new.xml 2022-03-23 09:16:18.625471992 -0400
@@ -91,6 +91,5 @@
<policy domain="coder" rights="none" pattern="PS2" />
<policy domain="coder" rights="none" pattern="PS3" />
<policy domain="coder" rights="none" pattern="EPS" />
- <policy domain="coder" rights="none" pattern="PDF" />
<policy domain="coder" rights="none" pattern="XPS" />
</policymap>
EOF
+1 -1
View File
@@ -28,7 +28,7 @@ function test(hashType, filePath, callback) {
ContentCacheManager.update(dir, filePath, x => { ContentCacheManager.update(dir, filePath, x => {
const t2 = process.hrtime.bigint() const t2 = process.hrtime.bigint()
const warm = Number(t2 - t1) / 1e6 const warm = Number(t2 - t1) / 1e6
fs.rmdir(dir, { recursive: true }, err => { fs.rm(dir, { recursive: true, force: true }, err => {
if (err) { if (err) {
return callback(err) return callback(err)
} }
@@ -40,7 +40,7 @@ describe('ContentCacheManager', function () {
}) })
before(async 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(contentDir, { recursive: true })
await fs.promises.mkdir(Path.dirname(pdfPath), { recursive: true }) await fs.promises.mkdir(Path.dirname(pdfPath), { recursive: true })
}) })
+1 -1
View File
@@ -1 +1 @@
14.18.3 16.14.2
+1 -1
View File
@@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from # Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment # 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 WORKDIR /overleaf/services/contacts
+1 -1
View File
@@ -30,7 +30,7 @@ HERE=$(shell pwd)
MONOREPO=$(shell cd ../../ && pwd) MONOREPO=$(shell cd ../../ && pwd)
# Run the linting commands in the scope of the monorepo. # Run the linting commands in the scope of the monorepo.
# Eslint and prettier (plus some configs) are on the root. # Eslint and prettier (plus some configs) are on the root.
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) 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: format:
$(RUN_LINTING) format $(RUN_LINTING) format
+1 -2
View File
@@ -3,7 +3,6 @@ contacts
--docker-repos=gcr.io/overleaf-ops --docker-repos=gcr.io/overleaf-ops
--env-add= --env-add=
--env-pass-through= --env-pass-through=
--node-image=gcr.io/overleaf-ops/node --node-version=16.14.2
--node-version=14.18.3
--public-repo=False --public-repo=False
--script-version=4.1.0 --script-version=4.1.0
+2 -2
View File
@@ -6,7 +6,7 @@ version: "2.3"
services: services:
test_unit: test_unit:
image: gcr.io/overleaf-ops/node:14.18.3 image: node:16.14.2
volumes: volumes:
- .:/overleaf/services/contacts - .:/overleaf/services/contacts
- ../../node_modules:/overleaf/node_modules - ../../node_modules:/overleaf/node_modules
@@ -20,7 +20,7 @@ services:
user: node user: node
test_acceptance: test_acceptance:
image: gcr.io/overleaf-ops/node:14.18.3 image: node:16.14.2
volumes: volumes:
- .:/overleaf/services/contacts - .:/overleaf/services/contacts
- ../../node_modules:/overleaf/node_modules - ../../node_modules:/overleaf/node_modules
+1 -1
View File
@@ -1 +1 @@
14.18.3 16.14.2
+1 -1
View File
@@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from # Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment # 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 WORKDIR /overleaf/services/docstore
+1 -1
View File
@@ -30,7 +30,7 @@ HERE=$(shell pwd)
MONOREPO=$(shell cd ../../ && pwd) MONOREPO=$(shell cd ../../ && pwd)
# Run the linting commands in the scope of the monorepo. # Run the linting commands in the scope of the monorepo.
# Eslint and prettier (plus some configs) are on the root. # Eslint and prettier (plus some configs) are on the root.
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) 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: format:
$(RUN_LINTING) format $(RUN_LINTING) format
+1 -2
View File
@@ -3,7 +3,6 @@ docstore
--docker-repos=gcr.io/overleaf-ops --docker-repos=gcr.io/overleaf-ops
--env-add= --env-add=
--env-pass-through= --env-pass-through=
--node-image=gcr.io/overleaf-ops/node --node-version=16.14.2
--node-version=14.18.3
--public-repo=True --public-repo=True
--script-version=4.1.0 --script-version=4.1.0
+2 -2
View File
@@ -6,7 +6,7 @@ version: "2.3"
services: services:
test_unit: test_unit:
image: gcr.io/overleaf-ops/node:14.18.3 image: node:16.14.2
volumes: volumes:
- .:/overleaf/services/docstore - .:/overleaf/services/docstore
- ../../node_modules:/overleaf/node_modules - ../../node_modules:/overleaf/node_modules
@@ -20,7 +20,7 @@ services:
user: node user: node
test_acceptance: test_acceptance:
image: gcr.io/overleaf-ops/node:14.18.3 image: node:16.14.2
volumes: volumes:
- .:/overleaf/services/docstore - .:/overleaf/services/docstore
- ../../node_modules:/overleaf/node_modules - ../../node_modules:/overleaf/node_modules
+1 -1
View File
@@ -1 +1 @@
14.18.3 16.14.2
+1 -1
View File
@@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from # Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment # 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 WORKDIR /overleaf/services/document-updater
+1 -1
View File
@@ -30,7 +30,7 @@ HERE=$(shell pwd)
MONOREPO=$(shell cd ../../ && pwd) MONOREPO=$(shell cd ../../ && pwd)
# Run the linting commands in the scope of the monorepo. # Run the linting commands in the scope of the monorepo.
# Eslint and prettier (plus some configs) are on the root. # Eslint and prettier (plus some configs) are on the root.
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) 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: format:
$(RUN_LINTING) format $(RUN_LINTING) format
+1 -2
View File
@@ -3,7 +3,6 @@ document-updater
--docker-repos=gcr.io/overleaf-ops --docker-repos=gcr.io/overleaf-ops
--env-add= --env-add=
--env-pass-through= --env-pass-through=
--node-image=gcr.io/overleaf-ops/node --node-version=16.14.2
--node-version=14.18.3
--public-repo=True --public-repo=True
--script-version=4.1.0 --script-version=4.1.0
+2 -2
View File
@@ -6,7 +6,7 @@ version: "2.3"
services: services:
test_unit: test_unit:
image: gcr.io/overleaf-ops/node:14.18.3 image: node:16.14.2
volumes: volumes:
- .:/overleaf/services/document-updater - .:/overleaf/services/document-updater
- ../../node_modules:/overleaf/node_modules - ../../node_modules:/overleaf/node_modules
@@ -20,7 +20,7 @@ services:
user: node user: node
test_acceptance: test_acceptance:
image: gcr.io/overleaf-ops/node:14.18.3 image: node:16.14.2
volumes: volumes:
- .:/overleaf/services/document-updater - .:/overleaf/services/document-updater
- ../../node_modules:/overleaf/node_modules - ../../node_modules:/overleaf/node_modules
+1 -1
View File
@@ -1 +1 @@
14.18.3 16.14.2
+1 -1
View File
@@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from # Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment # 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 WORKDIR /overleaf/services/filestore
COPY services/filestore/install_deps.sh /overleaf/services/filestore/ COPY services/filestore/install_deps.sh /overleaf/services/filestore/
+1 -1
View File
@@ -30,7 +30,7 @@ HERE=$(shell pwd)
MONOREPO=$(shell cd ../../ && pwd) MONOREPO=$(shell cd ../../ && pwd)
# Run the linting commands in the scope of the monorepo. # Run the linting commands in the scope of the monorepo.
# Eslint and prettier (plus some configs) are on the root. # Eslint and prettier (plus some configs) are on the root.
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) 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: format:
$(RUN_LINTING) format $(RUN_LINTING) format
+1 -2
View File
@@ -4,7 +4,6 @@ filestore
--docker-repos=gcr.io/overleaf-ops --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-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= --env-pass-through=
--node-image=gcr.io/overleaf-ops/node --node-version=16.14.2
--node-version=14.18.3
--public-repo=True --public-repo=True
--script-version=4.1.0 --script-version=4.1.0
+14
View File
@@ -7,3 +7,17 @@ apt-get update
apt-get install ghostscript imagemagick optipng --yes apt-get install ghostscript imagemagick optipng --yes
rm -rf /var/lib/apt/lists/* 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
--- old.xml 2022-03-23 09:16:03.985433900 -0400
+++ new.xml 2022-03-23 09:16:18.625471992 -0400
@@ -91,6 +91,5 @@
<policy domain="coder" rights="none" pattern="PS2" />
<policy domain="coder" rights="none" pattern="PS3" />
<policy domain="coder" rights="none" pattern="EPS" />
- <policy domain="coder" rights="none" pattern="PDF" />
<policy domain="coder" rights="none" pattern="XPS" />
</policymap>
EOF
+1 -1
View File
@@ -1 +1 @@
14.18.3 16.14.2
+1 -1
View File
@@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from # Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment # 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 WORKDIR /overleaf/services/notifications
+1 -1
View File
@@ -30,7 +30,7 @@ HERE=$(shell pwd)
MONOREPO=$(shell cd ../../ && pwd) MONOREPO=$(shell cd ../../ && pwd)
# Run the linting commands in the scope of the monorepo. # Run the linting commands in the scope of the monorepo.
# Eslint and prettier (plus some configs) are on the root. # Eslint and prettier (plus some configs) are on the root.
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) 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: format:
$(RUN_LINTING) format $(RUN_LINTING) format
+1 -2
View File
@@ -3,7 +3,6 @@ notifications
--docker-repos=gcr.io/overleaf-ops --docker-repos=gcr.io/overleaf-ops
--env-add= --env-add=
--env-pass-through= --env-pass-through=
--node-image=gcr.io/overleaf-ops/node --node-version=16.14.2
--node-version=14.18.3
--public-repo=True --public-repo=True
--script-version=4.1.0 --script-version=4.1.0
+2 -2
View File
@@ -6,7 +6,7 @@ version: "2.3"
services: services:
test_unit: test_unit:
image: gcr.io/overleaf-ops/node:14.18.3 image: node:16.14.2
volumes: volumes:
- .:/overleaf/services/notifications - .:/overleaf/services/notifications
- ../../node_modules:/overleaf/node_modules - ../../node_modules:/overleaf/node_modules
@@ -20,7 +20,7 @@ services:
user: node user: node
test_acceptance: test_acceptance:
image: gcr.io/overleaf-ops/node:14.18.3 image: node:16.14.2
volumes: volumes:
- .:/overleaf/services/notifications - .:/overleaf/services/notifications
- ../../node_modules:/overleaf/node_modules - ../../node_modules:/overleaf/node_modules
+1 -1
View File
@@ -1 +1 @@
14.18.3 16.14.2
+1 -1
View File
@@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from # Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment # 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 WORKDIR /overleaf/services/real-time
+1 -1
View File
@@ -30,7 +30,7 @@ HERE=$(shell pwd)
MONOREPO=$(shell cd ../../ && pwd) MONOREPO=$(shell cd ../../ && pwd)
# Run the linting commands in the scope of the monorepo. # Run the linting commands in the scope of the monorepo.
# Eslint and prettier (plus some configs) are on the root. # Eslint and prettier (plus some configs) are on the root.
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) 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: format:
$(RUN_LINTING) format $(RUN_LINTING) format
+1 -2
View File
@@ -3,7 +3,6 @@ real-time
--docker-repos=gcr.io/overleaf-ops --docker-repos=gcr.io/overleaf-ops
--env-add= --env-add=
--env-pass-through= --env-pass-through=
--node-image=gcr.io/overleaf-ops/node --node-version=16.14.2
--node-version=14.18.3
--public-repo=True --public-repo=True
--script-version=4.1.0 --script-version=4.1.0
+2 -2
View File
@@ -6,7 +6,7 @@ version: "2.3"
services: services:
test_unit: test_unit:
image: gcr.io/overleaf-ops/node:14.18.3 image: node:16.14.2
volumes: volumes:
- .:/overleaf/services/real-time - .:/overleaf/services/real-time
- ../../node_modules:/overleaf/node_modules - ../../node_modules:/overleaf/node_modules
@@ -20,7 +20,7 @@ services:
user: node user: node
test_acceptance: test_acceptance:
image: gcr.io/overleaf-ops/node:14.18.3 image: node:16.14.2
volumes: volumes:
- .:/overleaf/services/real-time - .:/overleaf/services/real-time
- ../../node_modules:/overleaf/node_modules - ../../node_modules:/overleaf/node_modules
+1 -1
View File
@@ -1 +1 @@
14.18.3 16.14.2
+1 -1
View File
@@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from # Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment # 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 WORKDIR /overleaf/services/spelling
COPY services/spelling/install_deps.sh /overleaf/services/spelling/ COPY services/spelling/install_deps.sh /overleaf/services/spelling/
+1 -1
View File
@@ -30,7 +30,7 @@ HERE=$(shell pwd)
MONOREPO=$(shell cd ../../ && pwd) MONOREPO=$(shell cd ../../ && pwd)
# Run the linting commands in the scope of the monorepo. # Run the linting commands in the scope of the monorepo.
# Eslint and prettier (plus some configs) are on the root. # Eslint and prettier (plus some configs) are on the root.
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) 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: format:
$(RUN_LINTING) format $(RUN_LINTING) format
+1 -2
View File
@@ -4,7 +4,6 @@ spelling
--docker-repos=gcr.io/overleaf-ops --docker-repos=gcr.io/overleaf-ops
--env-add= --env-add=
--env-pass-through= --env-pass-through=
--node-image=gcr.io/overleaf-ops/node --node-version=16.14.2
--node-version=14.18.3
--public-repo=False --public-repo=False
--script-version=4.1.0 --script-version=4.1.0
+1 -9
View File
@@ -2,19 +2,11 @@
set -ex set -ex
echo 'APT::Default-Release "stretch";' >/etc/apt/apt.conf.d/default-release
# The following aspell packages exist in Ubuntu but not Debian: # 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 # 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=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 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 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 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 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
printf 'Package: aspell-*\nPin: release a=unstable\nPin-Priority: 1337\n' \
> /etc/apt/preferences.d/aspell-from-unstable
apt-get install aspell-no
@@ -27,7 +27,26 @@ describe('checking words', function () {
it('should return the list of misspellings', async function () { it('should return the list of misspellings', async function () {
const body = JSON.parse(response.body) const body = JSON.parse(response.body)
expect(body).to.deep.equal({ 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',
],
},
],
}) })
}) })
}) })
+1 -1
View File
@@ -1 +1 @@
14.18.3 16.14.2
+1 -1
View File
@@ -2,7 +2,7 @@
# Instead run bin/update_build_scripts from # Instead run bin/update_build_scripts from
# https://github.com/sharelatex/sharelatex-dev-environment # 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 WORKDIR /overleaf/services/track-changes
+1 -1
View File
@@ -30,7 +30,7 @@ HERE=$(shell pwd)
MONOREPO=$(shell cd ../../ && pwd) MONOREPO=$(shell cd ../../ && pwd)
# Run the linting commands in the scope of the monorepo. # Run the linting commands in the scope of the monorepo.
# Eslint and prettier (plus some configs) are on the root. # Eslint and prettier (plus some configs) are on the root.
RUN_LINTING = docker run --rm -v $(MONOREPO):$(MONOREPO) -w $(HERE) 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: format:
$(RUN_LINTING) format $(RUN_LINTING) format
@@ -238,7 +238,7 @@ module.exports = HttpController = {
UpdatesManager.exportProject( UpdatesManager.exportProject(
project_id, project_id,
function (err, { updates, userIds }, confirmWrite) { function (err, { updates, userIds }, confirmWrite) {
const abortStreaming = req.aborted || res.finished || res.destroyed const abortStreaming = req.destroyed || res.finished || res.destroyed
if (abortStreaming) { if (abortStreaming) {
// Tell the producer to stop emitting data // Tell the producer to stop emitting data
if (confirmWrite) confirmWrite(new Error('stop')) if (confirmWrite) confirmWrite(new Error('stop'))
+1 -1
View File
@@ -162,7 +162,7 @@ async function makeTempDirectory() {
* Clean up a temporary directory made with makeTempDirectory() * Clean up a temporary directory made with makeTempDirectory()
*/ */
function cleanupTempDirectory(tmpdir) { function cleanupTempDirectory(tmpdir) {
fs.promises.rmdir(tmpdir, { recursive: true }).catch(err => { fs.promises.rm(tmpdir, { recursive: true, force: true }).catch(err => {
if (err) { if (err) {
logger.warn({ err, tmpdir }, 'Failed to clean up temp directory') logger.warn({ err, tmpdir }, 'Failed to clean up temp directory')
} }
+1 -2
View File
@@ -3,7 +3,6 @@ track-changes
--docker-repos=gcr.io/overleaf-ops --docker-repos=gcr.io/overleaf-ops
--env-add=AWS_BUCKET=bucket --env-add=AWS_BUCKET=bucket
--env-pass-through= --env-pass-through=
--node-image=gcr.io/overleaf-ops/node --node-version=16.14.2
--node-version=14.18.3
--public-repo=True --public-repo=True
--script-version=4.1.0 --script-version=4.1.0
+2 -2
View File
@@ -6,7 +6,7 @@ version: "2.3"
services: services:
test_unit: test_unit:
image: gcr.io/overleaf-ops/node:14.18.3 image: node:16.14.2
volumes: volumes:
- .:/overleaf/services/track-changes - .:/overleaf/services/track-changes
- ../../node_modules:/overleaf/node_modules - ../../node_modules:/overleaf/node_modules
@@ -20,7 +20,7 @@ services:
user: node user: node
test_acceptance: test_acceptance:
image: gcr.io/overleaf-ops/node:14.18.3 image: node:16.14.2
volumes: volumes:
- .:/overleaf/services/track-changes - .:/overleaf/services/track-changes
- ../../node_modules:/overleaf/node_modules - ../../node_modules:/overleaf/node_modules
+1 -1
View File
@@ -1,6 +1,6 @@
# the base image is suitable for running web with /overleaf/services/web bind # the base image is suitable for running web with /overleaf/services/web bind
# mounted # mounted
FROM gcr.io/overleaf-ops/node:14.18.3 as base FROM node:16.14.2 as base
WORKDIR /overleaf/services/web WORKDIR /overleaf/services/web
+1 -1
View File
@@ -1,4 +1,4 @@
FROM gcr.io/overleaf-ops/node:14.18.3 FROM node:16.14.2
# Install Google Chrome # Install Google Chrome
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
@@ -93,7 +93,7 @@ module.exports = {
async function runSmokeTestsDetached(req, res) { async function runSmokeTestsDetached(req, res) {
function isAborted() { function isAborted() {
return req.aborted return req.destroyed
} }
const stats = { start: new Date(), steps: [] } const stats = { start: new Date(), steps: [] }
let status, response let status, response
@@ -329,7 +329,7 @@ module.exports = HistoryController = {
}, },
_pipeHistoryZipToResponse(v1ProjectId, version, name, req, res, next) { _pipeHistoryZipToResponse(v1ProjectId, version, name, req, res, next) {
if (req.aborted) { if (req.destroyed) {
// client has disconnected -- skip project history api call and download // client has disconnected -- skip project history api call and download
return return
} }
@@ -365,7 +365,7 @@ module.exports = HistoryController = {
) )
} }
} }
if (req.aborted) { if (req.destroyed) {
// client has disconnected -- skip delayed s3 download // client has disconnected -- skip delayed s3 download
return return
} }
@@ -385,7 +385,7 @@ module.exports = HistoryController = {
40, 40,
callback => callback =>
setTimeout(function () { setTimeout(function () {
if (req.aborted) { if (req.destroyed) {
// client has disconnected -- skip s3 download // client has disconnected -- skip s3 download
return callback() // stop async.retry loop return callback() // stop async.retry loop
} }
@@ -400,10 +400,10 @@ module.exports = HistoryController = {
sendImmediately: true, sendImmediately: true,
}) })
const abortS3Request = () => getReq.abort() const abortS3Request = () => getReq.abort()
req.on('aborted', abortS3Request) req.on('close', abortS3Request)
res.on('timeout', abortS3Request) res.on('timeout', abortS3Request)
function cleanupAbortTrigger() { function cleanupAbortTrigger() {
req.off('aborted', abortS3Request) req.off('close', abortS3Request)
res.off('timeout', abortS3Request) res.off('timeout', abortS3Request)
} }
getReq.on('response', function (response) { getReq.on('response', function (response) {
@@ -100,7 +100,7 @@ Object.defineProperty(app.request, 'ip', {
}, },
}) })
app.use(function (req, res, next) { app.use(function (req, res, next) {
if (req.aborted) { if (req.destroyed) {
// Request has been aborted already. // Request has been aborted already.
return return
} }
+2 -2
View File
@@ -6,7 +6,7 @@ volumes:
services: services:
test_unit: test_unit:
image: gcr.io/overleaf-ops/node:14.18.3 image: node:16.14.2
volumes: volumes:
- .:/overleaf/services/web - .:/overleaf/services/web
- ../../node_modules:/overleaf/node_modules - ../../node_modules:/overleaf/node_modules
@@ -21,7 +21,7 @@ services:
user: node user: node
test_acceptance: test_acceptance:
image: gcr.io/overleaf-ops/node:14.18.3 image: node:16.14.2
volumes: volumes:
- .:/overleaf/services/web - .:/overleaf/services/web
- ../../node_modules:/overleaf/node_modules - ../../node_modules:/overleaf/node_modules
+1 -1
View File
@@ -1,4 +1,4 @@
FROM gcr.io/overleaf-ops/node:14.18.3 FROM node:16.14.2
WORKDIR /app/scripts/translations WORKDIR /app/scripts/translations
@@ -43,12 +43,12 @@ class MockV1HistoryApi extends AbstractMockApi {
res.write('chunk' + this.sentChunks++) res.write('chunk' + this.sentChunks++)
} }
const writeEvery = interval => { const writeEvery = interval => {
if (req.aborted) return if (req.destroyed) return
// setInterval delays the first run // setInterval delays the first run
writeChunk() writeChunk()
const periodicWrite = setInterval(writeChunk, interval) const periodicWrite = setInterval(writeChunk, interval)
req.on('aborted', () => clearInterval(periodicWrite)) req.on('close', () => clearInterval(periodicWrite))
const deadLine = setTimeout(() => { const deadLine = setTimeout(() => {
clearInterval(periodicWrite) clearInterval(periodicWrite)