Commit Graph

61 Commits

Author SHA1 Message Date
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
renovate[bot]
061f0ab062
Update dependency c8 to v7.12.0 2022-09-20 14:48:51 +00:00
Daniel Lockyer
abe9811c6c
Remove typescript files and dependencies
- these are not currently used/needed in this repo
2022-09-20 14:54:23 +01:00
Daniel Lockyer
ab12a978b1
Fixed missing yarn test:unit command
- this is needed so CI can just run unit tests independently
2022-09-20 14:32:39 +01:00
renovate[bot]
017bbd89c3
Pinned dependencies (#15441)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-20 14:29:59 +01:00
Daniel Lockyer
b1878e5a06
Cleanup Stats-Service package files
- LICENSE is no longer needed as this is an unpublished package in the
  monorepo
- the README has been cut down to reflect the fact that it's unpublished
- added `private: true` to package.json config
2022-09-20 14:28:11 +01:00
Daniel Lockyer
cd7aa42f5d
Updated knex dependency
- this needed to be updated to switch back to the official sqlite3
  library
2022-09-20 14:24:14 +01:00
Daniel Lockyer
b596eff418
Switched to official sqlite3 library
- this wasn't switched back when we switched from the vscode fork to our
  own maintained version
2022-09-20 14:21:31 +01:00
Daniel Lockyer
d73200799d
Updated lockfile
- also unversions `@tryghost/stats-service` so it isn't included in the
  lockfile
2022-09-20 14:18:51 +01:00
Simon Backx
bc202fff0a Published new versions
- @tryghost/stats-service@0.3.0
2022-07-13 12:26:22 +02:00
Simon Backx
9c90379892 Fixed tests not working in timezones other than UTC 2022-07-13 12:26:02 +02:00