Updating jQuery and using migration library

LEGEND ,
Aug 18, 2020 Aug 18, 2020

Copy link to clipboard

Copied

Hello, all,

 

Got a doozy of a question.  One of the projects that I have been working on for the last eight years has many sub-sections, each isolated from the root; they all have separate application.cfc/cfm files.  Likewise, they were all developed at different times and in different ways.  As such, each also has a different version of jQuery, all of them out of date.  I'm tasked with updating all of them to jQuery 3.5.1.  I did just the root, so far, and it broke.  Searching Google, I believe the issue to be that I updated from an old version to the new without grabbing the migration 3.3.0 file and including it.

 

My question:  If I update all the old versions (1.3.x, 1.4.x, 1.6.x, 1.8.x, 1.10.x, 1.11.x, etc.) will the current migration library work across all of them?  Is there anything else that I need to do?  Will including the migration library introduce vulnerabilities that were addressed in v3.5.1?

 

V/r,

 

^ _ ^

TOPICS
Advanced techniques, Asynchronous, Builder, cfchart, Cffiddle, Connector, Database access, Documentation, Event gateways, Flash integration, Getting started, Monitoring, Reporting, Security, Server administration

Views

101

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 18, 2020 Aug 18, 2020

Copy link to clipboard

Copied

I'm using 3.5.1. Add an IF/ELSE rule so that you get to use the non-minified version of the jQueryMigrate library.  This way, you'll see any errors in the F12 Dev tools console.  The migration library will provide you with fallback support and report all warnings and errors in the browser console. If any of the jQuery libraries you are using have used non-public methods or deprecated functions, you'll see the warnings in the console log.

 

I recommend inserting the newer version of jQuery (w/non-minified jQuery migrate) for "developers only" and then testing features of the website to identify any JS errors.  I also recommend going to the plugin website of the libraries you are using to determine if they are actively maintained or not.  I've had to manually update some older libraries.

 

If you want all JS errors to be reported (this is another topic entirely), there are some third-party services that can collect it.  This is importany as different devices (other than what you are using) may encounter issues that you don't.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 18, 2020 Aug 18, 2020

Copy link to clipboard

Copied

Hi, Jamo,

 

Thanks for your reply.  Am I to understand, then, that the migrate library is only for troubleshooting code under the updated jQuery library, and is not intended to be used in a production environment?  I assumed that it was to be used as an 'add-on'.

 

V/r,

 

^ _ ^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 18, 2020 Aug 18, 2020

Copy link to clipboard

Copied

LATEST

The "minified" version adds full fallback suppoort so that older jQuery libraries will continue to keep functioning.

 

The "unminified" version additionally adds console warnings.

 

If your jQuery codes doesn't use any deprecated functions (ie, no warnings), you could remove the jQueryMigrate library altogether.  We use the "minified" version for production and the "unminified" version for development.  I've seen many websites where the unminified version is used for the all visitors, but I don't recommend it.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines