Commit Graph

2907 Commits

Author SHA1 Message Date
Sam Lord
88670dfa28 v4.9.3 2021-07-09 20:41:27 +01:00
Rishabh
6bb10e6d4b 🐛 Fixed API errors when including member counts for labels
closes https://github.com/TryGhost/Team/issues/607

- patch was added in `bookshelf-include-count@0.1.3` to fix member counts for labels
- bumps `bookshelf-plugins` to include the patch
2021-07-09 19:51:17 +05:30
Sam Lord
fa231a1995 v4.9.2 2021-07-09 10:23:26 +01:00
Thibaut Patel
02324b95a3 🐛 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 10:21:23 +01: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
ff8e6e35b6 v4.9.1 2021-07-08 11:13:20 +01: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
a44f2d5a0c
Fixed yarn lint in yarn test:all
- mega derp, left this unstaged :/
2021-07-07 17:38:25 +01:00
Hannah Wolfe
8caa198b27
Moved lint (again) to run in yarn test:all
- Move test:regression out of yarn test:all
- Moved lint to be explicitly part of yarn test:all
- Got rid of posttest as that is implicit and hard to read
2021-07-07 16:02:44 +01:00
Hannah Wolfe
5bd031ac51
Moved lint to run after unit tests
- postest only runs after exactly yarn test… not after any of the other commands
- but if you’re using yarn test xxx it’s probably to quickly debug something and is when you least want to wait for linting
- Meanwhile, if you’re coding and running unit or acceptance tests before pushing, you’re not seeing lint output
- But you also don't need it twice...
- So for now, running lint just after yarn test:unit - it should be better than the current method
2021-07-07 15:14:06 +01:00
Daniel Lockyer
bc5f6ed3cc
v4.9.0 2021-07-07 09:39:57 +01: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
Daniel Lockyer
8a5846b204
Updated @tryghost/members-csv to 1.1.1
refs f08a55c21f (diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L76-R76)

- the package.json version for this got downgraded in the referenced
  commit but the `yarn.lock` version stayed the same
- this commit updates the dependency version again
2021-07-07 09:10:50 +01:00
Hannah Wolfe
f08a55c21f
Renamed tests to .test.js & updated commands
refs: https://github.com/TryGhost/Team/issues/856
refs: https://github.com/TryGhost/Team/issues/756

- The .test.js extension is better than _spec.js as it's more obvious that it's an extension
- It also meaans we can use the --extension parameter in mocha, which should result in a better default behaviour for `yarn test`
- It also highlights that some of our tests were named incorrectly and were not (and still will not be) run (see https://github.com/TryGhost/Team/issues/856)
- Note: even with this change, `yarn test` is throwing errors, I believe because of this issue https://github.com/TryGhost/Team/issues/756
2021-07-06 20:45:01 +01:00
Hannah Wolfe
1dda2cd931
Changed to use debug not console in acceptance tests
- In an ideal world, our acceptance tests would be much, much faster
- ATM we output how much time is spent on reloading Ghost for each suite, but this is output with console
- Changed this to use DEBUG, so we don't clutter the UI normally
- Added further debug statements, and a cumulative time, so we can see where time is spent/wasted
- Added a DEBUG command for running acceptance tests with this output
- This shows us that reloading Ghost accounts for 50% of the test time
2021-07-06 20:24:49 +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
Hannah Wolfe
8c2687c24e
Fixed yarn dev
refs: 7e6800b2b8

- I kept flip-flopping on making grunt dev into grunt and removing it so we have to remember to use `yarn dev` and fucked it up entirely
- Do the simple thing for now - and think about how we can make grunt dev better overall
2021-07-06 08:23:52 +01:00
Hannah Wolfe
7e6800b2b8
Improved dev tooling (#13118)
This commit achieves a few things:

- ☑️  No longer having to remember whether a command is yarn something or grunt something
- ☑️  Simplification of tools hopefully making them easier to remember and use 
- ☑️  Complete removal of the need for grunt from our test tooling

Several of the tools still use grunt under the hood, but the **entrypoint** should aways be `yarn xxx`.

- `grunt main` -> `yarn main`
- `grunt dev` -> `yarn dev`
- `grunt build` -> `yarn build`
- `grunt test:file-or-folder` -> `yarn test file-or-folder`
- `grunt test-unit` -> `yarn test:unit`
- `grunt test-acceptance` -> `yarn test:acceptance`
- `grunt test-regression` -> `yarn test:regression`
- `grunt validate` -> removed due to lack of use

There is now also `yarn test:all` to run all 3 classes of tests

This PR also reorders & restructures the Gruntfile extensively so that:

- The remaining useful commands are all at the top of the file
- Config and other blah happens after all the useful commands
- All release-only config happens in the release task at the very end of the file

---

DONE:

* Removed all references to npm/bower
* Removed all references to lint / deprecated command
* Moved debug to yarn dev:debug
* Removed all references to travis
* Removed broken help task + useless comment
* Removed unused knex-migrator and clean:test setup tasks
* Added new test commands, removed grunt validate
* Moved stubClientFiles to test utility and use in the few tests that need it
* Used mocha in yarn directly except grunt test:x
* Swapped grunt test for yarn test
* extensive cleanup and reshuffling
2021-07-05 20:02:22 +01:00
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
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
Naz
2f2c11bbe0 Added alpha support for segmented email cards
refs https://github.com/TryGhost/Team/issues/827

- Ghost needs an ability to insert email-only content for defined segments of members - at the moment distinguishing only free&paid ones.
- The card with a "segment" payload should contain a valid NQL statement to target specific members
2021-06-30 17:43:27 +04:00
Renovate Bot
5d960556f9
Update metascraper to v5.22.5 2021-06-29 18:11:11 +00:00
Daniel Lockyer
81cde2bbf9 v4.8.4
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTqYa7kNs8D7Oo9dgLSEYbwtHKVrQUCYNtS/AAKCRDSEYbwtHKV
 rWB9AP4oax10sV0tyQ5tUEHjKjEFme09Fnen0+YqBDipNE4gIgEAjNeuw+kggf/B
 cu5TdAiP3nHOyzaEIt0S28M6m9nnaAI=
 =Q+xD
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTqYa7kNs8D7Oo9dgLSEYbwtHKVrQUCYNtTfwAKCRDSEYbwtHKV
 rbn0AQDMtjID6NQk0zjQkjpNbOBf/BGbZWy4kC0+DAdo8AoAEwEAiZmbKAeRT3gv
 fxpSUKTVQHwdXTiJlvcHue0p9xyLKQ8=
 =VSw3
 -----END PGP SIGNATURE-----

Merged v4.8.4 into main

v4.8.4
2021-06-29 18:08:08 +01:00
Daniel Lockyer
e3d989e1b2
v4.8.4 2021-06-29 18:06:03 +01:00
Fabien O'Carroll
a6592566bb Added support for benefits to Admin Products API
refs https://github.com/TryGhost/Team/issues/806
2021-06-29 16:53:15 +01:00
Renovate Bot
25479364a9 Update dependency @tryghost/logging to v0.1.3 2021-06-29 07:28:06 +01:00
Hannah Wolfe
77996d1ee4
Moved vhost arg logic out of the parent app
- Makes the logic for determining the admin and frontend vhost args independent and easier to test
- Moved the tests to specifically test the vhost utils & removed proxyquire as a dependency
- We want to breakdown the current parent app into the existing core/app.js and boot code, allowing us to decouple the backend and frontend further
- This is all part of the refactoring to separate server and frontend completely
2021-06-28 19:38:42 +01:00
Renovate Bot
620b490be6
Update dependency @sentry/node to v6.8.0 2021-06-28 15:14:52 +00:00
Hannah Wolfe
fcce649600
🔥 Removed netjet support
refs: https://github.com/cloudflare/netjet/issues/46

- HTTP2/Push never made it, this module is therefore defunct
2021-06-28 16:13:46 +01:00
Renovate Bot
4fe723cd1b Update dependency @tryghost/url-utils to v2.0.1 2021-06-28 11:25:20 +01:00
Renovate Bot
3d5beb0c2a Update dependency @tryghost/helpers to v1.1.48 2021-06-28 11:01:23 +01:00
Renovate Bot
ce3a57a8ac
Update metascraper to v5.22.4 2021-06-28 00:15:47 +00:00
Renovate Bot
10d02e8343
Update dependency eslint-plugin-ghost to v2.4.0 2021-06-24 16:43:21 +00:00
Daniel Lockyer
53b7eb227b v4.8.3
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTqYa7kNs8D7Oo9dgLSEYbwtHKVrQUCYNSBfAAKCRDSEYbwtHKV
 rdNyAP9sT2e/01PE1p8l0PoTbq6nOL08BIA8ZKDiX/tFDeJ7owD9EikupgI6snND
 VrvRyA3AIZf3+hooAfjxIogX7NhUrQU=
 =Aqm+
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTqYa7kNs8D7Oo9dgLSEYbwtHKVrQUCYNSCAwAKCRDSEYbwtHKV
 rWOLAQDCheD486UqjssUUaEAjNxjoSzwvqnHSpnfRJB809eOmAEAv0UzVYM+vcJ6
 7vJdRXK2ke/dIc50n0mgRR8ktue6XAs=
 =TQTw
 -----END PGP SIGNATURE-----

Merged v4.8.3 into main

v4.8.3
2021-06-24 14:00:41 +01:00
Daniel Lockyer
80fab83cf0
v4.8.3 2021-06-24 13:58:36 +01:00
Daniel Lockyer
e389a6d991 v4.8.2
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTqYa7kNs8D7Oo9dgLSEYbwtHKVrQUCYNR3tAAKCRDSEYbwtHKV
 rXcMAQDQd7EcEmIx3sHlA5wjMz9SMZaybaOqLMzgCdUft2KOagD/dFtZBYpK4DLB
 Kr42XrNMVvORHNPso5lL35s9KNbTlwM=
 =OqBv
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTqYa7kNs8D7Oo9dgLSEYbwtHKVrQUCYNR4ygAKCRDSEYbwtHKV
 rXtsAQDNUqm3qK0b8/hET9h7cIG5J5RpAo0WYJWxv01DwcTscAEAjlfK3vgUo3wD
 uHeeXH+DXOIhAqSxsXoJr7X+N/s+WQw=
 =BJTH
 -----END PGP SIGNATURE-----

Merged v4.8.2 into main

v4.8.2
2021-06-24 13:21:23 +01:00
Daniel Lockyer
d4a0295792
v4.8.2 2021-06-24 13:16:52 +01:00
Daniel Lockyer
ac8029680c v4.8.1
-----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTqYa7kNs8D7Oo9dgLSEYbwtHKVrQUCYNRcHQAKCRDSEYbwtHKV
 rQJeAP9ufmgIztn1oj8kF7tZMZk4xaVCakqIgyQBlPvFKc+aawD8Dv44mmZ4Ntar
 7FQ52i07TCwk/b8lCUwxD4maYBuZNAE=
 =fgVN
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQTqYa7kNs8D7Oo9dgLSEYbwtHKVrQUCYNRciwAKCRDSEYbwtHKV
 rRatAQCJ27vyVeGYlnXVWF0XSgj3+QEwl2eEgh4GoVp4BPzHAwD/WrGvKRvddDtA
 kiqv93vRTda3GV1R4FGYVl34MwbGFAA=
 =+Yci
 -----END PGP SIGNATURE-----

Merged v4.8.1 into main

v4.8.1
2021-06-24 11:20:53 +01:00
Daniel Lockyer
13adff145c
v4.8.1 2021-06-24 11:19:09 +01:00
Hannah Wolfe
0ef9a7e415
Added quick commands for resetting yarn
- We keep having test issues caused by yarn, these fix commands help quickly check it's not a yarn problem
- Have renamed fixmodulenotrequired to fix:client to make a nice consistent naming pattern that's easy to remember and type
2021-06-23 20:55:03 +01:00
Fabien O'Carroll
ccd917ff8c Handled products column for CSV import & export
refs https://github.com/TryGhost/Team/issues/765

This includes the changes to @tryghost/members-csv so that we can read
and write the `product` column from/to csv files. Allowing us to include
products in exports, as well as use them in imports.
2021-06-23 13:53:34 +01:00
Renovate Bot
f9dab79d2e
Update metascraper to v5.22.2 2021-06-23 11:32:05 +00:00
Daniel Lockyer
d2adc08c18
v4.8.0 2021-06-22 15:25:52 +01:00
Naz
0d2c990013 Reverted Added detection of conditional partials in themes"
This reverts commit bab12ca3d1.

- Revert was due to 500 errors which would come up when the Ghost instance runst in "production" mode.
2021-06-22 17:49:12 +04:00
Renovate Bot
2f93ce7495 Update dependency @tryghost/logging to v0.1.2 2021-06-22 09:10:44 +01:00
Renovate Bot
7e05c402c9
Update dependency @sentry/node to v6.7.2 2021-06-21 16:25:40 +00:00
Renovate Bot
aae9388098 Update dependency @tryghost/version to v0.1.1 2021-06-21 17:24:43 +01:00
Renovate Bot
d379e18728 Update dependency @tryghost/validator to v0.1.2 2021-06-21 16:47:51 +01:00
Renovate Bot
ed4bdbd6e7 Update dependency @tryghost/root-utils to v0.3.1 2021-06-21 16:47:40 +01:00
Renovate Bot
d6ea82dbd0 Update dependency @tryghost/request to v0.1.2 2021-06-21 16:33:18 +01:00
Renovate Bot
b91cb8172d Update dependency @tryghost/debug to v0.1.2 2021-06-21 16:33:02 +01:00
Renovate Bot
8275a52204 Update dependency @tryghost/bookshelf-plugins to v0.1.3 2021-06-21 14:48:25 +01:00
Renovate Bot
484387ba51 Update dependency nconf to v0.11.3 2021-06-21 13:13:38 +01:00
Renovate Bot
d87d6a7d4e Update dependency @tryghost/members-ssr to v1.0.4 2021-06-21 13:13:25 +01:00
Renovate Bot
968543f967 Update dependency @tryghost/magic-link to v1.0.4 2021-06-21 13:12:53 +01:00
Renovate Bot
ace1513e9f Update dependency @tryghost/image-transform to v1.0.13 2021-06-21 13:12:03 +01:00
Renovate Bot
9aadfdf1bd Update dependency @tryghost/package-json to v1.0.2 2021-06-21 12:14:25 +01:00
Renovate Bot
587f6806df Update dependency @tryghost/session-service to v0.1.24 2021-06-21 08:26:36 +01:00
Renovate Bot
ced89e3777 Update dependency @tryghost/tpl to v0.1.3 2021-06-21 08:26:07 +01:00
Renovate Bot
9b5fc217dc Update dependency @tryghost/adapter-manager to v0.2.14 2021-06-21 08:26:01 +01:00
Renovate Bot
249f316177 Update dependency @tryghost/request to v0.1.1 2021-06-21 08:25:38 +01:00
Renovate Bot
e47c2e6fd9 Update dependency @tryghost/mw-session-from-token to v0.1.22 2021-06-21 08:25:28 +01:00
Renovate Bot
43b9084c86 Update dependency @tryghost/helpers to v1.1.47 2021-06-21 08:25:17 +01:00
Renovate Bot
df4c8ed1c9
Update dependency eslint to v7.29.0 2021-06-18 20:53:18 +00:00
Hannah Wolfe
2f3d60c87e
Updated to use config-url-helpers in urlUtils 2021-06-18 21:49:28 +01:00
Renovate Bot
3a43f0a776 Pin dependency @tryghost/config-url-helpers to 0.1.0 2021-06-18 21:29:00 +01:00
Hannah Wolfe
6aafb735b1
Added config-url-helpers to config
- getSubdir, getSiteUrl & getAdminUrl were currently part of @tryghost/url-utils
- They have been split out into their own library, and refactored so that they expect to be bound to nconf
- With this commit we can do e.g. config.getSubdir() rather than needing @tryghost/url-utils
- These functions will be passed to url-utils via DI
- This is the first step in breaking down url-utils into smaller pieces
- This commit only does a single change in Gruntfile.js to use the new funtions - this will be rolled out slowly
2021-06-18 20:05:00 +01:00
Renovate Bot
536d7a76d6 Update dependency mocha to v9.0.1 2021-06-18 17:02:20 +00:00
Fabien O'Carroll
5b66933981 Supported directly assigning products to members
refs https://github.com/TryGhost/Team/issues/748

This updates the @tryghost/members-api MemberRepository to stop ignoring
the `products` data passed to write operations, and to attach products
directly to members. As this logic is part of a new feature, we are
maintaining existing functionality by deleting the products data when
the feature flag is not enabled.

This functionality allows us to give members complimentary access to a
product without needing to use a Stripe Subscription internally.
2021-06-17 16:57:53 +01:00
Renovate Bot
bab12ca3d1 Added detection of conditional partials in themes
refs https://github.com/TryGhost/Team/issues/781
refs https://github.com/TryGhost/Team/issues/774

- Previous versions of gscan weren't able to detect partial usage inside
of a heprer, e.g.: "{{#if author}}{{> "missingpartial"}}{{/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-06-17 16:33:03 +04:00
Naz
2b73d0f66f Revert "Update dependency gscan to v4.1.0"
This reverts commit d010ab4490.
2021-06-17 16:33:03 +04:00
Naz
3092f779ec Revemod stray gulp dependency
refs 44a6e399dd

- The change seems unintentionall and prevents from clean revert of gscan commit
2021-06-17 16:11:50 +04:00
Sam Lord
44a6e399dd Upgrade @tryghost/validator
no issue
Fixes the build - as test checks for instanceof ValidationError, and
we were using 2 versions of @tryghost/errors between Ghost and
@tryghost/validator.
2021-06-17 12:59:59 +01:00
Sam Lord
44053553f5 Upgrade @tryghost/errors to use @tryghost/ignition-errors
no issue
Part of the de-coupling project - takes us closer to an Ignition-free
Ghost.
2021-06-17 11:11:03 +01:00
Renovate Bot
941635508e Update dependency postcss to v8.3.5 2021-06-17 10:44:22 +01:00
Renovate Bot
d010ab4490
Update dependency gscan to v4.1.0 2021-06-16 15:53:16 +00:00
Renovate Bot
0ebf8e0161 Update dependency @tryghost/logging to v0.1.1 2021-06-16 15:57:03 +01:00
Renovate Bot
26356b8a5e Update dependency @tryghost/bookshelf-plugins to v0.1.2 2021-06-16 15:33:59 +01:00
Renovate Bot
c394b82cd7 Update dependency @tryghost/package-json to v1.0.1 2021-06-16 15:33:45 +01:00
Renovate Bot
736c878dcf Update dependency @tryghost/tpl to v0.1.2 2021-06-16 15:33:38 +01:00
Sam Lord
3f0bab4389 Replaced request module with @tryghost/request
no issue
Part of the effort to break up Ghost into smaller, decoupled modules.
2021-06-16 13:16:15 +01:00
Sam Lord
24332c3d24 Replaced ghost-version.js with @tryghost/version
no issue
Part of the effort to break up the Ghost codebase into smaller, decoupled modules.
2021-06-16 13:16:15 +01:00
Fabien 'egg' O'Carroll
8ea577b58b
Added support for canceling subscriptions (#13039)
refs https://github.com/TryGhost/Team/issues/775

As we currently do not delete canceled subscriptions and they are
exposed via the API, this functionality has been added to the
editSubscription controller method under the PUT HTTP method.

The cancelSubscription method in @tryghost/members-api was updated to
handle deleting by member id
2021-06-16 11:25:19 +01:00
Hannah Wolfe
526993965a
Switch to @trghost/validator, remove validator
- Part of the effort to split Ghost down into smaller, decoupled pieces
- Moved out our internal validator tooling to a separate library
- Replaced all usage of our own tooling and validatorjs directly with @tryghost/validator
- Removed the validatorjs dependency and removed the renovate pin
- This gives us a consistant, smaller, clearer public API for validations
- It will eventually be used on Ghost Admin too
- This way we can start getting up to date with validator whilst not increasing build size
2021-06-16 08:11:22 +01:00
Sam Lord
35e51e364b Switch to @tryghost/debug, remove ghost-ignition
no issue
The only pieces of Ghost-Ignition used in Ghost were debug and
logging. Both of these modules have been superceded by the Framework
monorepo, and all usages of Ignition have now been removed, replaced
with @tryghost/debug and @tryghost/logging.
2021-06-15 17:24:22 +01:00
Hannah Wolfe
f8524cb0a9
Bumped validator to same version as admin
- validator has seen a lot of change, this one bump is safe
- after this we need to go through and make API updates as isURL has changed quite significantly!
2021-06-15 16:45:48 +01:00
Sam Lord
caea330647 Change to use @tryghost/logging
no issue

Logging is now controlled by a logginrc.js file in the root of the project - and now we can just import @tryghost/logging everywhere
2021-06-15 15:59:11 +01:00
Sam Lord
160cb07e02 Added @tryghost/root-utils to the ghost-version module
no issue
Part of the effort to split ghost into smaller, decoupled parts. The
@root-utils package lets us avoid hard-coding a path to package.json,
and means that the ghost-version.js file could eventually be moved
into a separate module.

This commit uses a patched version of @tryghost/root-utils which
checks for the existence of a `current` directory, as used in
Ghost-CLI. Since this is very specific to Ghost and Ghost CLI, there's
a new method called "getGhostRoot" for this purpose.
2021-06-15 15:06:31 +01:00
Renovate Bot
5b2e7d2c71
Update dependency @sentry/node to v6.7.1 2021-06-15 12:48:02 +00:00
Daniel Lockyer
495ef867c2 Extracted Bookshelf plugins from Ghost to Framework repo
refs:
  - cf15f60085
  - dd20cc649b
  - ccf27f7009
  - abf146d61f
  - 2b54c92a14
  - bb029a53f6
  - 95bd7ee675
  - 9018b4df22
  - df01a6e5f4
  - d313726b34

- these plugins were in a state where they were independent enough to be
  pulled out into their own packages, which is what we did in the
  referenced commits above
- each package is named like `@tryghost/bookshelf-<plugin>`
- to avoid requiring multiple packages into Ghost, we've also created a
  wrapper package called `@tryghost/bookshelf-plugins` which re-exports
  all these plugins, so the changes in Ghost are very simple - dbebdd43b5
- this commit deletes the plugins + tests, and replaces with our new
  package with some minor code changes
2021-06-15 12:49:38 +01:00
Renovate Bot
3092eb344d Update dependency postcss to v8.3.4 2021-06-15 08:55:48 +01:00
Renovate Bot
7cc021c114 Update dependency ghost-ignition to v4.6.3 2021-06-14 18:55:39 +00:00
Sam Lord
1ec79bfaea Revert "Added @root-utils to the ghost-version module"
This reverts commit 846e9f1bbc.
2021-06-14 18:42:40 +01:00
Sam Lord
846e9f1bbc Added @root-utils to the ghost-version module
no issue
Part of the effort to split ghost into smaller, decoupled parts. The
@root-utils package lets us avoid hard-coding a path to package.json,
and means that the ghost-version.js file could eventually be moved
into a separate module.
2021-06-14 16:33:53 +01:00
Renovate Bot
1ec7c70c6f
Update dependency @sentry/node to v6.7.0 2021-06-14 10:06:31 +00:00
Renovate Bot
ed87d1837a Update dependency postcss to v8.3.3 2021-06-14 09:41:29 +01:00
Renovate Bot
aa531dc28b Update dependency @tryghost/members-csv to v1.0.1 2021-06-11 17:44:57 +01:00
Renovate Bot
aee829db15 Update dependency @tryghost/helpers to v1.1.46 2021-06-11 13:37:21 +01:00
Renovate Bot
8d9f06f7c9 Update dependency @tryghost/tpl to v0.1.1 2021-06-11 13:29:43 +01:00
Renovate Bot
07bc610e7e Update dependency @tryghost/session-service to v0.1.23 2021-06-11 13:27:04 +01:00
Renovate Bot
1811e0029f Update dependency @tryghost/vhost-middleware to v1.0.15 2021-06-11 13:26:04 +01:00
Renovate Bot
6cbb6c3c17 Update dependency @tryghost/image-transform to v1.0.12 2021-06-11 13:23:56 +01:00
Renovate Bot
8f7bba3a0e Update dependency @tryghost/mw-session-from-token to v0.1.21 2021-06-11 13:23:50 +01:00
Renovate Bot
d312a05f22 Update dependency @tryghost/promise to v0.1.9 2021-06-11 13:23:43 +01:00
Renovate Bot
def12e0951 Update CSS preprocessors 2021-06-11 13:23:29 +01:00
Renovate Bot
8baad6af30 Update dependency @tryghost/errors to v0.2.12 2021-06-11 13:23:17 +01:00
Renovate Bot
d89ef63317 Update dependency @tryghost/constants to v0.1.8 2021-06-11 13:23:07 +01:00
Renovate Bot
cd5b186b00 Update dependency @tryghost/bootstrap-socket to v0.2.9 2021-06-11 12:29:08 +01:00
Renovate Bot
d9883d6060 Update dependency @tryghost/adapter-manager to v0.2.13 2021-06-11 12:28:50 +01:00
Renovate Bot
13c2d84e1e Update dependency @tryghost/job-manager to v0.8.7 2021-06-11 12:28:38 +01:00
Renovate Bot
3bd03d2bca Update dependency @tryghost/limit-service to v0.6.1 2021-06-11 12:28:32 +01:00
Renovate Bot
99b06682f5 Update dependency @tryghost/security to v0.2.9 2021-06-11 12:28:20 +01:00
Renovate Bot
ff5b1be4e1 Update dependency @tryghost/zip to v1.1.14 2021-06-11 12:28:06 +01:00
Kevin Ansfield
1bc57b584a
Added posts_meta.feature_image_{alt,caption} columns (#13030)
refs https://github.com/TryGhost/Team/issues/770

We want post feature image functionality to better match what's available inside the editor, to do that we'll need somewhere to store alt and caption meta data. `posts_meta` chosen because even though we want to make this generic for other tables in the future those tables also have a `feature_image` (or closely related) field.

- updated schema with new columns
- added migration to create columns
- cleaned new columns from API output
  - not output on v2/v3
  - conditionally output on v4/canary output based on labs flag
- bumped `@tryghost/admin-api-schema` to allow new columns through in canary API requests
  - silently clean properties from input when labs flag is disabled
  - updated acceptance tests so they fail if `admin-api-schema` is not letting the new fields through
2021-06-10 20:35:56 +01:00
Renovate Bot
b53de12e12
Update dependency eslint-plugin-ghost to v2.3.0 2021-06-10 16:13:31 +00:00
Renovate Bot
3472d7b63d
Update dependency @sentry/node to v6.6.0 2021-06-10 14:30:48 +00:00
Renovate Bot
139cf448d7
Update metascraper to v5.22.1 2021-06-09 15:53:54 +00:00
Hannah Wolfe
1f11bd9012
Updated package-json lib to not need DI
- The underlying package-json package has had i18n ripped out using the new tpl utility instead
- It's also then been refactored to not be a class that needs instantiating
- This means it can be required directly and its public interface methods used where needed
- This is a much nicer, neater pattern for what is a mature utility library :)
2021-06-09 16:48:19 +01:00
Daniel Lockyer
1e54db2720
Moved @tryghost/tpl to dependencies
refs 971ac479dc

- `@tryghost/tpl` was accidentally placed in `devDependencies` but
  Ghost needs this to run so it would cause Ghost-CLI to fail when it
  only installs `dependencies`
- this commit moves the dependency to `dependencies`
- also pins the dependency to `0.1.0`
2021-06-09 13:48:32 +01:00
Hannah Wolfe
971ac479dc
Updated ghost-server to use new minimal tpl helper
- We are going to get rid of the internal i18n tool because it doesn't solve a real use case
- Instead, we have a new tpl utility that does basic string interpolation
- This pattern will make it easier for us to decouple the codebase, and the new tool helps to keep the refactor surface area really small
- This is the first example of using the new tpl helper, so it also adds @tryghost/tpl
2021-06-09 12:20:59 +01:00
Daniel Lockyer
faf9598d7a
v4.7.0 2021-06-08 17:06:37 +01:00
Renovate Bot
a0f11282d3
Update dependency mocha to v9 2021-06-07 17:05:28 +00:00
Sam Lord
905a228cb7 Merged 4.6.6 into main 2021-06-07 18:03:33 +01:00
Sam Lord
a2b798ce2e v4.6.6 2021-06-07 17:59:45 +01:00
Sam Lord
573b0db76a Merged 4.6.5 into main 2021-06-07 11:31:01 +01:00
Sam Lord
4de81087cc v4.6.5 2021-06-07 11:25:17 +01:00
Renovate Bot
8e0b097c2c
Update dependency eslint to v7.28.0 2021-06-04 23:10:06 +00:00
Rishabh
def46df589 Updated portal plan settings to use named values
refs https://github.com/TryGhost/Team/issues/753

This bumps members-api to handle migration to revert portal settings to named values again as well as handle migration cleanup for old portal settings.
2021-06-04 19:25:39 +05:30
Renovate Bot
a947f7f829 Pin dependency @tryghost/update-check-service to 0.1.0 2021-06-04 13:37:54 +01:00
Kevin Ansfield
b81e5c26dc Added postcss as explicit dev dependency
no issue

- `cssnano` requires `postcss` as a peer dependency which was causing warnings when running `yarn`
- `postcss` was available because it's a sub-dependency of `sanitize-html` so nothing was broken but explicitly adding it to `package.json` resolves the warnings
2021-06-04 12:46:09 +01:00
Fabien O'Carroll
def07d595e Added monthly & yearly price support to products
refs https://github.com/TryGhost/Team/issues/712

The ProductRepository in members-api has been updated to accept
monthly_price & yearly_price when creating and updating products, as
well as including them when reading.
2021-06-03 17:02:32 +01:00
Naz
7d05da6185 Removed update check service in favor of external package
refs https://github.com/TryGhost/Team/issues/728

- The code of update check has been extracted into it's own package as a part of TryGhost/Core monorepo. This commit is a cleanup of the leftover files
2021-06-03 13:24:19 +04:00
Renovate Bot
71a0572f8a
Update dependency @sentry/node to v6.5.1 2021-06-02 18:07:24 +00:00
Fabien O'Carroll
c066dd157a Migrated members_{month,year}ly_price_id settings
refs https://github.com/TryGhost/Team/issues/711

Since we need to support multiple products, which will each have a
monthly and yearly price, we are moving away from storing these ids in
settings, and instead in a column on the products table. The migration
depends on the settings being prepopulated, which is done outside of
knex-migrator, in members-api, so this migration must also be done there.
2021-06-02 10:04:38 +01:00
Renovate Bot
66924486cf Update dependency nock to v13.1.0 2021-06-01 16:44:43 +01:00
Kevin Ansfield
035a38680e Bumped Koenig packages
no issue

- includes sub-dependency bumps for `markdown-it` packages for markdown renderer bug fixes and to keep Ghost and Admin markdown rendering in sync
2021-06-01 09:40:20 +01:00
Renovate Bot
fa2e116474
Update metascraper to v5.22.0 2021-05-31 15:30:42 +00:00
Renovate Bot
514e2ca821
Update dependency @sentry/node to v6.5.0 2021-05-31 10:52:51 +00:00
Renovate Bot
56fb8efccb Update dependency papaparse to v5.3.1 2021-05-31 08:59:54 +01:00
Renovate Bot
900f46bb8c Update dependency cssnano to v5.0.5 2021-05-31 08:59:28 +01:00
Daniel Lockyer
91f6cfda9a
v4.6.4 2021-05-27 19:19:14 +01:00
Daniel Lockyer
898e1cb956
v4.6.3 2021-05-27 17:25:35 +01:00
Daniel Lockyer
e5d0ded0e8
v4.6.2 2021-05-27 08:17:24 +01:00
Daniel Lockyer
1cbd14b376
v4.6.1 2021-05-26 18:46:08 +01:00
Renovate Bot
377fd85d98
Update dependency sinon to v11.1.1 2021-05-26 15:58:01 +00:00
renovate[bot]
f3defb98f3
Update dependency @tryghost/members-ssr to v1.0.3 (#12978)
no-issue

This bumps internal dependencies inside @tryghost/members-ssr

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-05-26 10:46:21 +01:00
renovate[bot]
c641929bdf
Update dependency @tryghost/magic-link to v1.0.3 (#12977)
no-issue

This just bumps dependencies within @tryghost/magic-link

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-05-26 10:45:35 +01:00
Renovate Bot
ef49e5683f Update dependency juice to v8 2021-05-26 10:15:13 +01:00
Renovate Bot
9ae55eecfb
Update dependency sinon to v11.1.0 2021-05-25 14:14:19 +00:00
Daniel Lockyer
8f305969e3
v4.6.0 2021-05-25 15:11:56 +01:00
Renovate Bot
fbdb0c1bb9 Update dependency grunt to v1.4.1 2021-05-25 09:16:32 +01:00
Renovate Bot
572d4ee15c
Update metascraper to v5.21.10 2021-05-24 23:29:32 +00:00
Renovate Bot
93896acf5d
Update dependency sinon to v11 2021-05-24 21:44:33 +00:00
Fabien O'Carroll
40e1a09083 Fixed error message when Stripe not connected
refs https://github.com/TryGhost/Team/issues/704

Previously a customer message was not passed, and the default message
was used. This made a reference to, "someone else is editing the post"
which is incorrect in this context! The members-api has been updated
with an appropriate error message, with a link to our documentation.
2021-05-24 17:45:33 +01:00
Fabien O'Carroll
2000c3c156 Errored when Stripe is used without a connection
refs https://github.com/TryGhost/Team/issues/704

Currently when attempting to create stripe_prices without a Stripe
connection, it will fail silently. This is an issue when initially
configuring Members as the Stripe connection can take some time to be
established. By erroring we allow the client to be notifed that the
connection does not yet exist, so that it can be retried later.
2021-05-24 11:54:45 +01:00
renovate[bot]
01ac1acfcb
Fixed indescribable error in custom themes limit
refs f51c640fb0

- This should not affect any of the current code but should improve edge case errors related to "allowlist" types of limits
- See referenced commit for details when this edgecase was happening
2021-05-24 22:09:18 +12:00
Renovate Bot
2cd687b7cf Update dependency cssnano to v5.0.4 2021-05-24 08:50:36 +01:00
Renovate Bot
e03f99a8f3
Update dependency eslint to v7.27.0 2021-05-24 00:31:56 +00:00
Fabien O'Carroll
730811fb6e Handled week & day interval in population of mrr events
refs https://github.com/TryGhost/Team/issues/635

This is to ensure we don't break migrations for any sites which have
imported external subscriptions which have an interval of 'week' or
'day'

The bump to members-api includes the handling of these intervals for
ongoing population of mrr events
2021-05-21 17:57:17 +01:00
Renovate Bot
6d2890c1a8
Update metascraper to v5.21.9 2021-05-21 10:16:46 +00:00
Renovate Bot
d08ea611b7 Update dependency cssnano to v5.0.3 2021-05-21 09:14:36 +01:00
Renovate Bot
5aaa910a2e Update dependency @tryghost/job-manager to v0.8.6 2021-05-21 09:08:54 +01:00
Renovate Bot
9010932466
Update dependency sanitize-html to v2.4.0 2021-05-20 16:28:50 +00:00
Fabien O'Carroll
253eee627c Removed boot precondition checks from members-api
refs https://github.com/TryGhost/Team/issues/598
refs https://github.com/TryGhost/Ghost/commit/5cdf910e

Since we have moved the preconditon checks into this codebase, we no
longer need the members-api module to run them. This bump includes the
changes to remove the last of those checks.
2021-05-20 12:14:14 +01:00
Renovate Bot
d98334eb89
Update dependency express-session to v1.17.2 2021-05-19 20:47:30 +00:00
Renovate Bot
fd394f0c3a
Update dependency @sentry/node to v6.4.1 2021-05-19 18:16:24 +00:00
Fabien O'Carroll
0e77b378a6 Migrated members_{monthly,yearly}_price_id settings
refs https://github.com/TryGhost/Team/issues/698

The migrations to populate these settings are handled by the members-api
module, as they depend on the stripe_prices table being populated. This
cannot be guarunteed at boot, so we're unable to do this as a standard
migration.
2021-05-19 15:37:20 +01:00
Renovate Bot
ae98bf5a6d Update dependency mock-knex to v0.4.10 2021-05-18 11:05:31 +01:00
Renovate Bot
2af3d760a2
Update dependency @sentry/node to v6.4.0 2021-05-17 08:09:59 +00:00
renovate[bot]
3b5ce73026
Update dependency @tryghost/session-service to v0.1.22 (#12965)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-05-14 18:35:36 +02:00
Renovate Bot
421d457430 Update dependency @tryghost/helpers to v1.1.45 2021-05-13 10:07:59 +01:00
Naz
eb7e4bb815 🐛 Fixed frontmatter-related validation error
refs https://github.com/TryGhost/Team/issues/687

- The frontmatter field has leaked into the API layer unintentionally when it was introduced into the DB schema during 4.0 release.
- The fix add the field to "trim" list in all API. A proper validation and handling will be add per API as usecase for the field becomes clear
2021-05-13 12:14:05 +04:00
Daniel Lockyer
9c2388e8aa
v4.5.0 2021-05-11 13:34:32 +01:00
Fabien O'Carroll
ed0f90a82d Fixed errors when importing comped Members
no-issue

The logic for finding the zero-value price to be used was broken, and
this patch to members-api fixes it
2021-05-11 12:13:48 +01:00
Renovate Bot
83d4a19757 Update dependency @tryghost/url-utils to v1.1.4 2021-05-11 12:09:16 +01:00
Renovate Bot
0b94b930b7 Update dependency @tryghost/html-to-mobiledoc to v0.7.16 2021-05-11 12:09:04 +01:00
Renovate Bot
a316ddd528 Update dependency @tryghost/helpers to v1.1.44 2021-05-10 20:37:26 +01:00
Fabien O'Carroll
8add0e04f5 Updated members-api to work with multiple products
refs https://github.com/TryGhost/Team/issues/682
refs https://github.com/TryGhost/Team/issues/650

- Provide backwards compatibility for the `comped` flag in the API and
  the importer.
- Ensures the default stripe product name is kept in sync with the name
  of the Ghost Product
- Updates the webhook handling to work with multiple products
2021-05-10 20:23:35 +01:00
Kevin Ansfield
c36e749820
Added support for gating content by member labels and products (#12946)
refs https://github.com/TryGhost/Team/issues/581
closes https://github.com/TryGhost/Team/issues/582

Emails can now be sent to members with specific associated labels or products by specifying an NQL string. We want to bring the same members segment feature to content by allowing `visibility` to be an NQL filter string on top of the `public/members/paid` special-case strings.

As an example it's possible to set `posts.visibility` to `label:vip` to make a post available only to those members with the `vip` label.

- removed enum validations for `visibility` so it now accepts any string or `null`
    - bumped `@tryghost/admin-api-schema` for API-level validation changes
- added nql validation to API input validators by running the visibility query against the members model
- added transform of NQL to special-case visibility values when saving post model
    - ensures there's a single way of representing "members" and "paid" where NQL gives multiple ways of representing the same segment
    - useful for keeping theme-level checks such as `{{#has visibility="paid"}}` working as expected
- updated content-gating to parse nql from post's visibility and use it to query the currently logged in member to see if there's a match
    - bumped @tryghost/members-api to include label and product data when loading member
2021-05-10 19:32:11 +01:00
Renovate Bot
e73d26d9da Update dependency @tryghost/string to v0.1.19 2021-05-10 17:33:38 +01:00
Renovate Bot
285a722444 Update dependency @tryghost/social-urls to v0.1.24 2021-05-10 17:28:25 +01:00
Renovate Bot
e7f300d4d2
Update dependency @sentry/node to v6.3.6 2021-05-10 09:23:15 +00:00
Renovate Bot
ec0a8c1d2f
Update dependency eslint to v7.26.0 2021-05-10 01:42:57 +00:00
Renovate Bot
8308db8eac
Update dependency mocha to v8.4.0 2021-05-07 20:26:12 +00:00
Renovate Bot
420ab29039 Update dependency @tryghost/package-json to v0.1.1 2021-05-07 16:14:45 +01:00
Naz
d72ba77aba Added support for max periodic limit check
refs https://github.com/TryGhost/Team/issues/588

- This is a new type of limit allowing to measure resource use (e.g. sent emails) per period (e.g. subscription, billing, cycle, etc)
- To enable periodical limit add  following values under `hostSettings.limits`:
```
"emails": {
    "maxPeriodic": 10,
    "error": "Your plan supports up to {{max}} emails. Please upgrade to reenable sending emails."
}
```
and following under `hostSettings.subscription`:
```
"subscription": {
    "start": "2020-04-02T15:53:55.000Z",
    "interval": "month"
}
```
- Above config would allow checking if 10 emails per month starting on the 2nd of every month has been reached untill now
2021-05-07 18:43:47 +04:00
Daniel Lockyer
4385070881
⬆️ Bumped minimum Node version to 12.22.1 and 14.16.1
refs https://nodejs.org/en/blog/vulnerability/april-2021-security-releases/

- these are the latest security releases and we should encourage people
  to upgrade to them
- also replaces Node 12 in the tests with Node 14 as this is soon our
  recommended version
2021-05-07 14:14:46 +01:00
Hannah Wolfe
781cc6f304
Switched to eslint-plugin-node + fix eslint test perf
refs: https://github.com/TryGhost/Ghost/commit/7bce05ab8

- I wrote a custom plugin for the no-cross-requires logic between our modules after not finding anything that could do it
- Then, when searching for the next rule I wanted, I found eslint-plugin-ghost has no-restricted-requires
- This rule is more flexible, so switching to it
- NOTE: This update to eslint-plugin-ghost also fixes performance of linting our test files by pinning eslint-plugin-mocha to v7 as v8 has performance problems
2021-05-07 13:25:18 +01:00
Renovate Bot
576a1ce5b7 Update dependency @tryghost/mw-session-from-token to v0.1.20 2021-05-07 13:10:55 +01:00
Renovate Bot
93de578939 Update dependency @tryghost/session-service to v0.1.21 2021-05-07 12:46:25 +01:00
Renovate Bot
80033a57b7 Update dependency @tryghost/job-manager to v0.8.5 2021-05-07 12:46:14 +01:00
Renovate Bot
037a443f49 Update dependency @tryghost/zip to v1.1.13 2021-05-07 12:45:30 +01:00
Daniel Lockyer
b1499d4037 Extracted package-json lib to Utils
refs 37ebe723c6

- `package-json` was a standalone library using dependency injection so
  we could pull it out into its own package in Utils
- this was done in the commit referenced above
- this commit removes the implementation and tests in Ghost and replaces
  the require in the initialization wrapper with the new package
2021-05-07 12:35:06 +01:00
Hannah Wolfe
c0054fdbd7
Fixed path to eslint file for tests
refs: d2c6838133

- Changed the file type but neglected to update the config filepath for tests
2021-05-07 12:14:01 +01:00
Renovate Bot
103b5bff56
Update dependency glob to v7.1.7 2021-05-06 22:37:19 +00:00
Renovate Bot
de1d77b86d Update dependency image-size to v1 2021-05-05 17:14:40 +01:00
Renovate Bot
a795e12ffe Update dependency fs-extra to v10 2021-05-05 16:06:45 +01:00
Daniel Lockyer
470f2a8728
Updated dependency grunt-contrib-compress to v2
- this reverts commit 4be4af9c18 because
  we have now dropped Node 10
2021-05-05 15:46:02 +01:00
Renovate Bot
ee9ef5498d Update metascraper to v5.21.7 2021-05-05 15:43:46 +01:00
Renovate Bot
a9cc729c54 Update dependency oembed-parser to v1.4.7 2021-05-05 15:24:05 +01:00
Daniel Lockyer
156900a4ae
⚙️ Bumped required Ghost-CLI version to 1.17.0
refs https://github.com/TryGhost/Team/issues/658

- Ghost-CLI 1.17.0 displays warnings when users are on an unsupported
  version of Node, or are running a Ghost version that is EOL
- by bumping this here, we can force users to update to CLI 1.17.0 to
  get these features
2021-05-05 14:40:28 +01:00
Daniel Lockyer
57ff38da8a
🔥 Dropped support for Node 10
refs https://github.com/TryGhost/Team/issues/658

- Node 10 become EOL as of April 30th so it's time to drop support
- this commit:
  - removes the Node 10 range from the `node` `engines` block
  - removes Node 10 from CI tests
  - switches Node 10 in the CLI test to Node 12 so we can ensure it
    installs on our oldest supported Node version
2021-05-05 14:38:14 +01:00
Daniel Lockyer
6bc4c2caa6
v4.4.0 2021-05-04 11:55:36 +01:00
Renovate Bot
7b6df51d08 Update dependency cssnano to v5.0.2 2021-05-04 08:57:43 +01:00
Naz
a83cccd84b Enabled "emails" limit configuration
refs https://github.com/TryGhost/Team/issues/588

- This bump allows to pass configuration for "emails" limit (flag type for now) and allows to do checks against this limit as a consequence
- Useful to be able to do basic checks for newsletter-related functionality
2021-05-03 14:06:45 +04:00
Renovate Bot
026b85baca
Update dependency @sentry/node to v6.3.5 2021-04-30 13:33:27 +00:00
Renovate Bot
62d257f7a0
Update dependency @sentry/node to v6.3.4 2021-04-29 11:16:46 +00:00
Daniel Lockyer
15ecfd471b
Merged v4.3.3 into main
v4.3.3
2021-04-29 12:14:39 +01:00
Daniel Lockyer
8f3fbfb79d
v4.3.3 2021-04-29 12:12:55 +01:00
Renovate Bot
ad48c16cb5
Update dependency @sentry/node to v6.3.3 2021-04-28 11:45:04 +00:00
Hannah Wolfe
d4aa37534d Added new lint command for code only
- allows for linting just code files, not the tests because the tests take a really long time to lint
- I want to make eslint do more heavy lifting in terms of code style, so this will be useful as the warnings start to pile up
2021-04-27 10:34:55 +01:00
Fabien O'Carroll
740d1b052f Added support for creating subscriptions
refs https://github.com/TryGhost/Team/issues/616
refs https://github.com/TryGhost/Ghost/commit/33f26fbf

This adds the createSubscription method to the MemberRepository, which
is used by the Member controller in the references commit.

We also fix updating products to correctly handle stripe_prices and the
product name.
2021-04-26 17:20:36 +01:00
Hannah Wolfe
7bce05ab86 Added custom no-cross-requires eslint rule [soft]
refs: 7e787ef807

- bumps eslint-plugin-ghost to 2.1.0 which adds the code for a new custom rule
- adds configuration to our eslint file to enable the rule in a very soft mode for now
- this rule is intended to enforce not tightly coupling the server and frontend
- the intention is to make it stricter over time as the number of cross requires reduces
- enabling this rule temporarily and running lint is a nice way to grok just how tightly coupled things are at the moment
2021-04-26 15:06:57 +01:00
Renovate Bot
5212187fd0
Update dependency eslint to v7.25.0 2021-04-26 01:20:09 +00:00
Renovate Bot
f21e689d1b
Update dependency @sentry/node to v6.3.1 2021-04-23 15:23:14 +00:00
Renovate Bot
8980c3051a Update dependency grunt to v1.4.0 2021-04-23 13:09:05 +01:00
Renovate Bot
d73e9c0567 Update dependency jwks-rsa to v2.0.3 2021-04-23 13:08:49 +01:00
Renovate Bot
4185bdb33e
Update dependency express-hbs to v2.4.0 2021-04-22 16:36:14 +00:00
Daniel Lockyer
cb0b10d05e
Merged v4.3.2 into main
v4.3.2
2021-04-22 17:34:45 +01:00
Daniel Lockyer
e99d6ee9b7
v4.3.2 2021-04-22 17:32:41 +01:00
Rish
b23b6a8afd 🐛 Fixed unable to import paid members
refs https://github.com/TryGhost/Team/issues/628

After a recent bump to Stripe API version used by Members service - 2020-08-27 - importing paid members via CSV in ghost was not working correctly due to missing subscriptions object in customer data fetched from Stripe. Stripe had updated the customer resource to not include the subscriptions data by default which is now patched to always include in Ghost.
2021-04-22 21:58:13 +05:30
Renovate Bot
ee82affe1f Pin dependencies 2021-04-22 16:09:30 +01:00
Daniel Lockyer
0df8aac0cc
Merged v4.3.1 into main
v4.3.1
2021-04-22 09:52:00 +01:00
Daniel Lockyer
35e4e1d892
v4.3.1 2021-04-22 09:48:47 +01:00
Rish
b6c79c30d4 🐛 Updated stripe prices/products table population
refs https://github.com/TryGhost/Team/issues/591
refs ffe24a728c

It's possible to have sites which still have customer subscriptions in their DB from old Stripe accounts, most likely added when we allowed Stripe Direct, as those subscriptions were not cleaned up. While populating stripe prices and products for existing subscriptions, we want to ignore these old subscriptions which are not part of current Stripe account instead of throwing error and halting the one off migration which we currently do.

The population script will re-run again as long as no new subscriptions are created between the last release and this, and there were no old invalid plans in DB, which is a very unlikely edge case so the data will eventually re-populate correctly.
2021-04-22 14:11:03 +05:30
Thibaut Patel
c471ae11d4 Added oauth login and invitation acceptance
issue https://github.com/TryGhost/Team/issues/614

- Users who have a password can directly sign-in via oauth
- User who are logged-in get their password disabled
- Users accepting an invitation get their password disabled
- The way we disable password is by setting it to a long random password
2021-04-21 19:36:27 +02:00
Renovate Bot
6745546538 Update dependency bson-objectid to v2 2021-04-21 16:23:52 +01:00
Renovate Bot
dd09a4500d
Update dependency knex-migrator to v4.0.4 2021-04-21 11:47:41 +00:00
Renovate Bot
87e747ebb0 Update dependency @tryghost/image-transform to v1.0.11 2021-04-21 12:11:15 +01:00
Daniel Lockyer
4fa4dc8034
v4.3.0 2021-04-21 09:10:24 +01:00
Renovate Bot
87b702f5d2
Update dependency @sentry/node to v6.3.0 2021-04-20 15:59:09 +00:00
Rish
ffe24a728c Bumped @tryghost/members-api to 1.3.0
refs https://github.com/TryGhost/Team/issues/619

- Bumps `@tryghost/members-api` to `1.3.0` which adds a one-off migration to populate missing stripe prices and products
- Bumps patch versions on `@trghost/members-ssr` and `@tryghost/magic-link` to 1.02
2021-04-20 17:32:07 +05:30
renovate[bot]
63e42199be
Updated JSON schema for Products & Members Admin API
refs https://github.com/TryGhost/Team/issues/616

This adds the schema for the Products Admin API to be used as the input
validation, and adds support for the `products` property on the Members
Admin API

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-04-20 12:22:55 +01:00
Renovate Bot
5fedb44e0b Update dependency @nexes/nql to v0.5.2 2021-04-19 15:32:22 +01:00
Daniel Lockyer
3421269ee7 Updated tmp dependency to v0.2.1
no issue

- `tmp` 0.1.0 was broken and I added `tmp` to the Renovate ignore list
  to stop it creating PRs - 082160106a
- 0.2.1 is fixed again so we can merge the update and remove it from the
  list
2021-04-19 15:13:55 +01:00
Daniel Lockyer
2fbbf9999d Bumped selected dependencies to unpin sub-dependencies
no issue

- we've been unpinning dependencies in our libraries to remove
  duplicates
- this commit bumps packages from the Utils repo and NQL, all of which
  contain changes to unpin their own dependencies
2021-04-19 11:07:11 +01:00
Renovate Bot
a789e05af4
Update dependency gscan to v4.0.2 2021-04-16 16:49:09 +00:00