2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00
Commit graph

3974 commits

Author SHA1 Message Date
Daniel Lockyer 2aa89f30c5 Moved dev script into subfolder
- we're going to start adding more scripts here so this helps keep the
  .github folder tidy
2023-07-05 11:00:06 +02:00
Daniel Lockyer 5da9264ea7
Updated lockfile
- removed the imported one from comments-ui repo
2023-06-22 09:51:25 +02:00
Hannah Wolfe 3a58b6402a Update dependency eslint-plugin-ghost to v3.2.0
refs: https://github.com/TryGhost/Toolbox/issues/595

- Adds custom rules for node assert
- Enforces assert/strict as an error
2023-06-21 10:34:37 +01:00
Daniel Lockyer 361fea9977
Revert "Updated Lerna to v7"
This reverts commit d007ff86ac.
2023-06-16 11:22:28 +02:00
Daniel Lockyer d007ff86ac
Updated Lerna to v7
refs https://github.com/TryGhost/Ghost/pull/16973

- updates Lerna to v7 and removes `useWorkspaces` as Lerna now detects
  this automatically
2023-06-16 11:18:52 +02:00
Daniel Lockyer 4b6cfa8f28
Added yarn archive to produce a build tarball
fixes https://github.com/TryGhost/Ghost/issues/16835

- this reimplements a command to product a tarball with Ghost after we
  took over `yarn build` for package-specific build steps
2023-06-15 15:42:39 +02:00
Daniel Lockyer 327600171c
Added support for apps/ workspace
refs https://github.com/TryGhost/Toolbox/issues/594

- we want to start moving "apps" into their own folder so we can
  conceptually separate code and avoid a HUGE list in `ghost/`
2023-06-13 12:53:53 +02:00
renovate[bot] ae3e38a14d Update dependency concurrently to v8.2.0 2023-06-09 17:39:51 +02:00
renovate[bot] 70960f27f6 Update dependency concurrently to v8.1.0 2023-06-01 11:08:55 +02:00
Fabien 'egg' O'Carroll 32f4861176
Bumped eslint-plugin-ghost (#16906)
- This includes changes to support PascalCase filenames for interfaces
- Also bumps newer packages to use the latest version to avoid conflicts
with the underlying eslint-plugin-filenames package
2023-05-31 16:36:32 -04:00
Fabien "egg" O'Carroll 104f84f252 Added eslint rule for file naming convention
As discussed with the product team we want to enforce kebab-case file names for
all files, with the exception of files which export a single class, in which
case they should be PascalCase and reflect the class which they export.

This will help find classes faster, and should push better naming for them too.

Some files and packages have been excluded from this linting, specifically when
a library or framework depends on the naming of a file for the functionality
e.g. Ember, knex-migrator, adapter-manager
2023-05-09 12:34:34 -04:00
renovate[bot] 5d392bbe57 Update dependency lerna to v6.6.2 2023-05-05 07:36:31 +02:00
Chris Raible 27e4523aec
🐛 Improved error message for unauthorized YouTube embeds (#16374)
refs TryGhost/Ghost#16048

- When attempting to embed a Youtube video that has had embedding
disabled by its owner/author, Ghost displayed a generic error message
that didn't indicate the reason for the failed emebed.
- This change updated the error message when Youtube (or any provider)
returns 401: Unauthorized to indicate that the owner of the resource has
explicitly disabled embedding.
2023-05-04 16:04:58 -07:00
Fabien "egg" O'Carroll b9565bc290 Migrated @tryghost/post-revisions to TypeScript!
This is an initial start to using TypeScript in our non-core Ghost packages.

- Adds a prepare script to build the project after installing deps
- Adds an initial tsconfig.json which is compatible with our node env
- Migrates all of the code to TypeScript, including tests
- Updates tests to use ts-node so that we don't need to compile the tests
- ts-node is installed at the top level because the env is weird with lerna and
  doesn't work otherwise
- Updates the yarn dev script to build the project with the --all and --revisions flag
2023-05-03 14:32:31 -04:00
Fabien "egg" O'Carroll ed674981e6 Updated npm scripts to support packages with a build step
- Updates the prepare script in the top level to run prepare on packages, so
  that packages can be built when running `yarn`

- Updates the build script in ghost/core to run build on packages, so that
  packages are built before being monobundled

- Updates monobundle to be a dependency and use the new TryGhost repo, which
  includes some minor fixes and improvements, such as supporting devDeps

- Updates the GitHub workflows to run the build command in the top level
  directory rather than ghost/core so that other packages are built, too.
2023-05-03 14:32:31 -04:00
Simon Backx 1b38361211 Updated @sentry/node to v7.50.0 and reenabled renovate again
fixes https://github.com/TryGhost/Team/issues/2385

The Sentry version has been locked to v7.11.1 for some time because Sentry still used a legacy Node feature, called domains. Due to a bug or change in in Noide 16+, those domains broke handling uncaught promise execptions. So Ghost crashed when a promise exception wasn't caught. But that shouldn't be the case because we have a global uncaught exception handler.

Luckily Sentry switched to AsyncLocalStorage in v7.48.0. This fixes the issue as demonstrated in c0cd62184c
2023-05-02 10:23:45 +02:00
renovate[bot] 07545541a8 Update @tryghost 2023-04-07 13:47:12 +02:00
Daniel Lockyer b64d32cc26 Removed heavy dependency within @tryghost/errors
- 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
2023-04-05 13:46:15 +02:00
renovate[bot] aaf2ee96c0 Update dependency lerna to v6.6.1 2023-04-05 12:03:30 +02:00
Daniel Lockyer 1a55ce9801
Disabled Renovate rebasing PRs when behind
- whilst we have a backlog, this can cause a lot of CI noise as it
  churns through PRs updating them every time we push
2023-04-05 11:26:25 +02:00
renovate[bot] 871379d872 Update dependency concurrently to v8 2023-04-05 11:20:47 +02:00
Daniel Lockyer 7ec2656495 Added yarn resolution for @tryghost/errors
- 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
2023-04-05 09:34:50 +02:00
Chris Raible 3236891b80
Fixed admin coverage reporting (#16512)
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
2023-03-28 11:07:28 -07:00
Daniel Lockyer 56b407f1f4
Added pre-push hook to run unit tests on changed packages
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
2023-03-23 11:27:43 +01:00
Daniel Lockyer 6207766ce7
Migrated from nodemon to native Node --watch
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
2023-03-21 15:57:41 +01:00
renovate[bot] 0b2f88c100
Update dependency nodemon to v2.0.21 2023-03-06 03:45:22 +00:00
renovate[bot] 9f08732039 Update @tryghost 2023-03-02 09:47:02 +01:00
renovate[bot] 9bd2b8c708 Update dependency lint-staged to v13.1.2 2023-02-16 15:01:58 +01:00
renovate[bot] 244fd05035 Update dependency lint-staged to v13.1.1 2023-02-07 09:09:59 +01:00
Daniel Lockyer 34fe49b110
Added version information to log lines
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
2023-01-20 13:18:44 +01:00
Daniel Lockyer 48dda23554
Reverted "Added version information to log lines"
refs https://github.com/TryGhost/Toolbox/issues/501

- this reverts commit f2116357b7
- something with Elasticsearch is causing high CPU usage, so this commit
  reverts that for now
2023-01-17 13:20:47 +01:00
Sam Lord f2116357b7 Added version information to log lines
refs: https://github.com/TryGhost/Toolbox/issues/502

Updated to @tryghost/logging@2.4.0 to allow metadata to be logged
2023-01-12 10:34:23 +00:00
renovate[bot] c908ccc721 Update dependency husky to v8.0.3 2023-01-03 14:06:21 +01:00
Daniel Lockyer 4867b7fb3d
Updated @tryghost/logging resolutions
refs 08b786af3b

- we recently bumped the packages but I forgot to update the resolutions
  to pin Ghost to a specific version of the package
2023-01-02 21:01:45 +01:00
Daniel Lockyer 6f4e663d74
Updated @tryghost dependencies (#16005)
- also includes `knex-migrator` with a simple `sqlite3` bump
2022-12-14 11:18:55 +07:00
Simon Backx b14e234576
🐛 Reverted Sentry to v7.11.1 to fix unhandled promise rejection crashes (#15998)
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
2022-12-13 15:53:27 +01:00
renovate[bot] c203f1da7a Update dependency lint-staged to v13.1.0 2022-12-05 09:23:47 +07:00
renovate[bot] 79ac85e63f Update dependency lint-staged to v13.0.4 2022-11-28 08:43:37 +07:00
renovate[bot] 4443f505fe Update dependency concurrently to v7.6.0 2022-11-21 15:36:00 +07:00
renovate[bot] a3dd1eb6eb Update dependency husky to v8.0.2 2022-11-14 10:16:54 +07:00
renovate[bot] c8c89a9fa3 Update dependency concurrently to v7.5.0 2022-10-24 10:23:48 +07:00
Daniel Lockyer 8ec071a47c
Update dependency eslint-plugin-ghost to v2.16.0 (#15551)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-10-10 10:23:24 +01:00
renovate[bot] 9cd15ec9fb Update dependency husky to v8.0.1 2022-10-10 15:49:51 +07:00
Daniel Lockyer a37b2cd24e Switched to Husky + lint-staged for git hooks
- 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!
2022-10-10 15:10:48 +07:00
renovate[bot] 9eb3c84a23
Updated @tryghost dependencies (#15434)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-27 08:31:35 +07:00
Daniel Lockyer a94c93e1c0
Added yarn build command
refs https://github.com/TryGhost/Toolbox/issues/390

- this allows us to run `yarn build` and make it output a .tgz file
  which can be installed with `ghost install --archive ...`
2022-09-26 18:28:30 +07:00
Daniel Lockyer 2bff2a22e0
Extracted dev tooling to separate script
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
2022-09-23 15:02:35 +02:00
renovate[bot] 225765241c
Updated @tryghost dependencies (#15404)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2022-09-19 12:09:33 +01:00
renovate[bot] 10f285d22e
Update dependency nodemon to v2.0.20 2022-09-16 18:19:50 +00:00
renovate[bot] 4438a72095 Update dependency concurrently to v7.4.0 2022-09-07 13:44:35 +01:00