graphql-hooks
graphql-hooks copied to clipboard
Remove Lerna Dependency
The usage of Lerna in the repository has lead to some difficult/unstable dependency issues that have become problematic to resolve (See: https://github.com/nearform/graphql-hooks/issues/735). We would like to change the repository to no longer rely on Lerna.
I put some work towards this, but there are a few caveats that make it a little more complex than anticipated, mainly revolving around the fact there's a mix of technologies and the projects can't be scaffolded out with nx tooling, resulting in a lot of brittle configuration.
Here's a few things to look out for if anyone were to pick up the work in the future,
- This project already has a base
tsconfig
, meaning any migration towards nx would have to account for extending this and not supplanting it with the provided nx version. (See here) - There is an existing maintained tool to migrate lerna codebases towards nx, but it is not complete and will transition the codebase to a state of having nx "on top" of lerna, this is not ideal as we wish to not use lerna.
- There are mixes of technologies, and in particular, "libraries" that would be in Typescript while the "application" that relies on them is in regular Javascript. This introduces a good bit of complexity to building, and while hinting and autocomplete can be made to work, CRA does not support path aliases by default. I would assume any effort farther towards this would require either a bespoke builder in a project.json file, or a complete migration of examples to use Typescript.
Thanks for this analysis @rp4rk !