Skip to content

Commit

Permalink
Upgrade to jQuery 3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelfranca committed Aug 19, 2016
1 parent f039ffd commit 340cb13
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 31 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## 4.2.0

- Update jQuery to 3.1.0

## 4.2.0

- Support jQuery 3.x
- Update jquery-ujs to 1.2.2
- Update jQuery to 1.12.4 and 2.2.4
Expand Down
1 change: 1 addition & 0 deletions VERSIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

| Gem | jQuery | jQuery UJS | jQuery UI |
|--------|--------|------------| ----------|
| 4.2.1 | 1.12.4 & 2.2.4 & 3.1.0 | 1.2.2 | - |
| 4.2.0 | 1.12.4 & 2.2.4 & 3.0.0 | 1.2.2 | - |
| 4.1.1 | 1.12.1 & 2.2.1 | 1.2.1 | - |
| 4.1.0 | 1.12.0 & 2.2.0 | 1.2.0 | - |
Expand Down
4 changes: 2 additions & 2 deletions lib/jquery/rails/version.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module Jquery
module Rails
VERSION = "4.2.0"
VERSION = "4.2.1"
JQUERY_VERSION = "1.12.4"
JQUERY_2_VERSION = "2.2.4"
JQUERY_3_VERSION = "3.0.0"
JQUERY_3_VERSION = "3.1.0"
JQUERY_UJS_VERSION = "1.2.2"
end
end
85 changes: 61 additions & 24 deletions vendor/assets/javascripts/jquery3.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*eslint-disable no-unused-vars*/
/*!
* jQuery JavaScript Library v3.0.0
* jQuery JavaScript Library v3.1.0
* https://jquery.com/
*
* Includes Sizzle.js
Expand All @@ -9,7 +10,7 @@
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2016-06-09T18:02Z
* Date: 2016-07-07T21:44Z
*/
( function( global, factory ) {

Expand Down Expand Up @@ -37,7 +38,7 @@
}

// Pass this if window is not defined yet
}( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) {

// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1
// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode
Expand Down Expand Up @@ -81,10 +82,14 @@ var support = {};
script.text = code;
doc.head.appendChild( script ).parentNode.removeChild( script );
}
/* global Symbol */
// Defining this global in .eslintrc would create a danger of using the global
// unguarded in another place, it seems safer to define global only for this module



var
version = "3.0.0",
version = "3.1.0",

// Define a local copy of jQuery
jQuery = function( selector, context ) {
Expand Down Expand Up @@ -316,7 +321,11 @@ jQuery.extend( {
},

isEmptyObject: function( obj ) {

/* eslint-disable no-unused-vars */
// See https://github.com/eslint/eslint/issues/6125
var name;

for ( name in obj ) {
return false;
}
Expand Down Expand Up @@ -506,15 +515,9 @@ jQuery.extend( {
support: support
} );

// JSHint would error on this code due to the Symbol not being defined in ES5.
// Defining this global in .jshintrc would create a danger of using the global
// unguarded in another place, it seems safer to just disable JSHint for these
// three lines.
/* jshint ignore: start */
if ( typeof Symbol === "function" ) {
jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
}
/* jshint ignore: end */

// Populate the class2type map
jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
Expand Down Expand Up @@ -2753,6 +2756,7 @@ jQuery.escapeSelector = Sizzle.escape;




var dir = function( elem, dir, until ) {
var matched = [],
truncate = until !== undefined;
Expand Down Expand Up @@ -2794,7 +2798,6 @@ var risSimple = /^.[^:#\[\.,]*$/;
function winnow( elements, qualifier, not ) {
if ( jQuery.isFunction( qualifier ) ) {
return jQuery.grep( elements, function( elem, i ) {
/* jshint -W018 */
return !!qualifier.call( elem, i, elem ) !== not;
} );

Expand Down Expand Up @@ -3420,7 +3423,7 @@ function adoptValue( value, resolve, reject ) {
// For Promises/A+, convert exceptions into rejections
// Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in
// Deferred#then to conditionally suppress rejection.
} catch ( /*jshint -W002 */ value ) {
} catch ( value ) {

// Support: Android 4.0 only
// Strict mode functions invoked without .call/.apply get global-object context
Expand Down Expand Up @@ -3785,12 +3788,29 @@ jQuery.Deferred.exceptionHook = function( error, stack ) {



jQuery.readyException = function( error ) {
window.setTimeout( function() {
throw error;
} );
};




// The deferred used on DOM ready
var readyList = jQuery.Deferred();

jQuery.fn.ready = function( fn ) {

readyList.then( fn );
readyList
.then( fn )

// Wrap jQuery.readyException in a function so that the lookup
// happens at the time of error handling instead of callback
// registration.
.catch( function( error ) {
jQuery.readyException( error );
} );

return this;
};
Expand Down Expand Up @@ -3930,7 +3950,6 @@ var acceptData = function( owner ) {
// - Node.DOCUMENT_NODE
// - Object
// - Any
/* jshint -W018 */
return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
};

Expand Down Expand Up @@ -4431,8 +4450,12 @@ function adjustCSS( elem, prop, valueParts, tween ) {
scale = 1,
maxIterations = 20,
currentValue = tween ?
function() { return tween.cur(); } :
function() { return jQuery.css( elem, prop, "" ); },
function() {
return tween.cur();
} :
function() {
return jQuery.css( elem, prop, "" );
},
initial = currentValue(),
unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),

Expand Down Expand Up @@ -5474,8 +5497,14 @@ jQuery.fn.extend( {


var

/* eslint-disable max-len */

// See https://github.com/eslint/eslint/issues/3229
rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,

/* eslint-enable */

// Support: IE <=10 - 11, Edge 12 - 13
// In IE/Edge using regex groups here causes severe slowdowns.
// See https://connect.microsoft.com/IE/feedback/details/1736512/
Expand Down Expand Up @@ -6631,7 +6660,7 @@ function genFx( type, includeWidth ) {
// If we include width, step value is 1 to do all cssExpand values,
// otherwise step value is 2 to skip over Left and Right
includeWidth = includeWidth ? 1 : 0;
for ( ; i < 4 ; i += 2 - includeWidth ) {
for ( ; i < 4; i += 2 - includeWidth ) {
which = cssExpand[ i ];
attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
}
Expand All @@ -6658,7 +6687,6 @@ function createTween( value, prop, animation ) {
}

function defaultPrefilter( elem, props, opts ) {
/* jshint validthis: true */
var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
isBox = "width" in props || "height" in props,
anim = this,
Expand Down Expand Up @@ -6800,9 +6828,12 @@ function defaultPrefilter( elem, props, opts ) {
showHide( [ elem ], true );
}

/* jshint -W083 */
/* eslint-disable no-loop-func */

anim.done( function() {

/* eslint-enable no-loop-func */

// The final step of a "hide" animation is actually hiding the element
if ( !hidden ) {
showHide( [ elem ] );
Expand Down Expand Up @@ -6887,7 +6918,7 @@ function Animation( elem, properties, options ) {
index = 0,
length = animation.tweens.length;

for ( ; index < length ; index++ ) {
for ( ; index < length; index++ ) {
animation.tweens[ index ].run( percent );
}

Expand Down Expand Up @@ -6928,7 +6959,7 @@ function Animation( elem, properties, options ) {
return this;
}
stopped = true;
for ( ; index < length ; index++ ) {
for ( ; index < length; index++ ) {
animation.tweens[ index ].run( 1 );
}

Expand All @@ -6946,7 +6977,7 @@ function Animation( elem, properties, options ) {

propFilter( props, animation.opts.specialEasing );

for ( ; index < length ; index++ ) {
for ( ; index < length; index++ ) {
result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );
if ( result ) {
if ( jQuery.isFunction( result.stop ) ) {
Expand Down Expand Up @@ -7000,7 +7031,7 @@ jQuery.Animation = jQuery.extend( Animation, {
index = 0,
length = props.length;

for ( ; index < length ; index++ ) {
for ( ; index < length; index++ ) {
prop = props[ index ];
Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];
Animation.tweeners[ prop ].unshift( callback );
Expand Down Expand Up @@ -7861,11 +7892,16 @@ jQuery.extend( {

while ( i-- ) {
option = options[ i ];

/* eslint-disable no-cond-assign */

if ( option.selected =
jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
) {
optionSet = true;
}

/* eslint-enable no-cond-assign */
}

// Force browsers to behave consistently when non-matching value is set
Expand Down Expand Up @@ -8574,6 +8610,7 @@ jQuery.extend( {
processData: true,
async: true,
contentType: "application/x-www-form-urlencoded; charset=UTF-8",

/*
timeout: 0,
data: null,
Expand Down Expand Up @@ -10034,4 +10071,4 @@ if ( !noGlobal ) {


return jQuery;
} ) );
} );
8 changes: 4 additions & 4 deletions vendor/assets/javascripts/jquery3.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion vendor/assets/javascripts/jquery3.min.map

Large diffs are not rendered by default.

0 comments on commit 340cb13

Please sign in to comment.