From f72362a66838ca3865414e9669087e10d0bc1187 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Mon, 12 Jul 2021 17:47:16 +0100 Subject: [PATCH] [misc] switch from settings-sharelatex to @overleaf/settings --- services/notifications/app.js | 2 +- .../app/js/HealthCheckController.js | 2 +- services/notifications/app/js/mongodb.js | 2 +- services/notifications/package-lock.json | 20 +++++-------------- services/notifications/package.json | 2 +- .../test/unit/js/NotificationsTests.js | 2 +- 6 files changed, 10 insertions(+), 20 deletions(-) diff --git a/services/notifications/app.js b/services/notifications/app.js index 6400b4c3a5..5f37198675 100644 --- a/services/notifications/app.js +++ b/services/notifications/app.js @@ -7,7 +7,7 @@ */ const metrics = require('@overleaf/metrics') metrics.initialize('notifications') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const logger = require('logger-sharelatex') logger.initialize('notifications-sharelatex') const express = require('express') diff --git a/services/notifications/app/js/HealthCheckController.js b/services/notifications/app/js/HealthCheckController.js index 3350f35bbe..64c9f5433d 100644 --- a/services/notifications/app/js/HealthCheckController.js +++ b/services/notifications/app/js/HealthCheckController.js @@ -15,7 +15,7 @@ const { db, ObjectId } = require('./mongodb') const request = require('request') const async = require('async') const _ = require('underscore') -const settings = require('settings-sharelatex') +const settings = require('@overleaf/settings') const { port } = settings.internal.notifications const logger = require('logger-sharelatex') diff --git a/services/notifications/app/js/mongodb.js b/services/notifications/app/js/mongodb.js index d52fa2c2cf..e43331e27d 100644 --- a/services/notifications/app/js/mongodb.js +++ b/services/notifications/app/js/mongodb.js @@ -1,4 +1,4 @@ -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const { MongoClient, ObjectId } = require('mongodb') const clientPromise = MongoClient.connect( diff --git a/services/notifications/package-lock.json b/services/notifications/package-lock.json index 33097c3d3c..d42da394cc 100644 --- a/services/notifications/package-lock.json +++ b/services/notifications/package-lock.json @@ -1023,6 +1023,11 @@ "resolved": "https://registry.npmjs.org/@overleaf/o-error/-/o-error-3.0.0.tgz", "integrity": "sha512-LsM2s6Iy9G97ktPo0ys4VxtI/m3ahc1ZHwjo5XnhXtjeIkkkVAehsrcRRoV/yWepPjymB0oZonhcfojpjYR/tg==" }, + "@overleaf/settings": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@overleaf/settings/-/settings-2.1.1.tgz", + "integrity": "sha512-vcJwqCGFKmQxTP/syUqCeMaSRjHmBcQgKOACR9He2uJcErg2GZPa1go+nGvszMbkElM4HfRKm/MfxvqHhoN4TQ==" + }, "@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -6240,21 +6245,6 @@ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" }, - "settings-sharelatex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/settings-sharelatex/-/settings-sharelatex-1.1.0.tgz", - "integrity": "sha1-Tv4vUpPbjxwVlnEEx5BfqHD/mS0=", - "requires": { - "coffee-script": "1.6.0" - }, - "dependencies": { - "coffee-script": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.6.0.tgz", - "integrity": "sha1-gIs5bhEPU9AhoZpO8fZb4OjjX6M=" - } - } - }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", diff --git a/services/notifications/package.json b/services/notifications/package.json index f3eb0f0b9b..6ae935dbbe 100644 --- a/services/notifications/package.json +++ b/services/notifications/package.json @@ -18,6 +18,7 @@ "license": "ISC", "dependencies": { "@overleaf/metrics": "^3.5.1", + "@overleaf/settings": "^2.1.1", "async": "^2.6.3", "body-parser": "^1.19.0", "bunyan": "^1.8.15", @@ -28,7 +29,6 @@ "method-override": "^3.0.0", "mongodb": "^3.6.0", "request": "^2.88.2", - "settings-sharelatex": "^1.1.0", "underscore": "1.13.1" }, "devDependencies": { diff --git a/services/notifications/test/unit/js/NotificationsTests.js b/services/notifications/test/unit/js/NotificationsTests.js index 7d2b89a26e..45c3b5fb06 100644 --- a/services/notifications/test/unit/js/NotificationsTests.js +++ b/services/notifications/test/unit/js/NotificationsTests.js @@ -41,7 +41,7 @@ describe('Notifications Tests', function () { this.notifications = SandboxedModule.require(modulePath, { requires: { - 'settings-sharelatex': {}, + '@overleaf/settings': {}, './mongodb': { db: this.db, ObjectId }, '@overleaf/metrics': { timeAsyncMethod: sinon.stub() } }