diff --git a/services/spelling/app.js b/services/spelling/app.js index d1751bbbea..1c2b7f0904 100644 --- a/services/spelling/app.js +++ b/services/spelling/app.js @@ -8,7 +8,7 @@ const metrics = require('@overleaf/metrics') metrics.initialize('spelling') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') const logger = require('logger-sharelatex') logger.initialize('spelling') if ((Settings.sentry != null ? Settings.sentry.dsn : undefined) != null) { diff --git a/services/spelling/app/js/ASpell.js b/services/spelling/app/js/ASpell.js index 8dafedbdda..50d502ac10 100644 --- a/services/spelling/app/js/ASpell.js +++ b/services/spelling/app/js/ASpell.js @@ -11,7 +11,7 @@ const ASpellWorkerPool = require('./ASpellWorkerPool') const LRU = require('lru-cache') const logger = require('logger-sharelatex') const fs = require('fs') -const settings = require('settings-sharelatex') +const settings = require('@overleaf/settings') const Path = require('path') const { promisify } = require('util') const OError = require('@overleaf/o-error') diff --git a/services/spelling/app/js/HealthCheckController.js b/services/spelling/app/js/HealthCheckController.js index 1ae9ba26ef..e8dfc4cbae 100644 --- a/services/spelling/app/js/HealthCheckController.js +++ b/services/spelling/app/js/HealthCheckController.js @@ -1,6 +1,6 @@ const request = require('request') const logger = require('logger-sharelatex') -const settings = require('settings-sharelatex') +const settings = require('@overleaf/settings') const OError = require('@overleaf/o-error') module.exports = { diff --git a/services/spelling/app/js/SpellingAPIManager.js b/services/spelling/app/js/SpellingAPIManager.js index 9a8dc1cc11..a01d4f0a01 100644 --- a/services/spelling/app/js/SpellingAPIManager.js +++ b/services/spelling/app/js/SpellingAPIManager.js @@ -10,7 +10,7 @@ const ASpell = require('./ASpell') const LearnedWordsManager = require('./LearnedWordsManager') const { callbackify } = require('util') const OError = require('@overleaf/o-error') -const Settings = require('settings-sharelatex') +const Settings = require('@overleaf/settings') // The max number of words checked in a single request const REQUEST_LIMIT = 10000 diff --git a/services/spelling/app/js/mongodb.js b/services/spelling/app/js/mongodb.js index 8016bbc1f8..df93683837 100644 --- a/services/spelling/app/js/mongodb.js +++ b/services/spelling/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/spelling/package-lock.json b/services/spelling/package-lock.json index e19bf46787..f4c28b9e69 100644 --- a/services/spelling/package-lock.json +++ b/services/spelling/package-lock.json @@ -865,6 +865,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", @@ -5755,21 +5760,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": "sha512-f7D+0lnlohoteSn6IKTH72NE+JnAdMWTKwQglAuimZWTID2FRRItZSGeYMTRpvEnaQApkoVwRp//WRMsiddnqw==", - "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": "sha512-Tx8itEfCsQp8RbLDFt7qwjqXycAx2g6SI7//4PPUR2j6meLmNifYm6zKrNDcU1+Q/GWRhjhEZk7DaLG1TfIzGA==" - } - } - }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", diff --git a/services/spelling/package.json b/services/spelling/package.json index df2f3de03e..4779b18917 100644 --- a/services/spelling/package.json +++ b/services/spelling/package.json @@ -26,6 +26,7 @@ "dependencies": { "@overleaf/metrics": "^3.5.1", "@overleaf/o-error": "^3.0.0", + "@overleaf/settings": "^2.1.1", "async": "^2.6.3", "body-parser": "^1.19.0", "bunyan": "^1.8.15", @@ -35,7 +36,6 @@ "lru-cache": "^5.1.1", "mongodb": "^3.6.0", "request": "^2.88.2", - "settings-sharelatex": "^1.1.0", "underscore": "1.13.1" }, "devDependencies": { diff --git a/services/spelling/test/unit/js/SpellingAPIManagerTests.js b/services/spelling/test/unit/js/SpellingAPIManagerTests.js index 8cf1d0c694..6c418f3cf4 100644 --- a/services/spelling/test/unit/js/SpellingAPIManagerTests.js +++ b/services/spelling/test/unit/js/SpellingAPIManagerTests.js @@ -28,7 +28,7 @@ describe('SpellingAPIManager', function () { this.SpellingAPIManager = SandboxedModule.require(modulePath, { requires: { './ASpell': this.ASpell, - 'settings-sharelatex': { ignoredMisspellings: ['ShareLaTeX'] }, + '@overleaf/settings': { ignoredMisspellings: ['ShareLaTeX'] }, './LearnedWordsManager': this.LearnedWordsManager } })