diff --git a/services/document-updater/.nvmrc b/services/document-updater/.nvmrc index 2baa2d433a..e68b860383 100644 --- a/services/document-updater/.nvmrc +++ b/services/document-updater/.nvmrc @@ -1 +1 @@ -10.23.1 +12.21.0 diff --git a/services/document-updater/Dockerfile b/services/document-updater/Dockerfile index 2da67d2436..4f417a2a4b 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 node:10.23.1 as base +FROM node:12.21.0 as base WORKDIR /app diff --git a/services/document-updater/Makefile b/services/document-updater/Makefile index 596aa47fdb..7591d2a689 100644 --- a/services/document-updater/Makefile +++ b/services/document-updater/Makefile @@ -21,8 +21,10 @@ DOCKER_COMPOSE_TEST_UNIT = \ COMPOSE_PROJECT_NAME=test_unit_$(BUILD_DIR_NAME) $(DOCKER_COMPOSE) clean: - docker rmi ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) - docker rmi gcr.io/overleaf-ops/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) + -docker rmi ci/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) + -docker rmi gcr.io/overleaf-ops/$(PROJECT_NAME):$(BRANCH_NAME)-$(BUILD_NUMBER) + -$(DOCKER_COMPOSE_TEST_UNIT) down --rmi local + -$(DOCKER_COMPOSE_TEST_ACCEPTANCE) down --rmi local format: $(DOCKER_COMPOSE) run --rm test_unit npm run --silent format diff --git a/services/document-updater/app/js/RangesTracker.js b/services/document-updater/app/js/RangesTracker.js index 6107acf300..5991ee2993 100644 --- a/services/document-updater/app/js/RangesTracker.js +++ b/services/document-updater/app/js/RangesTracker.js @@ -706,8 +706,10 @@ const load = function () { return result } else if (c1.op.i != null && c2.op.d != null) { return 1 - } else { + } else if (c1.op.d != null && c2.op.i != null) { return -1 + } else { + return 0 } }) @@ -728,8 +730,10 @@ const load = function () { return result } else if (a.i != null && b.d != null) { return 1 - } else { + } else if (a.d != null && b.i != null) { return -1 + } else { + return 0 } }) diff --git a/services/document-updater/buildscript.txt b/services/document-updater/buildscript.txt index 0d8b15d9f5..2d2f00495e 100644 --- a/services/document-updater/buildscript.txt +++ b/services/document-updater/buildscript.txt @@ -3,6 +3,6 @@ document-updater --docker-repos=gcr.io/overleaf-ops --env-add= --env-pass-through= ---node-version=10.23.1 +--node-version=12.21.0 --public-repo=True ---script-version=3.4.0 +--script-version=3.7.0 diff --git a/services/document-updater/docker-compose.yml b/services/document-updater/docker-compose.yml index 0db448f9b5..6a1c097a30 100644 --- a/services/document-updater/docker-compose.yml +++ b/services/document-updater/docker-compose.yml @@ -6,7 +6,7 @@ version: "2.3" services: test_unit: - image: node:10.23.1 + image: node:12.21.0 volumes: - .:/app working_dir: /app @@ -18,7 +18,7 @@ services: user: node test_acceptance: - image: node:10.23.1 + image: node:12.21.0 volumes: - .:/app working_dir: /app