Lets say I have a large code base built using React and other needed libraries. I have different repositories based on the functional breakdown. Each repo has its own package.json. With the way dependent packages release newer versions, its really hard to maintain dependent packages in turn resulting in audit issues and adding newer functionalities. Also, updating newer versions of React becomes a pain. So how do you all maintain javascript webapps? Any best practices or pointers to follow.
I've always tried to use monorepos to avoid different repos getting out of date and to avoid managing which versions work with which versions.<p>Updating dependencies is harder with a monorepo but for that I've tried to have as many unit and e2e tests as possible to try and make it a case of bump the version and assume no test failures means it worked (of course I do manual testing but if the tests worked it's likely that any problems will be small).
I’m curious about this too but there’s really only a few options. Npm update, etc, is the riskiest thing I do at this point, I’m extremely fed up with the state of packages and cross-compatibility.<p>I merely cross my fingers, if something fails, force peer-legacy install and hope for the best etc.<p>The only other options are:<p>- Don’t update, and when you do, update to an already old version not the latest<p>- Carefully scrutinize released updates and evaluate potential for breakages<p>I say this because I don’t primarily see any other options but hope we can get some more insight in the comments!