Commit Graph

1607 Commits

Author SHA1 Message Date
Rishabh
b8d79a850b Updated email subject copy for new mentions
refs https://github.com/TryGhost/Team/issues/2754

Updates email copy to be more descriptive and also avoid stacking in inbox.
2023-03-21 16:09:21 +05:30
Rishabh
0b7e09c986 Updated fallback for storing source site title
refs https://github.com/TryGhost/Team/issues/2754

Previously, we didn't have any backup for storing source site title and it could have stored as empty if missing. This change ensures the source site title is stored as site host instead as fallback if not present.
2023-03-21 16:09:21 +05:30
Rishabh
63edac090b Fixed incorrect usage of mentions report timestamp
refs https://github.com/TryGhost/Team/issues/2754

The name of the setting used for storing last timestamp of mentions report is `last_mentions_report_email_timestamp`, but in the code we incorrectly camel-cased it which meant we were not reading from and writing to the correct setting, and ended up sending a mentions report every few hours every time the job ran.
2023-03-21 16:09:21 +05:30
Simon Backx
a016f53b7e Added resolveMx stub to all E2E tests
refs https://ghost.slack.com/archives/C04TMVA1D7A/p1679391135060629
refs 1b0adcf4ab

The same issue when sending emails from E2E tests, where the tests timeout when resolving mx records for invalid domains.
2023-03-21 11:25:06 +01:00
Simon Backx
0cc3164b25
Added export button to posts page with placeholder endpoint (#16456)
fixes https://github.com/TryGhost/Team/issues/2780 
refs https://github.com/TryGhost/Team/issues/2781

Adds an export button to the posts page in admin (behind feature flag). It downloads a
placeholder CSV via a real endpoint (`/posts/export`).
2023-03-21 10:24:56 +01:00
Daniel Lockyer
2096773310
Added missing @tryghost/posts-service dependency
- this is needed so we can link between packages in the monorepo when
  the packages are bundled
2023-03-21 08:24:25 +01:00
renovate[bot]
e1fa8560d5 Update dependency fs-extra to v11.1.1 2023-03-21 07:35:30 +01:00
Simon Backx
a5dff4207e Moved posts service to its own package
fixes https://github.com/TryGhost/Team/issues/2778

It is easier to add extra classes using the latest patterns if it has its own package.
2023-03-20 16:06:42 +01:00
Elena Baidakova
aca8c5805c Improved members-actions e2e browser test
refs TryGhost/Team#2667
- Added notification check before checking that user successfully unsubscribed from all newsletters. It helps to make the test more stable
2023-03-20 18:48:35 +04:00
Simon Backx
07ec33fb3a
Added latest posts to email template (#16448)
refs https://github.com/TryGhost/Team/issues/2769

Needs some extra styling and design, this is only a minimal version
behind the feature flag.
2023-03-20 14:30:42 +01:00
Simon Backx
6d8388c5bb Fixed migration version for show latest posts
no issue

The migration was added to 5.39, but this was not correct. It should have been added to 5.40. This commit fixes moves the migration to the right folder. Running the migration twice locally will skip it because it detects the table is already correct.
2023-03-20 14:18:30 +01:00
Simon Backx
a513542b56
Added show_latest_posts column to newsletter table (#16402) 2023-03-20 11:10:49 +01:00
Sanne de Vries
1b0adcf4ab Fixed missing stub for DNS in GhostMailer Direct tests
- without this, Node will try and resolve the domain name but local DNS
  resolvers can take a while to timeout, which causes the tests to timeout
- `nodemailer-direct-transport` calls `dns.resolveMx`, so if we stub that
  function and return an empty array, we can avoid any real DNS lookups
2023-03-17 18:16:30 +01:00
Simon Backx
a6654b5e6c Updated GhostMailer Direct unit tests to async await style
no issue

Tests were timing out for some users, probably because not all errors are caught.
2023-03-17 17:34:01 +01:00
Ghost CI
7f1f6a7249 v5.39.0 2023-03-17 16:00:48 +00:00
Steve Larson
0a4d568f19 updated snapshot
no refs
-updated snapshot to pass tests
2023-03-17 10:57:50 -05:00
Peter Zimon
9d25c2a058 Fixed mobile size footer buttons in newsletters
refs. https://github.com/TryGhost/Team/issues/2740

- alignment of buttons in the footer of newsletter email template was off
2023-03-17 16:34:23 +01:00
Steve Larson
067b35de6b fixed member newsletter test
no refs
-fixed flaky test that seemed to have sync issues with fixture data and db
2023-03-17 10:27:09 -05:00
Simon Backx
b3c410a923 Reverted stats snapshot change 2023-03-17 16:06:00 +01:00
Simon Backx
c591f1f86a Updated email batch sending snapshots 2023-03-17 16:00:14 +01:00
Sanne de Vries
48a3159d3d Added mobile feedback buttons to email template
Refs https://github.com/TryGhost/Team/issues/2740
2023-03-17 15:58:14 +01:00
Daniel Lockyer
b7a03ca765 🐛 Fixed mainEntityOfPage property within page metadata
fixes https://github.com/TryGhost/Ghost/issues/16367
refs https://github.com/schemaorg/schemaorg/discussions/3274

- after a discussion with the schemaorg maintainers, it looks like
  `mainEntityOfPage` should refer to the entity itself vs the parent
  entity
- this commit updates the code to use the entity URL and fixes the
  associated tests
2023-03-17 15:13:28 +01:00
Simon Backx
f67b38daf4 Fixed posts and email wrappers in worker threads
refs https://ghost.slack.com/archives/C02G9E68C/p1679055933852679

- The posts api is used in the update-check job. This also uses the email wrapper, which needs the email-service
- The email service is not initalized in the worker threads, this causes an error
- Adds a check, because this part is optional in worker threads
2023-03-17 14:10:33 +01:00
Simon Backx
005b5f20fb Added E2E tests for comment CTA
fixes https://github.com/TryGhost/Team/issues/2727

Adds some E2E tests and snapshots for comment CTA in all possible situations.
2023-03-17 11:12:47 +01:00
Simon Backx
6058b2db22 Removed ghost comments link test
no issue

Accidentally left when committing.
2023-03-17 10:28:47 +01:00
Simon Backx
298e3da745 Fixed comment CTA button link
refs https://github.com/TryGhost/Team/issues/2672

- Use #ghost-comments instead of #ghost-comments-root
- Fixed snapshots
2023-03-17 10:27:23 +01:00
Simon Backx
423337a048 Fixed snapshots 2023-03-17 10:24:21 +01:00
Sanne de Vries
717ed114f4 Fixed center aligned post title in emails
Refs https://github.com/TryGhost/Team/issues/2740
2023-03-17 10:07:17 +01:00
Chris Raible
0640b9c4aa
Modified outbound link tagger to use ?ref=domain instead of ?ref=siteTitle (#16431)
refs TryGhost/Team#2755

- Outbound link tagger will now append ?ref=example.com or ?ref=example.ghost.io instead of ?ref=siteTitle
2023-03-17 14:18:26 +05:30
Simon Backx
25f4974846 Added comment CTA in newsletters
fixes https://github.com/TryGhost/Team/issues/2672

- Moves the feature from behind the flag
- Also hides the comment CTA for email only posts

Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
2023-03-17 09:38:55 +01:00
Naz
74a1ab4525
Fixed root zip media/files copying during import
refs https://github.com/TryGhost/Toolbox/issues/523

- During import process of content files the files from the root directory were also copied over. This is causing chaos in the root of content folder with files that only needed for data import. For example, the csv files needed for Revue import were also copied over by "file importer" even though those do not belong to any content.
- The approach of filtering on a "handler" level was taken over filtering in the import manager due to how our globing patterns work. See a previous commit with reverted previous fix for more context.
2023-03-16 22:48:57 +01:00
Naz
c487b12518 Reverted zip's root file copying fix
refs https://github.com/TryGhost/Toolbox/issues/523

- The reverted fix did not take into account the "original path" of the
files would be truncated. This path has to be full relative to the root
of the zip to later be used during importer url substitution logic.
- This reverts commit 831a76505c.
2023-03-16 21:52:24 +01:00
Daniel Lockyer
dda1d7cf26 Removed emojis from i18n strings
refs https://github.com/TryGhost/Ghost/issues/15502

- these aren't going to change across languages so we can exclude them
  from the strings to simplify things
2023-03-16 20:52:39 +01:00
Daniel Lockyer
dc0f021b99 Refactored i18n plaintext email translations to split on newline
refs https://github.com/TryGhost/Ghost/issues/15502

- this makes the translations files a lot nicer because they only
  contain one line per key
2023-03-16 17:25:22 +01:00
Steve Larson
7f223b56dd
fixed member newsletter test (#16425)
no ref
-fixed flaky test that seemed to have sync issues with fixture data and
db
2023-03-16 10:43:17 -05:00
Sanne de Vries
cdcb3dcd6f
Updated email template to include comment link in header and footer (#16423)
Refs https://github.com/TryGhost/Team/issues/2740

---------

Co-authored-by: Steve Larson <9larsons@gmail.com>
2023-03-16 16:10:53 +01:00
Daniel Lockyer
330e86944c Added example translation for emails within Ghost
refs https://github.com/TryGhost/Ghost/issues/15502

- this adds the i18n translation wrapper to the titles, plaintext
  versions and one HTML version of the member emails
2023-03-16 16:09:55 +01:00
Elena Baidakova
60b3731199 Separated admin and portal tests to different projects
refs TryGhost/Team#2667
- Portal tests are much more stable when running in the separate DB from admin tests.
2023-03-16 18:35:09 +04:00
Daniel Lockyer
21ea426794 Added i18n service to Ghost core
refs https://github.com/TryGhost/Ghost/issues/15502

- this adds the scaffolding for enabling i18n translations within Ghost
  core
- also adds `yarn translate:ghost` as an option to the `i18n` package
- the locale is currently hardcoded to `en` so we don't utilize the
  translations until we're ready
2023-03-16 14:50:50 +01:00
Simon Backx
450e01d1c0 Added placeholder basic subscription details to email template
refs https://github.com/TryGhost/Team/issues/2736

The renewal date is still missing, and style and desin is only a placeholder.
2023-03-15 17:12:56 +01:00
Rishabh Garg
d98ffcff28 Updated last mentions report timestamp to use number
Co-authored-by: Simon Backx <simon@ghost.org>
2023-03-15 21:22:13 +05:30
Fabien "egg" O'Carroll
266c70a8fd Added mentions-email-report service
This wires up the @tryghost/mentions-email-report service
2023-03-15 21:22:13 +05:30
Fabien "egg" O'Carroll
04efb6c177 Exposed MentionsAPI from mentions service
This is necessary so that we can use it as the IMentionReportGenerator
dependency for the mentions-email-report packages
2023-03-15 21:22:13 +05:30
Fabien "egg" O'Carroll
018e2654c5 Added getAll method to BookshelfMentionRepository
This is necessary to support the getMentionReport method in MentionsAPI
2023-03-15 21:22:13 +05:30
Kevin Ansfield
e2eba623dc
Added complex object URL transform support for lexical card datasets
refs https://github.com/TryGhost/Team/issues/2722

- bumped `@tryghost/url-utils` with additional lexical card dataset support
- see 2154b26dd2
2023-03-15 14:00:23 +00:00
Simon Backx
80043f2699 Fixed snapshot tests in batch sending 2023-03-15 14:11:05 +01:00
Simon Backx
6e5ddc6a9a Fixed email preview snapshots 2023-03-15 14:03:24 +01:00
Sanne de Vries
e0c3573079 Updated email template snapshot resulting in test failure
No ref
2023-03-15 12:45:54 +01:00
Simon Backx
da2e56916e
Added show_subscription_details column to newsletter table (#16403)
fixes https://github.com/TryGhost/Team/issues/2708

Adds `show_subscription_details` column to newsletter table. Disabled by
default.
2023-03-15 11:53:45 +01:00
Fabien 'egg' O'Carroll
bdaddd1a64
Added setting to store last mention report email date (#16399)
Because there is no guarantee about a daily job running exactly once a
day, we need to store the last time that the email was sent, so that we
can refrain from sending one if it's been less than a day since the
last.

A setting has been used for this as we don't currently have a pattern
for it, we might want to consider moving this to some kind of cache
based solution in future. This has been added as a core setting so that
we don't expose it via the API.

The setting is stored as a number to allow us to store value as unix timestamp.

---------

Co-authored-by: Rishabh <zrishabhgarg@gmail.com>
2023-03-15 15:34:41 +05:30
Simon Backx
b27c7bc707 Fixed batch sending snapshots dates
no issue

The snapshots contained the current date, so they broke every day. This commit fixes the issue by setting a fixed date.
2023-03-15 09:45:36 +01:00
renovate[bot]
a7207eb0dd Update dependency sqlite3 to v5.1.6 2023-03-15 07:51:08 +01:00
Naz
b627516088
Removed mediaInliner labs flag
refs https://github.com/TryGhost/Toolbox/issues/524

- The 'mediaInliner' beta flag is not used for anything anymore, so there's no need to keep it around. The only surface of the feature is the `POST /db/media/inline` endpoint that will be used through internal tooling mostly and won't be accessible through the Admin UI.
2023-03-14 22:13:04 +01:00
Naz
8025663616
Moved POST /db/media/inline endpoint outside labs
refs https://github.com/TryGhost/Toolbox/issues/524

- The endpoints is for internal (non-documented) usage at the moment and is fine without the labs flag.
- This should allows us to test the inlining on production sites sooner
2023-03-14 18:32:52 +01:00
Simon Backx
66c20710ba Added placeholder comment CTA button to emails
fixes https://github.com/TryGhost/Team/issues/2725

- Added to emails if labs flag enabled, comments enabled and comment CTA button enabled
- Links to comment section
- Design and styling not added yet
2023-03-14 17:11:24 +01:00
Simon Backx
bb019a0ab5 Added E2E test for sending email without post title
fixes https://github.com/TryGhost/Team/issues/2724

This change also includes new snapshots for email sending (similar for email previews, but this time for the real emails to make sure we catch changes).
2023-03-14 16:05:18 +01:00
Simon Backx
350b291c34
Added show_comment_cta column to newsletter table (#16401)
fixes https://github.com/TryGhost/Team/issues/2707

Adds the new column for storing whether we need to show a comment CTA in
emails. Enabled by default.
2023-03-14 15:03:02 +01:00
Simon Backx
1e435fb328
Implemented showPostTitleSection (#16404)
fixes https://github.com/TryGhost/Team/issues/2705

- Added showPostTitleSection to newsletter model in admin
- Wired up UI to admin model so it saves to the database
- Implemented showPostTitleSection in newsletter preview and added some
minor temporary css styling
- Implemented showPostTitleSection in newsletter template in backend,
and added some extra CSS styling to fix spacing
2023-03-14 11:29:43 +01:00
Aileen Nowak
475d8f9dd6 Fixed not providing a boolean value or slack-notifications service
no issue

The logic was incorrect and provided a URL instead of the expected `boolean` value for `isEnabled`
2023-03-14 12:00:20 +02:00
Simon Backx
69d07c892c
Fixed getLazyRelation returning new model for optional relations (#16411)
no issue

When using `getLazyRelation` on an optional relation that is not set, it
will return a newly created model instead of a model from the database.
- Adds a new require option to `getLazyRelation`, that throws an error
if the relation is not set (off by default to match existing use cases)
- This caused a bug (not visible because we always pass a newsletter id)
in email previews, where when the newsletter id was not explicitly set,
it would use `newsletter = (await post.getLazyRelation('newsletter')) ??
(await this.models.Newsletter.getDefaultNewsletter());`, which always
returned the first one, and could return a newly initiated newsletter
with all properties set to undefined.
- Some page snapshots are altered by this, because the usage of
`getLazyRelation` on a post no longer sets the email relation to some
new model.
2023-03-14 10:58:58 +01:00
Simon Backx
ff5e7202c6
Added show_post_title_section column to newsletters table (#16397)
fixes https://github.com/TryGhost/Team/issues/2706

Only includes the migration. The setting is not used at the moment, but
will be enabled by default.
2023-03-14 09:48:13 +01:00
renovate[bot]
3c22203c71
Update @tryghost (#16406)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@tryghost/html-to-mobiledoc](https://togithub.com/TryGhost/SDK/tree/master#readme)
([source](https://togithub.com/TryGhost/SDK)) | [`2.0.6` ->
`2.0.7`](https://renovatebot.com/diffs/npm/@tryghost%2fhtml-to-mobiledoc/2.0.6/2.0.7)
|
[![age](https://badges.renovateapi.com/packages/npm/@tryghost%2fhtml-to-mobiledoc/2.0.7/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@tryghost%2fhtml-to-mobiledoc/2.0.7/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@tryghost%2fhtml-to-mobiledoc/2.0.7/compatibility-slim/2.0.6)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@tryghost%2fhtml-to-mobiledoc/2.0.7/confidence-slim/2.0.6)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@tryghost/kg-card-factory](https://togithub.com/TryGhost/Koenig/tree/master#readme)
([source](https://togithub.com/TryGhost/Koenig)) | [`4.0.4` ->
`4.0.5`](https://renovatebot.com/diffs/npm/@tryghost%2fkg-card-factory/4.0.4/4.0.5)
|
[![age](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-card-factory/4.0.5/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-card-factory/4.0.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-card-factory/4.0.5/compatibility-slim/4.0.4)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-card-factory/4.0.5/confidence-slim/4.0.4)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@tryghost/kg-clean-basic-html](https://togithub.com/TryGhost/Koenig/tree/master#readme)
([source](https://togithub.com/TryGhost/Koenig)) | [`3.0.6` ->
`3.0.7`](https://renovatebot.com/diffs/npm/@tryghost%2fkg-clean-basic-html/3.0.6/3.0.7)
|
[![age](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-clean-basic-html/3.0.7/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-clean-basic-html/3.0.7/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-clean-basic-html/3.0.7/compatibility-slim/3.0.6)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-clean-basic-html/3.0.7/confidence-slim/3.0.6)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@tryghost/kg-default-cards](https://togithub.com/TryGhost/Koenig/tree/master#readme)
([source](https://togithub.com/TryGhost/Koenig)) | [`6.0.4` ->
`6.0.5`](https://renovatebot.com/diffs/npm/@tryghost%2fkg-default-cards/6.0.4/6.0.5)
|
[![age](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-default-cards/6.0.5/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-default-cards/6.0.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-default-cards/6.0.5/compatibility-slim/6.0.4)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-default-cards/6.0.5/confidence-slim/6.0.4)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@tryghost/kg-default-nodes](https://togithub.com/TryGhost/Koenig/tree/main#readme)
([source](https://togithub.com/TryGhost/Koenig)) | [`0.0.15` ->
`0.0.16`](https://renovatebot.com/diffs/npm/@tryghost%2fkg-default-nodes/0.0.15/0.0.16)
|
[![age](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-default-nodes/0.0.16/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-default-nodes/0.0.16/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-default-nodes/0.0.16/compatibility-slim/0.0.15)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-default-nodes/0.0.16/confidence-slim/0.0.15)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@tryghost/kg-lexical-html-renderer](https://togithub.com/TryGhost/Koenig/tree/main#readme)
([source](https://togithub.com/TryGhost/Koenig)) | [`0.1.11` ->
`0.1.12`](https://renovatebot.com/diffs/npm/@tryghost%2fkg-lexical-html-renderer/0.1.11/0.1.12)
|
[![age](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-lexical-html-renderer/0.1.12/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-lexical-html-renderer/0.1.12/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-lexical-html-renderer/0.1.12/compatibility-slim/0.1.11)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-lexical-html-renderer/0.1.12/confidence-slim/0.1.11)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@tryghost/kg-mobiledoc-html-renderer](https://togithub.com/TryGhost/Koenig/tree/master#readme)
([source](https://togithub.com/TryGhost/Koenig)) | [`6.0.4` ->
`6.0.5`](https://renovatebot.com/diffs/npm/@tryghost%2fkg-mobiledoc-html-renderer/6.0.4/6.0.5)
|
[![age](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-mobiledoc-html-renderer/6.0.5/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-mobiledoc-html-renderer/6.0.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-mobiledoc-html-renderer/6.0.5/compatibility-slim/6.0.4)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-mobiledoc-html-renderer/6.0.5/confidence-slim/6.0.4)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@tryghost/kg-parser-plugins](https://togithub.com/TryGhost/Koenig/tree/master#readme)
([source](https://togithub.com/TryGhost/Koenig)) | [`3.0.6` ->
`3.0.7`](https://renovatebot.com/diffs/npm/@tryghost%2fkg-parser-plugins/3.0.6/3.0.7)
|
[![age](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-parser-plugins/3.0.7/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-parser-plugins/3.0.7/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-parser-plugins/3.0.7/compatibility-slim/3.0.6)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/@tryghost%2fkg-parser-plugins/3.0.7/confidence-slim/3.0.6)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>TryGhost/SDK</summary>

###
[`v2.0.7`](ca389b95dd...924c77a60e)

[Compare
Source](ca389b95dd...924c77a60e)

</details>

<details>
<summary>TryGhost/Koenig</summary>

###
[`v4.0.5`](https://togithub.com/TryGhost/Koenig/compare/@tryghost/kg-card-factory@4.0.4...@tryghost/kg-card-factory@4.0.5)

[Compare
Source](https://togithub.com/TryGhost/Koenig/compare/@tryghost/kg-card-factory@4.0.4...@tryghost/kg-card-factory@4.0.5)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekday" (UTC), Automerge - At
any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/TryGhost/Ghost).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNjAuMCIsInVwZGF0ZWRJblZlciI6IjM0LjE2MC4wIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-14 06:47:38 +00:00
renovate[bot]
221d1e616c Update dependency sqlite3 to v5.1.5 [SECURITY] 2023-03-14 07:09:09 +01:00
Aileen Booker
eeb7546abb
Added handling for initial and skipped Milestones (#16405)
refs
https://www.notion.so/ghost/Marketing-Milestone-email-campaigns-1d2c9dee3cfa4029863edb16092ad5c4?pvs=4

- When milestones will be activated we would send out emails to users
that are way above the achieved milestone, as we didn't record
milestones before
- The plan is to implement a 0 milestone and don't send an email for
achieving those and also add all achieved milestones in the first run
until a first milestone is stored in the DB, then increment from there.
- This change takes care of two cases:
1. Milestones gets enabled and runs initially. We don't want to send
emails unless there's already at least one milestone achieved. For that
we add a 0 milestone helper and add a `initial` reason to the meta
object for the milestone event, so we can choose not to ping Slack and
also disable email sending for all milestones achieved in this initial
run.
2. All achieved milestones will be stored in the DB, even when that
means we skip some. This introduces the `skipped` reason which also
doesn't send emails for the skipped milestones, but will do for
correctly achieved milestones (always the highest one).
- Added handling for slack notifications to not attempt sending when
reason is `skipped` or `initial`
2023-03-13 19:01:11 +02:00
Fabien 'egg' O'Carroll
4525c7293c
Removed email notifications for new mentions
These are no longer desired and will be replaced with a digest style
email.
2023-03-13 18:33:57 +07:00
Fabien "egg" O'Carroll
531e4ab1a9 Removed service.js files from unit test coverage
The service.js files are rarely unit tested because they are
essentially glue code which acts as a singleton and doesn't use
dependency injection, this lil cocktail makes it difficult to stub
dependencies, as well as to call the init method more than once in a
test suite. This change should give us improved unit test coverage
2023-03-13 17:26:03 +07:00
Sanne de Vries
f31c69d7d5 Added UI for new settings in email newsletter settings
Refs https://github.com/TryGhost/Team/issues/2699

- Added 'Making it rain' feature flag
- Added toggles for newsletter title section, comment links, and latest posts
2023-03-13 09:56:35 +01:00
renovate[bot]
2223db5379
Update Test & linting packages 2023-03-13 02:36:20 +00:00
Steve Larson
8d76832b07 added e2e tests to cover page events
no refs
-added e2e tests for sending mentions on various page events
2023-03-10 15:25:10 -06:00
Simon Backx
80cec29144
Added Stripe Mocker to make testing easier (#16396)
no issue

The Stripe Mocker mocks the Stripe API in memory, to make it much easier
to test subscription flows. Currently it is more a POC to see if it
works well. It probably needs a bit more work to support more scenarios.
- Added new tests for the subscription stats endpoint for 3D secure +
free trial flows using the new Stripe Mocker
- Updated members admin api tests to use Stripe Mocker (+ added new test
for deleting members with Stripe cancellation)
- Some tests called mockStripe at the beginning, but that method did
nothing apart from disabling network (which is the default now), then
they mocked Stripe inside the tests file... so I've removed those
because those conflict with the new mocker that is enabled when calling
mockStripe. We'll need to port those over later.
2023-03-10 18:43:35 +01:00
Ghost CI
c5b116e2b0 v5.38.0 2023-03-10 16:00:46 +00:00
Rishabh Garg
c71582877c
Added page attribution to member email alerts (#16381)
refs https://github.com/TryGhost/Team/issues/2489

- adds attribution title and url for new free members and paid subscriptions to email alert

---------

Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
2023-03-10 20:14:53 +05:30
Daniel Lockyer
89493893d1 Removed all unused variables from test files
- this cleans up all imports or variables that aren't currently being used
- this really helps keep the tests clean by only allowing what is needed
- I've left `should` as an exemption for now because we need to clean up
  how it is used
2023-03-10 14:29:55 +01:00
Daniel Lockyer
42333a3349 Removed custom assertions
- these are no longer used in favor of snapshots in tests
2023-03-10 14:29:55 +01:00
Daniel Lockyer
08f84475e7 Removed sleep lib from test utils
- this is generally an anti-pattern in tests and leads to flaky
  behaviour when tests are ran on different machines/loads
- this is currently unused so it is an easy removal
2023-03-10 14:29:55 +01:00
Elena Baidakova
6f9f83bee8 Revert "Removed explicit timeout for offer creation helper"
This reverts commit ac427e4253.
2023-03-10 13:44:45 +04:00
Elena Baidakova
ac427e4253 Removed explicit timeout for offer creation helper
refs TryGhost/Team#2667
- Removed timeout to make it the same as a global one
2023-03-10 13:24:38 +04:00
Daniel Lockyer
8df5b1a974 Refactored events wrapper into class
- we have our own class in order to add the `hasRegisteredListener`
  function
- this commit refactors the implementation to use the class syntactic
  sugar, which means we get better editor autocomplete
- this shouldn't change the functionality
2023-03-10 10:19:05 +01:00
renovate[bot]
b93b38a8e8 Update @tryghost 2023-03-10 09:52:02 +01:00
Ronald Langeveld
ab01e4fcbf Added new Tier e2e test
refs https://github.com/TryGhost/Team/issues/1446

- Added a test for successfully creating a new tier.
2023-03-10 13:29:25 +08:00
Simon Backx
832610fd2a
🐛 Fixed retrying failed emails when rescheduling them (#16383)
fixes https://github.com/TryGhost/Team/issues/2560

When an email fails, and you reschedule the post, the error dialog was
shown (from the previous try). The retry button on that page allowed you
to retry sending the email immediately, which could be very confusing.

- The email error dialog is no longer shown for scheduled emails
- The email status is no longer polled for scheduled emails
- Retrying an email is not possible via the API if the post status is
not published or sent
- Added some extra snapshot tests
- When retrying an email, we immediately update the email status to
'pending' to have a better API response (instead of still returning
failed).
- Disabled email sending retrying in development (otherwise very hard to
test failed emails if it takes 10 mins before it gives up automatic
retrying)
2023-03-09 12:32:22 +01:00
Elena Baidakova
8b191a8d01 Removed all tiers archive from portal tests to reduce relation between tests
refs TryGhost/Team#2667
2023-03-09 12:55:27 +04:00
Ronald Langeveld
7539a681fe
Excludes sites with canonical_url meta from sitemap. (#16376)
closes https://github.com/TryGhost/Team/issues/2531

This commit fixes the issue where non-canonical URLs are included in the
XML sitemap, leading to poor SEO for our user's sites. The solution
implemented is to exclude any page or post that specifies a canonical
URL in its metadata from the sitemap.

To achieve this, a condition has been added to the 'addUrl' method,
which checks for the existence of a canonical URL in the metadata of the
resource being added to the sitemap. If a canonical URL is present, the
resource is excluded from the sitemap.

With this fix, our user's sites will have better SEO and improved search
engine visibility.
2023-03-09 16:38:43 +08:00
Steve Larson
cb05fae5a3
🐛 Fixed maintaining archived newsletter subscriptions for members (#16375)
refs #16355
-archived newsletters will no longer be unsubscribed when saving member
-fixed bug with initialMember load
-fixed errors in unit tests
2023-03-08 16:39:28 -06:00
Simon Backx
4184b279d2
🐛 Fixed HTML escaping when using outbound link tagging (#16380)
fixes https://github.com/TryGhost/Team/issues/2666

- Somehow occurrences of `&map_` got replaced with `&#x21A6;`
- Disables escaping &, ', " and other HTML characters when not needed
(escaping is already handled by mobiledoc/lexical)
- Bumps unit test coverage of link replacer to 100%
2023-03-08 16:30:54 +01:00
Elena Baidakova
00cda68125
Disabled fraud detection for e2e browser tests (#16379)
refs TryGhost/Team#2667
2023-03-08 16:01:08 +04:00
Simon Backx
3d89dbb775 Fixed whistelisted domains in Playwright tests and network connectivity
no issue

- Nock doesn't support multiple calls to enableNetConnect -> only the last one counts. This fixes that issue.
- Some tests interacted directly with nock instead of using the mockManager to restore everything.
2023-03-08 12:40:21 +01:00
Simon Backx
df9df4be80 Allowed Stripe network access in Playwright tests
no issue

Previous test change that blocks network access broke the Playwright tests, that need to access the Stripe checkout page.
2023-03-08 11:49:36 +01:00
Naz
831a76505c
Fixed root zip image/media/files copying during import
https://github.com/TryGhost/Toolbox/issues/523

- During import process of content files the files from the root directory were also copied over. This is causing chaos in the root of content folder with files that only needed for data import. For example, the csv files needed for Revue import were also copied over by "file importer" even though those do not belong to any content.
- Any content import files - images, media, files, should be in according folders in the imported zip file. The root files in the base zip directory are for data-related imports
2023-03-08 11:03:47 +08:00
renovate[bot]
ec869cfa0d
Update dependency mysql2 to v3.2.0 2023-03-07 23:33:30 +00:00
Simon Backx
38de815d98
Removed old email flow (#16349)
fixes https://github.com/TryGhost/Team/issues/2611

The old email flow is no longer used since we introduced the email stability flow. This commit removes the related code and tests. The general test coverage decreased a bit as a result, because the old email flow probably had a high test coverage. The new flow is in separate packages, so it couldn't contribute to a higher test coverage (but it does have 100% unit test coverage).
2023-03-07 16:08:40 +01:00
Simon Backx
3db434736b
🐛 Fixed replacements with fallback in plaintext newsletters (#16372)
fixes https://github.com/TryGhost/Team/issues/2683

When sending a newsletter with a replacement that has a fallback, the
replacement only happens in the HTML version of the newsletter. The
plaintext version isn't replaced.

This commit fixes the issue and adds some tests to make sure it doesn't
happen again.

The cause of the issue was that we used the original matched Regex text
to replace. But that was calculated on the HTML version, so double
quotes were encoded. This change updates the generated 'token' regex to
also match on both a double quote as the escaped double quote.
2023-03-07 15:34:43 +01:00
Simon Backx
f50224f445
Improved network access and mocking in tests (#16371)
refs https://github.com/TryGhost/Team/issues/2667

Some tests still accessed the internet. Now network access is disabled
by default. This change also introduces two helper methods related to
networking (mocking Slack and Mailgun).

This fixes two unreliable tests:
- Staff service was accessing a Slack test API -> timeout possible
- MentionSendingService was trying to send webmentions for every post
publish/change -> possible timeouts and job issues
2023-03-07 13:20:28 +01:00
Daniel Lockyer
b3d36709ab
Downgraded expect and @playwright/test packages
refs 6460522352

- these were both bumped around the time that Playwright browser tests
  started going awry, so they may be the cause of some random failures
2023-03-07 12:11:05 +01:00
Naz
bd9b76c5ec
Fixed inlined media storage path
refs https://github.com/TryGhost/Toolbox/issues/523

- When storing a Buffer through saveRaw the target path *has to* be relative path instead of a full path.
2023-03-07 18:42:58 +08:00
Simon Backx
b2e00221e1 Fixed MentionSendingService listening to events multiple times in tests
no issue
2023-03-07 11:24:02 +01:00
Naz
6d4dcdf45d
Extended external media inlining
refs https://github.com/TryGhost/Toolbox/issues/524

- We need to be able to inline external media in all internal resources: tags, users, post's meta fields.
- This change adds media inlining logic to all these resources
2023-03-07 15:22:56 +08:00
renovate[bot]
d140e656c5 Update dependency expect to v29.5.0 2023-03-07 06:49:58 +01:00
Daniel Lockyer
5a6b9e6d84
Added debug logging to measure model require time
- these models should be as lightweight as possible to require, so we
  need to measure how long they take
- this has already found a couple of models which need optimizing
2023-03-06 13:11:59 +01:00
Tim Gates
5394fa81fc
Fixed typos (#16359) 2023-03-06 13:11:45 +01:00