Commit Graph

4008 Commits

Author SHA1 Message Date
Daniel Lockyer
6dc1d08590 Re-enabled general eslint rules in TS config
refs https://github.com/TryGhost/DevOps/issues/50

- when creating a TS config in our `eslint-plugin-ghost` dependency, I
  only extended the recommended config, which left out a lot of
  stylistic things we used to enforce in JS
- this fixes that by bumping the dependency to a version which extends
  those shared configs, and fixes all the code that currently goes
  against those rules
2023-09-08 13:47:42 +02:00
Daniel Lockyer
baf980e2f2 Updated Renovate presets
refs https://github.com/TryGhost/DevOps/issues/69

- deleted the preset extensions as these are all part of the base preset
  now
2023-08-31 16:36:17 +02:00
Daniel Lockyer
7596742ae8 Configured new Renovate presets
refs https://github.com/TryGhost/DevOps/issues/69

- we're doing some work to update our Renovate rules
- part of that is the fact that they're deprecating package-based
  presets, so I've moved the rules into a repo
- this commit switches the Ghost repo over to that
2023-08-31 16:06:11 +02:00
renovate[bot]
780ea2f35b Update dependency nx to v16.7.4 2023-08-29 08:33:55 +01:00
renovate[bot]
5989ea0ffa Update dependency typescript to v5.2.2 2023-08-29 07:37:08 +01:00
renovate[bot]
7e63c541c9 Update dependency lint-staged to v14.0.1 2023-08-22 17:40:09 +01:00
renovate[bot]
26bdba9d4c Update dependency concurrently to v8.2.1 2023-08-22 17:39:36 +01:00
renovate[bot]
636ae389b7 Update dependency nx to v16.7.1 2023-08-17 11:47:03 +02:00
renovate[bot]
ecffbf35e9 Update dependency lint-staged to v14 2023-08-14 08:34:37 +02:00
renovate[bot]
906a2392b5 Update dependency lint-staged to v13.3.0 2023-08-14 07:55:59 +02:00
Daniel Lockyer
c032bcebde Disabled TypeScript incremental building
refs https://ghost.slack.com/archives/C02G9E68C/p1691403750186279

- we keep seeing strange things from incremental TS builds, and it's
  causing random/spurious test failures for developers
- this commit disables that
- also adds cleaning up of TS incremental build artifacts to the
  `build:clean` command
2023-08-09 18:27:56 +02:00
Fabien "egg" O'Carroll
9d3cc0cf65 Bumbed nx to 16.6.0
I was having issues running Ghost locally with nx and this fixed them for me.
2023-08-02 12:05:58 +01:00
Simon Backx
841e52ccfe
Added donations API (#17495)
refs https://github.com/TryGhost/Product/issues/3648

- Refactored Members API RouterController.createCheckoutSession: Split the method into smaller parts so we can reuse individual parts for the upcoming donation checkout session.
- Wired up donation checkout creation
- Added donation events
2023-07-31 16:00:52 +00:00
Daniel Lockyer
c97cc08455 Updated ESLint config for React+Typescript packages
refs https://github.com/TryGhost/DevOps/issues/50

- `react-app` comes from `eslint-config-react-app`, which is a CRA package
- we're moving away from that so this commit switches the linting over
  to a more recently updated plugin
- once that was removed, we started using a newer version of
  `@typescript-eslint/eslint-plugin`, so there were plenty of
  updates/exemptions to make
2023-07-27 11:40:31 +02:00
Daniel Lockyer
5875962392 Converted CRA packages to Vite
refs https://github.com/TryGhost/DevOps/issues/50

- we're moving away from CRA in favor of Vite, so this switches the last
  packages over
2023-07-27 09:43:35 +02:00
Daniel Lockyer
b0cf1f949a Switched TypeScript eslint config to custom plugin
refs https://github.com/TryGhost/DevOps/issues/50

- this switches the .eslint configs from `node` to `ts`, which is a new
  config to support eslint for TypeScript
- also makes minor changes to adhere to these new rules
2023-07-25 16:12:35 +02:00
Daniel Lockyer
bb4c3de992 Deduplicated ts-node and typescript dependencies
refs https://github.com/TryGhost/DevOps/issues/50

- this commit deduplicates where we define the versions of these
  packages to make them easier to maintain
2023-07-24 16:21:47 +02:00
Daniel Lockyer
d0f9c8cf0c Deduplicated eslint and eslint-plugin-ghost to top-level package.json
refs https://github.com/TryGhost/DevOps/issues/50

- this deduplicates where we define the version of `eslint` and
  `eslint-plugin-ghost` so it's easier to maintain
2023-07-24 16:21:47 +02:00
renovate[bot]
0aa5815b26 Update dependency nx to v16.5.5 2023-07-24 08:46:03 +02:00
renovate[bot]
81e91e1c7a Update dependency nx to v16.5.4 2023-07-21 18:21:46 +02:00
Daniel Lockyer
52df88cf63 Updated tiptap monorepo to v2.0.3
- also adds `@tiptap/pm` as this is requires in v2.0.0 and removes the
  resolutions as they are no longer needed
2023-07-19 12:08:52 +02:00
renovate[bot]
368f6c57a6 Update dependency nx to v16.5.3 2023-07-18 16:01:45 +02:00
Daniel Lockyer
a1cc60638a Added yarn build:clean command
- this reset the Nx build cache and removes the build files from each
  package:
2023-07-17 17:41:57 +02:00
Daniel Lockyer
9f40c90e07 Switched to Nx runner for more tasks
- this switches us to using Nx for `ghost:dev`, which means we can
  configure its dependencies and ensure that the TS projects are built
  beforehand
- also switches to Nx for `ghost:archive` so we don't need to run
  `build:ts` for all `yarn` commands
2023-07-14 08:52:01 +02:00
renovate[bot]
4d477c636e Update dependency nx to v16.5.2 2023-07-14 08:15:51 +02:00
renovate[bot]
707f2501c5 Update dependency prosemirror-model to v1.19.3 2023-07-13 14:07:23 +02:00
Daniel Lockyer
2aa7da3a0b Improved monorepo tooling setup
refs https://github.com/TryGhost/DevOps/issues/45

- this switches the monorepo over to using Nx instead of Lerna, because
  we don't currently need the versioning+publishing capabilities
- this also adds an `nx.json`, which allows us to enable task caching
- also adds `build:ts` to the TS projects, which is cached for fast execution
- how these interact with the dev.js script will hopefully soon be
  reworked to be a better experience
2023-07-12 16:27:39 +02:00
renovate[bot]
e81ae6b9a6 Update dependency prosemirror-model to v1.19.2 2023-07-11 08:59:51 +02:00
renovate[bot]
7fa1ecb68a Update dependency lint-staged to v13.2.3 2023-07-10 18:17:17 +02:00
renovate[bot]
40ecd47500 Update dependency prosemirror-transform to v1.7.3 2023-07-10 18:10:10 +02:00
renovate[bot]
9f7b68adf6 Update dependency prosemirror-state to v1.4.3 2023-07-10 17:59:12 +02:00
Daniel Lockyer
04e8159388 Removed useWorkspaces to handle Lerna v7 change
refs https://github.com/lerna/lerna/blob/main/CHANGELOG.md#700-2023-06-08

- Lerna now automatically uses the configured workspaces so we don't
  need to tell it to do so
2023-07-10 17:54:47 +02:00
renovate[bot]
869eb04eed Update dependency lerna to v7 2023-07-10 17:54:47 +02:00
renovate[bot]
b74bc8a2c2 Update dependency lint-staged to v13.2.3 2023-07-10 17:00:46 +02:00
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