Commit Graph

12282 Commits

Author SHA1 Message Date
Renovate Bot
33c4d0030d Update dependency js-yaml to v4 2021-02-10 11:39:30 +00:00
Daniel Lockyer
6d70c0451c
Removed unused ajv dependency
no issue

- this doesn't seem to be used and is instead used in the
  @tryghost/admin-api-schema package, so it is not needed here
2021-02-10 11:30:08 +00:00
Renovate Bot
8c77f4531d Update dependency @tryghost/errors to v0.2.8 2021-02-10 10:32:08 +00:00
Fabien O'Carroll
4dd1423026 Added missing semicolon
no-issue
2021-02-10 10:14:29 +00:00
Fabien O'Carroll
9a142cd906 Added aggregateSubscriptionDeltas to permitted options
no-issue

This was missing from https://github.com/TryGhost/Ghost/commit/1dc6fdc.
Without it the option will never be passed into the customQuery method.
2021-02-10 10:06:06 +00:00
Renovate Bot
1be6817b0e Update dependency knex to v0.21.17 2021-02-10 09:33:29 +00:00
Renovate Bot
0717c53296 Update dependency @tryghost/security to v0.2.5 2021-02-10 09:32:53 +00:00
Renovate Bot
3ef018949d Update dependency @tryghost/constants to v0.1.5 2021-02-10 09:32:30 +00:00
Naz
864fcd8a0c Removed settings populateDefaults pre-migration
refs https://github.com/TryGhost/Ghost/issues/12568
refs 5fbc40430b

- Having populateDefaults run before migrations creates a chicken and egg problem where populate defaults can create records that are "non-migratable" as happened in https://github.com/TryGhost/Ghost/issues/12026
2021-02-10 10:34:08 +13:00
Renovate Bot
f1cf7b125f
Update dependency @tryghost/zip to v1.1.9 2021-02-09 17:37:40 +00:00
Daniel Lockyer
0ddc76874a
v4.0.0-alpha.1 2021-02-09 17:34:48 +00:00
Daniel Lockyer
94e9f60193
Updated Ghost-Admin to v4.0.0-alpha.1 2021-02-09 17:34:48 +00:00
Daniel Lockyer
5a758ea86e Re-enabled Ghost-CLI upgrade tests
no issue

- now GScan has been updated to support v4, we should be able to run these tests again
2021-02-09 17:13:55 +00:00
Daniel Lockyer
3e39239af0
Updated actions/setup-node to v2
no issue

- amongst many other things, v2 uses a cache to download Node versions
2021-02-09 16:21:54 +00:00
Daniel Lockyer
33f60e27c3
Updated gscan dependency to v4.0.0-pre.0
no issue

- Renovate is being slow so I'm doing it manually
2021-02-09 16:17:40 +00:00
Renovate Bot
97d20b2f4a Update dependency @tryghost/job-manager to v0.7.2 2021-02-09 16:09:26 +00:00
Renovate Bot
bb74f6ff49 Update dependency @tryghost/bootstrap-socket to v0.2.6 2021-02-09 16:08:57 +00:00
Renovate Bot
9a6c8229e5 Update dependency @tryghost/mw-session-from-token to v0.1.15 2021-02-09 16:08:27 +00:00
Renovate Bot
104d654522 Update dependency @tryghost/promise to v0.1.5 2021-02-09 14:47:28 +00:00
Renovate Bot
be725c061c Update dependency @tryghost/session-service to v0.1.16 2021-02-09 14:47:18 +00:00
Renovate Bot
39e8eec118 Update dependency @tryghost/adapter-manager to v0.2.8 2021-02-09 14:47:06 +00:00
Renovate Bot
181b5ea25e
Update dependency @tryghost/vhost-middleware to v1.0.12 2021-02-09 13:16:24 +00:00
Daniel Lockyer
1a370a3708
Fixed path to analytics-events in boot file
refs 0b79abf5b2

- in the referenced commit, we refactored the boot code to simplify it
- one of the required files was not updated with the change, so the path
  was wrong
- this wouldn't have been easily visible from local testing because it's
  based upon a config flag that isn't on by default
- this commit updates the path to the file
2021-02-09 12:51:06 +00:00
Renovate Bot
daec858165 Update dependency @tryghost/url-utils to v0.6.26 2021-02-09 09:17:23 +00:00
Renovate Bot
ccfb75d24a Update dependency @tryghost/social-urls to v0.1.19 2021-02-09 09:17:07 +00:00
Renovate Bot
d11b48e9dd Update dependency @tryghost/html-to-mobiledoc to v0.7.10 2021-02-09 09:16:43 +00:00
Renovate Bot
1326cf3f8d Update dependency @tryghost/admin-api-schema to v2.0.0-rc.1 2021-02-09 14:15:47 +05:30
Sanne de Vries
67b1745bcb Fixed bug for newsletter bookmarks without author displaying redundant separator 2021-02-09 09:35:45 +01:00
Rish
1272968848 Updated {{content}} helper partial template name
no issue
refs e3a0bb535f

Previously, {{content}} helper was updated use default or custom template to show a CTA when trying to use helper without access to content.

While the change was expected to not affect any existing themes as `{{content}}` helper is not supposed to be used on member sites without `access` check, we found quite a few themes use a pattern of using `content.hbs` with `{{content}}` helper inside them as default, which causes infinite loop in how content helper works in certain cases.

Whilst this followed the pattern of the other helpers using a partial with the same name, there are 2 key differences:

- this partial template pattern is being introduced way after the inception of themes with a fairly generic name “content”
- this partial template isn’t used to render the helper all the time - just the CTA part under certain circumstances.

This change updates the template name to `content-cta.hbs` to which makes it less likely to clash, and makes more sense as to what it is.
2021-02-09 13:59:52 +05:30
Renovate Bot
c3b7612849 Update dependency @tryghost/string to v0.1.17 2021-02-09 08:25:13 +00:00
Renovate Bot
ca383eb504
Update dependency @tryghost/helpers to v1.1.38 2021-02-09 01:44:51 +00:00
Naz
e0178099a2 🏗 Altered slug unique constraint in posts table
refs https://github.com/TryGhost/Ghost/issues/12567

- Changing unique constraint from slug to slug+type should allow for posts and pages to be created with the same slug
- The constraint will be present on application layer for API v4 while we figure out how to deal with it in API v5
2021-02-09 13:31:12 +13:00
Naz
55fb6dd2b0 Bumplped admin-api-schema package to 2.0.0-rc.0
refs https://github.com/TryGhost/Team/issues/221

- These changes are a precursor for stable version bump of admin-api-schema. Should allow for early bug detection and introduction of breaking changes in the canary admin-api-schemas
2021-02-09 13:27:08 +13:00
Sanne de Vries
118ceae29c Fixed gmail bug for newsletter bookmark cards not displaying correctly 2021-02-08 16:49:13 +01:00
Hannah Wolfe
0b79abf5b2 Added new, simpler, linear boot process
Background:
- Ghosts existing boot process is split across multiple files, has affordances for outdated ways of running Ghost and is generally non-linear making it nigh-impossible to follow
- The web of dependencies that are loaded on boot are also impossible to unpick, which makes it really hard to decouple Ghost
- With 4.0 we want to introduce a new, linear, simpler, clearer way to boot up Ghost to unlock decoupling Ghost into much smaller pieces

This commit:
- adds a new ghost.js file which switches between boot mode with `node index` or `node index old` so that if we find bugs we can work around them this week
   - Note: the old boot process will go away very soon, but ghost.js will remain as the interface between the command to start Ghost and the application code
- reworks the database migration process into a standalone utility, so that the DB is handled as one simple step of the boot process, decoupled from everything else
- is missing tests for this new db utility
- leaves a lot of work to do around loading core code, services, express apps in a sensible order, as work to fix this would start to break the old boot process
- doesn't use the new maintenance app because we aren't restarting the server here, instead we have the concept of a "core app" that starts in maintenance mode - need to think about how apps will be decoupled in the near future
2021-02-08 11:56:44 +00:00
Renovate Bot
d88993e9b5 Update dependency @tryghost/members-csv to v0.4.4 2021-02-08 11:09:24 +00:00
Renovate Bot
0739080f2b Update dependency @tryghost/members-ssr to v0.8.10 2021-02-08 11:07:27 +00:00
Renovate Bot
8af97b5e34 Update dependency @tryghost/magic-link to v0.6.6 2021-02-08 11:07:13 +00:00
Fabien O'Carroll
93b1035df5 🐛 Fixed Member model removing labels when unset
closes https://github.com/TryGhost/Ghost/issues/12600

The bookshelf-relations plugin which we use will **remove** all
relations when they are set to an empty array, but will leave them alone
if it's set to undefined.

Our logic to deduplicate uppercase & lowercase version of the same label
was in advertently always setting the labels to an array, but when the
model was saved without passing the labels, this array would be empty.

Here we've added a check which will skip all label handling, if there
are no labels set.
2021-02-08 09:39:46 +00:00
Naz
47843bbfe9 Refactored migration to use transactional utility 2021-02-08 12:25:52 +13:00
Naz
d254a697b9 🏗 Cleanedup app-related settings
refs https://github.com/TryGhost/Ghost/issues/12565
refs f74d459dad

- These fields should have been cleaned up as a result of changed done in referenced commit
2021-02-08 12:25:52 +13:00
Naz
7e7a94def3 Added a note to locale columns
refs https://github.com/TryGhost/Ghost/pull/12599

- These columns are reserved for future features and should not be dropped.
2021-02-08 12:09:23 +13:00
Hannah Wolfe
2b3c00ac32 Changed exit codes to be > 0
ref: https://tldp.org/LDP/abs/html/exitcodes.html

- exit codes being -1 is a mistake that got perpetuated, should be 1 or greater
- for now, just use 1
2021-02-05 20:13:50 +00:00
Fabien O'Carroll
1dc6fdcd66 Added customQuery to handle subscribed aggregates
refs https://github.com/TryGhost/Ghost/issues/12602

In order to build up a list of un/subscribes over time we have to use
the customQuery functionality to run SQL aggregates - this is "hidden"
behind an option, so that we can find{All,Page} as usual.
2021-02-05 16:02:08 +00:00
Fabien O'Carroll
3dbc7ef5b4 Passed MemberSubscribeEvent to members-api
refs https://github.com/TryGhost/Ghost/issues/12602

This allows the Members module to create MemberSubscribeEvents when
appropriate
2021-02-05 16:02:08 +00:00
Fabien O'Carroll
5aab41931f Added skeleton MemberSubscribeEvent model
refs https://github.com/TryGhost/Ghost/issues/12602

Member Events in general are read-only after they've been created, so
we've explicitly disallowed destroying and editing via the model
2021-02-05 16:02:08 +00:00
Fabien O'Carroll
065bbaeafa Populated members_subscribe_events table
refs https://github.com/TryGhost/Ghost/issues/12602

This allows us to backfill the data for testing purposes as well as for
use by existing sites. The mechanism for determining the date of an
unsubscribe event is crude, we use the date of the last update, which we
might expect to be _sometimes_ correct, but not always. We store the
`source` as NULL for unsubscribes as we cannot determine that with any
certainty whatsoever.
2021-02-05 16:02:08 +00:00
Fabien O'Carroll
e39644bd2d Added members_subscribe_events table
refs https://github.com/TryGhost/Ghost/issues/12602
2021-02-05 16:02:08 +00:00
Fabien O'Carroll
873d21d975 Updated addTable util to take optional tableSpec
no-issue

Migrations should contain all the necessary information rather than
relying on external data
2021-02-05 16:02:08 +00:00
Hannah Wolfe
dbfddf545d Removed overrides from Gruntfile.js
- nothing in Gruntfile.js uses bluebird or mocha
- they ARE seperately required by mocha-cli ahead of our tests in the config
2021-02-05 12:05:09 +00:00