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

Core: Fix the selector module, make CI green #552

Merged
merged 1 commit into from
Oct 29, 2024
Merged

Conversation

mgol
Copy link
Member

@mgol mgol commented Oct 29, 2024

Note: Please don't review the first commit, that's #551. I based it like that so that I can see the tests pass; it should be "unbased" before merging. For this reason alone I'm marking this as a draft.

Changes:

  1. Support legacy pseudos only in jQuery 3.7.0+.
  2. Downgrade sinon to a version working with IE 9+.
  3. Skip cross-domain ajax tests in IE 9.
  4. Skip tests requiring jQuery.Deferred.getErrorHook in <3.7.
  5. Don't require warnings for backwards-compatible pseudos if Proxy unsupported.

@mgol mgol added this to the 3.6.0 milestone Oct 29, 2024
@mgol mgol self-assigned this Oct 29, 2024
@mgol mgol requested a review from timmywil October 29, 2024 16:00
@mgol
Copy link
Member Author

mgol commented Oct 29, 2024

Since Edge in IE mode only covers IE 11, I also run the following locally on this branch and it passed:

npm run test:unit -- \
  -v --browserstack "IE_10" --browserstack "IE_9" \
  --jquery-migrate dev \
  --jquery 3.x-git --jquery 3.x-git.slim \
  --jquery 3.7.1 --jquery 3.7.1.slim --jquery 3.6.4 \
  --jquery 3.5.1 --jquery 3.4.1 \
  --jquery 3.3.1 --jquery 3.2.1 \
  --jquery 3.1.1 --jquery 3.0.0

@mgol
Copy link
Member Author

mgol commented Oct 29, 2024

Reviewing with whitespace changes disabled is much easier, BTW (too much indenting).

expectWarning :
function( _assert, _title, fn ) {
fn();
assert.ok( true, "No Proxy => warnings not expected" );
Copy link
Member Author

Choose a reason for hiding this comment

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

This is added so that the number of assertions is identical in both versions.

@@ -58,7 +58,7 @@
"qunit": "2.21.0",
"rollup": "4.22.4",
"selenium-webdriver": "4.21.0",
"sinon": "9.2.4",
Copy link
Member

Choose a reason for hiding this comment

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

I almost said something in the previous PR, but forgot the main branch still supports IE9.

@@ -1,3 +1,4 @@
import { jQueryVersionSince } from "../compareVersions.js";
Copy link
Member

Choose a reason for hiding this comment

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

Does this import mean we don't need it as a global in the eslint config?

Copy link
Member Author

Choose a reason for hiding this comment

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

Imports are in source, globals are in tests; the ESLint global is for tests. Tests are loaded as regular scripts.

Copy link
Member Author

Choose a reason for hiding this comment

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

...which annoys me a lot, as WebStorm keeps inserting the imports the first time I add usage in a test file and I have to remove it. 😅 When we no longer support IE, we can consider loading test files as modules and remove all the globals (plus, this would allow us to only keep one version of these utils; now they're duplicated).

Changes:
1. Support legacy pseudos only in jQuery 3.7.0+.
2. Downgrade sinon to a version working with IE 9+.
3. Skip cross-domain ajax tests in IE 9.
4. Skip tests requiring `jQuery.Deferred.getErrorHook` in <3.7.
5. Don't require warnings for backwards-compatible pseudos if Proxy unsupported.
@mgol mgol marked this pull request as ready for review October 29, 2024 16:12
@mgol mgol removed the Needs review label Oct 29, 2024
@mgol mgol merged commit bfd4b3a into jquery:main Oct 29, 2024
13 checks passed
@mgol mgol deleted the main-fixes branch October 29, 2024 16:14
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