Upgrade jQuery UI from 1.8.8 to 1.12.1

Upgrade jQuery UI from 1.8.8 to 1.12.1

Hi,

I'm currently working on a project with a huge amount of legacy code and I need to upgrade the jQuery UI library to the latest version due to some security issues.

I've already read some of the upgrade guides (  https://jqueryui.com/upgrade-guide/ ) but it's still not clear to me the strategy to follow. Should I update versions sequentially and fix any possible issues that I might find for each individual upgrade? If so, how can I be sure about what should be changed? Each upgrade guide contains a lot of changes and my project has several pages with references to the library.

Any advice would be highly appreciated.