Commit Graph

71 Commits

Author SHA1 Message Date
renovate[bot]
ce5466d017 Update dependency sqlite3 to v5.1.7 2024-01-05 11:05:15 +01:00
renovate[bot]
5811dcaa41 Update Types packages 2023-12-04 22:05:57 +01:00
renovate[bot]
72ed1cdec2 Update Types packages 2023-12-04 11:06:28 +01:00
renovate[bot]
b275450bec Update Types packages 2023-11-21 15:06:56 +01:00
renovate[bot]
93fc6106dd Update dependency luxon to v3.4.4 2023-11-13 09:50:36 +01:00
renovate[bot]
cc43a311c2 Update Types packages 2023-11-08 12:29:48 +01:00
renovate[bot]
df8eeb2249 Update Types packages 2023-10-31 14:40:32 +01:00
Daniel Lockyer
85098e07d4 Configured all unit tests to use dot reporter
refs https://ghost.slack.com/archives/C02G9E68C/p1696490748701419

- this configures mocha to use the dot reporter because the default is
  way too verbose in CI
2023-10-05 12:24:24 +02:00
renovate[bot]
e32e0cb7af Update dependency luxon to v3.4.3 2023-09-12 09:02:09 +02:00
Daniel Lockyer
c6cb35074a Updated linting and testing packages 2023-09-01 15:51:17 +02:00
renovate[bot]
bde3465af5 Update dependency @types/luxon to v3.3.2 2023-08-31 17:40:59 +02:00
renovate[bot]
bd8c43c7b5 Update dependency luxon to v3.4.2 2023-08-28 19:07:40 +01:00
renovate[bot]
2159b4fb30 Update dependency luxon to v3.4.1 2023-08-22 22:47:51 +01:00
renovate[bot]
fc4fef85a6 Update dependency @types/sinon to v10.0.16 2023-08-09 11:18:47 +02:00
renovate[bot]
f56d9a5794 Update dependency luxon to v3.4.0 2023-08-09 11:15:27 +02:00
renovate[bot]
98937dbba6 Update dependency @types/luxon to v3.3.1 2023-07-21 09:23:24 +02:00
hemri
afaf4965db
Fixed timezone configuration in package tests (#17087) 2023-07-20 07:46:27 +00:00
renovate[bot]
7dce046786 Update Test & linting packages 2023-07-11 15:26:07 +02:00
Hannah Wolfe
6161f94910
Updated to use assert/strict everywhere (#17047)
refs: https://github.com/TryGhost/Toolbox/issues/595

We're rolling out new rules around the node assert library, the first of which is enforcing the use of assert/strict. This means we don't need to use the strict version of methods, as the standard version will work that way by default.

This caught some gotchas in our existing usage of assert where the lack of strict mode had unexpected results:
- Url matching needs to be done on `url.href` see aa58b354a4
- Null and undefined are not the same thing,  there were a few cases of this being confused
- Particularly questionable changes in [PostExporter tests](c1a468744b) tracked [here](https://github.com/TryGhost/Team/issues/3505).
- A typo see eaac9c293a

Moving forward, using assert strict should help us to catch unexpected behaviour, particularly around nulls and undefineds during implementation.
2023-06-21 09:56:59 +01:00
renovate[bot]
b1bcc2cb2d Update dependency luxon to v3 2023-06-20 15:22:54 +02:00
renovate[bot]
f29f011919 Update dependency @types/sinon to v10.0.15 2023-05-15 15:12:50 +02:00
Fabien "egg" O'Carroll
104f84f252 Added eslint rule for file naming convention
As discussed with the product team we want to enforce kebab-case file names for
all files, with the exception of files which export a single class, in which
case they should be PascalCase and reflect the class which they export.

This will help find classes faster, and should push better naming for them too.

Some files and packages have been excluded from this linting, specifically when
a library or framework depends on the naming of a file for the functionality
e.g. Ember, knex-migrator, adapter-manager
2023-05-09 12:34:34 -04:00
renovate[bot]
eff4662af3 Update dependency @types/sinon to v10.0.14 2023-05-01 15:01:17 +02:00
renovate[bot]
83373e1751 Update Test & linting packages 2023-04-05 15:16:08 +02:00
renovate[bot]
a7207eb0dd Update dependency sqlite3 to v5.1.6 2023-03-15 07:51:08 +01:00
renovate[bot]
221d1e616c Update dependency sqlite3 to v5.1.5 [SECURITY] 2023-03-14 07:09:09 +01:00
renovate[bot]
2223db5379
Update Test & linting packages 2023-03-13 02:36:20 +00:00
Simon Backx
db717f446f 🐛 Fixed free trials not visible in paid subscriptions graph
fixes https://github.com/TryGhost/Team/issues/2607

When a free trial converts to a paid subscription, and increases the MRR, it just creates a 'updated' paid subscription event.

To fix this, we need to count updated events that didn't change plan but do have a positive MRR. As an extension we could also check if the MRR change matches the expected MRR for the corresponsing Stripe plan, but that requires a more complex condition check (because for yearly subscriptions we need to convert to monthly), I don't think that is required here.
2023-03-10 16:16:17 +01:00
Simon Backx
400e1b4ab6 🐛 Fixed 3D secure payment not counted as paid subscription in graph
fixes https://github.com/TryGhost/Team/issues/2644

A 3D secure payment first has a status of incomplete, then active.

With the current logic, this creates 2 MemberPaidSubscriptionEvents:

- `created` with mrr_delta of 0
- `active` with mrr_delta of 5

We need to also count 'active' events. And to complement that, also 'inactive' events to make sure we balance out in rare cases.
2023-03-10 16:16:17 +01:00
Daniel Lockyer
6b1966ad9b Updated sinon dependency
- this is being done manually instead of merging the Renovate PR because
  the PR bundles another bump which doesn't pass yet
2023-03-02 12:43:42 +01:00
renovate[bot]
cf7ecb492c
Update dependency c8 to v7.13.0 2023-02-16 22:15:50 +00:00
renovate[bot]
929d32dddf Update dependency knex to v2.4.2 2023-01-23 13:00:53 +01:00
renovate[bot]
28ed23c13e Update dependency knex to v2.4.1 2023-01-18 07:43:07 +01:00
renovate[bot]
608d4eb6d2 Update dependency knex to v2.4.0 2023-01-06 19:11:14 +01:00
renovate[bot]
f58a7725d6 Update dependency luxon to v2.5.2 2023-01-06 11:59:24 +01:00
renovate[bot]
102f2f39c7 Update dependency sqlite3 to v5.1.4 2022-12-13 10:59:30 +07:00
renovate[bot]
13abcf6c9d
Update dependency mocha to v10.2.0 2022-12-12 13:20:22 +00:00
renovate[bot]
8682100e58 Update dependency @types/mocha to v10.0.1 2022-11-30 12:23:06 +07:00
renovate[bot]
8fa9f1e7e6
Update Test & linting packages 2022-11-07 20:39:48 +00:00
renovate[bot]
e9587e02d0
Update dependency mocha to v10.1.0 2022-10-17 08:41:28 +00:00
Daniel Lockyer
5aeaa977fd
Pinned moment dependency
- this shouldn't make any difference because `moment` has a resolution but we take
  the approach of pinning all our dependencies in this repository
2022-10-12 15:42:46 +07:00
renovate[bot]
2c2ee81adb
Update Test & linting packages 2022-10-05 00:36:08 +00:00
Fabien 'egg' O'Carroll
35bc5fa08a
Fixed no-shadow lint warnings (#15520)
We're planning to change this from a warning to an error and need to
clean the codebase up before we do so.

In all of these cases the shadowing was known about and was not
causing unexpected behaviour, so the refactor consists entirely of
renaming, rather than refactoring/bug fixes.
2022-10-03 15:50:28 +01:00
renovate[bot]
5140f8a887 Update dependency sqlite3 to v5.1.2 2022-10-03 14:21:24 +07:00
Daniel Lockyer
16ada37358 Updated Stats-Service repository URL
- this package was moved from the Analytics repo so this needed updating
2022-09-29 11:55:08 +07:00
renovate[bot]
5176aa8a7b Update dependency @types/mocha to v10 2022-09-29 11:42:45 +07:00
Rishabh Garg
45a301277d
Updated empty referrer source to null (#15456)
refs https://github.com/TryGhost/Team/issues/1939

- changes empty referrer source to null instead of explicit `Unavailable` in API
- makes it easier for clients/frontend to ignore empty referrers
2022-09-22 20:58:45 +05:30
Rishabh Garg
b048b02f67
Added new referrer source stats API (#15449)
closes https://github.com/TryGhost/Team/issues/1939

- adds new endpoint that returns count of referrer sources by date for admin dashboard
2022-09-22 16:34:26 +05:30
Simon Backx
7437d92d50
Added post referrers stats API (#15448)
closes https://github.com/TryGhost/Team/issues/1942

- Added data fixtures for referrers
- Added new endpoint to fetch referrer stats for a given post: `/stats/referrers/posts/:id`
- Added new ReferrersStatsService, responsible for calculating referrer stats
2022-09-21 18:16:56 +02:00
renovate[bot]
19e21a1e78
Update Test & linting packages 2022-09-20 18:01:42 +00:00