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 1 commit into from May 22, 2019


Copy link

commented May 17, 2019


Update jQuery version to latest.

Tickets / Documentation

Add links to any relevant tickets and documentation.


This comment has been minimized.

Copy link

commented May 17, 2019

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:

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

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


This comment has been minimized.

Copy link
Contributor Author

commented May 17, 2019

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


This comment has been minimized.

Copy link

commented May 21, 2019


This comment has been minimized.

Copy link

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

@bookernath bookernath merged commit 347e8cf into bigcommerce:master May 22, 2019

@bookernath bookernath deleted the bookernath: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
None yet
6 participants
You can’t perform that action at this time.