2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00
Ghost/package.json
Simon Backx 82a3133ace
Added replies/likes count and limited replies to comments (#15206)
refs https://github.com/TryGhost/Team/issues/1723

- Added count.replies to comments
- Added replies endpoint
- Limited returned replies to 3.
- Replaced likes_count with count.likes in comments
- Instead of fetching all the likes of a comment to determine the total count, we'll now use count.likes
- Instead of fetching all the likes of a comment to determine whether a member liked a comment, we'll now use count.liked (which returns the amount of likes of the current member, being 0 or 1). This is mapped to `liked` to make it more natural to work with.

The `members.test.snap` file changed because we no longer include `liked: false` if we didn't fetch the liked relation. And in the comments events of the activity feed the liked property is therefore removed.

These changes requires an update to the `bookshelf-include-count` plugin:
- Updated to also work for nested relations
- This moves the count queries from the `bookshelf-include-count` plugin to the `countRelations` method of each model.
- Updated to keep the counts after saving a model (crud.edit didn't return the counts before)
2022-08-10 16:12:35 +02:00

116 lines
3.1 KiB
JSON

{
"name": "ghost-monorepo",
"version": "0.0.0-private",
"description": "The professional publishing platform",
"private": true,
"repository": "https://github.com/TryGhost/Ghost",
"author": "Ghost Foundation",
"license": "MIT",
"workspaces": [
"ghost/*"
],
"monorepo": {
"public": false,
"internalPackages": true,
"repo": "https://github.com/TryGhost/Ghost",
"scope": "@tryghost"
},
"eslintIgnore": [
"**/node_modules/**"
],
"scripts": {
"dev:debug": "DEBUG=@tryghost*,ghost:* yarn dev",
"dev:admin": "yarn workspace ghost run grunt shell:ember:watch",
"dev:ghost": "nodemon -q -i ghost/admin -i ghost/core/content -i ghost/core/core/built",
"dev": "concurrently -c \"blue,green\" --kill-others -n ghost,admin \"yarn dev:ghost\" \"yarn dev:admin\"",
"fix": "yarn cache clean && rm -rf node_modules && yarn",
"knex-migrator": "yarn workspace ghost run knex-migrator",
"lint": "yarn workspaces run lint",
"setup": "yarn && yarn workspace ghost run setup",
"start": "yarn workspace ghost run start",
"test": "yarn workspaces run test",
"main": "yarn main:monorepo && yarn main:submodules",
"main:monorepo": "git checkout main && git pull ${GHOST_UPSTREAM:-origin} main && yarn",
"main:submodules": "git submodule sync && git submodule update && git submodule foreach \"git checkout main && git pull ${GHOST_UPSTREAM:-origin} main && yarn\""
},
"resolutions": {
"@tryghost/logging": "2.2.4",
"moment": "2.24.0",
"moment-timezone": "0.5.23"
},
"renovate": {
"extends": [
"@tryghost:quietJS",
"@tryghost:disableTryGhostAutomerge",
"@tryghost:groupTestLint",
"@tryghost:groupCSS",
"@tryghost:groupBuildTools"
],
"ignoreDeps": [
"got",
"intl-messageformat",
"moment",
"moment-timezone",
"oembed-parser",
"simple-dom",
"ember-drag-drop",
"normalize.css",
"validator",
"codemirror",
"faker"
],
"ignorePaths": [
"test",
"ghost/admin/lib/koenig-editor/package.json"
],
"packageRules": [
{
"packagePatterns": [
"@tryghost"
],
"groupName": "@tryghost"
},
{
"packagePatterns": [
"metascraper"
],
"groupName": "metascraper"
},
{
"groupName": "ember-basic-dropdown addons",
"packagePatterns": [
"^ember-basic",
"^ember-power"
]
},
{
"groupName": "ember core",
"packageNames": [
"ember-source",
"ember-cli",
"ember-data"
]
},
{
"groupName": "disable css",
"matchFiles": [
"ghost/admin/package.json"
],
"packagePatterns": [
"^postcss",
"^css"
],
"packageNames": [
"autoprefixer",
"ember-cli-postcss"
],
"enabled": false
}
]
},
"devDependencies": {
"concurrently": "7.3.0",
"eslint-plugin-ghost": "2.15.1",
"nodemon": "2.0.19"
}
}