Skip to content

Commit 362d4f8

Browse files
committed
Merge pull request #66 from rickbeerendonk/react-0.12.2
Update to React 0.12.2
2 parents 09151db + 8c8e06b commit 362d4f8

File tree

8 files changed

+57
-36
lines changed

8 files changed

+57
-36
lines changed

site/jekyll/getting-started/tutorial.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Replace the contents of the new view file with the following:
6666
</head>
6767
<body>
6868
<div id="content"></div>
69-
<script src="http://fb.me/react-0.12.1.js"></script>
69+
<script src="http://fb.me/react-0.12.2.js"></script>
7070
<script src="@Url.Content("~/Scripts/Tutorial.jsx")"></script>
7171
</body>
7272
</html>
@@ -235,7 +235,7 @@ Markdown is a simple way to format your text inline. For example, surrounding te
235235
First, add the third-party **Showdown** library to your application. This is a JavaScript library which takes Markdown text and converts it to raw HTML. We will add it via NuGet (search for "Showdown" and install it, similar to how you installed ReactJS.NET earlier) and reference the script tag in your view:
236236

237237
```html{2}
238-
<script src="http://fb.me/react-0.12.1.js"></script>
238+
<script src="http://fb.me/react-0.12.2.js"></script>
239239
<script src="@Url.Content("~/Scripts/showdown.min.js")"></script>
240240
<script src="@Url.Content("~/Scripts/Tutorial.jsx")"></script>
241241
```
@@ -848,7 +848,7 @@ Now that the bundle has been registered, we need to reference it from the view:
848848
</head>
849849
<body>
850850
<div id="content"></div>
851-
<script src="http://fb.me/react-0.12.1.js"></script>
851+
<script src="http://fb.me/react-0.12.2.js"></script>
852852
@Scripts.Render("~/bundles/main")
853853
@Html.ReactInitJavaScript()
854854
</body>
@@ -934,7 +934,7 @@ In the view, we will accept the list of comments as the model, and use `Html.Rea
934934
submitUrl = Url.Action("AddComment"),
935935
pollInterval = 2000,
936936
})
937-
<script src="http://fb.me/react-0.12.1.js"></script>
937+
<script src="http://fb.me/react-0.12.2.js"></script>
938938
<script src="@Url.Content("~/Scripts/showdown.min.js")"></script>
939939
<script src="@Url.Content("~/Scripts/Tutorial.jsx")"></script>
940940
@Html.ReactInitJavaScript()

site/jekyll/guides/cassette.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ render from your view using Cassette:
3636
</head>
3737
<body>
3838
...
39-
<script src="http://fb.me/react-0.12.1.min.js"></script>
39+
<script src="http://fb.me/react-0.12.2.min.js"></script>
4040
@Bundles.RenderScripts()
4141
</body>
4242
```

site/jekyll/guides/server-side-rendering.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ code.
4747
```html
4848
<!-- Load all your scripts normally before calling ReactInitJavaScript -->
4949
<!-- Assumes minification/combination is configured as per previous section -->
50-
<script src="http://fb.me/react-0.12.1.min.js"></script>
50+
<script src="http://fb.me/react-0.12.2.min.js"></script>
5151
@Scripts.Render("~/bundles/main")
5252
@Html.ReactInitJavaScript()
5353
```
@@ -62,7 +62,7 @@ code.
6262
</div>
6363
</div>
6464

65-
<script src="http://fb.me/react-0.12.1.min.js"></script>
65+
<script src="http://fb.me/react-0.12.2.min.js"></script>
6666
<script src="/Scripts/HelloWorld.js"></script>
6767
<script>React.render(HelloWorld({"name":"Daniel"}), document.getElementById("react1"));</script>
6868
```

site/jekyll/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ bundles.Add(new JsxBundle("~/bundles/main").Include(
106106
})
107107

108108
<!-- Initialise the component in JavaScript too -->
109-
<script src="http://fb.me/react-0.12.1.min.js"></script>
109+
<script src="http://fb.me/react-0.12.2.min.js"></script>
110110
@Scripts.Render("~/bundles/main")
111111
@Html.ReactInitJavaScript()
112112
```

src/React.Sample.Cassette/Views/Home/Index.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
@Html.React("CommentsBox", new { initialComments = Model.Comments })
2121

2222
<!-- Load all required scripts (React + the site's scripts) -->
23-
<script src="http://fb.me/react-0.12.1.min.js"></script>
23+
<script src="http://fb.me/react-0.12.2.min.js"></script>
2424
@Bundles.RenderScripts()
2525
<!-- Render the code to initialise the component -->
2626
@Html.ReactInitJavaScript()

src/React.Sample.Mvc4/Views/Home/Index.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@Html.React("CommentsBox", new { initialComments = Model.Comments })
1818

1919
<!-- Load all required scripts (React + the site's scripts) -->
20-
<script src="http://fb.me/react-0.12.1.js"></script>
20+
<script src="http://fb.me/react-0.12.2.js"></script>
2121
@Scripts.Render("~/bundles/main")
2222
<!-- Render the code to initialise the component -->
2323
@Html.ReactInitJavaScript()

src/React/Resources/JSXTransformer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* JSXTransformer v0.12.1
2+
* JSXTransformer v0.12.2
33
*/
44
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.JSXTransformer=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
55
/**
@@ -14779,7 +14779,7 @@ function addDisplayName(displayName, object, state) {
1477914779

1478014780
if (safe) {
1478114781
utils.catchup(object['arguments'][0].range[0] + 1, state);
14782-
utils.append("displayName: '" + displayName + "',", state);
14782+
utils.append('displayName: "' + displayName + '",', state);
1478314783
}
1478414784
}
1478514785
}
@@ -15072,7 +15072,7 @@ function renderXJSExpressionContainer(traverse, object, isLast, path, state) {
1507215072
function quoteAttrName(attr) {
1507315073
// Quote invalid JS identifiers.
1507415074
if (!/^[a-z_$][a-z\d_$]*$/i.test(attr)) {
15075-
return "'" + attr + "'";
15075+
return '"' + attr + '"';
1507615076
}
1507715077
return attr;
1507815078
}

src/React/Resources/react-with-addons.js

Lines changed: 44 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* React (with addons) v0.12.1
2+
* React (with addons) v0.12.2
33
*/
44
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.React=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
55
/**
@@ -431,7 +431,6 @@ module.exports = CSSCore;
431431
*/
432432
var isUnitlessNumber = {
433433
columnCount: true,
434-
fillOpacity: true,
435434
flex: true,
436435
flexGrow: true,
437436
flexShrink: true,
@@ -443,7 +442,11 @@ var isUnitlessNumber = {
443442
orphans: true,
444443
widows: true,
445444
zIndex: true,
446-
zoom: true
445+
zoom: true,
446+
447+
// SVG-related properties
448+
fillOpacity: true,
449+
strokeOpacity: true
447450
};
448451

449452
/**
@@ -3661,7 +3664,11 @@ var HTMLDOMPropertyConfig = {
36613664
draggable: null,
36623665
encType: null,
36633666
form: MUST_USE_ATTRIBUTE,
3667+
formAction: MUST_USE_ATTRIBUTE,
3668+
formEncType: MUST_USE_ATTRIBUTE,
3669+
formMethod: MUST_USE_ATTRIBUTE,
36643670
formNoValidate: HAS_BOOLEAN_VALUE,
3671+
formTarget: MUST_USE_ATTRIBUTE,
36653672
frameBorder: MUST_USE_ATTRIBUTE,
36663673
height: MUST_USE_ATTRIBUTE,
36673674
hidden: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
@@ -3676,6 +3683,8 @@ var HTMLDOMPropertyConfig = {
36763683
list: MUST_USE_ATTRIBUTE,
36773684
loop: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
36783685
manifest: MUST_USE_ATTRIBUTE,
3686+
marginHeight: null,
3687+
marginWidth: null,
36793688
max: null,
36803689
maxLength: MUST_USE_ATTRIBUTE,
36813690
media: MUST_USE_ATTRIBUTE,
@@ -4400,7 +4409,7 @@ if ("production" !== "development") {
44004409

44014410
// Version exists only in the open-source version of React, not in Facebook's
44024411
// internal version.
4403-
React.version = '0.12.1';
4412+
React.version = '0.12.2';
44044413

44054414
module.exports = React;
44064415

@@ -9907,7 +9916,7 @@ ReactElement.createElement = function(type, config, children) {
99079916
}
99089917

99099918
// Resolve default props
9910-
if (type.defaultProps) {
9919+
if (type && type.defaultProps) {
99119920
var defaultProps = type.defaultProps;
99129921
for (propName in defaultProps) {
99139922
if (typeof props[propName] === 'undefined') {
@@ -10000,6 +10009,7 @@ var ReactPropTypeLocations = _dereq_("./ReactPropTypeLocations");
1000010009
var ReactCurrentOwner = _dereq_("./ReactCurrentOwner");
1000110010

1000210011
var monitorCodeUse = _dereq_("./monitorCodeUse");
10012+
var warning = _dereq_("./warning");
1000310013

1000410014
/**
1000510015
* Warn if there's no key explicitly set on dynamic arrays of children or
@@ -10197,6 +10207,15 @@ function checkPropTypes(componentName, propTypes, props, location) {
1019710207
var ReactElementValidator = {
1019810208

1019910209
createElement: function(type, props, children) {
10210+
// We warn in this case but don't throw. We expect the element creation to
10211+
// succeed and there will likely be errors in render.
10212+
("production" !== "development" ? warning(
10213+
type != null,
10214+
'React.createElement: type should not be null or undefined. It should ' +
10215+
'be a string (for DOM elements) or a ReactClass (for composite ' +
10216+
'components).'
10217+
) : null);
10218+
1020010219
var element = ReactElement.createElement.apply(this, arguments);
1020110220

1020210221
// The result can be nullish if a mock or a custom function is used.
@@ -10209,22 +10228,24 @@ var ReactElementValidator = {
1020910228
validateChildKeys(arguments[i], type);
1021010229
}
1021110230

10212-
var name = type.displayName;
10213-
if (type.propTypes) {
10214-
checkPropTypes(
10215-
name,
10216-
type.propTypes,
10217-
element.props,
10218-
ReactPropTypeLocations.prop
10219-
);
10220-
}
10221-
if (type.contextTypes) {
10222-
checkPropTypes(
10223-
name,
10224-
type.contextTypes,
10225-
element._context,
10226-
ReactPropTypeLocations.context
10227-
);
10231+
if (type) {
10232+
var name = type.displayName;
10233+
if (type.propTypes) {
10234+
checkPropTypes(
10235+
name,
10236+
type.propTypes,
10237+
element.props,
10238+
ReactPropTypeLocations.prop
10239+
);
10240+
}
10241+
if (type.contextTypes) {
10242+
checkPropTypes(
10243+
name,
10244+
type.contextTypes,
10245+
element._context,
10246+
ReactPropTypeLocations.context
10247+
);
10248+
}
1022810249
}
1022910250
return element;
1023010251
},
@@ -10242,7 +10263,7 @@ var ReactElementValidator = {
1024210263

1024310264
module.exports = ReactElementValidator;
1024410265

10245-
},{"./ReactCurrentOwner":42,"./ReactElement":58,"./ReactPropTypeLocations":78,"./monitorCodeUse":150}],60:[function(_dereq_,module,exports){
10266+
},{"./ReactCurrentOwner":42,"./ReactElement":58,"./ReactPropTypeLocations":78,"./monitorCodeUse":150,"./warning":160}],60:[function(_dereq_,module,exports){
1024610267
/**
1024710268
* Copyright 2014, Facebook, Inc.
1024810269
* All rights reserved.
@@ -14285,7 +14306,7 @@ var ReactTestUtils = {
1428514306
mockComponent: function(module, mockTagName) {
1428614307
mockTagName = mockTagName || module.mockTagName || "div";
1428714308

14288-
var ConvenienceConstructor = React.createClass({displayName: 'ConvenienceConstructor',
14309+
var ConvenienceConstructor = React.createClass({displayName: "ConvenienceConstructor",
1428914310
render: function() {
1429014311
return React.createElement(
1429114312
mockTagName,

0 commit comments

Comments
 (0)