Commit Graph

45 Commits

Author SHA1 Message Date
renovate[bot]
feabbc2fca Update dependency @tryghost/logging to v2 (#63)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-06 12:58:06 +00:00
Daniel Lockyer
836a3f433b Published new versions
- @tryghost/update-check-service@0.2.5
2021-10-28 14:59:07 +01:00
Renovate Bot
6c6133c35b Update dependency @tryghost/logging to v1 2021-10-28 14:58:35 +01:00
Daniel Lockyer
1ba35ed0e6 Published new versions
- @tryghost/maintenance@0.1.6
 - @tryghost/update-check-service@0.2.4
2021-10-18 09:50:32 +02:00
Renovate Bot
f71eec2a60 Update dependency mocha to v9.1.3 2021-10-18 09:47:21 +02:00
Renovate Bot
c6f4e725ff Update dependency @tryghost/logging to ^0.2.0 2021-10-18 09:47:09 +02:00
Naz
455f2c060f Published new versions
- @tryghost/maintenance@0.1.5
 - @tryghost/update-check-service@0.2.3
2021-10-06 22:32:15 +02:00
Naz
20fc1649f4 Fixed alert notifications being sent out to non-active users
refs https://linear.app/tryghost/issue/CORE-63/restrict-update-service-notifications-to-active-admins

- It only makes sense to notify active users about a notification of 'alert' or any other type really.
2021-10-06 22:31:06 +02:00
Renovate Bot
b29f519857 Update dependency mocha to v9.1.2 2021-09-28 08:22:13 +00:00
Sam Lord
3b0a94cadb Published new versions
- @tryghost/maintenance@0.1.4
 - @tryghost/update-check-service@0.2.2
2021-09-22 15:38:26 +01:00
Sam Lord
ea88c86ccb Switched Ignition for @tryghost/debug & unpinned deps
no issue

Unpinning dependencies to ensure deps stay up to date when used in Ghost. Removed Ignition because deprecated in favour of using @tryghost/debug
2021-09-22 15:38:09 +01:00
Sam Lord
cce1c0fe67 Published new versions
- @tryghost/maintenance@0.1.3
 - @tryghost/update-check-service@0.2.1
2021-09-22 14:40:41 +01:00
Sam Lord
70f7dd500c Update @tryghost/logging in update-check-service
no issue

Prevents update check service from creating a separate logger. TODO: Ensure this is kept in sync with Ghost's version
2021-09-22 14:40:00 +01:00
Renovate Bot
9725d5b3c0 Update dependency mocha to v9.1.1 2021-08-31 07:48:45 +00:00
Renovate Bot
d08cf7a8d4 Update dependency mocha to v9.1.0 2021-08-23 03:00:02 +00:00
Renovate Bot
c14ae3052e Update dependency sinon to v11.1.2 2021-07-28 14:22:50 +00:00
Renovate Bot
4b976d3e0c Update dependency mocha to v9.0.3 2021-07-27 04:02:33 +00:00
Renovate Bot
13a8b5386c Update Test & linting packages 2021-07-06 04:14:03 +00:00
Naz
c06fe94469 Published new versions
- @tryghost/maintenance@0.1.2
 - @tryghost/update-check-service@0.2.0
2021-07-02 18:56:12 +04:00
Naz
664b933bc8 Removed logging dependency from update check constructor
refs https://github.com/TryGhost/Team/issues/727

- The latest code standards require using @tryghost/logging module instead of injecting it as a parameter in the construcotr
- Left it as an optional constructor parameter to make testing easier
2021-07-02 18:54:50 +04:00
Naz
98a64ed0f8 Removed i18n dependency from update check constructor
refs https://github.com/TryGhost/Team/issues/727

- The latest code standards require using tpl module in combination with local messages object instead of i18n  injected in the constructor
2021-07-02 18:48:12 +04:00
Naz
7ea81dc50d Fixed uk -> us English wording 2021-06-24 17:44:09 +04:00
Renovate Bot
e77e20e6eb Update dependency mocha to v9 2021-06-23 17:01:28 +00:00
Naz
bc3ea7e12e Skipped notificaiton processing when no valid data
refs https://github.com/TryGhost/Team/issues/754

- When there are no message objects coming from the external update check service in the response there is no need to continue to process the data and fire off unneeded queries
2021-06-23 19:14:47 +04:00
Naz
65d863d74b Added debug calls
refs https://github.com/TryGhost/Team/issues/754

- These debug messages are useful to see what kind of data came in and was processed by the update check
2021-06-23 19:13:11 +04:00
Naz
b0af1f9ddb Switched configurations to use main instead of master
no issue

- The repo was migrated to main branch as "main" and needed update in configs
2021-06-23 19:04:16 +04:00
Naz
9e5fe475c8 Improved code safety in update check's check method
refs https://github.com/TryGhost/Team/issues/754

- The api call can also generate an error which would bubble up to a client. This is not a good design if the client has to know to handle internal errors of the module
- By having try block wrap around whole block it makes the error handling behave the same way throughout the check process
2021-06-23 18:57:45 +04:00
naz
d45ef018fe Added UpateCheckService usage example 2021-06-03 21:41:38 +12:00
Naz
74a949e38c Published new versions
- @tryghost/maintenance@0.1.1
 - @tryghost/update-check-service@0.1.0
2021-06-03 13:11:58 +04:00
Naz
aced29681f Updated package entry points
refs https://github.com/TryGhost/Team/issues/728

- The package does not have an index.js file!
2021-06-03 13:05:54 +04:00
Naz
2cd6cd9140 Documented notifications api parameter
refs https://github.com/TryGhost/Team/issues/728

- This was missing from the JSDoc
2021-06-03 13:04:47 +04:00
Naz
ba3c351aad Added missing module dependencies for update-check-service
refs TryGhost/Team#728

- These are dependancies that have to come with the update check service
- Used exact same versions of Bluebird/moment/lodash as in current
TryGhost/Ghost main
2021-06-02 18:25:15 +04:00
Naz
fd4e0a44c4 Fixed tests
refs TryGhost/Team#728

- After history migration the tests were referencing modules using
previous folder structure
2021-06-02 18:22:54 +04:00
Naz
cb2c40d2cb Merged update-check-service files and histry from TryGhost/Ghost 2021-06-02 18:19:30 +04:00
Naz
494880778d Added update check service initial commit
refs https://github.com/TryGhost/Team/issues/728
2021-06-02 18:17:56 +04:00
Naz
7121efb010 Removed GhostMailer parameter from UpdateCheckService
refs https://github.com/TryGhost/Team/issues/728

- This is continuation of the previous commit. TLDR: Passing only the necessary parameter data makes it easier to reason about what dependencies the UpdateCheckService has to deal with
- Instead of passing in a whole GhostMailer instance passing only an email sending function, which again - makes things way more manageable to reason about
- The end of refactor, next will be a move of the UpdateCheckService into a separate module in tryghost/core
2021-06-02 15:18:32 +04:00
Naz
a4e5436df7 Removed ghostVersion parameter from UpdateCheckService
refs https://github.com/TryGhost/Team/issues/728

- This is continuation of the previous commit. TLDR: Passing only the necessary parameter data makes it easier to reason about what dependencies the UpdateCheckService has to deal with
- Burned ghostVersion module passing in vafor of just one additional config parameter. Now the module along with unit tests can be easily extracted out of the codebase!
2021-06-02 15:08:26 +04:00
Naz
796e2caaff Removed urlFor parameter from UpdateCheckService
refs https://github.com/TryGhost/Team/issues/728

- This is continuation of the previous commit. TLDR: Passing only the necessary API endpoint function makes it easier to reason about what dependencies the UpdateCheckService has to deal with
- Substituted a parameter with already existing 'siteUrl' config value. No need to duplicate work!
2021-06-02 14:37:29 +04:00
Naz
7ce5ab27c3 Limited the API surface of the UpdateCheckService
refs https://github.com/TryGhost/Team/issues/728

- This is continuation of the previous commit. TLDR: Passing only the necessary API endpoint function makes it easier to reason about what dependencies the UpdateCheckService has to deal with
- Limited urlUtils to only one function as that's all the UpdateCheck uses. Next step will be removing the function completely as and passing a 'blogURL' as a config value (way better readability this way)
2021-06-02 14:31:07 +04:00
Naz
94700863a4 Limited the API surface of the UpdateCheckService
refs https://github.com/TryGhost/Team/issues/728

- This is continuation of the previous commit. TLDR: Passing only the necessary API endpoint function makes it easier to reason about what dependencies the UpdateCheckService has to deal with
- There are 8 different configs that NotificationService depends upon it will need some further investigation around which ones are even needed anymore and the naming is not the best. To keep the time cap at bay leaving it at what it is.
2021-06-02 14:08:29 +04:00
Naz
361166dde0 Limited the API surface of the UpdateCheckService
refs https://github.com/TryGhost/Team/issues/728

- Passing only the necessary API endpoint function makes it easier to reason about what dependencies the UpdateCheckService has to deal with
- The instance initialization had to be moved insided the module's exports to resolve "models" module initialization failure
2021-06-02 14:08:29 +04:00
Naz
1fd689ba45 Renamed update check test suite
refs https://github.com/TryGhost/Team/issues/728

- Previous name was after the do-all-the-things mega module that have now become an "initializer" for the UpdateCheckService class. The unit tests are testing the latter, so the rename is a cleanup from the previous ways
2021-06-01 17:53:46 +04:00
Naz
df048ab2c2 Added update check notificaitons test coverage
refs https://github.com/TryGhost/Team/issues/728

- This is a continuation of the test coverage for the UpdateCheckService.
- Covers scpecial cases of notification processing within Update Check
- The refactor inside the update check service was a convenience to get rid or the Bluebird dependency completely. Also, some minor preventative code added to avoid errors from referencing undefined objects
2021-06-01 17:35:10 +04:00
Naz
60473d608d Updated UpdateCheckService methods to async/await
refs https://github.com/TryGhost/Team/issues/728

- In additions to easier tracking of "this" context in the unit tests it gets rid of unnecessary Bluebird's "reflect" method which was making unit test dependent on Bluebird's specific Promise implementation
2021-06-01 17:35:10 +04:00
Naz
fd58343d65 Extraced update check code into a separate service
refs https://github.com/TryGhost/Team/issues/728

- This is a first step before moving update check code into an outside codebase.
- The aim is to have a self-contained module which could be unit tested and have a very clear API
2021-06-01 17:35:10 +04:00