graphql-hooks icon indicating copy to clipboard operation
graphql-hooks copied to clipboard

Remove Lerna Dependency

Open rp4rk opened this issue 2 years ago • 2 comments

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.

rp4rk avatar Apr 25 '22 09:04 rp4rk

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.

rp4rk avatar May 04 '22 16:05 rp4rk

Thanks for this analysis @rp4rk !

simoneb avatar May 04 '22 16:05 simoneb