Commit Graph

746 Commits

Author SHA1 Message Date
Renovate Bot
4b976d3e0c Update dependency mocha to v9.0.3 2021-07-27 04:02:33 +00:00
Renovate Bot
798f7d1421 Update dependency date-fns to v2.23.0 2021-07-23 07:26:46 +00:00
Renovate Bot
0ad9fcf8dd Update dependency supertest to v6.1.4 2021-07-21 05:00:25 +00:00
Daniel Lockyer
1d6b8c1875 Stopped type declaration files from being generated
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
2021-07-14 11:51:14 +01:00
Daniel Lockyer
f918398779 Added c8 test coverage to all packages
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
2021-07-14 11:26:06 +01:00
Renovate Bot
9979768591 Update dependency @types/mocha to v8.2.3 2021-07-07 01:36:51 +00:00
Renovate Bot
950689fb35 Update dependency @types/express to v4.17.13 2021-07-06 21:26:50 +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
Renovate Bot
b56dc030ea Update dependency typescript to v4.3.5 2021-07-01 01:11:31 +00: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
Renovate Bot
895c93ad46 Update dependency typescript to v4.3.4 2021-06-17 18:53:56 +00:00
Renovate Bot
ec7805b7f0 Pin dependency c8 to 7.7.3 2021-06-17 13:57:17 +00:00
Hannah Wolfe
d259fcc4c6 Published new versions
- @tryghost/config-url-helpers@0.1.0
2021-06-17 14:55:21 +01:00
Hannah Wolfe
5b43d82742 Improved types in config-url-helpers 2021-06-17 13:53:09 +01:00
Hannah Wolfe
eb829a050b Prepared config-url-helpers for their intended use
- 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
2021-06-17 11:41:50 +01:00
Sam Lord
320e689ad4 Published new versions
- @tryghost/adapter-manager@0.2.14
 - @tryghost/config-url-helpers@0.0.1
 - @tryghost/errors@0.2.13
 - @tryghost/image-transform@1.0.13
 - @tryghost/moleculer-service-from-class@0.2.17
 - @tryghost/mw-session-from-token@0.1.22
 - @tryghost/package-json@1.0.2
 - @tryghost/session-service@0.1.24
 - @tryghost/tpl@0.1.3
2021-06-17 10:50:39 +01:00
Sam Lord
095d64b449 Switch to ES6 classes for errors, use @tryghost/ignition errors
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.
2021-06-17 10:26:19 +01:00
Renovate Bot
e8f7a4c158 Update dependency typescript to v4.3.3 2021-06-16 23:47:07 +00:00
Hannah Wolfe
3927c9002c Fixed merge error for deduplicate subdirectory
- tried to move history and fucked up git filter-repo :(
2021-06-16 20:22:06 +01:00
Hannah Wolfe
f98bcf150c Merged deduplicate subdirectory util from SDK/url-utils 2021-06-16 17:55:14 +01:00
Hannah Wolfe
0d965276a1 Added new config-url-helpers package
- This will contain a small number of helpers for getting correctly formatted urls from config
2021-06-16 17:54:30 +01:00
Renovate Bot
ede081837b Update dependency c8 to v7.7.3 2021-06-15 13:11:52 +00:00
Daniel Lockyer
939d4d9591 Published new versions
- @tryghost/package-json@1.0.1
 - @tryghost/tpl@0.1.2
2021-06-15 14:10:54 +01:00
Renovate Bot
8bed51c7aa Pin dependency c8 to v7.7.2 2021-06-15 10:05:23 +00:00
Daniel Lockyer
e14beeb7d2 Moved c8 to devDependencies
no issue

- `c8` is only used to check coverage in testing and we don't directly
  use it from within `tpl`, so this can be moved to `devDependencies`
2021-06-15 11:04:14 +01:00
Renovate Bot
f248f0d347 Update dependency c8 to v7.7.3 2021-06-14 00:31:49 +00:00
Hannah Wolfe
9eed5d69ef Published new versions
- @tryghost/package-json@1.0.0
 - @tryghost/tpl@0.1.1
2021-06-09 15:50:58 +01:00
Hannah Wolfe
1daa6eda61 Improved typing in package-json
- 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
2021-06-09 15:44:04 +01:00
Hannah Wolfe
93e4577caf Removed class pattern
- 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
2021-06-09 14:39:41 +01:00
Hannah Wolfe
dd129e0920 Removed use of i18n in package-json
- 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
2021-06-09 14:10:04 +01:00
Hannah Wolfe
224c6996f1 Added new tests & missing return type to tpl
- Ensuring that various strings from en.json will work
- Added missing return type
2021-06-09 12:25:45 +01:00
Hannah Wolfe
b06e2a4577 Published new versions
- @tryghost/adapter-manager@0.2.13
 - @tryghost/bootstrap-socket@0.2.9
 - @tryghost/constants@0.1.8
 - @tryghost/errors@0.2.12
 - @tryghost/image-transform@1.0.12
 - @tryghost/job-manager@0.8.7
 - @tryghost/limit-service@0.6.1
 - @tryghost/moleculer-service-from-class@0.2.16
 - @tryghost/mw-session-from-token@0.1.21
 - @tryghost/package-json@0.1.2
 - @tryghost/pretty-cli@1.2.18
 - @tryghost/promise@0.1.9
 - @tryghost/release-utils@0.6.15
 - @tryghost/security@0.2.9
 - @tryghost/session-service@0.1.23
 - @tryghost/tpl@0.1.0
 - @tryghost/vhost-middleware@1.0.15
 - @tryghost/zip@1.1.14
2021-06-09 12:10:10 +01:00
Hannah Wolfe
1a0436b540 Added ts-ignore for lodash interpolate
- 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
2021-06-09 12:00:07 +01:00
Hannah Wolfe
f2b1d37cd4 Renamed package-json tests to use .test.js pattern
- all our modules use .test.js instead of the _spec.js pattern we use in Ghost
- updated for consistency
2021-06-09 11:57:52 +01:00
Hannah Wolfe
202e0a0bb6 Added coverage reporting for tpl package
- this is 100% already
2021-06-09 11:57:52 +01:00
Renovate Bot
c72d090c97 Update dependency mocha to v9 2021-06-09 09:58:44 +00:00
Hannah Wolfe
6d3a629690 Added minimal tpl() template helper
- 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
2021-06-09 10:04:49 +01: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