diff --git a/core/server/update-check.js b/core/server/update-check.js index 58e4cbefd2..238f94fbdb 100644 --- a/core/server/update-check.js +++ b/core/server/update-check.js @@ -6,7 +6,6 @@ const config = require('../shared/config'); const urlUtils = require('./../shared/url-utils'); const jobsService = require('./services/jobs'); -const i18n = require('../shared/i18n'); const request = require('@tryghost/request'); const ghostVersion = require('@tryghost/version'); const UpdateCheckService = require('@tryghost/update-check-service'); @@ -14,13 +13,11 @@ const UpdateCheckService = require('@tryghost/update-check-service'); const ghostMailer = new GhostMailer(); /** - * - * @param {Object} options - * @param {Object} [options.logging] - logging object instance or defaults to Ghost's default logger otherwise + * Initializes and triggers update check * * @returns {Promise} */ -module.exports = async ({logging = require('@tryghost/logging')} = {}) => { +module.exports = async () => { const allowedCheckEnvironments = ['development', 'production']; // CASE: The check will not happen if your NODE_ENV is not in the allowed defined environments. @@ -55,8 +52,6 @@ module.exports = async ({logging = require('@tryghost/logging')} = {}) => { forceUpdate: config.get('updateCheck:forceUpdate'), ghostVersion: ghostVersion.original }, - i18n, - logging, request, sendEmail: ghostMailer.send }); diff --git a/core/shared/i18n/translations/en.json b/core/shared/i18n/translations/en.json index 193e6b3a6d..3bdc141cce 100644 --- a/core/shared/i18n/translations/en.json +++ b/core/shared/i18n/translations/en.json @@ -276,15 +276,6 @@ }, "noPermissionToAction": "You do not have permission to perform this action" }, - "updateCheck": { - "checkingForUpdatesFailed": { - "error": "Checking for updates failed, your site will continue to function.", - "help": "If you get this error repeatedly, please seek help from {url}." - }, - "unableToDecodeUpdateResponse": { - "error": "Unable to decode update response" - } - }, "api": { "common": { "notImplemented": "The server does not support the functionality required to fulfill the request." diff --git a/package.json b/package.json index 207997f3cc..d515fb0d73 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "@tryghost/social-urls": "0.1.24", "@tryghost/string": "0.1.19", "@tryghost/tpl": "0.1.3", - "@tryghost/update-check-service": "0.1.0", + "@tryghost/update-check-service": "0.2.0", "@tryghost/url-utils": "2.0.1", "@tryghost/validator": "0.1.2", "@tryghost/version": "0.1.1", diff --git a/yarn.lock b/yarn.lock index 11b6f540e6..e0316d718d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -866,7 +866,7 @@ lodash "^4.17.21" luxon "^1.26.0" -"@tryghost/logging@0.1.3": +"@tryghost/logging@0.1.3", "@tryghost/logging@^0.1.3": version "0.1.3" resolved "https://registry.yarnpkg.com/@tryghost/logging/-/logging-0.1.3.tgz#86cc8b54c2b319acea4c5ef4a390ac770f4a1495" integrity sha512-zq/s2rrfiaGtoTXrfl4zLkyVnXHm0qL4K+t64ngDArCapi+WnUOpAVAGWzpOVESVF8mqycFjZZo9xg6TjMuSWg== @@ -1054,12 +1054,14 @@ dependencies: lodash.template "^4.5.0" -"@tryghost/update-check-service@0.1.0": - version "0.1.0" - resolved "https://registry.yarnpkg.com/@tryghost/update-check-service/-/update-check-service-0.1.0.tgz#ca1277989989968f2b2603a7d3b86e1124025be5" - integrity sha512-i79AXxYlyR4sLOWBUgQ62DpNZ+12LE36kuYP39/R/qa2XiCQUd+2JYbm+Irf1m5f3x2U9B9Pmj4PkoeKhH4FHw== +"@tryghost/update-check-service@0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@tryghost/update-check-service/-/update-check-service-0.2.0.tgz#3c473faf380cda4b34d106b1109222d4fd8ca942" + integrity sha512-RN6roj5f6CqPVEEbBYPLkqRKGuPaOA7NrBZBIpTB5MEFQRKpeh3hwSb65KsViFfUKLkshV1haYVe1ggx+0KP5A== dependencies: "@tryghost/errors" "^0.2.11" + "@tryghost/logging" "^0.1.3" + "@tryghost/tpl" "^0.1.3" bluebird "3.7.2" lodash "4.17.21" moment "2.24.0"