Commit Graph

3313 Commits

Author SHA1 Message Date
Daniel Lockyer
d7a523a7c2
Updated lockfile 2023-05-19 16:25:58 +02:00
renovate[bot]
a1dc3d4f33 Update dependency typescript to v5.0.4 2023-05-19 12:39:23 +02:00
renovate[bot]
b373c8911e Update storybook monorepo to v7.0.12 2023-05-19 12:04:46 +02:00
renovate[bot]
39453b678b Update dependency vitest to v0.31.1 2023-05-19 11:50:49 +02:00
Ronald
d7cf8f0a65 Updated kg dependencies
no issue
2023-05-17 15:58:51 +02:00
Ronald
72ba157987 Revert "Bumped kg-default-nodes"
This reverts commit ab5b6c7b84661f6ce5387ae4ec9b4962790b3f43.
2023-05-17 15:58:51 +02:00
Ronald
6bf6fde7e2 Bumped kg-default-nodes
no issue
2023-05-17 15:58:51 +02:00
Rishabh
3d6fb0d6b1 Added new package for admin-x settings
refs https://github.com/TryGhost/Team/issues/3151

- adds a new vite + typescript + storybook + TW package for setting up admin settings in react with base config that works with Ghost monorepo
- includes base components/design system for new settings UI
- adds eslint rule config to the package to match rest of Ghost codebase
- this is an experimental package as we figure out the best patterns for new admin packages in Ghost monorepo

Co-authored-by: Peter Zimon <zimo@ghost.org>
2023-05-16 12:23:24 +05:30
renovate[bot]
4ffdd27f0a Update dependency vite to v4.3.6 2023-05-15 20:15:31 +02:00
renovate[bot]
e66d335aef Update dependency semver to v7.5.1 2023-05-15 15:13:17 +02:00
renovate[bot]
f29f011919 Update dependency @types/sinon to v10.0.15 2023-05-15 15:12:50 +02:00
renovate[bot]
25dd51aa82 Update dependency cross-fetch to v3.1.6 2023-05-15 15:12:41 +02:00
Chris Raible
58ffd1cfeb
Bumped kg-default-nodes and kg-lexical-html-renderer (#16785)
no issue

- bumped kg-default-nodes to 0.0.41
- bumped kg-lexical-html-renderer to 0.1.37
2023-05-12 18:20:54 -07:00
renovate[bot]
aa85263cb2 Update dependency express-lazy-router to v1.0.5 2023-05-12 13:55:57 +02:00
renovate[bot]
1fbf28618c Update dependency lib0 to v0.2.74 2023-05-12 11:47:38 +02:00
renovate[bot]
36b26611a4 Update dependency @babel/eslint-parser to v7.21.8 2023-05-12 11:30:55 +02:00
renovate[bot]
4ca5817286 Update dependency express-jwt to v8 2023-05-12 11:14:05 +02:00
renovate[bot]
763b3c50fc Update dependency vite-plugin-svgr to v3 2023-05-12 11:11:56 +02:00
renovate[bot]
3920d217c0 Update dependency jsdom to v22 2023-05-11 14:40:08 +02:00
Fabien 'egg' O'Carroll
d3432399c7
Bumped knex-migrator & gscan to latest versions (#16770)
These versions use the latest version of @tryghost/errors, which uses
the correct import for @stdlib/utils-copy. This should hopefully stop
missing module errors when running locally.
2023-05-10 10:13:02 -04: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]
35d02fd3ec Update dependency vite-plugin-css-injected-by-js to v3.1.1 2023-05-09 12:51:52 +02:00
Sag
f560a334cc
Bumped Lexical packages (#16756)
no issue

- Bumped default config for koenig-lexical to ~0.2
2023-05-08 18:39:14 +02:00
Daniel Lockyer
799561aaec
Reduced Sharp concurrency to test alleviating memory fragmentation
refs 9d104c8511

- we've seen recurring instances where Ghost will hog memory after image
  uploads
- we use `jemalloc` to try and help this, but it still seems to happen
- according to the sharp thread referenced in my commit above, memory
  fragmentation can also be helped by reducing the concurrency within
  sharp
- this is a bit of an experiment and we can revert if it causes issues
2023-05-08 10:51:56 +02:00
renovate[bot]
6518d2ccae Update dependency i18next-parser to v8 2023-05-08 07:01:20 +02:00
renovate[bot]
6d78512a4b Update dependency vite to v4.3.5 2023-05-05 16:04:32 +02:00
Daniel Lockyer
cf41c3ad54
Removed final declaration of oembed-parser
refs 27e4523aec

- we no longer use `oembed-parser`, so we can remove it from
  package.json
- also pins the `@extractus/oembed-extractor` package and adds it into
  `@tryghost/oembed-service` where it was missing
2023-05-05 10:48:16 +02:00
renovate[bot]
0cdf555758 Update dependency vitest to v0.31.0 2023-05-05 09:48:36 +02:00
renovate[bot]
5d392bbe57 Update dependency lerna to v6.6.2 2023-05-05 07:36:31 +02:00
Chris Raible
27e4523aec
🐛 Improved error message for unauthorized YouTube embeds (#16374)
refs TryGhost/Ghost#16048

- When attempting to embed a Youtube video that has had embedding
disabled by its owner/author, Ghost displayed a generic error message
that didn't indicate the reason for the failed emebed.
- This change updated the error message when Youtube (or any provider)
returns 401: Unauthorized to indicate that the owner of the resource has
explicitly disabled embedding.
2023-05-04 16:04:58 -07:00
renovate[bot]
b407676b94 Update dependency vite to v4.3.4 2023-05-04 07:19:15 +02:00
Daniel Lockyer
53071dccd6
Updated lockfile 2023-05-03 21:40:28 +02:00
Fabien "egg" O'Carroll
b9565bc290 Migrated @tryghost/post-revisions to TypeScript!
This is an initial start to using TypeScript in our non-core Ghost packages.

- Adds a prepare script to build the project after installing deps
- Adds an initial tsconfig.json which is compatible with our node env
- Migrates all of the code to TypeScript, including tests
- Updates tests to use ts-node so that we don't need to compile the tests
- ts-node is installed at the top level because the env is weird with lerna and
  doesn't work otherwise
- Updates the yarn dev script to build the project with the --all and --revisions flag
2023-05-03 14:32:31 -04:00
Simon Backx
1b38361211 Updated @sentry/node to v7.50.0 and reenabled renovate again
fixes https://github.com/TryGhost/Team/issues/2385

The Sentry version has been locked to v7.11.1 for some time because Sentry still used a legacy Node feature, called domains. Due to a bug or change in in Noide 16+, those domains broke handling uncaught promise execptions. So Ghost crashed when a promise exception wasn't caught. But that shouldn't be the case because we have a global uncaught exception handler.

Luckily Sentry switched to AsyncLocalStorage in v7.48.0. This fixes the issue as demonstrated in c0cd62184c
2023-05-02 10:23:45 +02:00
renovate[bot]
e7cef15bdf Update dependency jsdom to v21.1.2 2023-05-01 18:22:36 +02:00
renovate[bot]
67abd6555b Update CSS preprocessors 2023-05-01 16:43:16 +02:00
renovate[bot]
eff4662af3 Update dependency @types/sinon to v10.0.14 2023-05-01 15:01:17 +02:00
renovate[bot]
8ca3f301ae Update dependency date-fns to v2.30.0 2023-05-01 15:00:19 +02:00
renovate[bot]
60d26c62e8 Update dependency vite to v4.3.3 2023-05-01 08:57:56 +02:00
renovate[bot]
f4cc04d235 Update dependency @playwright/test to v1.33.0 2023-05-01 08:57:43 +02:00
renovate[bot]
235b39ab7a Update sentry-javascript monorepo to v7.49.0 2023-04-26 10:30:25 +02:00
renovate[bot]
2a2c8efaea Update dependency vite to v4.3.2 2023-04-26 10:30:12 +02:00
renovate[bot]
bcc2e06063 Update dependency @vitejs/plugin-react to v4 2023-04-26 10:29:12 +02:00
renovate[bot]
52b7086d1d Update dependency semver to v7.5.0 2023-04-26 10:14:22 +02:00
renovate[bot]
48ebe66208 Update sentry-javascript monorepo to v7.48.0 2023-04-26 10:14:04 +02:00
renovate[bot]
95b4d48c39 Update dependency vite to v4.2.2 2023-04-26 10:13:40 +02:00
renovate[bot]
31ae31a13d Update dependency tailwindcss to v3.3.2 2023-04-26 06:36:40 +02:00
Naz
cddf786424
Added filtering of announcement bar content
refs https://github.com/TryGhost/Team/issues/3051

-  We need to show the announcement_content to specific audiences based on the announcement_visibility filter
2023-04-21 13:46:37 +02:00
Sag
06610e150a Bumped lexical packages
no issue
2023-04-20 10:54:16 +01:00
Elena Baidakova
9c59fbfb52 Bumped Lexical packages
no issue
2023-04-20 10:58:09 +04:00
Sag
932bfef27a
Bumped Lexical packages (#16661)
no issue
2023-04-18 13:42:05 +01:00
Elena Baidakova
b7f091f732 Updated lexical packages
no issue
2023-04-18 13:23:02 +04:00
Steve Larson
8a563910d3 updated lexical packages
no refs
2023-04-17 16:24:36 +01:00
Elena Baidakova
7f184d2451
Added support for filtering snippets to mobiledoc/lexical (#16636)
refs TryGhost/Team#2904


<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at b3f5423</samp>

This pull request adds support for multiple formats of snippet content,
especially the `lexical` format, to the Ghost CMS. It modifies the
snippets API, model, and test files to handle the format conversion,
filtering, and serialization of snippets.
2023-04-17 10:54:08 +04:00
Sag
1d19021606
Bumped Lexical packages (#16626)
no issue
2023-04-13 10:47:22 +02:00
Kevin Ansfield
b286faf011
Initial setup for Lexical multiplayer websockets service (#16611)
no issue

Rough prototype only, current limitations:
- **No persistence**. Docs are in-memory only, YJS state will be lost on server restart although it could be re-populated by clients if they reconnect without closing their local doc (needs testing/investigation)
- **No tie-in with saved lexical state**. Lexical state is updated in the post model via normal API requests from Admin which can mean the multiplayer doc and the saved lexical state become out of sync but there's no detection/indication of that state at present. Will also trigger the "someone else is editing" errors because multiplayer doesn't yet override the default post update collision detection
- **New posts don't start in multiplayer**. New posts don't have an ID and so can't have a respective YJS doc, after initial save we don't transition to multiplayer because the React component in Ember doesn't re-render on prop changes yet
- **No tests**. Experimental code just to get something working and help answer questions for what's next

Changes:
- added `lexicalMultiplayer` labs flag
- updated `<KoenigLexicalEditor>` to pass through the required `<KoenigComposer>` props for multiplayer when enabled
- added `lexical-multiplayer` service
  - `init()` called during boot, used to set up the `enable()` and `disable()` methods so the flag can be toggled without restarts
  - when enabled it adds `upgrade` request handling to the base Ghost server
    - returns 404 if the URL doesn't match `/ghost/api/admin/posts/multiplayer/*`
    - returns 401 if a valid session cookie is not present
    - if everything is good, hands off to code in `y-websocket.js` that handles YJS doc creation, awareness, keepalive, etc
    - uses doc names in the format `${post.id}/${docId}` where `docId` is `main` for the primary document and a GUID for any sub-documents like captions and nested editors in cards
- updated `SettingsBREADService` to check if the `labs` setting is changed, and enables/disables the `lexical-multiplayer` service as needed so the websockets server can be started and shutdown when toggling without requiring a restart
2023-04-12 20:24:02 +01:00
Jonathan Noack
dd5fd20cf9
Renamed Kiev to Kyiv in site timezone select (#16619)
closes https://github.com/TryGhost/Ghost/issues/16603

- Updates the timezone data used by Ghost to the latest version, which fixes the spelling of Kyiv in the timezone select.
2023-04-12 17:54:13 +02:00
Elena Baidakova
100b4880ee Bump Koenig packages
no issue
2023-04-11 18:08:30 +04:00
renovate[bot]
ee216038e9 Update dependency @tryghost/email-mock-receiver to v0.3.1 2023-04-11 11:47:08 +02:00
renovate[bot]
4b8f631563 Update dependency @playwright/test to v1.32.3 2023-04-11 11:14:38 +02:00
renovate[bot]
88e1f2c50f Update dependency semver to v7.4.0 2023-04-11 11:01:01 +02:00
Sag
ed28bba94d
Upgraded Lexical packages (#16600)
no issue
2023-04-10 10:39:15 +02:00
renovate[bot]
3b8eea2c01 Update dependency html-validate to v7.15.1 2023-04-10 10:25:09 +02:00
renovate[bot]
11aacc0e6b Update dependency copy-webpack-plugin to v11 2023-04-07 13:47:46 +02:00
renovate[bot]
07545541a8 Update @tryghost 2023-04-07 13:47:12 +02:00
renovate[bot]
9e888aeb15 Update dependency @babel/eslint-parser to v7.21.3 2023-04-07 13:43:07 +02:00
Naz
3f78e959b3
Bumped email-mock-receiver
refs https://github.com/TryGhost/Team/issues/2691

- This bump changes the "sentEmailCount" method to a more descriptive "assertSentEmailCount" and adds chaining to this method.
2023-04-06 22:13:17 +02:00
naz
70ae3efd5c
Update email mock receive (#16578)
refs TryGhost/Team#2691

- The bump adds possibility to make email's html/text snapshots with dynamic content. The breaking change here is with separate "matchPlaintextSnapshot" method extracted out of "matchMetadataSnapshot" to handle dynamic content in "text" part of the sent email.
2023-04-06 17:24:23 +02:00
renovate[bot]
95308573fd Update dependency cssnano to v6 2023-04-05 18:24:03 +02:00
renovate[bot]
21516bfe11 Update sentry-javascript monorepo to v7.47.0 2023-04-05 18:23:06 +02:00
Sanne de Vries
92663ea731
Fixed email width and dark mode images in email template (#16566)
Refs https://github.com/TryGhost/Team/issues/2845

---------

Co-authored-by: Fabien "egg" O'Carroll <fabien@allou.is>
Co-authored-by: Simon Backx <simon@ghost.org>
2023-04-05 15:53:51 +02:00
renovate[bot]
3d5da1b091 Update dependency webpack to v5.77.0 2023-04-05 15:16:30 +02:00
renovate[bot]
83373e1751 Update Test & linting packages 2023-04-05 15:16:08 +02:00
Sag
8f6c3c12e2
Upgraded Lexical packages (#16564)
no issue
2023-04-05 15:00:26 +02:00
renovate[bot]
254533ad92 Update dependency @playwright/test to v1.32.2 2023-04-05 14:49:19 +02:00
renovate[bot]
bcd9e2196b Update vitest monorepo to v0.29.8 2023-04-05 14:10:08 +02:00
Daniel Lockyer
19445c13f2
Updated lockfile 2023-04-05 13:47:14 +02:00
Daniel Lockyer
b64d32cc26 Removed heavy dependency within @tryghost/errors
- we previously used `@stdlib/utils` instead of the child package
  `@stdlib/copy`, which is a lot smaller and contains our only use of
  the parent
- this saves 140+MB of dependencies
2023-04-05 13:46:15 +02:00
renovate[bot]
e5084a23e6 Update dependency html-validate to v7.14.0 2023-04-05 13:33:05 +02:00
renovate[bot]
1a1286b150 Update metascraper to v5.34.2 2023-04-05 13:25:45 +02:00
renovate[bot]
aaf2ee96c0 Update dependency lerna to v6.6.1 2023-04-05 12:03:30 +02:00
renovate[bot]
101fd6f885 Update dependency terser to v5.16.8 2023-04-05 12:01:27 +02:00
renovate[bot]
5b7df1a7d0 Update dependency i18next to v22.4.14 2023-04-05 11:48:26 +02:00
renovate[bot]
24df14a3dc Update dependency tailwindcss to v3.3.1 2023-04-05 11:21:22 +02:00
renovate[bot]
871379d872 Update dependency concurrently to v8 2023-04-05 11:20:47 +02:00
renovate[bot]
c975e9af00 Update sentry-javascript monorepo to v7.46.0 2023-04-05 10:32:46 +02:00
Daniel Lockyer
7ec2656495 Added yarn resolution for @tryghost/errors
- we keep ending up with multiple versions of the depedency in our tree,
  and it's causing problems when comparing instances
- the workaround I'm implementing for now is to bump the package
  everywhere and set a resolution so we only have 1 shared instance
- hopefully we can come up with a better method down the line
2023-04-05 09:34:50 +02:00
Sanne de Vries
57fcfe76d8
Updated images in email template to be work with light/dark mode
refs https://github.com/TryGhost/Team/issues/2845

We needed to update the html out of the cards to include images for light
and dark mode, and then we've used CSS to show/hide them 

Co-authored-by: Fabien "egg" O'Carroll <fabien@allou.is>
2023-04-04 00:32:08 +07:00
Sag
3393d3910c
Upgraded Koenig packages
no issue
2023-04-03 11:33:43 +02:00
Sagar Gupta
0c8f75686b Fixed Public Preview Card in Lexical 2023-04-03 10:04:37 +02:00
Daniel Lockyer
97fc422835
Updated lockfile 2023-03-30 18:16:55 +02:00
Paul Davis
86027fdb6f
Add Migrate app (#16458)
Adds the UI for self-serve migrations
2023-03-30 15:40:06 +01:00
Fabien 'egg' O'Carroll
0f72816951
Newsletter email template customisation (#16523)
Refs https://github.com/TryGhost/Team/issues/2845

Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
2023-03-30 15:33:46 +02:00
Chris Raible
3236891b80
Fixed admin coverage reporting (#16512)
no issue

- Renovate merged in a breaking change to ember-cli-code-coverage which
broke our coverage reporting for the admin app
- This commit fixes the issue by pinning the version of
ember-cli-code-coverage to the last working version and telling renovate
to ignore it in the future
- It also adds html coverage reporting to make it easier to run locally
and see your coverage before pushing
2023-03-28 11:07:28 -07:00
Rishabh Garg
2e2b3c7c0f
Fixed LinkReplacer bug causing broken links on published post/page (#16514)
refs TryGhost/Team#2840

- moves the `entities.decode()` step to the `LinkReplacer` class so that
it's applied to all links, not just the ones that are replaced in the
email service
- adds a test case to `LinkReplacer` to ensure that the
`entities.decode()` step is applied to all links correctly, decoding any
URLs with HTML entities in them

---------

Co-authored-by: Chris Raible <chris@ghost.org>
2023-03-28 15:59:15 +05:30
Ronald Langeveld
fe31898dcd Bumped koenig lexical packages
no issue

- Bumped kg-default-nodes to make compatible with the latest cards
2023-03-28 15:47:46 +08:00
Chris Raible
64c9e66b56
🐛 Fixed broken link tracking in newsletters (#16473)
refs https://github.com/TryGhost/Team/issues/2805

When we render mobiledoc to HTML, it automatically escapes HTML entities in the process, so a button or directly pasted link with href="https://example.com?code=test" will be rendered as href="https://example.com?code&#x3Dtest" as the url is encoded in the rendered HTML. Our link tracking was using the encoded URL as the redirect URL in newsletters, causing certain links to break.

This change updates the link tracking to decode the URL with `entities.decode(url)` so we store the correct redirect URL in our DB and ensure link tracking redirects to the correct url from newsletters.

---------

Co-authored-by: Rishabh <zrishabhgarg@gmail.com>
2023-03-24 18:44:55 +05:30
Sagar Gupta
5bd558ddf1 Added Toggle Card (first version) 2023-03-24 12:42:58 +01:00
Daniel Lockyer
045e1ee33d Disabled got retries in testing environment
- by default, got retries failed requests, which is causing issues in
  tests because we've disabled the network with `nock`
- this is causing huge idle time because got pauses before retrying
- this change disables the retries if we're running tests, so things are
  more stable
2023-03-24 11:55:57 +01:00
renovate[bot]
eb1d63eac0
Update dependency @isaacs/ttlcache to v1.2.2 2023-03-23 20:20:25 +00:00