jQuery Migrate 1.4.1 released, and the path to jQuery 3.0

Posted on by

Version 1.4.1 of the jQuery Migrate plugin has been released. It has only a few changes but the most important of them fixes a problem with unquoted selectors that seems to be very common in some WordPress themes. In most cases Migrate can automatically fix this problem when it is used with jQuery 1.12.x or 2.2.x, although it may not be able to repair some complex selectors. The good news is that all the cases of unquoted selectors reported in WordPress themes appear to be fixable by this version of Migrate!

You can get this new version at all the old familiar places:

jQuery CDN: https://code.jquery.com/jquery-migrate-1.4.1.js or https://code.jquery.com/jquery-migrate-1.4.1.min.js

npm: Just npm install jquery-migrate@1.4.1 which is listed at https://www.npmjs.com/package/jquery-migrate.

Bower: In your bower.json file, use the following in the dependencies section to copy the CDN file:

 "dependencies": {
    ...
    "jquery-migrate": "https://code.jquery.com/jquery-migrate-1.4.1.js"
  },

As always, we recommend that you use jQuery Migrate as a tool to find and fix issues when upgrading web sites to new versions of jQuery and associated plugins. The non-minified version provides extensive diagnostics on the console. Take advantage of them, we built them for you!

Migrate and jQuery 3.0

jQuery Migrate will be continuing its role of making jQuery upgrades easier. A release candidate for jQuery Migrate 3.0 will be coming soon.

With all the years of accumulated changes, it isn’t possible to have a single version of jQuery Migrate that can support all the changes from jQuery 1.6 (five years ago!) all the way to jQuery 3.0. So, with Migrate 3.0 we recommend this process to upgrade to jQuery 3.0:

  • If you haven’t already, upgrade to the latest 1.x or 2.x version of jQuery, and the latest 1.x version of jQuery Migrate. (As of today that is jQuery 1.12.3 or jQuery 2.2.3, combined with jQuery Migrate 1.4.1.)
  • Fix any problems identified in the Migrate 1.x warning messages you may see on the console.
  • Remove the Migrate 1.x plugin and ensure the page still works properly without it loaded.
  • Upgrade to the latest jQuery 3.x and latest jQuery Migrate 3.x.
  • Fix any problems identified in the Migrate 3.x warning messages you may see on the console.
  • Remove the Migrate 3.x plugin and ensure the page still works properly without it loaded.

Please do use jQuery Migrate 3.0 as you explore this latest release of jQuery, it will greatly simplify finding problems. We want this plugin to be a tool that makes your development life easier. If you find problems you can report them at the issue tracker.

Many thanks to the jQuery core team for their help, and to Github user ekonoval for a very helpful bug report!

One thought on “jQuery Migrate 1.4.1 released, and the path to jQuery 3.0