refs https://github.com/TryGhost/Team/issues/870
- currently, a handful of packages in this repo generate type
declarations when building
- we're aiming to go more in the direction of better inline jsdoc, and
we want to clean up all generated files and use of external types
- this commit removes the `typescript` dependency, removes the pretest
commands that run the builds, and cleans up anywhere where we
configure types
refs https://github.com/TryGhost/Team/issues/870
- using `c8` allows us to see test coverage for all packages in the repo
- this commit adds `c8` as a dev dependency and prepends the `mocha`
command with `c8` so it runs on all tests
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
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
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
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
- added getSubdir, getSiteUrl and getAdminUrl methods from url-utils
- refactored them so they are designed to be bound by nconf
- exposed a bindAll method
- moved over the tests and refactor from a class instance to nconf bindings
no issue
Replaces the usage of ghost-ignition with @tryghost/ignition-errors,
and switched to using the more modern ES6 class syntax over the
`.call(this, ...)` syntax used previously in both Ignition and here.
- fixed type warnings
- introduced explicit use of bluebird to help with type warnings and also make it clear when we're actually using Bluebird features
- removed the class pattern in the simplest possible way
- have package-json expose only the public methods
- move parse to an independent, not public file so that we can test it independently still
- We are going to get rid of the internal i18n tool because it doesn't solve a real use case
- Instead, we have a new tpl utility that does basic string interpolation
- This makes this module less complex as it no longer requires dependency injection to work
- ts complains the value may be undefined but in reality it never is
- plus we don't care about this error in this context as the test is checking that the value is set to its default
- This mini helper wraps lodash template and supports `{...}` as the delimiters
- It's designed to use and support the exact same patterns we already have in our en.json strings
E.g. The {flagName} flag must be enabled in labs if you wish to use the \\{\\{{helperName}\\}\\} helper.
- This allows us to get rid of our old, broken i18n helper and still keep some of the smart messaging we have setup
- It also keeps the refactor surface area minimal
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