Commit Graph

1618 Commits

Author SHA1 Message Date
Rishabh
4b315348aa Removed unused data queries for member identity
refs https://github.com/TryGhost/Team/issues/909

The request for fetching logged-in member data was making several extra DB queries to fetch data points that are not used on frontend, like `labels`, `products`, `stripe customer`. This refactor removes these extra data points and cuts DB queries in half for fetching logged in member.
2021-07-22 12:42:45 +05:30
Renovate Bot
49a1367ff0 Update CSS preprocessors 2021-07-22 08:11:11 +01:00
Renovate Bot
c4f2864cc6 Update dependency supertest to v6.1.4 2021-07-22 08:10:50 +01:00
Naz
57c4afdea2 Integrated @tryghost/members-importer
closes https://github.com/TryGhost/Team/issues/916

- The members importer module was extracted into an ouside module as per project structuring standards
2021-07-21 19:34:30 +04:00
Fabien O'Carroll
ba7ddc88c1 🐛 Fixed 500 error when creating Products
refs https://github.com/TryGhost/Team/issues/919

This version of @tryghost/members-api has a patch to the loading of the
benefits relation for products, which previously was erroring and
causing a 500 error.
2021-07-20 13:22:21 +01:00
Fabien 'egg' O'Carroll
264fb51a87
Exposed Members pub keys on /members/.well-known/ (#13163)
refs https://github.com/TryGhost/Team/issues/664

The new WellKnownController and middleware handles exposing a JSON Web
Key Set for us.

In order to serve the keys on /members/.well-known/jwks.json without a
trailing slash, we must mount the wellKnown middleware before the
frontend.
2021-07-20 13:19:31 +01:00
Kevin Ansfield
ea3bf8ad7f Bumped Koenig-related packages
refs https://github.com/TryGhost/Team/issues/910

- fixed missing `alt` attributes on images in bookmark cards
- added `email-cta` card
- dropped node 10 support
2021-07-20 12:20:36 +01:00
renovate[bot]
6646c1bb65
🐛 Fixed member cookies remaining after signout
refs https://github.com/TryGhost/Team/issues/908

The `cookies` module inside `@tryghost/members-ssr` was being used incorrectly
and resulted in cookies being set with `'[Object object]'`

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-07-20 11:16:00 +01:00
Thibaut Patel
8425fb480d 🐛 Fixed gscan path issues on windows
issue https://github.com/TryGhost/Team/issues/901

- The main issue was in the AST linter, where partials could have either forward- or backward-slash separators depending on the operating system. We have normalized all partial names to only have forward-slashes, which matches the handlebars syntax, like `{{> icons/avatar}}`.
- The second issue was in the 005-template-compile, where we wouldn't check partials even though they were used. This also comes from the path separator difference.
- We have also updated all regular expressions to account for paths with backward-slashes
2021-07-19 18:17:17 +02:00
Renovate Bot
ab4694db47
Update dependency eslint-plugin-ghost to v2.6.0 2021-07-19 12:50:50 +00:00
Rishabh
41717a53a0 Fixed migration to avoid incorrect default prices
refs https://github.com/TryGhost/Team/issues/778

- cleans up the stripe migration to add default monthly/yearly prices for sites, which had a possibility of using complimentary (0 amount prices) in edge cases
- adds missing return in the same migration for an unlikely failure to parse stripe plans
2021-07-19 18:19:17 +05:30
Renovate Bot
dbf6c783a5
Update metascraper to v5.22.11 2021-07-19 11:38:44 +00:00
Renovate Bot
846db16071 Update dependency analytics-node to v5 2021-07-19 11:28:51 +01:00
Renovate Bot
21fcdaa69b Lock file maintenance 2021-07-19 11:26:48 +01:00
Renovate Bot
566615f014 Update dependency jwks-rsa to v2.0.4 2021-07-19 08:16:08 +01:00
Renovate Bot
97f19b1650
Update dependency eslint to v7.31.0 2021-07-19 01:06:44 +00:00
renovate[bot]
a292a4ba18
Update dependency eslint-plugin-ghost to v2.5.0 (#13149)
Co-authored-by: Renovate Bot <bot@renovateapp.com>

This version of eslint contains changes for Admin only
2021-07-16 13:13:04 +01:00
Fabien 'egg' O'Carroll
81e7d71391
Fixed created_at dates for member events on import (#13151)
refs https://github.com/TryGhost/Team/issues/542

The members-api has been updated to use the passed `created_at`
property when creating members for the status change events, as well as
using the subscription start_date for members paid subscription events

This is a duplicate of 7eb821b3f5 but
with updated dependencies.
2021-07-16 12:06:46 +01:00
Fabien O'Carroll
768709ce88 Revert "Fixed created_at dates for member events on import"
This reverts commit 7eb821b3f5.

This package version is broken.
2021-07-15 18:45:47 +01:00
Fabien O'Carroll
7eb821b3f5 Fixed created_at dates for member events on import
refs https://github.com/TryGhost/Team/issues/542

The members-api has been updated to use the passed `created_at`
property when creating members for the status change events, as well as
using the subscription start_date for members paid subscription events
2021-07-15 17:44:22 +01:00
Renovate Bot
167da5addd Update dependency @tryghost/root-utils to v0.3.2 2021-07-12 13:45:09 +01:00
Renovate Bot
494de507a8 Update dependency @tryghost/validator to v0.1.3 2021-07-12 13:44:54 +01:00
Renovate Bot
16649386b7 Update dependency @tryghost/version to v0.1.2 2021-07-12 13:16:54 +01:00
Renovate Bot
0750e37793
Update dependency @sentry/node to v6.9.0 2021-07-12 11:02:08 +00:00
Renovate Bot
65111c9464 Update dependency @tryghost/logging to v0.1.4 2021-07-12 10:41:34 +01:00
Renovate Bot
571e63691e Update dependency @tryghost/request to v0.1.3 2021-07-12 10:41:24 +01:00
Renovate Bot
b4f6985634 Update dependency @tryghost/debug to v0.1.3 2021-07-12 10:41:06 +01:00
Renovate Bot
74c956d06b Lock file maintenance 2021-07-12 04:06:17 +00:00
Renovate Bot
a494f3d3ac
Update metascraper 2021-07-12 00:37:41 +00:00
Thibaut Patel
92b55b7b01 🐛 Fixed a gscan bug that was causing Ghost to throw http 500s.
refs https://github.com/TryGhost/Team/issues/864

- gscan was breaking when parsing double-quoted helpers like `{{"pagination"}}`.
- re-used a function to convert StringLiterals to PathExpressions, which fixes the issue.
2021-07-09 11:06:59 +02:00
Renovate Bot
2ffad75b9d
Update metascraper to v5.22.7 2021-07-08 20:16:37 +00:00
Sam Lord
cfc8b2152a 🐛 Upgrade Gscan to 4.1.1
issue TryGhost/Team#864

Use latest gscan to fix issue where custom themes didn't work
2021-07-08 10:54:33 +01:00
Thibaut Patel
2e731f91a7 Revert " Added detection of conditional partials in themes"
This reverts commit 4c551fcde6.
2021-07-08 09:54:05 +02:00
Hannah Wolfe
0f9e3ea8df
Removed grunt-mocha-cli
- we no longer rely on grunt for any testing, and call mocha directly
2021-07-07 09:19:13 +01:00
Renovate Bot
afb81a5c73 Update dependency @tryghost/members-csv to v1.1.1 2021-07-06 16:26:54 +01:00
Fabien O'Carroll
feae70d7c1 Restricted Stripe Checkout to Members without products
refs https://github.com/TryGhost/Team/issues/858

Previously when complimentary access used a Stripe subscription under
the hood, we were able to restrict access to Stripe Checkout based on
whether or not a Member had an active Stripe subscription. This updates
the logic in members-api to instead check for whether or not the member
has 1-or-more products.
2021-07-06 14:21:55 +01:00
Renovate Bot
59dc2a9bc9 Update dependency @tryghost/magic-link to v1.0.5 2021-07-06 14:05:58 +01:00
Renovate Bot
6aeb5af454 Update dependency @tryghost/members-ssr to v1.0.5 2021-07-06 14:05:48 +01:00
Fabien O'Carroll
904a10a2ec Supported 'comped' status in MemberRepository
refs https://github.com/TryGhost/Team/issues/790

This makes the create, update & linkSubscription methods correctly
handle the comped status for members.
2021-07-06 12:02:15 +01:00
Rishabh
ec7cf99279 Updated missing yarn lock changes
no refs

- cleans up the yarn lock file with missing dependency changes from previous commits.
2021-07-06 13:15:56 +05:30
Rishabh
6988dadb1e Added visibility filter string to post/page admin schema
refs https://github.com/TryGhost/Team/issues/849

With multiple products back behind alpha flag, we want to bring back segmented post access for members which allows site owners to set post access to specific products. This change -

- updates admin-api-schema to allow `visibility_filter` attribute to post/page response
2021-07-05 17:10:45 +05:30
Renovate Bot
fec534f833
Pin dependency mocha-slow-test-reporter to 0.1.2 2021-07-05 09:53:57 +00:00
Hannah Wolfe
8f496fb447
Added yarn test:slow tool to show slow tests
- We have a lot of tests, so it can be hard to see if any are problematic
- We have a problem with some tests being too slow, this highlights these in particular
- Very slow tests that take seconds are not really unit tests, we should look for different ways to run these
- Also we should tailor our mocha settings more, so that we have more lenient settings for acceptance/regression tests but not for unit tests
- Note: You have to wait for all tests to run to see the output
2021-07-05 10:42:27 +01:00
Renovate Bot
4a27096af5 Update dependency nock to v13.1.1 2021-07-05 08:45:28 +01:00
Renovate Bot
4ae5cff740 Update dependency @tryghost/helpers to v1.1.49 2021-07-05 08:43:21 +01:00
Renovate Bot
0a032acf99 Update dependency @tryghost/social-urls to v0.1.25 2021-07-05 08:43:02 +01:00
Renovate Bot
ecc33f63de Lock file maintenance 2021-07-05 02:55:08 +00:00
Renovate Bot
d5f457fbb6
Update Test & linting packages 2021-07-05 00:37:17 +00:00
Naz
0f49e19127 Removed unneded i18n and logging parametes from update check
refs https://github.com/TryGhost/Team/issues/727

- @tryghost/update-check-service v0.2.0 does not require either i18n or logging parameters - makes things less tangled up!
2021-07-02 19:07:13 +04:00
renovate[bot]
4c551fcde6
Added detection of conditional partials in themes
closes https://github.com/TryGhost/Team/issues/781
refs 076ad99593
refs https://github.com/TryGhost/Ghost/commit/2b73d0f66
refs https://github.com/TryGhost/Ghost/commit/bab12ca3d

- With refs 076ad99593 
landing in main there is no more 500 error stopping us from bumping the version
- Previous versions of gscan wasn't able to detect partial usage inside
of a helper, e.g.: "{{#if author}}{{> "missing_partial"}}{{/if}}". It's
important to be able to detect these on theme upload/validation stage to
avoid errors during the runtime.
- The updated version provides additional information about used and
unused partials and helpers.
- With this change users might start seeing a "fatal" error during an
upload/activation of a theme previously passing validation. Currently
active themes with partials used in the context will still allow for a
 boot, but will log a 422 error pointing to missing partial.
2021-07-02 22:43:35 +12:00