Search code examples
jqueryjquery-migrate

How well does the jQuery migrate plugin deal with deprecated code?


I will soon be tasked with upgrading to jQuery 1.9. That said I know a few places where we have live(); toggle(); hover(); and browser(); with a number of surprises on the way, -I'm sure.

If I add the migrate pluggin, will it continue to execute the old code -or just give me messages in the console to help me track down and fix things?

Has anyone made such a wide jump from 1.4.1 to 1.8 or 1.9? that has implemented the migrate pluggin and seen how well it works and the limitations?


Solution

  • The oficial jQuery site describes it pretty well http://jquery.com/upgrade-guide/1.9/#jquery-migrate-plugin

    The uncompressed development version of the jQuery Migrate plugin includes console log output to warn when specific deprecated and/or removed features are being used. This makes it valuable as a migration debugging tool for finding and remediating issues in existing jQuery code and plugins. It can be used for its diagnostics with versions of jQuery core all the way back to 1.6.4.

    The compressed version of the plugin does not generate any log output, and can be used on production sites when jQuery 1.9 or higher is desired but older incompatible jQuery code or plugins must also be used. Ideally this would only be used as a short-term solution, but that's a decision for you to make.