Skip to content
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

chore(storefront): STRF-6720 Update jQuery to 3.4.1 #1502

Merged
merged 1 commit into from May 22, 2019
Merged

chore(storefront): STRF-6720 Update jQuery to 3.4.1 #1502

merged 1 commit into from May 22, 2019

Conversation

@bookernath
Copy link
Contributor

@bookernath bookernath commented May 17, 2019

What?

Update jQuery version to latest.

Tickets / Documentation

Add links to any relevant tickets and documentation.

@sacr3dc0w
Copy link
Contributor

@sacr3dc0w sacr3dc0w commented May 17, 2019

https://www.i-programmer.info/news/167-javascript/12693-sizzle-out-in-jquery-34.html

Now that many of these selectors have made their way into modern browsers, it’s almost time to say goodbye to Sizzle. But in order to remove Sizzle in jQuery 4.0, we will also need to remove what we refer to as positional selectors, which are non-standard selectors.
Specifically, jQuery 3.4.0 is deprecating :first, :last, :eq, :even, :odd, :lt, :gt, and :nth. When we remove Sizzle, we’ll replace it with a small wrapper around querySelectorAll, and it would be almost impossible to reimplement these selectors without a larger selector engine.
We think this trade-off is worth it. Keep in mind we will still support the positional methods, such as .first, .last, and .eq. Anything you can do with positional selectors, you can do with positional methods instead. They perform better anyway.

  • :first
  • :last
  • :eq
  • :even
  • :odd
  • :lt
  • :gt
  • :nth

Line 42 of common/select-option-plugin.js:

Replace:
const $elementNowAtPreviousIndex = selectElement.find(option:eq(${previousIndex}));

With:
const $elementNowAtPreviousIndex = selectElement.find('option').eq(previousIndex);

Loading

@bookernath
Copy link
Contributor Author

@bookernath bookernath commented May 17, 2019

Thanks for the callout @sacr3dc0w ! We'll update.

Loading

@bigbot
Copy link

@bigbot bigbot commented May 21, 2019

Loading

@bc-sandeep
Copy link
Contributor

@bc-sandeep bc-sandeep commented May 22, 2019

💚 smoke tested manually without util bump. looks good

will also monitor automated tests on staging before including this in next cornerstone release

Loading

@bookernath bookernath merged commit 347e8cf into bigcommerce:master May 22, 2019
@bookernath bookernath deleted the jq-3.4.1 branch May 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants