Commit Graph

149 Commits

Author SHA1 Message Date
Daniel Lockyer
6dde5e40e3
Updated Eslint ECMAScript compatibility to 2022
refs https://github.com/TryGhost/Toolbox/issues/345

- this commit bumps `eslint-plugin-ghost`, which bumps compatiblity to
  2022
- this also removes a lot of the manually-added
  `parserOptions.ecmaVersion` that we had in imported packages, in favor
  of the value set in `eslint-plugin-ghost`
2022-08-09 15:51:40 +02:00
Fabien 'egg' O'Carroll
43d41e8b0e
Removed deleted and hidden comments from the comment count
refs https://github.com/TryGhost/Team/issues/1763

These should not be included in the count as they do not contain content.
2022-08-09 13:51:13 +01:00
Aileen Nowak
fd9e19ce07 Fixed limit service not allowing explore integration
no issue

- Don't run limit checks for the Ghost Explore integration
2022-08-09 13:15:00 +01:00
Fabien 'egg' O'Carroll
f34740d6d0
Added support for autowrap and class to the comment_count helper (#15203)
refs https://github.com/TryGhost/Team/issues/1760

This allows theme developers to wrap the output of the comment_count
helper in an element, which will only be shown when there is content
to output.

This makes styling a lot easier, as the default output for no comments
is nothing, meaning that separators defined with CSS will not be rendered.
2022-08-09 13:08:36 +01:00
Rishabh Garg
098f40bbe3
Added trial info to member subscription detail (#15193)
refs https://github.com/TryGhost/Team/issues/1757

- exposes trial start and end dates in member's subscription object
- allows portal and admin to show member's trial information in UI
2022-08-09 17:28:00 +05:30
renovate[bot]
ac2ddee8fb Update dependency postcss to v8.4.16 2022-08-09 12:54:15 +02:00
Rishabh
ce80d250bf Handled null trial days on tiers
refs e26c977c66

- handles null trial days in admin and API, sets trial days as 0 for null values
2022-08-09 14:14:22 +05:30
Rishabh
98b21d18f9 Allowed null value for trial days in tiers api
refs e26c977c66

- allows trial days to be null in admin api schema when set via tiers api
2022-08-09 14:14:22 +05:30
Daniel Lockyer
c2e45b657f Removed bthreads dependency in favor of native worker_threads
fixes https://github.com/TryGhost/Toolbox/issues/370

- we no longer need `bthreads` because we can use native
  `worker_threads` now we don't have to support Node 10 any longer
- this allows us to clean up a dependency and stick with native
  libraries
- the referenced node-sqlite3 issue should be fixed (or at least, we now
  maintain it so we can fix it if not)
2022-08-09 09:04:59 +02:00
renovate[bot]
db86e21512
Update dependency juice to v8.1.0 2022-08-09 05:03:08 +00:00
Daniel Lockyer
c11f5edc10 v5.8.2 2022-08-08 19:19:03 +01:00
Fabien 'egg' O'Carroll
e26c977c66
🐛 Fixed saving membership settings (#15196)
refs https://github.com/TryGhost/Ghost/commit/a58efd6b

The references commit updated the admin-api-schema to require the `trail_days`
property, which is not yet supported by the Admin. When saving membership
setting we also save all the Tiers, which then causes the validation to fail.

Until the Admin supports the property we should remove validation from the API
2022-08-08 19:10:54 +01:00
Daniel Lockyer
67aa8d5956 v5.8.1 2022-08-08 15:53:50 +01:00
Fabien 'egg' O'Carroll
5165a0b298
Redacted comment html for deleted and hidden comments (#15173)
refs https://github.com/TryGhost/Team/issues/1745

This is done at the mapper layer, so that the model can be used for the
Admin API - where will probably want to expose the underlying content.

We've also disabled editing of deleted/hidden comments, to avoid
accidentally overriding the comments html when sending up deleted
comments.
2022-08-08 13:29:27 +01:00
Daniel Lockyer
e1984c8607
Cleaned up core package Gruntfile
- most of these tasks were duplicates or had been extracted out into
  npm/yarn scripts
- in order to get closer to removing Grunt, I've cleaned up the majority
  of those script
- this also removes an intermediate command to building Admin, so it starts
  ever so slightly quicker
2022-08-08 13:03:49 +02:00
Daniel Lockyer
71b599b632
Removed coffeescript dev dependency
refs 82dcc042cd

- `coffeescript` was only added in the first place because of an update
  to `grunt-bg-shell`, which required it
- since then, we've removed `grunt-bg-shell`, so we don't need this
  dependency any further
2022-08-08 12:37:07 +02:00
renovate[bot]
6d9a5cc28a
Update metascraper to v5.30.1 2022-08-05 19:09:11 +00:00
Simon Backx
eb4d882bb2 Fixed whitespace in bio not removed
fixes https://github.com/TryGhost/Team/issues/1755
2022-08-05 17:10:56 +02:00
Daniel Lockyer
512c40b5d5 v5.8.0 2022-08-05 16:02:32 +01:00
renovate[bot]
342ced452e Update sentry-javascript monorepo to v7.9.0 2022-08-05 16:05:30 +02:00
Daniel Lockyer
ad209f3a7d
Improved yarn dev development tooling
- this commit switches our `yarn dev` workflow from heavily relying on
  Grunt, to using `nodemon` and `concurrently`
- we're doing this to reduce reliance on Grunt, but also to fix several
  nits with the way `yarn dev` works in the monorepo
- we now use `nodemon` to run the Ghost backend, and it should
  auto-refresh whenever you change a file in any of the packages (except
  `admin`)
- we use `concurrently` to simultaneously run `ghost` and `admin` at
  the same time. it seems to handle process cleanup well and has nice
  colored prefixes to help with differentiating between log output
- this commit ends up removing a handful of Grunt dependencies and
  reduces the functionality stored in the Gruntfile
- on the whole, it should keep existing functionality but there may be
  some small underlying changes to get used to
2022-08-05 15:54:37 +02:00
Simon Backx
46e1f52d3a Cleaned up debug console log
refs 17a9759cf3
2022-08-05 15:39:54 +02:00
Simon Backx
17a9759cf3 Fixed posting empty comments
refs https://github.com/TryGhost/Team/issues/1750

- Trim whitespace from empty paragraphs
- Do not allow empty comments
- Also includes: Allow requesting the parent relationship of a comment (required for focusing comments)
2022-08-05 15:31:08 +02:00
David Kolosowski
3c76172e81
removed catch predicate from integrations (#14969)
refs https://github.com/TryGhost/Ghost/issues/14882

- catch predicates make removing Bluebird from other parts of the code risky.
2022-08-05 14:21:02 +01:00
Rishabh
eb5b463460 Updated comment notification management in Portal
refs https://github.com/TryGhost/Team/issues/1677

- updates managing comment notifications in UI for single newsletter sites
- updated cta for tiers with free trial
2022-08-05 18:21:18 +05:30
Rishabh Garg
5704ac061e
Handled storing of trial start/end info for subscription (#15161)
refs https://github.com/TryGhost/Team/issues/1724

With free trials, members can start subscriptions with a trial period. This change stores the information about trial start and end date for every subscription so it can be shown on Admin/Portal for member.

- adds new `trial_start_at` column for storing trial start date on Stripe subscription. Will in most cases match the start of subscription date.
- adds new `trial_end_at` column for storing trial end date on Stripe subscription.
- wires storing trial start and end values on stripe subscription
2022-08-05 17:50:40 +05:30
Rishabh
a58efd6ba1 Updated admin api schema to include trial days on tiers
refs https://github.com/TryGhost/Team/issues/1724
2022-08-05 17:23:40 +05:30
Rishabh
2d12d9aa89 Wired trial days to tiers API
refs https://github.com/TryGhost/Team/issues/1724

- Added `trial_days` to api serializers
2022-08-05 17:23:40 +05:30
Daniel Lockyer
a0dca653e7
Updated @tryghost/* packages
- these were all published from the SDK repo
2022-08-05 13:30:50 +02:00
arsereg
182a7ea07c
💡 Upgraded Tenor API to v2 (#15087)
closes: https://github.com/TryGhost/Ghost/issues/14980
refs: cc276486f0

- Tenor is now operated by Google, and the old v1 Tenor API has been decommissioned
- At present anyone with a pre-configured tenor integration will get intermittent errors, whilst it is impossible to setup a new tenor API integration
- Sadly old keys do not work with the new API, and new keys do not work with the old API, so there is no happy path forward.
- After this lands, everyone will need to go and get a new Google API Key for Tenor, update their config, and then the integration will work properly again.
- This particular change renames the API key from `publicReadOnlyApiKey` to `googleApiKey` to reflect that the key itself changes in type and behaviour

Co-authored-by: Hannah Wolfe <github.erisds@gmail.com>
2022-08-05 12:13:27 +01:00
Daniel Lockyer
ba863966ad
Increased integration test threshold
- this is only a temporary fix until we have time to go and investigate
  some performance issues in the tests
- we keep seeing random failures due to timeouts in the integration
  tests, and it's incredibly distracting
2022-08-05 12:57:57 +02:00
Daniel Lockyer
36fef8976b Fixed allowing multiple shutdown procedures
- Ghost doesn't prevent itself from running the `shutdown` procedure more than once
- if you spam Ctrl-C, you can reproduce this
  - this might not be the case when running using `yarn dev` because
    some Grunt code captures the SIGINT/SIGTERM, but that is changing
    very soon
- whilst not necessary a problem now, we might introduce code that runs
  during a shutdown but only expects to happen once
- this commit introduces a flag to say that Ghost is shutting down, and
  prevents the `shutdown` function from executing further once true
2022-08-05 12:43:18 +02:00
Simon Backx
43f57a4742 Bumped comments-ui to 0.4.0
no issue
2022-08-05 11:50:50 +02:00
Aileen Nowak
085958d53d Added Ghost Explore integration
no issue

- bumps Ghost Explore to GA from alpha
2022-08-05 10:06:10 +01:00
Daniel Lockyer
c8b3a08f24
Fixed linting 2022-08-05 10:01:09 +02:00
Daniel Lockyer
dd41929251
Removed Grunt from Admin
- as part of our effort to reduce our usage of Grunt in favor of more
  maintainable (and maintained) alternatives, this commit removes Grunt
  from Admin
- the main difference here is switching from subgrunt to shell, which
  should be a nice stepping stone to removing Grunt altogether one day
2022-08-05 09:53:08 +02:00
renovate[bot]
7cb6bcac85
Update dependency @tryghost/kg-mobiledoc-html-renderer to v5.3.6 (#15118)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-04 21:23:54 +01:00
Rishabh
2055a742de Updated comments notification copy in Portal
refs https://github.com/TryGhost/Team/issues/1744
2022-08-05 01:08:02 +05:30
Daniel Lockyer
8f8fcbd5e9
Switched to original version for metrics
- up until now, we've been sending the `safe` version as data in
  metrics, but this only includes major.minor
- we'd like to be able to see how every release affects the results, so
  this commit switches to using the version that was supplied in the
  package.json so we've got more of a granular overview
2022-08-04 19:22:57 +02:00
Naz
fa8d94fce2 Fixed the typo
refs e9bfc4ef01

- Did a typo in the find and replace... and now correcting a typo of a typo  -_-
2022-08-04 15:38:32 +01:00
Naz
2de7688eaf Used in memory cache adapter in settigs cache manager
refs https://github.com/TryGhost/Toolbox/issues/364

- Settings Manager used to store all of it's settings values in a hash - an in memory cache in disguise. Having a hidden cache made it hard to reason about it's impact of memory usage and did not allow to swap it out for an alternative storage metchanism easily. Having a cache storage abstraction in Settings Manager allows to get rid of long lasting memory problems + decouples storage mechanism from the logic around transforming stored values.
2022-08-05 02:28:33 +12:00
Naz
ed79d3e9b3 Added basic memory cache storage implementation
refs https://github.com/TryGhost/Toolbox/issues/364

- This is groundwork to substitute in memory caches we use across the codebase. The first candidate would be settings cache. The interface of the memory cache was kept to the minimum. The "keys" method is a somewhat acceptable alternative to the "getAll" method used in the codebase right now.
- The next iteration over this would be adding async methods are alternative key/value storage methanisms like Redis.
2022-08-05 02:28:33 +12:00
Naz
af0014917b Moved cache storage initialization
refs https://github.com/TryGhost/Toolbox/issues/364

- Passing "cache" through constructor did not work out because cache setting is still dependent upon on the model layer (gets called before it has a chance to initialize during db migrations)
- To remove the initialization dependency blockers were:
    "defaults" method in the post model - the value resolved to "undefined" anyway during the fixture insertion
    validate-password module - checks the password against "undefined" during fixture initialization
- Passing the cache through "init" method works too, but is not as clear as with constructor DI pattern.
2022-08-05 02:28:33 +12:00
Naz
e9bfc4ef01 Changed the lingo to US of A variation
refs 16728a3ef1

- It's 'merica time!
2022-08-05 02:28:33 +12:00
Simon Backx
bac8f4b8db
Added bio to members api (#15168)
refs https://github.com/TryGhost/Team/issues/1716

- Adds the bio field to the API output
- Allow setting bio when updating the member
- Includes new E2E tests for the members API that were missing
2022-08-04 15:51:23 +02:00
renovate[bot]
f4a31aae7d
Update dependency @tryghost/kg-default-atoms to v3.1.3 (#15115)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-04 12:17:58 +01:00
renovate[bot]
4957298e68
Update dependency @tryghost/kg-markdown-html-renderer to v5.1.6 (#15117)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-04 12:17:04 +01:00
renovate[bot]
88436506f4
Update dependency @tryghost/kg-default-cards to v5.16.3 (#15116)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-04 11:06:18 +01:00
renovate[bot]
4868989a4a
Update dependency @tryghost/kg-card-factory to v3.1.4 (#15114)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-04 11:05:55 +01:00
Fabien "egg" O'Carroll
7e630dcb23 Bumped comments-ui version to 0.3.x
refs https://github.com/TryGhost/Team/issues/1695

This version of the comments-ui includes changes to work with the
comments helper design.
2022-08-04 11:04:50 +01:00