0

Just a conceptual question. Does the migrate plugin search through the javascript files pulled in by the browser? Or does the migrate plugin only look through code that is being executed by the server?

I need to use the jquery migrate plugin to update my code to the latest version of jquery. I'm trying to replace all instances of code stripped away in previous version and replace it with the latest ones.

0

1 Answer 1

3

From jQuery migrate docs:

Upgrading libraries such as jQuery can be a lot of work, when breaking changes have been introduced. jQuery Migrate makes this easier, by restoring the APIs that were removed, and additionally shows warnings in the browser console (development version of jQuery Migrate only) when removed and/or deprecated APIs are used.

That way you can spot and fix what otherwise would have been errors, until you no longer need jQuery Migrate and can remove it.


Does it look through your files? No. It only warns when deprecated methods have been called from within your code

2
  • Thank you. Are there any tools that does so without having to run the code? Probably something that searches through a javascript code base and logs the old methods, or even updates them automatically? Or is it just simply just manual? Commented Jul 25, 2019 at 19:45
  • Possibly but I am personally not aware of them
    – charlietfl
    Commented Jul 25, 2019 at 19:49

Not the answer you're looking for? Browse other questions tagged or ask your own question.