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

jquery-migrate: jQuery 4.0 error: jQuery.expr.match.bool does not exist #495

Closed
nagyimre1980 opened this issue Jan 30, 2024 · 4 comments · Fixed by #496
Closed

jquery-migrate: jQuery 4.0 error: jQuery.expr.match.bool does not exist #495

nagyimre1980 opened this issue Jan 30, 2024 · 4 comments · Fixed by #496
Assignees
Milestone

Comments

@nagyimre1980
Copy link

jquery-migrate has been incompatible with jquery version 4.0 for a few weeks.
"Query.expr.match.bool" does not exist.
The following part was removed from jquery 4.0 a few weeks ago. "bool: new RegExp( "^(?:" + booleans + ")$", "i" ),"
(jquery 4.0: https://releases.jquery.com/git/jquery-git.js)

migratePatchFunc( jQuery.fn, "removeAttr", function( name ) {
var self = this,
patchNeeded = false;

jQuery.each( name.match( rmatchNonSpace ), function( _i, attr ) {
	if ( jQuery.expr.match.bool.test( attr ) ) {
@mgol
Copy link
Member

mgol commented Feb 1, 2024

I am aware of this issue, we're seeing it in our tests at https://swarm.jquery.org/project/jquerymigrate. There's no urgency since Git versions of jQuery & compatibility with them is not supported but we'll fix it.

I haven't created an issue for it so we can use this one for tracking.

@mgol mgol added this to the 3.5.0 milestone Feb 1, 2024
@mgol mgol self-assigned this Feb 1, 2024
@mgol
Copy link
Member

mgol commented Feb 1, 2024

For the record, the cause is jquery/jquery#5384.

mgol added a commit to mgol/jquery-migrate that referenced this issue Feb 3, 2024
In jquery/jquery#5384, `jQuery.expr.match.bool` stopped being defined and the
regex matching boolean attributes is no longer exposed. Inline it in Migrate
to avoid it crashing on jQuery 4.x.

Fixes jquerygh-495
@mgol
Copy link
Member

mgol commented Feb 3, 2024

Fix at #496.

@mgol mgol changed the title jquery-migrate: Jquery 4.0 incomplete Query.expr.match.bool** does not exist jquery-migrate: jQuery 4.0 incomplete jQuery.expr.match.bool** does not exist Feb 3, 2024
@mgol mgol changed the title jquery-migrate: jQuery 4.0 incomplete jQuery.expr.match.bool** does not exist jquery-migrate: jQuery 4.0 error: jQuery.expr.match.bool does not exist Feb 3, 2024
@mgol mgol closed this as completed in #496 Feb 3, 2024
mgol added a commit that referenced this issue Feb 3, 2024
In jquery/jquery#5384, `jQuery.expr.match.bool` stopped being defined and the
regex matching boolean attributes is no longer exposed. Inline it in Migrate
to avoid it crashing on jQuery 4.x.

Fixes gh-495
Closes gh-496
@mgol mgol modified the milestones: 3.5.0, 3.4.2 Jul 8, 2024
@mgol
Copy link
Member

mgol commented Jul 12, 2024

Released as part of jQuery Migrate 3.5.0: https://github.com/jquery/jquery-migrate/releases/tag/3.5.0.

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 a pull request may close this issue.

2 participants