Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace :react do
desc "Install the JavaScript dependencies"
task :install do
Dir.chdir("react-builds") do
`yarn install`
`yarn upgrade`
end
end
end
Expand Down
3 changes: 2 additions & 1 deletion VERSIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ You can control what version of React.js (and JSXTransformer) is used by `react-

| Gem | React.js |
|----------|----------|
| master | 15.4.1 |
| master | 15.4.2 |
| 1.11.0 | 15.4.2 |
| 1.10.0 | 15.4.1 |
| 1.9.0 | 15.3.0 |
| 1.8.2 | 15.3.0 |
Expand Down
3,768 changes: 2,064 additions & 1,704 deletions lib/assets/react-source/development-with-addons/react-server.js

Large diffs are not rendered by default.

3,842 changes: 2,101 additions & 1,741 deletions lib/assets/react-source/development-with-addons/react.js

Large diffs are not rendered by default.

182 changes: 104 additions & 78 deletions lib/assets/react-source/development/react-server.js

Large diffs are not rendered by default.

159 changes: 96 additions & 63 deletions lib/assets/react-source/development/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,15 @@
/* 4 */
/***/ function(module, exports) {

/*
object-assign
(c) Sindre Sorhus
@license MIT
*/

'use strict';
/* eslint-disable no-unused-vars */
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var hasOwnProperty = Object.prototype.hasOwnProperty;
var propIsEnumerable = Object.prototype.propertyIsEnumerable;

Expand All @@ -366,7 +373,7 @@
// Detect buggy property enumeration order in older V8 versions.

// https://bugs.chromium.org/p/v8/issues/detail?id=4118
var test1 = new String('abc'); // eslint-disable-line
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
test1[5] = 'de';
if (Object.getOwnPropertyNames(test1)[0] === '5') {
return false;
Expand Down Expand Up @@ -395,7 +402,7 @@
}

return true;
} catch (e) {
} catch (err) {
// We don't expect any of the above to throw, but better to be safe.
return false;
}
Expand All @@ -415,8 +422,8 @@
}
}

if (Object.getOwnPropertySymbols) {
symbols = Object.getOwnPropertySymbols(from);
if (getOwnPropertySymbols) {
symbols = getOwnPropertySymbols(from);
for (var i = 0; i < symbols.length; i++) {
if (propIsEnumerable.call(from, symbols[i])) {
to[symbols[i]] = from[symbols[i]];
Expand Down Expand Up @@ -696,17 +703,6 @@
}
};

var fiveArgumentPooler = function (a1, a2, a3, a4, a5) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
Klass.call(instance, a1, a2, a3, a4, a5);
return instance;
} else {
return new Klass(a1, a2, a3, a4, a5);
}
};

var standardReleaser = function (instance) {
var Klass = this;
!(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
Expand Down Expand Up @@ -746,8 +742,7 @@
oneArgumentPooler: oneArgumentPooler,
twoArgumentPooler: twoArgumentPooler,
threeArgumentPooler: threeArgumentPooler,
fourArgumentPooler: fourArgumentPooler,
fiveArgumentPooler: fiveArgumentPooler
fourArgumentPooler: fourArgumentPooler
};

module.exports = PooledClass;
Expand Down Expand Up @@ -823,12 +818,18 @@
* will remain to ensure logic does not differ in production.
*/

function invariant(condition, format, a, b, c, d, e, f) {
if (process.env.NODE_ENV !== 'production') {
var validateFormat = function validateFormat(format) {};

if (process.env.NODE_ENV !== 'production') {
validateFormat = function validateFormat(format) {
if (format === undefined) {
throw new Error('invariant requires an error message argument');
}
}
};
}

function invariant(condition, format, a, b, c, d, e, f) {
validateFormat(format);

if (!condition) {
var error;
Expand Down Expand Up @@ -3081,7 +3082,14 @@
// We warn in this case but don't throw. We expect the element creation to
// succeed and there will likely be errors in render.
if (!validType) {
process.env.NODE_ENV !== 'production' ? warning(false, 'React.createElement: type should not be null, undefined, boolean, or ' + 'number. It should be a string (for DOM elements) or a ReactClass ' + '(for composite components).%s', getDeclarationErrorAddendum()) : void 0;
if (typeof type !== 'function' && typeof type !== 'string') {
var info = '';
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.';
}
info += getDeclarationErrorAddendum();
process.env.NODE_ENV !== 'production' ? warning(false, 'React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', type == null ? type : typeof type, info) : void 0;
}
}

var element = ReactElement.createElement.apply(this, arguments);
Expand Down Expand Up @@ -4052,7 +4060,7 @@

'use strict';

module.exports = '15.4.1';
module.exports = '15.4.2';

/***/ },
/* 31 */
Expand Down Expand Up @@ -4250,6 +4258,13 @@

var internalInstanceKey = '__reactInternalInstance$' + Math.random().toString(36).slice(2);

/**
* Check if a given node should be cached.
*/
function shouldPrecacheNode(node, nodeID) {
return node.nodeType === 1 && node.getAttribute(ATTR_NAME) === String(nodeID) || node.nodeType === 8 && node.nodeValue === ' react-text: ' + nodeID + ' ' || node.nodeType === 8 && node.nodeValue === ' react-empty: ' + nodeID + ' ';
}

/**
* Drill down (through composites and empty components) until we get a host or
* host text component.
Expand Down Expand Up @@ -4315,7 +4330,7 @@
}
// We assume the child nodes are in the same order as the child instances.
for (; childNode !== null; childNode = childNode.nextSibling) {
if (childNode.nodeType === 1 && childNode.getAttribute(ATTR_NAME) === String(childID) || childNode.nodeType === 8 && childNode.nodeValue === ' react-text: ' + childID + ' ' || childNode.nodeType === 8 && childNode.nodeValue === ' react-empty: ' + childID + ' ') {
if (shouldPrecacheNode(childNode, childID)) {
precacheNode(childInst, childNode);
continue outer;
}
Expand Down Expand Up @@ -6556,17 +6571,6 @@
}
};

var fiveArgumentPooler = function (a1, a2, a3, a4, a5) {
var Klass = this;
if (Klass.instancePool.length) {
var instance = Klass.instancePool.pop();
Klass.call(instance, a1, a2, a3, a4, a5);
return instance;
} else {
return new Klass(a1, a2, a3, a4, a5);
}
};

var standardReleaser = function (instance) {
var Klass = this;
!(instance instanceof Klass) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Trying to release an instance into a pool of a different type.') : _prodInvariant('25') : void 0;
Expand Down Expand Up @@ -6606,8 +6610,7 @@
oneArgumentPooler: oneArgumentPooler,
twoArgumentPooler: twoArgumentPooler,
threeArgumentPooler: threeArgumentPooler,
fourArgumentPooler: fourArgumentPooler,
fiveArgumentPooler: fiveArgumentPooler
fourArgumentPooler: fourArgumentPooler
};

module.exports = PooledClass;
Expand Down Expand Up @@ -11425,12 +11428,18 @@
} else {
var contentToUse = CONTENT_TYPES[typeof props.children] ? props.children : null;
var childrenToUse = contentToUse != null ? null : props.children;
// TODO: Validate that text is allowed as a child of this node
if (contentToUse != null) {
// TODO: Validate that text is allowed as a child of this node
if (process.env.NODE_ENV !== 'production') {
setAndValidateContentChildDev.call(this, contentToUse);
// Avoid setting textContent when the text is empty. In IE11 setting
// textContent on a text area will cause the placeholder to not
// show within the textarea until it has been focused and blurred again.
// https://github.com/facebook/react/issues/6731#issuecomment-254874553
if (contentToUse !== '') {
if (process.env.NODE_ENV !== 'production') {
setAndValidateContentChildDev.call(this, contentToUse);
}
DOMLazyTree.queueText(lazyTree, contentToUse);
}
DOMLazyTree.queueText(lazyTree, contentToUse);
} else if (childrenToUse != null) {
var mountImages = this.mountChildren(childrenToUse, transaction, context);
for (var i = 0; i < mountImages.length; i++) {
Expand Down Expand Up @@ -13350,7 +13359,17 @@
}
} else {
if (props.value == null && props.defaultValue != null) {
node.defaultValue = '' + props.defaultValue;
// In Chrome, assigning defaultValue to certain input types triggers input validation.
// For number inputs, the display value loses trailing decimal points. For email inputs,
// Chrome raises "The specified value <x> is not a valid email address".
//
// Here we check to see if the defaultValue has actually changed, avoiding these problems
// when the user is inputting text
//
// https://github.com/facebook/react/issues/7253
if (node.defaultValue !== '' + props.defaultValue) {
node.defaultValue = '' + props.defaultValue;
}
}
if (props.checked == null && props.defaultChecked != null) {
node.defaultChecked = !!props.defaultChecked;
Expand Down Expand Up @@ -14097,9 +14116,15 @@
// This is in postMount because we need access to the DOM node, which is not
// available until after the component has mounted.
var node = ReactDOMComponentTree.getNodeFromInstance(inst);
var textContent = node.textContent;

// Warning: node.value may be the empty string at this point (IE11) if placeholder is set.
node.value = node.textContent; // Detach value from defaultValue
// Only set node.value if textContent is equal to the expected
// initial value. In IE10/IE11 there is a bug where the placeholder attribute
// will populate textContent as well.
// https://developer.microsoft.com/microsoft-edge/platform/issues/101525/
if (textContent === inst._wrapperState.initialValue) {
node.value = textContent;
}
}
};

Expand Down Expand Up @@ -14901,7 +14926,17 @@
instance = ReactEmptyComponent.create(instantiateReactComponent);
} else if (typeof node === 'object') {
var element = node;
!(element && (typeof element.type === 'function' || typeof element.type === 'string')) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', element.type == null ? element.type : typeof element.type, getDeclarationErrorAddendum(element._owner)) : _prodInvariant('130', element.type == null ? element.type : typeof element.type, getDeclarationErrorAddendum(element._owner)) : void 0;
var type = element.type;
if (typeof type !== 'function' && typeof type !== 'string') {
var info = '';
if (process.env.NODE_ENV !== 'production') {
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
info += ' You likely forgot to export your component from the file ' + 'it\'s defined in.';
}
}
info += getDeclarationErrorAddendum(element._owner);
true ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', type == null ? type : typeof type, info) : _prodInvariant('130', type == null ? type : typeof type, info) : void 0;
}

// Special case string values
if (typeof element.type === 'string') {
Expand Down Expand Up @@ -15191,7 +15226,7 @@
// Since plain JS classes are defined without any special initialization
// logic, we can not catch common errors early. Therefore, we have to
// catch them here, at initialization time, instead.
process.env.NODE_ENV !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : void 0;
process.env.NODE_ENV !== 'production' ? warning(!inst.getInitialState || inst.getInitialState.isReactClassApproved || inst.state, 'getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', this.getName() || 'a component') : void 0;
process.env.NODE_ENV !== 'production' ? warning(!inst.getDefaultProps || inst.getDefaultProps.isReactClassApproved, 'getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', this.getName() || 'a component') : void 0;
process.env.NODE_ENV !== 'production' ? warning(!inst.propTypes, 'propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', this.getName() || 'a component') : void 0;
process.env.NODE_ENV !== 'production' ? warning(!inst.contextTypes, 'contextTypes was defined as an instance property on %s. Use a ' + 'static property to define contextTypes instead.', this.getName() || 'a component') : void 0;
Expand Down Expand Up @@ -16195,14 +16230,11 @@

'use strict';

var _prodInvariant = __webpack_require__(35),
_assign = __webpack_require__(4);
var _prodInvariant = __webpack_require__(35);

var invariant = __webpack_require__(8);

var genericComponentClass = null;
// This registry keeps track of wrapper classes around host tags.
var tagToComponentClass = {};
var textComponentClass = null;

var ReactHostComponentInjection = {
Expand All @@ -16215,11 +16247,6 @@
// rendered as props.
injectTextComponentClass: function (componentClass) {
textComponentClass = componentClass;
},
// This accepts a keyed object with classes as values. Each key represents a
// tag. That particular tag will use this class instead of the generic one.
injectComponentClasses: function (componentClasses) {
_assign(tagToComponentClass, componentClasses);
}
};

Expand Down Expand Up @@ -18259,10 +18286,10 @@
*/

function getUnboundedScrollPosition(scrollable) {
if (scrollable === window) {
if (scrollable.Window && scrollable instanceof scrollable.Window) {
return {
x: window.pageXOffset || document.documentElement.scrollLeft,
y: window.pageYOffset || document.documentElement.scrollTop
x: scrollable.pageXOffset || scrollable.document.documentElement.scrollLeft,
y: scrollable.pageYOffset || scrollable.document.documentElement.scrollTop
};
}
return {
Expand Down Expand Up @@ -19011,7 +19038,9 @@
* @return {boolean} Whether or not the object is a DOM node.
*/
function isNode(object) {
return !!(object && (typeof Node === 'function' ? object instanceof Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
var doc = object ? object.ownerDocument || object : document;
var defaultView = doc.defaultView || window;
return !!(object && (typeof defaultView.Node === 'function' ? object instanceof defaultView.Node : typeof object === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string'));
}

module.exports = isNode;
Expand Down Expand Up @@ -19041,15 +19070,19 @@
*
* The activeElement will be null only if the document or document body is not
* yet defined.
*
* @param {?DOMDocument} doc Defaults to current document.
* @return {?DOMElement}
*/
function getActiveElement() /*?DOMElement*/{
if (typeof document === 'undefined') {
function getActiveElement(doc) /*?DOMElement*/{
doc = doc || (typeof document !== 'undefined' ? document : undefined);
if (typeof doc === 'undefined') {
return null;
}
try {
return document.activeElement || document.body;
return doc.activeElement || doc.body;
} catch (e) {
return document.body;
return doc.body;
}
}

Expand Down Expand Up @@ -21074,7 +21107,7 @@

'use strict';

module.exports = '15.4.1';
module.exports = '15.4.2';

/***/ },
/* 172 */
Expand Down
17 changes: 11 additions & 6 deletions lib/assets/react-source/production-with-addons/react-server.js

Large diffs are not rendered by default.

17 changes: 11 additions & 6 deletions lib/assets/react-source/production-with-addons/react.js

Large diffs are not rendered by default.

17 changes: 11 additions & 6 deletions lib/assets/react-source/production/react-server.js

Large diffs are not rendered by default.

17 changes: 11 additions & 6 deletions lib/assets/react-source/production/react.js

Large diffs are not rendered by default.

Loading