monorepo internal package management
I've inherited a lerna monorepo and I'm struggling to get the internal package management working - it doesn't appear to be right now. I'd like to hear suggestions for the best approach to manage what we're trying to do.
We have about 15 packages in the monorepo. Each is publicly published to our registry. The publish enforces the same ver for all, so a change to one republishes all with the same updated version. The version is calculated during the jenkins build step.
That all seems to work. The issue I'm having is with internal dependencies, eg: packages/pkg1 packages/pkg2 packages/pkg3 In addition to being publicly publish, pkg1 is consumed by pkg2 and pkg 3, and pkg 2 is also consumed by 3.
How do we manage this so that pkg 2 and pkg3 are automatically updated when a change to pk2 is published? Right now it's requiring multiple PRs to make it so. I think there should be some internally linking but I'm not sure if that will work with how we're handling the package number updating - each package.json doesn't have the latest ver for itself because that's calculated during the publish in the build.