From 9edfd2a2580e3c0251ae9eff26defdb686a29c26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Go=C5=82e=CC=A8biowski-Owczarek?= Date: Sat, 17 Jan 2026 22:23:46 -0600 Subject: [PATCH] Build: Update jQuery 4.0.0-rc.1 to 4.0.0, Migrate 4.0.0-beta.1 to 4.0.1 --- Gruntfile.js | 4 +- bower.json | 4 +- .../LICENSE.txt | 0 .../jquery.js | 62 +++++-------------- external/jquery-migrate-4.x/jquery-migrate.js | 32 ++++++++-- jtr-stable.yml | 2 +- tests/lib/qunit.js | 2 +- tests/unit/subsuite.js | 2 +- 8 files changed, 49 insertions(+), 59 deletions(-) rename external/{jquery-4.0.0-rc.1 => jquery-4.0.0}/LICENSE.txt (100%) rename external/{jquery-4.0.0-rc.1 => jquery-4.0.0}/jquery.js (99%) diff --git a/Gruntfile.js b/Gruntfile.js index 0af16188106..7f40028731f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -316,8 +316,8 @@ grunt.initConfig( { "jquery-3.7.1/jquery.js": "jquery-3.7.1/dist/jquery.js", "jquery-3.7.1/LICENSE.txt": "jquery-3.7.1/LICENSE.txt", - "jquery-4.0.0-rc.1/jquery.js": "jquery-4.0.0-rc.1/dist/jquery.js", - "jquery-4.0.0-rc.1/LICENSE.txt": "jquery-4.0.0-rc.1/LICENSE.txt", + "jquery-4.0.0/jquery.js": "jquery-4.0.0/dist/jquery.js", + "jquery-4.0.0/LICENSE.txt": "jquery-4.0.0/LICENSE.txt", "jquery-migrate-1.x/jquery-migrate.js": "jquery-migrate-1.x/dist/jquery-migrate.js", diff --git a/bower.json b/bower.json index ec775027b9a..d80d8ba9fbc 100644 --- a/bower.json +++ b/bower.json @@ -38,9 +38,9 @@ "jquery-3.6.4": "jquery#3.6.4", "jquery-3.7.0": "jquery#3.7.0", "jquery-3.7.1": "jquery#3.7.1", - "jquery-4.0.0-rc.1": "jquery#4.0.0-rc.1", + "jquery-4.0.0": "jquery#4.0.0", "jquery-migrate-1.x": "https://registry.npmjs.org/jquery-migrate/-/jquery-migrate-1.4.1.tgz", "jquery-migrate-3.x": "https://registry.npmjs.org/jquery-migrate/-/jquery-migrate-3.6.0.tgz", - "jquery-migrate-4.x": "https://registry.npmjs.org/jquery-migrate/-/jquery-migrate-4.0.0-beta.1.tgz" + "jquery-migrate-4.x": "https://registry.npmjs.org/jquery-migrate/-/jquery-migrate-4.0.1.tgz" } } diff --git a/external/jquery-4.0.0-rc.1/LICENSE.txt b/external/jquery-4.0.0/LICENSE.txt similarity index 100% rename from external/jquery-4.0.0-rc.1/LICENSE.txt rename to external/jquery-4.0.0/LICENSE.txt diff --git a/external/jquery-4.0.0-rc.1/jquery.js b/external/jquery-4.0.0/jquery.js similarity index 99% rename from external/jquery-4.0.0-rc.1/jquery.js rename to external/jquery-4.0.0/jquery.js index 004ecb2046b..097b0883448 100644 --- a/external/jquery-4.0.0-rc.1/jquery.js +++ b/external/jquery-4.0.0/jquery.js @@ -1,12 +1,12 @@ /*! - * jQuery JavaScript Library v4.0.0-rc.1 + * jQuery JavaScript Library v4.0.0 * https://jquery.com/ * * Copyright OpenJS Foundation and other contributors * Released under the MIT license * https://jquery.com/license/ * - * Date: 2025-08-11T16:40Z + * Date: 2026-01-18T00:20Z */ ( function( global, factory ) { @@ -116,7 +116,7 @@ function DOMEval( code, node, doc ) { } } -var version = "4.0.0-rc.1", +var version = "4.0.0", rhtmlSuffix = /HTML$/i, @@ -530,54 +530,20 @@ var whitespace = "[\\x20\\t\\r\\n\\f]"; var isIE = document$1.documentMode; -// Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only -// Make sure the `:has()` argument is parsed unforgivingly. -// We include `*` in the test to detect buggy implementations that are -// _selectively_ forgiving (specifically when the list includes at least -// one valid selector). -// Note that we treat complete lack of support for `:has()` as if it were -// spec-compliant support, which is fine because use of `:has()` in such -// environments will fail in the qSA path and fall back to jQuery traversal -// anyway. -try { - document$1.querySelector( ":has(*,:jqfake)" ); - support.cssHas = false; -} catch ( e ) { - support.cssHas = true; -} - -// Build QSA regex. -// Regex strategy adopted from Diego Perini. -var rbuggyQSA = []; - -if ( isIE ) { - rbuggyQSA.push( - - // Support: IE 9 - 11+ - // IE's :disabled selector does not pick up the children of disabled fieldsets - ":enabled", - ":disabled", - - // Support: IE 11+ - // IE 11 doesn't find elements on a `[name='']` query in some cases. - // Adding a temporary attribute to the document before the selection works - // around the issue. - "\\[" + whitespace + "*name" + whitespace + "*=" + - whitespace + "*(?:''|\"\")" - ); -} +var rbuggyQSA = isIE && new RegExp( -if ( !support.cssHas ) { + // Support: IE 9 - 11+ + // IE's :disabled selector does not pick up the children of disabled fieldsets + ":enabled|:disabled|" + - // Our regular `try-catch` mechanism fails to detect natively-unsupported - // pseudo-classes inside `:has()` (such as `:has(:contains("Foo"))`) - // in browsers that parse the `:has()` argument as a forgiving selector list. - // https://drafts.csswg.org/selectors/#relational now requires the argument - // to be parsed unforgivingly, but browsers have not yet fully adjusted. - rbuggyQSA.push( ":has" ); -} + // Support: IE 11+ + // IE 11 doesn't find elements on a `[name='']` query in some cases. + // Adding a temporary attribute to the document before the selection works + // around the issue. + "\\[" + whitespace + "*name" + whitespace + "*=" + + whitespace + "*(?:''|\"\")" -rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) ); +); var rtrimCSS = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", diff --git a/external/jquery-migrate-4.x/jquery-migrate.js b/external/jquery-migrate-4.x/jquery-migrate.js index 70d521582ad..598d8bb64f4 100644 --- a/external/jquery-migrate-4.x/jquery-migrate.js +++ b/external/jquery-migrate-4.x/jquery-migrate.js @@ -1,5 +1,5 @@ /*! - * jQuery Migrate - v4.0.0-beta.1 - 2025-08-11T21:16Z + * jQuery Migrate - v4.0.1 - 2026-01-18T00:35Z * Copyright OpenJS Foundation and other contributors * Released under the MIT license * https://jquery.com/license/ @@ -26,7 +26,7 @@ } )( function( jQuery, window ) { "use strict"; -jQuery.migrateVersion = "4.0.0-beta.1"; +jQuery.migrateVersion = "4.0.1"; // Returns 0 if v1 == v2, -1 if v1 < v2, 1 if v1 > v2 function compareVersions( v1, v2 ) { @@ -55,7 +55,7 @@ function jQueryVersionSince( version ) { var disabledPatches = Object.create( null ); // Don't apply patches for specified codes. Helpful for code bases -// where some Migrate warnings have been addressed and it's desirable +// where some Migrate warnings have been addressed, and it's desirable // to avoid needless patches or false positives. jQuery.migrateDisablePatches = function() { var i; @@ -260,6 +260,10 @@ var arr = [], splice = arr.splice, class2type = {}, + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([a-z])/g, + // Require that the "whitespace run" starts from a non-whitespace // to avoid O(N^2) behavior when the engine would try matching "\s+$" at each space position. rtrim = /^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g; @@ -338,6 +342,26 @@ migratePatchAndWarnFunc( jQuery, "isWindow", "jQuery.isWindow() is removed" ); +migratePatchAndWarnFunc( jQuery, "now", Date.now, "now", + "jQuery.now() is removed; use Date.now()" +); + +// Used by camelCase as callback to replace() +function fcamelCase( _all, letter ) { + return letter.toUpperCase(); +} + +migratePatchAndWarnFunc( jQuery, "camelCase", + function( string ) { + + // Convert dashed to camelCase; used by the css and data modules + // Support: IE <=9 - 11, Edge 12 - 15 + // Microsoft forgot to hump their vendor prefix (trac-9572) + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, "camelCase", + "jQuery.camelCase() is removed" +); + // Bind a function to a context, optionally partially applying any // arguments. // jQuery.proxy is deprecated to promote standards (specifically Function#bind) @@ -652,7 +676,7 @@ migratePatchFunc( jQuery.fn, "toggleClass", function( state ) { // If the element has a class name or if we're passed `false`, // then remove the whole classname (if there was one, the above saved it). - // Otherwise bring back whatever was previously saved (if anything), + // Otherwise, bring back whatever was previously saved (if anything), // falling back to the empty string if nothing was stored. if ( this.setAttribute ) { this.setAttribute( "class", diff --git a/jtr-stable.yml b/jtr-stable.yml index afe4d30b984..954bfe964b8 100644 --- a/jtr-stable.yml +++ b/jtr-stable.yml @@ -31,7 +31,7 @@ test-urls: runs: jquery: - - 4.0.0-rc.1 + - 4.0.0 - 3.7.1 - 3.6.4 - 2.2.4 diff --git a/tests/lib/qunit.js b/tests/lib/qunit.js index 0f4985a67f9..6298a2cd808 100644 --- a/tests/lib/qunit.js +++ b/tests/lib/qunit.js @@ -26,7 +26,7 @@ QUnit.config.urlConfig.push( { "3.5.0", "3.5.1", "3.6.0", "3.6.1", "3.6.2", "3.6.3", "3.6.4", "3.7.0", "3.7.1", - "4.0.0-rc.1", + "4.0.0", "3.x-git", "git", "custom" ], tooltip: "Which jQuery Core version to test against" diff --git a/tests/unit/subsuite.js b/tests/unit/subsuite.js index 4e634b363a8..05ff2a50b8a 100644 --- a/tests/unit/subsuite.js +++ b/tests/unit/subsuite.js @@ -12,7 +12,7 @@ var versions = [ "3.5.0", "3.5.1", "3.6.0", "3.6.1", "3.6.2", "3.6.3", "3.6.4", "3.7.0", "3.7.1", - "4.0.0-rc.1", + "4.0.0", "3.x-git", "git", "custom" ], additionalTests = {