- we previously used `@stdlib/utils` instead of the child package
`@stdlib/copy`, which is a lot smaller and contains our only use of
the parent
- this saves 140+MB of dependencies
- we keep ending up with multiple versions of the depedency in our tree,
and it's causing problems when comparing instances
- the workaround I'm implementing for now is to bump the package
everywhere and set a resolution so we only have 1 shared instance
- hopefully we can come up with a better method down the line
no issue
- Renovate merged in a breaking change to ember-cli-code-coverage which
broke our coverage reporting for the admin app
- This commit fixes the issue by pinning the version of
ember-cli-code-coverage to the last working version and telling renovate
to ignore it in the future
- It also adds html coverage reporting to make it easier to run locally
and see your coverage before pushing
fixes https://github.com/TryGhost/Toolbox/issues/532
- we should protect against failures entering `main` which could be
avoided by running a quick unit test beforehand
- this reintroduces Lerna as it supports parallelisation and `--since`,
to run linting and unit tests on packages that have changed since
upstream
fixes https://github.com/TryGhost/Toolbox/issues/493
- `nodemon` doesn't properly wait for graceful shutdown if there's a job
running in Ghost when it tries to reload, so it ends up producing
errors because two versions of Ghost are started
- Node 18 added a `--watch` flag, which reloads if any required file is
changed
- switching from nodemon to this native feature should keep the
core functionality the same but fix this edge case that disrupts the
development flow
refs https://github.com/TryGhost/Toolbox/issues/501
- this reverts commit 48dda23554
- also includes a resolution for `@elastic/elasticsearch` so we don't
run a version that is potentially problematic - see referenced issue
for context
refs https://github.com/TryGhost/Team/issues/2370
Due to a possible bug in either `@sentry/node` (mainly the Express
middlewares and the usage of deprectated Domain) and Node v16+,
unhandled promise rejections are transformed into uncaught exceptions
and cause Ghost to crash in unexpected situations.
Reverting to `v7.11.1` fixes this (but definitely not ideal at all)
because errors are caught in the Express middleware.
Reproduction repo:
https://github.com/SimonBackx/sentry-node-unhandled-rejection-crash
- up until this commit, git hooks were only used by a handful of people
because they were a pain:
- they'd only be set up when you did `yarn setup`
- the existing hooks ran `yarn lint` on all projects, which was
incredibly slow
- as a result, not many of us actually had them enabled, but this would
cause issues in CI because people were pushing un-linted commits
- other JS projects tend to use husky to automate the git hook setup and
lint-staged to speed up linting on changed files
- this commit switches to using them both
- `lint-staged` only runs `eslint` on staged JS files that are about to
be committed - if there's a linting error, it will stop the commit
- I've configured the pre-commit hook to successfully exit in CI because we
don't want to run pre-commit hooks right now
- this means we can remove Grunt - yay!
refs https://github.com/TryGhost/Toolbox/issues/426
- we're going to need to support more complex combinations of dev
commands soon, with other packages optionally running and env
variables being altered
- this command pulls out a lot of the dev env scripting into a single
scripts
- also cleans up the use of grunt-shell so we can remove the dependency
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
- because we use `concurrently`, `debug` thinks it's not inside a TTY,
so it doesn't show colors
- we can force it to show colors using the DEBUG_COLORS env variable, as
done in this commit
- 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
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)
- `eslint-plugin-ghost` v2.15.0 bumped `eslint-plugin-unicorn` to a
version that required Node 14.18.0
- we don't support that minimum right now so this commit bumps the Ghost
plugin which contains a revert to that plugin
refs https://github.com/TryGhost/Toolbox/issues/345
- this commit bumps `eslint-plugin-ghost`, which bumps compatiblity to
2022
- this also removes a lot of the manually-added
`parserOptions.ecmaVersion` that we had in imported packages, in favor
of the value set in `eslint-plugin-ghost`
- this Renovate config was pulled from Admin but it's inadvertantly
stopping `postcss` updates in core
- this commit restricts the dependency updates to the Admin package only
- most of these tasks were duplicates or had been extracted out into
npm/yarn scripts
- in order to get closer to removing Grunt, I've cleaned up the majority
of those script
- this also removes an intermediate command to building Admin, so it starts
ever so slightly quicker
- this commit switches our `yarn dev` workflow from heavily relying on
Grunt, to using `nodemon` and `concurrently`
- we're doing this to reduce reliance on Grunt, but also to fix several
nits with the way `yarn dev` works in the monorepo
- we now use `nodemon` to run the Ghost backend, and it should
auto-refresh whenever you change a file in any of the packages (except
`admin`)
- we use `concurrently` to simultaneously run `ghost` and `admin` at
the same time. it seems to handle process cleanup well and has nice
colored prefixes to help with differentiating between log output
- this commit ends up removing a handful of Grunt dependencies and
reduces the functionality stored in the Gruntfile
- on the whole, it should keep existing functionality but there may be
some small underlying changes to get used to
- we're doing this to reduce the repo PR noise when a separate monorepo
get published
- you can still update your dependency with yarn, and then this rollup
PR will be occasionally merged
refs https://github.com/TryGhost/Toolbox/issues/365
- these files are no longer needed now they're in the main Ghost repo
- re-adds the Renovate rules into the top-level Renovate config
- our internal tooling needs to know when to add LICENSE files
- unfortunately, setting a package to private gives it a LICENSE file of
a closed source app, which is not the case here
- my MVP solution is just to add a key here so I can detect it in Slimer