react 0.14.6 → 0.14.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/react-jsx-dev-runtime.development.js +861 -0
- package/cjs/react-jsx-dev-runtime.production.min.js +9 -0
- package/cjs/react-jsx-runtime.development.js +883 -0
- package/cjs/react-jsx-runtime.production.min.js +10 -0
- package/dist/react-with-addons.js +32 -18
- package/dist/react-with-addons.min.js +6 -6
- package/dist/react.js +26 -16
- package/dist/react.min.js +6 -6
- package/jsx-dev-runtime.js +7 -0
- package/jsx-runtime.js +7 -0
- package/lib/LinkedValueUtils.js +1 -1
- package/lib/ReactCompositeComponent.js +1 -1
- package/lib/ReactDOMOption.js +4 -1
- package/lib/ReactElementValidator.js +1 -1
- package/lib/ReactEmptyComponent.js +5 -1
- package/lib/ReactPropTypes.js +4 -4
- package/lib/ReactTestUtils.js +6 -2
- package/lib/ReactVersion.js +1 -1
- package/lib/SyntheticEvent.js +6 -3
- package/package.json +32 -22
package/lib/ReactPropTypes.js
CHANGED
|
@@ -137,7 +137,7 @@ function createArrayOfTypeChecker(typeChecker) {
|
|
|
137
137
|
return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
|
138
138
|
}
|
|
139
139
|
for (var i = 0; i < propValue.length; i++) {
|
|
140
|
-
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']');
|
|
140
|
+
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
|
|
141
141
|
if (error instanceof Error) {
|
|
142
142
|
return error;
|
|
143
143
|
}
|
|
@@ -203,7 +203,7 @@ function createObjectOfTypeChecker(typeChecker) {
|
|
|
203
203
|
}
|
|
204
204
|
for (var key in propValue) {
|
|
205
205
|
if (propValue.hasOwnProperty(key)) {
|
|
206
|
-
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key);
|
|
206
|
+
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
|
|
207
207
|
if (error instanceof Error) {
|
|
208
208
|
return error;
|
|
209
209
|
}
|
|
@@ -224,7 +224,7 @@ function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
|
224
224
|
function validate(props, propName, componentName, location, propFullName) {
|
|
225
225
|
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
226
226
|
var checker = arrayOfTypeCheckers[i];
|
|
227
|
-
if (checker(props, propName, componentName, location, propFullName) == null) {
|
|
227
|
+
if (checker(props, propName, componentName, location, propFullName, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED') == null) {
|
|
228
228
|
return null;
|
|
229
229
|
}
|
|
230
230
|
}
|
|
@@ -259,7 +259,7 @@ function createShapeTypeChecker(shapeTypes) {
|
|
|
259
259
|
if (!checker) {
|
|
260
260
|
continue;
|
|
261
261
|
}
|
|
262
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key);
|
|
262
|
+
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
|
|
263
263
|
if (error) {
|
|
264
264
|
return error;
|
|
265
265
|
}
|
package/lib/ReactTestUtils.js
CHANGED
|
@@ -340,10 +340,14 @@ ReactShallowRenderer.prototype.render = function (element, context) {
|
|
|
340
340
|
if (!context) {
|
|
341
341
|
context = emptyObject;
|
|
342
342
|
}
|
|
343
|
+
ReactUpdates.batchedUpdates(_batchedRender, this, element, context);
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
function _batchedRender(renderer, element, context) {
|
|
343
347
|
var transaction = ReactUpdates.ReactReconcileTransaction.getPooled(false);
|
|
344
|
-
|
|
348
|
+
renderer._render(element, transaction, context);
|
|
345
349
|
ReactUpdates.ReactReconcileTransaction.release(transaction);
|
|
346
|
-
}
|
|
350
|
+
}
|
|
347
351
|
|
|
348
352
|
ReactShallowRenderer.prototype.unmount = function () {
|
|
349
353
|
if (this._instance) {
|
package/lib/ReactVersion.js
CHANGED
package/lib/SyntheticEvent.js
CHANGED
|
@@ -24,6 +24,7 @@ var warning = require('fbjs/lib/warning');
|
|
|
24
24
|
*/
|
|
25
25
|
var EventInterface = {
|
|
26
26
|
type: null,
|
|
27
|
+
target: null,
|
|
27
28
|
// currentTarget is set when dispatching; no use in copying it here
|
|
28
29
|
currentTarget: emptyFunction.thatReturnsNull,
|
|
29
30
|
eventPhase: null,
|
|
@@ -57,8 +58,6 @@ function SyntheticEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEvent
|
|
|
57
58
|
this.dispatchConfig = dispatchConfig;
|
|
58
59
|
this.dispatchMarker = dispatchMarker;
|
|
59
60
|
this.nativeEvent = nativeEvent;
|
|
60
|
-
this.target = nativeEventTarget;
|
|
61
|
-
this.currentTarget = nativeEventTarget;
|
|
62
61
|
|
|
63
62
|
var Interface = this.constructor.Interface;
|
|
64
63
|
for (var propName in Interface) {
|
|
@@ -69,7 +68,11 @@ function SyntheticEvent(dispatchConfig, dispatchMarker, nativeEvent, nativeEvent
|
|
|
69
68
|
if (normalize) {
|
|
70
69
|
this[propName] = normalize(nativeEvent);
|
|
71
70
|
} else {
|
|
72
|
-
|
|
71
|
+
if (propName === 'target') {
|
|
72
|
+
this.target = nativeEventTarget;
|
|
73
|
+
} else {
|
|
74
|
+
this[propName] = nativeEvent[propName];
|
|
75
|
+
}
|
|
73
76
|
}
|
|
74
77
|
}
|
|
75
78
|
|
package/package.json
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
2
|
+
"browserify": {
|
|
3
|
+
"transform": [
|
|
4
|
+
"envify"
|
|
5
|
+
]
|
|
6
|
+
},
|
|
7
|
+
"bugs": {
|
|
8
|
+
"url": "https://github.com/facebook/react/issues"
|
|
9
|
+
},
|
|
10
|
+
"bundleDependencies": false,
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"envify": "^3.0.0",
|
|
13
|
+
"fbjs": "^0.6.1"
|
|
14
|
+
},
|
|
15
|
+
"deprecated": false,
|
|
3
16
|
"description": "React is a JavaScript library for building user interfaces.",
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
],
|
|
8
|
-
"homepage": "https://github.com/facebook/react/tree/master/npm-react",
|
|
9
|
-
"bugs": "https://github.com/facebook/react/issues",
|
|
10
|
-
"license": "BSD-3-Clause",
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=0.10.0"
|
|
19
|
+
},
|
|
11
20
|
"files": [
|
|
12
21
|
"LICENSE",
|
|
13
22
|
"PATENTS",
|
|
@@ -15,20 +24,21 @@
|
|
|
15
24
|
"react.js",
|
|
16
25
|
"addons/",
|
|
17
26
|
"dist/",
|
|
18
|
-
"lib/"
|
|
27
|
+
"lib/",
|
|
28
|
+
"cjs/",
|
|
29
|
+
"jsx-runtime.js",
|
|
30
|
+
"jsx-dev-runtime.js"
|
|
31
|
+
],
|
|
32
|
+
"homepage": "https://facebook.github.io/react/",
|
|
33
|
+
"keywords": [
|
|
34
|
+
"react"
|
|
19
35
|
],
|
|
36
|
+
"license": "BSD-3-Clause",
|
|
20
37
|
"main": "react.js",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
"dependencies": {
|
|
26
|
-
"envify": "^3.0.0",
|
|
27
|
-
"fbjs": "^0.6.1"
|
|
38
|
+
"name": "react",
|
|
39
|
+
"repository": {
|
|
40
|
+
"type": "git",
|
|
41
|
+
"url": "git+https://github.com/facebook/react.git"
|
|
28
42
|
},
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
"envify"
|
|
32
|
-
]
|
|
33
|
-
}
|
|
34
|
-
}
|
|
43
|
+
"version": "0.14.10"
|
|
44
|
+
}
|