react 0.12.1 → 0.13.0-beta.1

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.
Files changed (153) hide show
  1. package/dist/JSXTransformer.js +352 -251
  2. package/dist/react-with-addons.js +5409 -4242
  3. package/dist/react-with-addons.min.js +5 -6
  4. package/dist/react.js +5012 -4136
  5. package/dist/react.min.js +5 -6
  6. package/lib/AutoFocusMixin.js +1 -1
  7. package/lib/BeforeInputEventPlugin.js +389 -112
  8. package/lib/CSSProperty.js +6 -3
  9. package/lib/CSSPropertyOperations.js +57 -10
  10. package/lib/CallbackQueue.js +2 -2
  11. package/lib/ChangeEventPlugin.js +3 -3
  12. package/lib/ClientReactRootIndex.js +1 -1
  13. package/lib/DOMChildrenOperations.js +6 -4
  14. package/lib/DOMProperty.js +1 -1
  15. package/lib/DOMPropertyOperations.js +4 -2
  16. package/lib/Danger.js +7 -6
  17. package/lib/DefaultEventPluginOrder.js +1 -2
  18. package/lib/EnterLeaveEventPlugin.js +1 -1
  19. package/lib/EventConstants.js +1 -1
  20. package/lib/EventPluginHub.js +9 -7
  21. package/lib/EventPluginRegistry.js +1 -1
  22. package/lib/EventPluginUtils.js +1 -1
  23. package/lib/EventPropagators.js +1 -1
  24. package/lib/ExecutionEnvironment.js +2 -3
  25. package/lib/FallbackCompositionState.js +89 -0
  26. package/lib/HTMLDOMPropertyConfig.js +19 -7
  27. package/lib/LinkedStateMixin.js +1 -1
  28. package/lib/LinkedValueUtils.js +3 -3
  29. package/lib/LocalEventTrapMixin.js +9 -2
  30. package/lib/MobileSafariClickEventPlugin.js +1 -1
  31. package/lib/Object.assign.js +3 -1
  32. package/lib/PooledClass.js +1 -1
  33. package/lib/React.js +17 -51
  34. package/lib/ReactBrowserComponentMixin.js +3 -13
  35. package/lib/ReactBrowserEventEmitter.js +4 -6
  36. package/lib/ReactCSSTransitionGroup.js +4 -1
  37. package/lib/ReactCSSTransitionGroupChild.js +12 -2
  38. package/lib/ReactChildReconciler.js +125 -0
  39. package/lib/ReactChildren.js +10 -8
  40. package/lib/ReactClass.js +916 -0
  41. package/lib/ReactComponent.js +81 -404
  42. package/lib/ReactComponentBrowserEnvironment.js +10 -83
  43. package/lib/ReactComponentEnvironment.js +57 -0
  44. package/lib/ReactComponentWithPureRenderMixin.js +1 -1
  45. package/lib/ReactCompositeComponent.js +533 -1132
  46. package/lib/ReactContext.js +6 -2
  47. package/lib/ReactCurrentOwner.js +1 -1
  48. package/lib/ReactDOM.js +3 -8
  49. package/lib/ReactDOMButton.js +5 -6
  50. package/lib/ReactDOMComponent.js +110 -92
  51. package/lib/ReactDOMForm.js +5 -6
  52. package/lib/ReactDOMIDOperations.js +56 -74
  53. package/lib/ReactDOMImg.js +4 -6
  54. package/lib/ReactDOMInput.js +5 -6
  55. package/lib/ReactDOMOption.js +5 -6
  56. package/lib/ReactDOMSelect.js +57 -65
  57. package/lib/ReactDOMSelection.js +6 -2
  58. package/lib/{ReactTextComponent.js → ReactDOMTextComponent.js} +48 -35
  59. package/lib/ReactDOMTextarea.js +5 -6
  60. package/lib/ReactDefaultBatchingStrategy.js +4 -4
  61. package/lib/ReactDefaultInjection.js +14 -8
  62. package/lib/ReactDefaultPerf.js +16 -7
  63. package/lib/ReactDefaultPerfAnalysis.js +1 -1
  64. package/lib/ReactElement.js +23 -15
  65. package/lib/ReactElementValidator.js +209 -57
  66. package/lib/ReactEmptyComponent.js +29 -11
  67. package/lib/ReactEventEmitterMixin.js +1 -1
  68. package/lib/ReactEventListener.js +3 -4
  69. package/lib/ReactInjection.js +7 -5
  70. package/lib/ReactInputSelection.js +3 -4
  71. package/lib/ReactInstanceHandles.js +3 -2
  72. package/lib/ReactInstanceMap.js +47 -0
  73. package/lib/ReactLifeCycle.js +35 -0
  74. package/lib/ReactLink.js +1 -1
  75. package/lib/ReactMarkupChecksum.js +1 -1
  76. package/lib/ReactMount.js +239 -68
  77. package/lib/ReactMultiChild.js +49 -47
  78. package/lib/ReactMultiChildUpdateTypes.js +1 -1
  79. package/lib/ReactNativeComponent.js +72 -25
  80. package/lib/ReactOwner.js +4 -48
  81. package/lib/ReactPerf.js +21 -1
  82. package/lib/ReactPropTransferer.js +2 -57
  83. package/lib/ReactPropTypeLocationNames.js +1 -1
  84. package/lib/ReactPropTypeLocations.js +1 -1
  85. package/lib/ReactPropTypes.js +14 -22
  86. package/lib/ReactPutListenerQueue.js +1 -1
  87. package/lib/ReactReconcileTransaction.js +1 -1
  88. package/lib/ReactReconciler.js +107 -0
  89. package/lib/ReactRef.js +70 -0
  90. package/lib/ReactRootIndex.js +1 -1
  91. package/lib/ReactServerRendering.js +5 -3
  92. package/lib/ReactServerRenderingTransaction.js +1 -1
  93. package/lib/ReactStateSetters.js +1 -1
  94. package/lib/ReactTestUtils.js +112 -26
  95. package/lib/ReactTransitionChildMapping.js +1 -1
  96. package/lib/ReactTransitionEvents.js +1 -1
  97. package/lib/ReactTransitionGroup.js +48 -7
  98. package/lib/ReactUpdateQueue.js +264 -0
  99. package/lib/ReactUpdates.js +48 -61
  100. package/lib/ReactWithAddons.js +1 -1
  101. package/lib/SVGDOMPropertyConfig.js +1 -1
  102. package/lib/SelectEventPlugin.js +3 -3
  103. package/lib/ServerReactRootIndex.js +1 -1
  104. package/lib/SimpleEventPlugin.js +1 -1
  105. package/lib/SyntheticClipboardEvent.js +1 -2
  106. package/lib/SyntheticCompositionEvent.js +1 -2
  107. package/lib/SyntheticDragEvent.js +1 -1
  108. package/lib/SyntheticEvent.js +11 -3
  109. package/lib/SyntheticFocusEvent.js +1 -1
  110. package/lib/SyntheticInputEvent.js +1 -2
  111. package/lib/SyntheticKeyboardEvent.js +1 -1
  112. package/lib/SyntheticMouseEvent.js +2 -4
  113. package/lib/SyntheticTouchEvent.js +1 -1
  114. package/lib/SyntheticUIEvent.js +1 -1
  115. package/lib/SyntheticWheelEvent.js +1 -1
  116. package/lib/Transaction.js +3 -3
  117. package/lib/ViewportMetrics.js +2 -5
  118. package/lib/accumulateInto.js +1 -1
  119. package/lib/adler32.js +1 -1
  120. package/lib/cloneWithProps.js +3 -3
  121. package/lib/copyProperties.js +2 -0
  122. package/lib/createFullPageComponent.js +3 -3
  123. package/lib/dangerousStyleValue.js +1 -1
  124. package/lib/escapeTextForBrowser.js +6 -6
  125. package/lib/findDOMNode.js +51 -0
  126. package/lib/flattenChildren.js +11 -22
  127. package/lib/forEachAccumulated.js +1 -1
  128. package/lib/getEventCharCode.js +1 -1
  129. package/lib/getEventKey.js +1 -1
  130. package/lib/getEventModifierState.js +1 -1
  131. package/lib/getEventTarget.js +1 -1
  132. package/lib/getIteratorFn.js +42 -0
  133. package/lib/getNodeForCharacterOffset.js +2 -2
  134. package/lib/getReactRootElementInContainer.js +1 -1
  135. package/lib/getTextContentAccessor.js +1 -1
  136. package/lib/instantiateReactComponent.js +85 -67
  137. package/lib/isEventSupported.js +1 -1
  138. package/lib/isNode.js +3 -4
  139. package/lib/isTextInputElement.js +2 -3
  140. package/lib/joinClasses.js +1 -1
  141. package/lib/keyMirror.js +1 -1
  142. package/lib/memoizeStringOnly.js +4 -5
  143. package/lib/onlyChild.js +1 -1
  144. package/lib/setInnerHTML.js +12 -1
  145. package/lib/shallowEqual.js +1 -1
  146. package/lib/shouldUpdateReactComponent.js +48 -6
  147. package/lib/traverseAllChildren.js +111 -55
  148. package/lib/update.js +1 -1
  149. package/lib/warning.js +12 -1
  150. package/package.json +1 -1
  151. package/lib/CompositionEventPlugin.js +0 -257
  152. package/lib/ReactLegacyElement.js +0 -243
  153. package/lib/deprecated.js +0 -47
@@ -9,7 +9,7 @@
9
9
  * @providesModule isEventSupported
10
10
  */
11
11
 
12
- "use strict";
12
+ 'use strict';
13
13
 
14
14
  var ExecutionEnvironment = require("./ExecutionEnvironment");
15
15
 
package/lib/isNode.js CHANGED
@@ -16,10 +16,9 @@
16
16
  */
17
17
  function isNode(object) {
18
18
  return !!(object && (
19
- typeof Node === 'function' ? object instanceof Node :
20
- typeof object === 'object' &&
21
- typeof object.nodeType === 'number' &&
22
- typeof object.nodeName === 'string'
19
+ ((typeof Node === 'function' ? object instanceof Node : typeof object === 'object' &&
20
+ typeof object.nodeType === 'number' &&
21
+ typeof object.nodeName === 'string'))
23
22
  ));
24
23
  }
25
24
 
@@ -9,7 +9,7 @@
9
9
  * @providesModule isTextInputElement
10
10
  */
11
11
 
12
- "use strict";
12
+ 'use strict';
13
13
 
14
14
  /**
15
15
  * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
@@ -34,8 +34,7 @@ var supportedInputTypes = {
34
34
 
35
35
  function isTextInputElement(elem) {
36
36
  return elem && (
37
- (elem.nodeName === 'INPUT' && supportedInputTypes[elem.type]) ||
38
- elem.nodeName === 'TEXTAREA'
37
+ (elem.nodeName === 'INPUT' && supportedInputTypes[elem.type] || elem.nodeName === 'TEXTAREA')
39
38
  );
40
39
  }
41
40
 
@@ -10,7 +10,7 @@
10
10
  * @typechecks static-only
11
11
  */
12
12
 
13
- "use strict";
13
+ 'use strict';
14
14
 
15
15
  /**
16
16
  * Combines multiple className strings into one.
package/lib/keyMirror.js CHANGED
@@ -10,7 +10,7 @@
10
10
  * @typechecks static-only
11
11
  */
12
12
 
13
- "use strict";
13
+ 'use strict';
14
14
 
15
15
  var invariant = require("./invariant");
16
16
 
@@ -10,7 +10,7 @@
10
10
  * @typechecks static-only
11
11
  */
12
12
 
13
- "use strict";
13
+ 'use strict';
14
14
 
15
15
  /**
16
16
  * Memoizes the return value of a function that accepts one string argument.
@@ -21,11 +21,10 @@
21
21
  function memoizeStringOnly(callback) {
22
22
  var cache = {};
23
23
  return function(string) {
24
- if (cache.hasOwnProperty(string)) {
25
- return cache[string];
26
- } else {
27
- return cache[string] = callback.call(this, string);
24
+ if (!cache.hasOwnProperty(string)) {
25
+ cache[string] = callback.call(this, string);
28
26
  }
27
+ return cache[string];
29
28
  };
30
29
  }
31
30
 
package/lib/onlyChild.js CHANGED
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * @providesModule onlyChild
10
10
  */
11
- "use strict";
11
+ 'use strict';
12
12
 
13
13
  var ReactElement = require("./ReactElement");
14
14
 
@@ -9,7 +9,9 @@
9
9
  * @providesModule setInnerHTML
10
10
  */
11
11
 
12
- "use strict";
12
+ /* globals MSApp */
13
+
14
+ 'use strict';
13
15
 
14
16
  var ExecutionEnvironment = require("./ExecutionEnvironment");
15
17
 
@@ -28,6 +30,15 @@ var setInnerHTML = function(node, html) {
28
30
  node.innerHTML = html;
29
31
  };
30
32
 
33
+ // Win8 apps: Allow all html to be inserted
34
+ if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
35
+ setInnerHTML = function(node, html) {
36
+ MSApp.execUnsafeLocalFunction(function() {
37
+ node.innerHTML = html;
38
+ });
39
+ };
40
+ }
41
+
31
42
  if (ExecutionEnvironment.canUseDOM) {
32
43
  // IE8: When updating a just created node with innerHTML only leading
33
44
  // whitespace is removed. When updating an existing node with innerHTML
@@ -9,7 +9,7 @@
9
9
  * @providesModule shallowEqual
10
10
  */
11
11
 
12
- "use strict";
12
+ 'use strict';
13
13
 
14
14
  /**
15
15
  * Performs equality by iterating through keys on an object and returning
@@ -10,7 +10,9 @@
10
10
  * @typechecks static-only
11
11
  */
12
12
 
13
- "use strict";
13
+ 'use strict';
14
+
15
+ var monitorCodeUse = require("./monitorCodeUse");
14
16
 
15
17
  /**
16
18
  * Given a `prevElement` and `nextElement`, determines if the existing
@@ -24,11 +26,51 @@
24
26
  * @protected
25
27
  */
26
28
  function shouldUpdateReactComponent(prevElement, nextElement) {
27
- if (prevElement && nextElement &&
28
- prevElement.type === nextElement.type &&
29
- prevElement.key === nextElement.key &&
30
- prevElement._owner === nextElement._owner) {
31
- return true;
29
+ if (prevElement != null && nextElement != null) {
30
+ var prevType = typeof prevElement;
31
+ var nextType = typeof nextElement;
32
+ if (prevType === 'string' || prevType === 'number') {
33
+ return (nextType === 'string' || nextType === 'number');
34
+ } else {
35
+ if (nextType === 'object' &&
36
+ prevElement.type === nextElement.type &&
37
+ prevElement.key === nextElement.key) {
38
+ var ownersMatch = prevElement._owner === nextElement._owner;
39
+ var prevName = null;
40
+ var nextName = null;
41
+ var nextDisplayName = null;
42
+ if ("production" !== process.env.NODE_ENV) {
43
+ if (!ownersMatch) {
44
+ if (prevElement._owner != null &&
45
+ prevElement._owner.getPublicInstance() != null &&
46
+ prevElement._owner.getPublicInstance().constructor != null) {
47
+ prevName =
48
+ prevElement._owner.getPublicInstance().constructor.displayName;
49
+ }
50
+ if (nextElement._owner != null &&
51
+ nextElement._owner.getPublicInstance() != null &&
52
+ nextElement._owner.getPublicInstance().constructor != null) {
53
+ nextName =
54
+ nextElement._owner.getPublicInstance().constructor.displayName;
55
+ }
56
+ if (nextElement.type != null &&
57
+ nextElement.type.displayName != null) {
58
+ nextDisplayName = nextElement.type.displayName;
59
+ }
60
+ monitorCodeUse(
61
+ 'react_should_update_owner_is_useful',
62
+ {
63
+ key: prevElement.key,
64
+ prevOwner: prevName,
65
+ nextOwner: nextName,
66
+ nextDisplayName: nextDisplayName
67
+ }
68
+ );
69
+ }
70
+ }
71
+ return ownersMatch;
72
+ }
73
+ }
32
74
  }
33
75
  return false;
34
76
  }
@@ -9,22 +9,20 @@
9
9
  * @providesModule traverseAllChildren
10
10
  */
11
11
 
12
- "use strict";
12
+ 'use strict';
13
13
 
14
14
  var ReactElement = require("./ReactElement");
15
15
  var ReactInstanceHandles = require("./ReactInstanceHandles");
16
16
 
17
+ var getIteratorFn = require("./getIteratorFn");
17
18
  var invariant = require("./invariant");
18
19
 
19
20
  var SEPARATOR = ReactInstanceHandles.SEPARATOR;
20
21
  var SUBSEPARATOR = ':';
21
22
 
22
23
  /**
23
- * TODO: Test that:
24
- * 1. `mapChildren` transforms strings and numbers into `ReactTextComponent`.
25
- * 2. it('should fail when supplied duplicate key', function() {
26
- * 3. That a single child and an array with one item have the same key pattern.
27
- * });
24
+ * TODO: Test that a single child and an array with one item have the same key
25
+ * pattern.
28
26
  */
29
27
 
30
28
  var userProvidedKeyEscaperLookup = {
@@ -88,58 +86,90 @@ function wrapUserProvidedKey(key) {
88
86
  * process.
89
87
  * @return {!number} The number of children in this subtree.
90
88
  */
91
- var traverseAllChildrenImpl =
92
- function(children, nameSoFar, indexSoFar, callback, traverseContext) {
93
- var nextName, nextIndex;
94
- var subtreeCount = 0; // Count of children found in the current subtree.
95
- if (Array.isArray(children)) {
96
- for (var i = 0; i < children.length; i++) {
97
- var child = children[i];
98
- nextName = (
99
- nameSoFar +
100
- (nameSoFar ? SUBSEPARATOR : SEPARATOR) +
101
- getComponentKey(child, i)
102
- );
103
- nextIndex = indexSoFar + subtreeCount;
104
- subtreeCount += traverseAllChildrenImpl(
105
- child,
106
- nextName,
107
- nextIndex,
108
- callback,
109
- traverseContext
110
- );
111
- }
112
- } else {
113
- var type = typeof children;
114
- var isOnlyChild = nameSoFar === '';
89
+ function traverseAllChildrenImpl(
90
+ children,
91
+ nameSoFar,
92
+ indexSoFar,
93
+ callback,
94
+ traverseContext
95
+ ) {
96
+ var type = typeof children;
97
+
98
+ if (type === 'undefined' || type === 'boolean') {
99
+ // All of the above are perceived as null.
100
+ children = null;
101
+ }
102
+
103
+ if (children === null ||
104
+ type === 'string' ||
105
+ type === 'number' ||
106
+ ReactElement.isValidElement(children)) {
107
+ callback(
108
+ traverseContext,
109
+ children,
115
110
  // If it's the only child, treat the name as if it was wrapped in an array
116
- // so that it's consistent if the number of children grows
117
- var storageName =
118
- isOnlyChild ? SEPARATOR + getComponentKey(children, 0) : nameSoFar;
119
- if (children == null || type === 'boolean') {
120
- // All of the above are perceived as null.
121
- callback(traverseContext, null, storageName, indexSoFar);
122
- subtreeCount = 1;
123
- } else if (type === 'string' || type === 'number' ||
124
- ReactElement.isValidElement(children)) {
125
- callback(traverseContext, children, storageName, indexSoFar);
126
- subtreeCount = 1;
127
- } else if (type === 'object') {
128
- ("production" !== process.env.NODE_ENV ? invariant(
129
- !children || children.nodeType !== 1,
130
- 'traverseAllChildren(...): Encountered an invalid child; DOM ' +
131
- 'elements are not valid children of React components.'
132
- ) : invariant(!children || children.nodeType !== 1));
133
- for (var key in children) {
134
- if (children.hasOwnProperty(key)) {
111
+ // so that it's consistent if the number of children grows.
112
+ nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar,
113
+ indexSoFar
114
+ );
115
+ return 1;
116
+ }
117
+
118
+ var child, nextName, nextIndex;
119
+ var subtreeCount = 0; // Count of children found in the current subtree.
120
+
121
+ if (Array.isArray(children)) {
122
+ for (var i = 0; i < children.length; i++) {
123
+ child = children[i];
124
+ nextName = (
125
+ (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) +
126
+ getComponentKey(child, i)
127
+ );
128
+ nextIndex = indexSoFar + subtreeCount;
129
+ subtreeCount += traverseAllChildrenImpl(
130
+ child,
131
+ nextName,
132
+ nextIndex,
133
+ callback,
134
+ traverseContext
135
+ );
136
+ }
137
+ } else {
138
+ var iteratorFn = getIteratorFn(children);
139
+ if (iteratorFn) {
140
+ var iterator = iteratorFn.call(children);
141
+ var step;
142
+ if (iteratorFn !== children.entries) {
143
+ var ii = 0;
144
+ while (!(step = iterator.next()).done) {
145
+ child = step.value;
146
+ nextName = (
147
+ (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) +
148
+ getComponentKey(child, ii++)
149
+ );
150
+ nextIndex = indexSoFar + subtreeCount;
151
+ subtreeCount += traverseAllChildrenImpl(
152
+ child,
153
+ nextName,
154
+ nextIndex,
155
+ callback,
156
+ traverseContext
157
+ );
158
+ }
159
+ } else {
160
+ // Iterator will provide entry [k,v] tuples rather than values.
161
+ while (!(step = iterator.next()).done) {
162
+ var entry = step.value;
163
+ if (entry) {
164
+ child = entry[1];
135
165
  nextName = (
136
- nameSoFar + (nameSoFar ? SUBSEPARATOR : SEPARATOR) +
137
- wrapUserProvidedKey(key) + SUBSEPARATOR +
138
- getComponentKey(children[key], 0)
166
+ (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) +
167
+ wrapUserProvidedKey(entry[0]) + SUBSEPARATOR +
168
+ getComponentKey(child, 0)
139
169
  );
140
170
  nextIndex = indexSoFar + subtreeCount;
141
171
  subtreeCount += traverseAllChildrenImpl(
142
- children[key],
172
+ child,
143
173
  nextName,
144
174
  nextIndex,
145
175
  callback,
@@ -148,9 +178,35 @@ var traverseAllChildrenImpl =
148
178
  }
149
179
  }
150
180
  }
181
+ } else if (type === 'object') {
182
+ ("production" !== process.env.NODE_ENV ? invariant(
183
+ children.nodeType !== 1,
184
+ 'traverseAllChildren(...): Encountered an invalid child; DOM ' +
185
+ 'elements are not valid children of React components.'
186
+ ) : invariant(children.nodeType !== 1));
187
+ for (var key in children) {
188
+ if (children.hasOwnProperty(key)) {
189
+ child = children[key];
190
+ nextName = (
191
+ (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) +
192
+ wrapUserProvidedKey(key) + SUBSEPARATOR +
193
+ getComponentKey(child, 0)
194
+ );
195
+ nextIndex = indexSoFar + subtreeCount;
196
+ subtreeCount += traverseAllChildrenImpl(
197
+ child,
198
+ nextName,
199
+ nextIndex,
200
+ callback,
201
+ traverseContext
202
+ );
203
+ }
204
+ }
151
205
  }
152
- return subtreeCount;
153
- };
206
+ }
207
+
208
+ return subtreeCount;
209
+ }
154
210
 
155
211
  /**
156
212
  * Traverses children that are typically specified as `props.children`, but
package/lib/update.js CHANGED
@@ -9,7 +9,7 @@
9
9
  * @providesModule update
10
10
  */
11
11
 
12
- "use strict";
12
+ 'use strict';
13
13
 
14
14
  var assign = require("./Object.assign");
15
15
  var keyOf = require("./keyOf");
package/lib/warning.js CHANGED
@@ -31,9 +31,20 @@ if ("production" !== process.env.NODE_ENV) {
31
31
  );
32
32
  }
33
33
 
34
+ if (format.indexOf('Failed CompositeComponent proptype check. ') === 0) {
35
+ return; // Ignore CompositeComponent proptype check.
36
+ }
37
+
34
38
  if (!condition) {
35
39
  var argIndex = 0;
36
- console.warn('Warning: ' + format.replace(/%s/g, function() {return args[argIndex++];}));
40
+ var message = 'Warning: ' + format.replace(/%s/g, function() {return args[argIndex++];});
41
+ console.warn(message);
42
+ try {
43
+ // --- Welcome to debugging React ---
44
+ // This error was thrown as a convenience so that you can use this stack
45
+ // to find the callsite that caused this warning to fire.
46
+ throw new Error(message);
47
+ } catch(x) {}
37
48
  }
38
49
  };
39
50
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react",
3
3
  "description": "React is a JavaScript library for building user interfaces.",
4
- "version": "0.12.1",
4
+ "version": "0.13.0-beta.1",
5
5
  "keywords": [
6
6
  "react"
7
7
  ],