I have two applications, A and B, that both rely on a shared UI library. If I need to make significant changes to the UI library, how can I version it in such a way that application A uses the new version while application B continues to use the old version? Any advice would be appreciated!
4 Answers
It's generally recommended to keep all internal packages updated to the latest version in a monorepo. If you change the UI library and it breaks application B, you shouldn't publish anything until you fix B. This ensures that all applications are in sync and working properly.
In a monorepo, the ideal situation is to keep everything at the same version. If you start wanting different versions for different apps, you might be better off separating them into individual repositories. This way, each can manage its own dependencies without conflict.
You should consider using a CLI tool that can check the versions of all your monorepo packages and update them accordingly. This can help with versioning when making major changes. Just remember, consistency is key — everything should ideally use the same version to avoid complications.
If you're temporarily migrating and need different versions, you can pin specific versions in each app's package.json instead of using `workspace:*`. This method works as a short-term solution. Just be careful — that's not a long-term fix. It's best to prioritize updating all apps to the latest version eventually.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically