Commit Graph

126 Commits

Author SHA1 Message Date
renovate[bot]
be70064716
Pinned dependency html-validate to 7.3.3 (#15384)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-08 10:30:07 +01:00
Simon Backx
4534b693e4
Added test that validates output HTML of email template (#15365)
refs https://github.com/TryGhost/Team/issues/1871

This commit adds a test to the serialize method of `post-emaiserializer`. It checks whether the generated email HTML is valid and standard HTML5 and that all properties are escaped.

To do this validation, I depend on the new `html-validate` dev dependency. Just parsing the HTML with a HTML parser is not enough to guarantee that the HTML is okay.

Apart from that this fixes:
- Removed the sanitizeHTML method and replaced it with normal HTML escaping. We don't want to allow any HTML in the escaped fields. Whereas `sanitizeHTML` still allows valid HTML, but we don't want that and want the same behaviour as on the site. E.g., a post with a title `All your need to know about the <br /> tag` should actually render the same title and non-html content, being `All your need to know about the &lt;br /&gt; tag`
- The file, nft and audio card didn't (always) escape the injected HTML fields (new version @tryghost/kg-default-cards) 
- `@tryghost/string` is bumped because it contains the new escapeHtml method
2022-09-08 10:11:01 +02:00
renovate[bot]
3d76c89660 Update dependency @playwright/test to v1.25.2 2022-09-07 13:10:11 +01:00
renovate[bot]
5812e491d2 Update dependency uuid to v9 2022-09-07 13:06:48 +01:00
Kevin Ansfield
10946a56b2
🐛 Fixed product card images causing very wide emails in Outlook (#15374)
closes https://github.com/TryGhost/Team/issues/1873

- bumps `@tryghost/kg-default-cards` which amends the product card rendering to output adjusted `width` and `height` attributes and a resized `src` attribute on the `<img>` element
2022-09-06 19:36:19 +01:00
Daniel Lockyer
4a6f57b105
Merged v5.13.2 into main
v5.13.2
2022-09-06 16:45:52 +01:00
Ghost CI
d71efb128f v5.13.2 2022-09-06 16:32:05 +01:00
Daniel Lockyer
e0f86cb1cb
Merged v5.13.1 into main
v5.13.1
2022-09-06 10:12:54 +01:00
Ghost CI
da1997d96e v5.13.1 2022-09-06 09:53:23 +01:00
renovate[bot]
8c91f7b7d4 Update sentry-javascript monorepo to v7.12.1 2022-09-02 16:27:26 +01:00
Ghost CI
27704794d4 v5.13.0 2022-09-02 16:00:27 +01:00
Daniel Lockyer
dd2bfb8c0e
Merged v5.12.4 into main
v5.12.4
2022-09-02 15:13:37 +01:00
Ghost CI
c02646b31d v5.12.4 2022-09-02 15:04:07 +01:00
Kevin Ansfield
c220c1e288
🐛 Fixed image width/height and links not being preserved when pasting or importing html (#15350)
refs https://github.com/TryGhost/Koenig/issues/330
refs https://github.com/TryGhost/Koenig/issues/329

- bumps packages related to pasting content into the editor and importing content via the posts API with `?source=html`
2022-09-01 17:31:21 +01:00
Daniel Lockyer
df99e1aec3
Merged v5.12.3 into main
v5.12.3
2022-09-01 15:36:46 +01:00
Ghost CI
7650ecafeb v5.12.3 2022-09-01 15:36:17 +01:00
renovate[bot]
d0103a6b31 Update sentry-javascript monorepo to v7.12.0 2022-09-01 08:48:54 +01:00
renovate[bot]
36ac8ccb41
Update dependency knex to v2.3.0 2022-08-31 20:32:37 +00:00
renovate[bot]
87a97726c6
Update dependency human-number to v2.0.1 2022-08-31 19:21:36 +00:00
renovate[bot]
405d1acec5 Update dependency @tryghost/express-test to v0.11.3 2022-08-31 16:42:28 +01:00
Daniel Lockyer
7a2f766668
Added logging configuration option for timestamps to use the local timezone
fixes https://github.com/TryGhost/Ghost/issues/15190
refs https://github.com/TryGhost/framework/pull/76

- log output always uses UTC timestamps, but it may be desirable to
  configure logs to use the local machine timezone
- a new config option has been added to `@tryghost/logging` so you can
  switch the logs to the local timezone
- this commit bumps the package and sets the default config option to
  `false`, so it doesn't suddenly change the timezone of the logs
- docs will be updated soon but if you'd like to use the
  timezone-altered timestamps, you can set `logging.useLocalTime` to
  `true`
- credits to https://github.com/levee223 for the implementation and PR
2022-08-31 10:29:55 +01:00
Daniel Lockyer
e897efe842
Moved bundling to the end of prepack steps
- in its current form, bundling will happen before we build Admin
- Admin complains because the version in its package.json for
  `@tryghost/members-csv` is different to the one linked in the monorepo
- by putting bundling at the end, we write the new package versions
  after we've already built Admin, so this issue should go away
2022-08-31 08:48:47 +01:00
renovate[bot]
5a359be582 Update dependency knex-migrator to v5.0.4 2022-08-31 07:36:17 +00:00
Ghost CI
a2edc7ea1b v5.12.2 2022-08-30 16:58:26 +01:00
Daniel Lockyer
0b0401d593 v5.12.1 2022-08-30 11:56:45 +01:00
renovate[bot]
619af026d6
Update dependency luxon to v3.0.3 2022-08-29 18:37:24 +00:00
renovate[bot]
ced7f41112
Update Test & linting packages 2022-08-29 15:21:11 +00:00
renovate[bot]
ea5942ef3d
Update dependency luxon to v3.0.2 2022-08-29 00:09:28 +00:00
Daniel Lockyer
d986059a50 v5.12.0 2022-08-26 16:00:32 +01:00
Rishabh
281d52610f Added staff service to manage email alert notifications
refs TryGhost/Team#1826

- adds new service package that manages all the email alert notifications for free members and paid subscriptions
- includes email templates for free member signup and paid subscription start/cancel
- initializes staff service before members to allow managing email alert notifications
- passes staff service to members api for triggering alerts
2022-08-25 18:01:52 +05:30
Daniel Lockyer
ab8952dd46 v5.11.0 2022-08-24 15:04:56 +01:00
renovate[bot]
c860b5b715 Update dependency @playwright/test to v1.25.1 2022-08-24 08:42:13 +02:00
Daniel Lockyer
6ade771a9f v5.10.1 2022-08-19 17:50:40 +01:00
Daniel Lockyer
0df8ee8c72 v5.10.0 2022-08-19 16:02:37 +01:00
Simon Backx
da24d13601
Added member attribution events and storage (#15243)
refs https://github.com/TryGhost/Team/issues/1808
refs https://github.com/TryGhost/Team/issues/1809
refs https://github.com/TryGhost/Team/issues/1820
refs https://github.com/TryGhost/Team/issues/1814

### Changes in `member-events` package

- Added MemberCreatedEvent (event, not model)
- Added SubscriptionCreatedEvent (event, not model) 

### Added `member-attribution` package (new)

- Added the AttributionBuilder class which is able to convert a url history to an attribution object (exposed as getAttribution on the service itself, which handles the dependencies)
```
[{
    "path": "/",
    "time": 123
}]
```
to
```
{
    "url": "/",
    "id": null,
    "type": "url"
}
```

- event handler listens for MemberCreatedEvent and SubscriptionCreatedEvent and creates the corresponding models in the database.

### Changes in `members-api` package

- Added urlHistory to `sendMagicLink` endpoint body + convert the urlHistory to an attribution object that is stored in the tokenData of the magic link (sent by Portal in this PR: https://github.com/TryGhost/Portal/pull/256).
- Added urlHistory to `createCheckoutSession` endpoint + convert the urlHistory to attribution keys that are saved in the Stripe Session metadata (sent by Portal in this PR: https://github.com/TryGhost/Portal/pull/256).

- Added attribution data property to member repository's create method (when a member is created)
- Dispatch MemberCreatedEvent with attribution

###  Changes in `members-stripe-service` package (`ghost/stripe`)

- Dispatch SubscriptionCreatedEvent in WebhookController on subscription checkout (with attribution from session metadata)
2022-08-18 17:38:42 +02:00
Daniel Lockyer
f51226e5fb Organized package dependencies
- cleaned up unused dependencies
- adds missing dependencies that are used in the code
- this should help us be more explicit about the dependencies a package
  uses
2022-08-18 11:55:49 +02:00
renovate[bot]
0f998e30aa Update sentry-javascript monorepo to v7.11.1 2022-08-17 21:53:41 +02:00
renovate[bot]
79f28a82a3 Update sentry-javascript monorepo to v7.11.0 2022-08-17 21:16:25 +02:00
renovate[bot]
f348fc3223
Updated @tryghost dependencies (#15235)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-08-17 08:45:47 +02:00
Daniel Lockyer
d153b40c48 v5.9.4 2022-08-15 20:47:26 +01:00
Daniel Lockyer
d493fd7bf1 v5.9.3 2022-08-15 13:09:54 +01:00
Daniel Lockyer
fa6900b299 v5.9.2 2022-08-15 10:55:17 +01:00
renovate[bot]
7f5d95ffff Update @tryghost 2022-08-15 10:08:46 +02:00
renovate[bot]
7d3f5d3165 Update dependency eslint to v8.22.0 2022-08-15 10:07:34 +02:00
Daniel Lockyer
d2eda5cf51 Extracted oembed service to separate package
refs https://github.com/TryGhost/Toolbox/issues/363

- the oembed service is completely standalone and could do with some
  individual unit tests
- moving it out to a package allows us to draw the boundaries better and
  allows us to remove some dependencies from the core package.json
2022-08-15 10:07:06 +02:00
renovate[bot]
5250dd9a12 Update dependency cssnano to v5.1.13 2022-08-13 11:20:27 +02:00
Daniel Lockyer
54baa8d71e v5.9.1 2022-08-12 17:11:31 +01:00
Daniel Lockyer
b7ea57e2da
🐛 Fixed packaging issue with missing component
refs bf254b9c6a

- this was missing from the referenced commit in order to import the
  package into Ghost core
2022-08-12 17:48:40 +02:00
Daniel Lockyer
b06b7c5ddd v5.9.0 2022-08-12 16:00:29 +01:00
Daniel Lockyer
5f514a7d1b
Improved functionality of yarn setup
- we need to initialize the submodules in case they weren't done when
  cloning, otherwise Casper will be missing
- we can avoid doing an initial build because it'll get wiped when we do
  `yarn dev` anyway
2022-08-12 09:36:48 +02:00