aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2020-07-27 21:03:48 +0200
committerGitHub <noreply@github.com>2020-07-27 21:03:48 +0200
commitd2f577f13b545cea7e0ade31cd42e61831a559dd (patch)
tree1a0d78b317bac4f09c7286fa25848720bd040b8d
parentbcdaf1481543457b097cc42be2f2a9ac3db110cf (diff)
downloadjquery-ui-d2f577f13b545cea7e0ade31cd42e61831a559dd.tar.gz
jquery-ui-d2f577f13b545cea7e0ade31cd42e61831a559dd.zip
Tests: Update jQuery Migrate from 3.3.0 to 3.3.1
That upgrade makes UI pass the whole test suite without a single jQuery Migrate warning. 🎉 Closes gh-1932
-rw-r--r--Gruntfile.js4
-rw-r--r--bower.json2
-rw-r--r--external/jquery-migrate-3.3.1/LICENSE.txt (renamed from external/jquery-migrate-3.3.0/LICENSE.txt)0
-rw-r--r--external/jquery-migrate-3.3.1/jquery-migrate.js (renamed from external/jquery-migrate-3.3.0/jquery-migrate.js)31
-rw-r--r--tests/lib/bootstrap.js2
5 files changed, 18 insertions, 21 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
index 87a00a852..75004eb58 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -430,8 +430,8 @@ grunt.initConfig( {
"jquery-migrate-1.4.1/jquery-migrate.js": "jquery-migrate-1.4.1/dist/jquery-migrate.js",
"jquery-migrate-1.4.1/LICENSE.txt": "jquery-migrate-1.4.1/LICENSE.txt",
- "jquery-migrate-3.3.0/jquery-migrate.js": "jquery-migrate-3.3.0/dist/jquery-migrate.js",
- "jquery-migrate-3.3.0/LICENSE.txt": "jquery-migrate-3.3.0/LICENSE.txt"
+ "jquery-migrate-3.3.1/jquery-migrate.js": "jquery-migrate-3.3.1/dist/jquery-migrate.js",
+ "jquery-migrate-3.3.1/LICENSE.txt": "jquery-migrate-3.3.1/LICENSE.txt"
}
}
},
diff --git a/bower.json b/bower.json
index 6432c388d..e0c061a67 100644
--- a/bower.json
+++ b/bower.json
@@ -67,6 +67,6 @@
"jquery-3.5.0": "jquery#3.5.0",
"jquery-3.5.1": "jquery#3.5.1",
"jquery-migrate-1.4.1": "https://registry.npmjs.org/jquery-migrate/-/jquery-migrate-1.4.1.tgz",
- "jquery-migrate-3.3.0": "https://registry.npmjs.org/jquery-migrate/-/jquery-migrate-3.3.0.tgz"
+ "jquery-migrate-3.3.1": "https://registry.npmjs.org/jquery-migrate/-/jquery-migrate-3.3.1.tgz"
}
}
diff --git a/external/jquery-migrate-3.3.0/LICENSE.txt b/external/jquery-migrate-3.3.1/LICENSE.txt
index c0f86cb14..c0f86cb14 100644
--- a/external/jquery-migrate-3.3.0/LICENSE.txt
+++ b/external/jquery-migrate-3.3.1/LICENSE.txt
diff --git a/external/jquery-migrate-3.3.0/jquery-migrate.js b/external/jquery-migrate-3.3.1/jquery-migrate.js
index d0585ceb1..2e4bde47f 100644
--- a/external/jquery-migrate-3.3.0/jquery-migrate.js
+++ b/external/jquery-migrate-3.3.1/jquery-migrate.js
@@ -1,5 +1,5 @@
/*!
- * jQuery Migrate - v3.3.0 - 2020-05-05T01:57Z
+ * jQuery Migrate - v3.3.1 - 2020-06-25T01:07Z
* Copyright OpenJS Foundation and other contributors
*/
( function( factory ) {
@@ -24,7 +24,7 @@
} )( function( jQuery, window ) {
"use strict";
-jQuery.migrateVersion = "3.3.0";
+jQuery.migrateVersion = "3.3.1";
// Returns 0 if v1 == v2, -1 if v1 < v2, 1 if v1 > v2
function compareVersions( v1, v2 ) {
@@ -469,14 +469,19 @@ function isAutoPx( prop ) {
oldFnCss = jQuery.fn.css;
jQuery.fn.css = function( name, value ) {
- var origThis = this;
- if ( typeof name !== "string" ) {
+ var camelName,
+ origThis = this;
+ if ( name && typeof name === "object" && !Array.isArray( name ) ) {
jQuery.each( name, function( n, v ) {
jQuery.fn.css.call( origThis, n, v );
} );
}
- if ( typeof value === "number" && !isAutoPx( camelCase( name ) ) ) {
- migrateWarn( "Use of number-typed values is deprecated in jQuery.fn.css" );
+ if ( typeof value === "number" ) {
+ camelName = camelCase( name );
+ if ( !isAutoPx( camelName ) && !jQuery.cssNumber[ camelName ] ) {
+ migrateWarn( "Number-typed values are deprecated for jQuery.fn.css( \"" +
+ name + "\", value )" );
+ }
}
return oldFnCss.apply( this, arguments );
@@ -725,19 +730,11 @@ jQuery.htmlPrefilter = function( html ) {
var oldOffset = jQuery.fn.offset;
jQuery.fn.offset = function() {
- var docElem,
- elem = this[ 0 ],
- bogus = { top: 0, left: 0 };
+ var elem = this[ 0 ];
- if ( !elem || !elem.nodeType ) {
+ if ( elem && ( !elem.nodeType || !elem.getBoundingClientRect ) ) {
migrateWarn( "jQuery.fn.offset() requires a valid DOM element" );
- return undefined;
- }
-
- docElem = ( elem.ownerDocument || window.document ).documentElement;
- if ( !jQuery.contains( docElem, elem ) ) {
- migrateWarn( "jQuery.fn.offset() requires an element connected to a document" );
- return bogus;
+ return arguments.length ? this : undefined;
}
return oldOffset.apply( this, arguments );
diff --git a/tests/lib/bootstrap.js b/tests/lib/bootstrap.js
index d0c489dc0..6178e5052 100644
--- a/tests/lib/bootstrap.js
+++ b/tests/lib/bootstrap.js
@@ -123,7 +123,7 @@ function migrateUrl() {
if ( jqueryVersion === "git" ) {
url = "https://code.jquery.com/jquery-migrate-git";
} else if ( jqueryVersion[ 0 ] === "3" ) {
- url = "../../../external/jquery-migrate-3.3.0/jquery-migrate";
+ url = "../../../external/jquery-migrate-3.3.1/jquery-migrate";
} else if ( jqueryVersion[ 0 ] === "1" || jqueryVersion[ 0 ] === "2" ) {
url = "../../../external/jquery-migrate-1.4.1/jquery-migrate";
} else if ( jqueryVersion === "custom" ) {