Our react web application is broken down to multiple components. Some of these components are part of the same git mono repo and some live in a different repo.

Now, to implement a bug fix we have to update the changes in one repo, release a version of the package, update the tree of dependencies, release other intermediatory packages and then we finally update the react web application.

This feels very a bit waterfall and not continuous. Additionally, we are optimized for package delivery versus web product delivery. Is there a solution which allows us to continuously get the latest and once in a while we release a new version of the libraries?

  • Once I was told that there are "tools" which help it, and provided github.com/lerna/lerna as example. I cannot say anything if it helps, but you could take a look at it. – max630 Nov 9 at 7:58
  • Mono repo tools like lerna work for 1 repo. What if the packages were in separate repos? – NM Roku Nov 10 at 11:23

A solution I see to this is having your CI/CD process on the main package ensure child packages are updated. Using semantic versioning you could set and fixate your package version major version and minor version number but ensure you always have the latest patch version.

This way, whenever a child package has a new patch, your build process will pick that up, and install it. Whenever a major or minor version update occurs you'll have to update your set version numbers accordingly, which will require you to check if the update didn't break anything etc...

The main assumption in this approach is that you adhere to using the semantic versioning principles.

Depending on the build system you are using, there might be ways (via webhooks orso) to trigger new builds on the main package whenever a child package has a new version.

  • Of course, you need this. However, the challenge here each time you make a change to a downstream package, you need to release a new version. This means each commit is a new release for the package. Alternatively, you wait for a period of time (say a week) to accumulate changes and then release the package version. This does not give you continuous delivery – NM Roku Nov 10 at 11:21

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.