Skip to content

Upgrading jQuery to 3.6.0 #4891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 8, 2022
Merged

Conversation

elebitzero
Copy link
Member

@elebitzero elebitzero commented May 25, 2022

Changes proposed in this pull request:

  • Upgrade jQuery and jQuery Migrate.

The jQuery migration from 1.12.4 to the latest (3.6.0) version required many fixes due to deprecated and removed methods, and also some behavior changes.

Luckily, all the work was able to be done incrementally since all of the fixes were compatible with the old version (1.12.4).

All of the Cypress tests are passing, and I have done some additional manual testing.

Summary of Changes:

Pending:

  • The tablesorter dependency has an open PR to remove calls to deprecated functions. (Ref: Fix jquery deprecations Mottie/tablesorter#1786). The current tablesorter does work with jQuery 3.6.0, so it's still okay to go ahead.
  • May want to remove jquery-migrate. They don't recommend you have it enabled in production. We should just add it in dev builds when we are doing migrations from one jQuery version to the next.

Associated PRs:

@elebitzero elebitzero marked this pull request as ready for review May 26, 2022 22:33
@wetneb
Copy link
Member

wetneb commented May 27, 2022

Very nice, thank you for the amazing work!
In terms of schedule, I wonder if we want to have this in 3.6. This is going to be a breaking change for some extensions, I suspect. I guess we could decide to put this in 4.0 only and keep the 3.x series as compatible as possible. But then jQuery 1.12.4 does have some vulnerabilities so I guess there is also a case for migrating it in 3.x directly.

@elebitzero
Copy link
Member Author

elebitzero commented May 28, 2022

Is OpenRefine 3.6 going to be released soon?

In the OpenRefine UI code, I only found 10 actual issues which broke either the code or the cypress tests, which resulted in 53 tests failing. In some cases, one bug broke multiple tests.

A lot of the changes were migrating deprecated functions, but of course that isn't required. JQuery has deprecated many functions, but they have been very slow to remove them. If you look at the list, they have only removed functions in early jQuery 1.3-1.10. (Ref: https://api.jquery.com/category/removed/). There were only a handful of places OpenRefine was using removed jQuery functions.

For extensions, I would expect there would be few issues. If there are popular extensions outside of this repo, link them here and I can try them out with OpenRefine 3.6 and jQuery 3.6.00 to see if they work.

And yes, the upgrade does resolve four security issues. Not sure how critical that is if OpenRefine is mainly used locally or within a private network. I've added info to the PR for that.

@wetneb
Copy link
Member

wetneb commented May 29, 2022

Yes I would like to release 3.6 soon.
We have a list of popular extensions here: https://openrefine.org/download.html

@elebitzero
Copy link
Member Author

I looked at the list of extensions but most were not active and haven't been updated to work with OpenRefine 3.5.x.

If we postpone upgrading jQuery, that means any new extensions on 3.6.x will be using jQuery 1.12.4, and may break when jQuery gets upgraded in the next OpenRefine version.

Copy link
Member

@wetneb wetneb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging and adding to 3.6 since no concerns have been raised.

@wetneb wetneb merged commit 106dda4 into OpenRefine:master Jun 8, 2022
wetneb pushed a commit that referenced this pull request Jun 8, 2022
@wetneb wetneb mentioned this pull request Jun 9, 2022
antoine2711 pushed a commit that referenced this pull request Jun 21, 2022
antoine2711 pushed a commit that referenced this pull request Jun 21, 2022
antoine2711 pushed a commit that referenced this pull request Jun 21, 2022
antoine2711 pushed a commit that referenced this pull request Jun 21, 2022
antoine2711 pushed a commit that referenced this pull request Jun 21, 2022
antoine2711 pushed a commit that referenced this pull request Jun 21, 2022
antoine2711 pushed a commit that referenced this pull request Jul 6, 2022
@elebitzero elebitzero deleted the jquery-3.6.0-upgrade branch October 26, 2022 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants