Commit Graph

29 Commits

Author SHA1 Message Date
Steve Larson
d696e8b2e2
Added support for TK tracking inside cards (#19247)
refs https://github.com/TryGhost/Product/issues/4209

- bumped Koenig packages
  - `koenig-lexical` added nested editor TK support
  - all packages dropped Node 16 support
- switched to using `isTKEnabled` prop and `<TKCountPlugin>`

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2023-12-06 11:32:36 +00:00
Kevin Ansfield
75672a902b
Enabled emoji picker in feature image caption (#18824)
closes https://github.com/TryGhost/Koenig/pull/1038

- updated `<KoenigLexicalEditorInput>` to load `<EmojiPickerPlugin>` and compose it into the editor unless used with `<KoenigLexicalEditorInput @emojiPicker={{false}} />`
- bumped Koenig packages so `EmojiPickerPlugin` is available to import from `koenig-lexical`
2023-11-01 21:22:56 +00:00
renovate[bot]
057d9599f5 Update TryGhost packages 2023-10-31 20:54:17 +01:00
renovate[bot]
24849d8787
🐛 Fixed indent behaviour for paragraphs (#18724)
no issue

- updates `@tryghost/koenig-lexical` with indent improvements
  - prevents indents on paragraphs/headings etc which are not supported when rendering for front-end display
  - improves indent behaviour for lists so <kbd>Tab</kbd> can be pressed anywhere in a list item to indent rather than only at the beginning of the list
2023-10-23 08:43:25 +00:00
renovate[bot]
93382df314
🐛 Fixed various editor issues (#18645)
closes https://github.com/TryGhost/Ghost/issues/18448

- improved slash menu positioning when opening at the bottom of a post
- fixed backspace sometimes deleting a preceding card (e.g. backspace at end of link inside a paragraph preceded by a card)
- fixed `?source=html` issues
  - images not rendering in front-end output after import
  - images wrapped in links losing their link after import
- fixed inline styles in HTML card content not displaying in the editor
- fixed broken help link in the email card
2023-10-19 19:17:23 +01:00
renovate[bot]
394c09be49 Update Koenig packages 2023-10-06 12:40:19 +01:00
renovate[bot]
991f815a51
Update Koenig packages (#18477)
[![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/kg-card-factory](https://togithub.com/TryGhost/Koenig/tree/master#readme)
([source](https://togithub.com/TryGhost/Koenig)) | [`4.0.10` ->
`4.0.11`](https://renovatebot.com/diffs/npm/@tryghost%2fkg-card-factory/4.0.10/4.0.11)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@tryghost%2fkg-card-factory/4.0.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@tryghost%2fkg-card-factory/4.0.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@tryghost%2fkg-card-factory/4.0.10/4.0.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@tryghost%2fkg-card-factory/4.0.10/4.0.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@tryghost/kg-default-cards](https://togithub.com/TryGhost/Koenig/tree/master#readme)
([source](https://togithub.com/TryGhost/Koenig)) | [`9.1.4` ->
`9.1.5`](https://renovatebot.com/diffs/npm/@tryghost%2fkg-default-cards/9.1.4/9.1.5)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@tryghost%2fkg-default-cards/9.1.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@tryghost%2fkg-default-cards/9.1.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@tryghost%2fkg-default-cards/9.1.4/9.1.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@tryghost%2fkg-default-cards/9.1.4/9.1.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>TryGhost/Koenig (@&#8203;tryghost/kg-card-factory)</summary>

###
[`v4.0.11`](https://togithub.com/TryGhost/Koenig/compare/@tryghost/kg-card-factory@4.0.10...@tryghost/kg-card-factory@4.0.11)

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

</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**: Never, 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://developer.mend.io/github/TryGhost/Ghost).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-06 10:53:31 +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
Steve Larson
fecd326510
📦 Updated koenig dependencies (#17728)
no refs
-contains multiple bug fixes and improvements
2023-08-15 11:38:41 -05:00
Steve Larson
8273671425
Updated bookmark card renderer (#17662)
refs https://github.com/TryGhost/Product/issues/3609
-reverted css changes
-reverted mobiledoc renderer
-made lexical renderer consistent with mobiledoc
-css classes were inverted for theme backwards compatibility
2023-08-10 13:41:59 +00:00
Steve Larson
c539417e89
🐛 Fixed bookmark card metadata styles (#17577)
refs TryGhost/Product#3609
- author and publisher styles were mixed up in mobiledoc
- made consistent for author coming after publisher for md and lexical
- updated renderer packages
2023-08-02 14:13:25 -05:00
Daniel Lockyer
d5cbb33e54 Pinned dependencies 2023-07-24 16:21:47 +02: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
Ronald Langeveld
393055dd6c Bumped koenig related packages
no issue
2023-05-30 08:00:42 +02:00
renovate[bot]
07545541a8 Update @tryghost 2023-04-07 13:47:12 +02:00
renovate[bot]
83373e1751 Update Test & linting packages 2023-04-05 15:16:08 +02:00
Simon Backx
db589b1ad4 Fixed random unit test failure for revue importer
refs https://github.com/TryGhost/Ghost/actions/runs/4477418718/jobs/7868921949

This test used the current time, and this resulted in a `AssertionError [ERR_ASSERTION]: '2023-03-21T09:28:29.837Z' == '2023-03-21T09:28:29.838Z'` in rare situations.
2023-03-21 10:46: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]
2223db5379
Update Test & linting packages 2023-03-13 02:36:20 +00:00
renovate[bot]
b93b38a8e8 Update @tryghost 2023-03-10 09:52:02 +01:00
renovate[bot]
9f08732039 Update @tryghost 2023-03-02 09:47:02 +01:00
Daniel Lockyer
aa08fc72e7 Updated Koenig packages
refs https://github.com/TryGhost/Toolbox/issues/488

- these packages add support for Node 18 and drop support for Node 12
2023-01-04 11:27:39 +01:00
Paul Davis
8db947cd24
Trim generated post slug length in Revue importer (#16065)
refs: 5f90baf6fe

- Ghost has a character limit on post slugs of 191 characters,
- Sometimes, the slug that is generated from the title in Revue content is longer than this, causing the import to fail. 
- This PR trims that generated post slug to 190 characters.
2023-01-03 20:15:32 +00:00
Daniel Lockyer
08b786af3b Bumped TryGhost-owned dependencies and lockfile
- this was all getting terribly behind so I've done several things:
  - majority of `@tryghost/*` except Lexical packages
  - gscan + knex-migrator to remove old `@tryghost/errors` usage
  - bumped lockfile
2023-01-02 20:55:22 +01:00
renovate[bot]
9ec6a7320a
Update dependency sinon to v15.0.1 2022-12-15 21:03:48 +00:00
Hannah Wolfe
3ee0b813b6
Updated to use proper members importer for Revue (#16018)
refs:
5f90baf6fe

- The OG implementation of importing revue subscribers was very naive
- This sures it up to use our proper member importer, which makes sure
everything works perfectly:
  - adds an import label
  - ensures members are subscribed to newsletters

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2022-12-15 20:29:08 +00:00
Paul Davis
ecd2083745
Handle blockquotes & empty paragraphs (#16019)
refs: 5f90baf6fe

- Blockquotes without any wrapping tag get converted to Mobiledoc weirdly. Wrapping them in `<p>` tags helps solve that
- Also removes empty paragraph tags which cause unwanted large blank spaces in content
- Remove internal #revue from Revue content
2022-12-15 19:28:48 +00:00
Hannah Wolfe
5f90baf6fe
Added Revue Importer (#16012)
refs: https://www.getrevue.co/app/offboard

- Revue is stopping all paid subscriptions on 20th Dec, and shutting down on Jan 18th.
- This update allows Ghost to accept and handle the zip file Revue are providing as an export in Labs > Importer
- It will import posts (as best as we can with the data provided) and subscribers as free members
- At present it doesn't import paid subscribers, as we don't have that info, but you can disconnect Revue from your Stripe account to prevent all your subscriptions being cancelled & there's the option this can be fixed later
- There will be further updates to polish up this tooling - this is just a first pass to try to get something in people's hands

Co-authored-by: Paul Davis <PaulAdamDavis@users.noreply.github.com>
2022-12-15 17:22:54 +00:00