https://github.com/TryGhost/Arch/issues/90
- When a tag.deleted event is emitted the original 'data' object does not contain an 'id' property. The logic in collections service assumes the id would be present to update the collections efficiently.
https://github.com/TryGhost/Arch/issues/90
- When a post.deleted event is emitted the original 'data' object does not contain an 'id' property. The logic in collections service assumes the id would be present to update the collections efficiently.
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
refs https://github.com/TryGhost/DevOps/issues/50
- we should default to keeping the rule on and so I've excluded lines
that currently use `any` to avoid the need to go and fix them all up
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
refs https://github.com/TryGhost/Arch/issues/61
Because the tags system is still written in the old way, the tag.deleted
bookshelf event needs to be mapped to the DomainEvents to bridge the gap with
the collections package.
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
- `@tryghost/collections` is used within
`@tryghost/model-to-domain-event-interceptor` but there wasn't a
dependency on this package, so the build script wouldn't always build
the dependency first
refs https://github.com/TryGhost/Arch/issues/46
- Similarly to post filters, collection filters now support both 'tag' and 'tags' nql filter keys when defining a filter for related tag slugs. For example, both `tag:avocado` and `tags:avocado` would both be valid collection filters that would filter by the same 'slug' property of the tags assigned to a post.
- Along with these changes had to rework the tags property of the collection posts to match the shape used in post resources. Moved from:
`tags: ['bacon', 'broc']`
to
`tags:[{slug: 'bacon'}, {slug: 'broc'}]`
refs https://github.com/TryGhost/Arch/issues/16
- The generic "UpdateAllCollections" logic should not be used as the mapped Post's delete/add/edit events should be sufficient in maintaining collection's state
refs https://github.com/TryGhost/Arch/issues/41
- Having switch statement instead of lots of if/else is slightly more readable. Before adding 5 more event mappings it makes sense to cleanup before things get too messy :)
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
refs https://github.com/TryGhost/DevOps/issues/45
- this moves the bulk of the tsconfig file to the `ghost/` folder and
simply extends this file in each of the TS lib packages we currently
have
- this makes it a lot easier to make single changes to our TS config
no issue
- Function types in TypeScript can have what looks like an unused variable for the eslint. It's part of the TypeScript language and should be fully supported out of the box.
refs https://github.com/TryGhost/Ghost/pull/17065
- This is a follow up cleanup work after introducing even mapper when working on collections refresh mechanism.
- This module manages interception of the Model events and maps/dispatches Domain events that could later be used in different libraries.