mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #7228 from overleaf/em-node-16
Upgrade to Node 16 GitOrigin-RevId: 3db1ae57ffb02f8a2b9012ffbb3efecfc01d2b04
This commit is contained in:
parent
ae76850d39
commit
3235119302
77 changed files with 135 additions and 113 deletions
|
@ -1 +1 @@
|
|||
14.18.3
|
||||
16.14.2
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +1 @@
|
|||
14.18.3
|
||||
16.14.2
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +1 @@
|
|||
14.18.3
|
||||
16.14.2
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +1 @@
|
|||
14.18.3
|
||||
16.14.2
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +1 @@
|
|||
14.18.3
|
||||
16.14.2
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +1 @@
|
|||
14.18.3
|
||||
16.14.2
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +1 @@
|
|||
14.18.3
|
||||
16.14.2
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +1 @@
|
|||
14.18.3
|
||||
16.14.2
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +1 @@
|
|||
14.18.3
|
||||
16.14.2
|
||||
|
|
|
@ -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/
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
--- 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
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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 })
|
||||
})
|
||||
|
|
|
@ -1 +1 @@
|
|||
14.18.3
|
||||
16.14.2
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +1 @@
|
|||
14.18.3
|
||||
16.14.2
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +1 @@
|
|||
14.18.3
|
||||
16.14.2
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +1 @@
|
|||
14.18.3
|
||||
16.14.2
|
||||
|
|
|
@ -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/
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
--- 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 @@
|
|||
14.18.3
|
||||
16.14.2
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +1 @@
|
|||
14.18.3
|
||||
16.14.2
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +1 @@
|
|||
14.18.3
|
||||
16.14.2
|
||||
|
|
|
@ -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/
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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',
|
||||
],
|
||||
},
|
||||
],
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -1 +1 @@
|
|||
14.18.3
|
||||
16.14.2
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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'))
|
||||
|
|
|
@ -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')
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 -
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FROM gcr.io/overleaf-ops/node:14.18.3
|
||||
FROM node:16.14.2
|
||||
|
||||
WORKDIR /app/scripts/translations
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue