Run yarn outdated in your terminal to view all remaining outdated dependencies. Sometimes you may get lucky and find that the breaking change didn't apply to any of the functionality you were using, so no additional work is required. This means you should visit the GitHub repo for the package, view the changelog or release notes, and then make updates to your code as needed. ![]() By definition, a major version signifies a breaking change, such as the removal of a feature or API that your code may be using. This time, select any major version updates you'd like to tackle. Run yarn upgrade-interactive -latest in your terminal again. Choose all the minor and patch version updates, and then hit Enter. This opens up an interactive CLI that allows you to pick and choose which packages you'd like to update at this time. Run yarn upgrade-interactive -latest in your terminal. This may seem like a lot of time spent updating dependencies, but the truth is, if you are diligent in staying on top of things, it doesn't take long at all. I tend to update the dependencies in projects I own about every two weeks, which is once per sprint. Staying on top of your dependency updates helps you avoid the mess of dealing with several breaking changes at once. It's also much easier to update to one major version ahead, like from v2 to v3, than it is to update to several versions ahead, like from v2 to v7. ![]() By staying up to date, you have access to all the latest features and bug fixes in each third-party package you use. ![]() For any active code repository you maintain, it's essential to keep your dependencies up to date.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |