Skip to content

Commit

Permalink
Merge branch 'master' into iframes
Browse files Browse the repository at this point in the history
  • Loading branch information
acusti committed Jan 7, 2018
2 parents 0744710 + 48833f6 commit c71601b
Show file tree
Hide file tree
Showing 139 changed files with 4,323 additions and 5,509 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

**What is the current behavior?**

**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template for React 16: https://jsfiddle.net/Luktwrdm/, template for React 15: https://jsfiddle.net/hmbg7e9w/).**
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**

**What is the expected behavior?**

Expand Down
22 changes: 11 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ Starting with 16.1.0, we will no longer be publishing new releases on Bower. You
* Fix `onMouseEnter` and `onMouseLeave` firing on wrong elements. ([@gaearon](https://github.com/gaearon) in [#11164](https://github.com/facebook/react/pull/11164))
* Fix `null` showing up in a warning instead of the component stack. ([@gaearon](https://github.com/gaearon) in [#10915](https://github.com/facebook/react/pull/10915))
* Fix IE11 crash in development mode. ([@leidegre](https://github.com/leidegre) in [#10921](https://github.com/facebook/react/pull/10921))
* Fix `tabIndex` not getting applied to SVG elements. ([@gaearon](http://github.com/gaearon) in [#11034](https://github.com/facebook/react/pull/11034))
* Fix `tabIndex` not getting applied to SVG elements. ([@gaearon](https://github.com/gaearon) in [#11034](https://github.com/facebook/react/pull/11034))
* Fix SVG children not getting cleaned up on `dangerouslySetInnerHTML` in IE. ([@OriR](https://github.com/OriR) in [#11108](https://github.com/facebook/react/pull/11108))
* Fix false positive text mismatch warning caused by newline normalization. ([@gaearon](http://github.com/gaearon) in [#11119](https://github.com/facebook/react/pull/11119))
* Fix false positive text mismatch warning caused by newline normalization. ([@gaearon](https://github.com/gaearon) in [#11119](https://github.com/facebook/react/pull/11119))
* Fix `form.reset()` to respect `defaultValue` on uncontrolled `<select>`. ([@aweary](https://github.com/aweary) in [#11057](https://github.com/facebook/react/pull/11057))
* Fix `<textarea>` placeholder not rendering on IE11. ([@gaearon](https://github.com/gaearon) in [#11177](https://github.com/facebook/react/pull/11177))
* Fix a crash rendering into shadow root. ([@gaearon](https://github.com/gaearon) in [#11037](https://github.com/facebook/react/pull/11037))
* Fix false positive warning about hydrating mixed case SVG tags. ([@gaearon](http://github.com/gaearon) in [#11174](https://github.com/facebook/react/pull/11174))
* Suppress the new unknown tag warning for `<dialog>` element. ([@gaearon](http://github.com/gaearon) in [#11035](https://github.com/facebook/react/pull/11035))
* Fix false positive warning about hydrating mixed case SVG tags. ([@gaearon](https://github.com/gaearon) in [#11174](https://github.com/facebook/react/pull/11174))
* Suppress the new unknown tag warning for `<dialog>` element. ([@gaearon](https://github.com/gaearon) in [#11035](https://github.com/facebook/react/pull/11035))
* Warn when defining a non-existent `componentDidReceiveProps` method. ([@iamtommcc](https://github.com/iamtommcc) in [#11479](https://github.com/facebook/react/pull/11479))
* Warn about function child no more than once. ([@andreysaleba](https://github.com/andreysaleba) in [#11120](https://github.com/facebook/react/pull/11120))
* Warn about nested updates no more than once. ([@anushreesubramani](https://github.com/anushreesubramani) in [#11113](https://github.com/facebook/react/pull/11113))
Expand All @@ -105,16 +105,16 @@ Starting with 16.1.0, we will no longer be publishing new releases on Bower. You
* Improve the warning about booleans passed to event handlers. ([@NicBonetto](https://github.com/NicBonetto) in [#11308](https://github.com/facebook/react/pull/11308))
* Improve the warning when a multiple `select` gets null `value`. ([@Hendeca](https://github.com/Hendeca) in [#11141](https://github.com/facebook/react/pull/11141))
* Move link in the warning message to avoid redirect. ([@marciovicente](https://github.com/marciovicente) in [#11400](https://github.com/facebook/react/pull/11400))
* Add a way to suppress the React DevTools installation prompt. ([@gaearon](http://github.com/gaearon) in [#11448](https://github.com/facebook/react/pull/11448))
* Add a way to suppress the React DevTools installation prompt. ([@gaearon](https://github.com/gaearon) in [#11448](https://github.com/facebook/react/pull/11448))
* Remove unused code. ([@gaearon](https://github.com/gaearon) in [#10802](https://github.com/facebook/react/pull/10802), [#10803](https://github.com/facebook/react/pull/10803))

### React DOM Server

* Add a new `suppressHydrationWarning` attribute for intentional client/server text mismatches. ([@sebmarkbage](http://github.com/sebmarkbage) in [#11126](https://github.com/facebook/react/pull/11126))
* Fix markup generation when components return strings. ([@gaearon](http://github.com/gaearon) in [#11109](https://github.com/facebook/react/pull/11109))
* Add a new `suppressHydrationWarning` attribute for intentional client/server text mismatches. ([@sebmarkbage](https://github.com/sebmarkbage) in [#11126](https://github.com/facebook/react/pull/11126))
* Fix markup generation when components return strings. ([@gaearon](https://github.com/gaearon) in [#11109](https://github.com/facebook/react/pull/11109))
* Fix obscure error message when passing an invalid style value. ([@iamdustan](https://github.com/iamdustan) in [#11173](https://github.com/facebook/react/pull/11173))
* Include the `autoFocus` attribute into SSR markup. ([@gaearon](http://github.com/gaearon) in [#11192](https://github.com/facebook/react/pull/11192))
* Include the component stack into more warnings. ([@gaearon](http://github.com/gaearon) in [#11284](https://github.com/facebook/react/pull/11284))
* Include the `autoFocus` attribute into SSR markup. ([@gaearon](https://github.com/gaearon) in [#11192](https://github.com/facebook/react/pull/11192))
* Include the component stack into more warnings. ([@gaearon](https://github.com/gaearon) in [#11284](https://github.com/facebook/react/pull/11284))

### React Test Renderer and Test Utils

Expand Down Expand Up @@ -752,7 +752,7 @@ Each of these changes will continue to work as before with a new warning until t

- Added `React.Children.toArray` which takes a nested children object and returns a flat array with keys assigned to each child. This helper makes it easier to manipulate collections of children in your `render` methods, especially if you want to reorder or slice `this.props.children` before passing it down. In addition, `React.Children.map` now returns plain arrays too.
- React uses `console.error` instead of `console.warn` for warnings so that browsers show a full stack trace in the console. (Our warnings appear when you use patterns that will break in future releases and for code that is likely to behave unexpectedly, so we do consider our warnings to be “must-fix” errors.)
- Previously, including untrusted objects as React children [could result in an XSS security vulnerability](http://danlec.com/blog/xss-via-a-spoofed-react-element). This problem should be avoided by properly validating input at the application layer and by never passing untrusted objects around your application code. As an additional layer of protection, [React now tags elements](https://github.com/facebook/react/pull/4832) with a specific [ES2015 (ES6) `Symbol`](http://www.2ality.com/2014/12/es6-symbols.html) in browsers that support it, in order to ensure that React never considers untrusted JSON to be a valid element. If this extra security protection is important to you, you should add a `Symbol` polyfill for older browsers, such as the one included by [Babel’s polyfill](http://babeljs.io/docs/usage/polyfill/).
- Previously, including untrusted objects as React children [could result in an XSS security vulnerability](http://danlec.com/blog/xss-via-a-spoofed-react-element). This problem should be avoided by properly validating input at the application layer and by never passing untrusted objects around your application code. As an additional layer of protection, [React now tags elements](https://github.com/facebook/react/pull/4832) with a specific [ES2015 (ES6) `Symbol`](http://www.2ality.com/2014/12/es6-symbols.html) in browsers that support it, in order to ensure that React never considers untrusted JSON to be a valid element. If this extra security protection is important to you, you should add a `Symbol` polyfill for older browsers, such as the one included by [Babel’s polyfill](https://babeljs.io/docs/usage/polyfill/).
- When possible, React DOM now generates XHTML-compatible markup.
- React DOM now supports these standard HTML attributes: `capture`, `challenge`, `inputMode`, `is`, `keyParams`, `keyType`, `minLength`, `summary`, `wrap`. It also now supports these non-standard attributes: `autoSave`, `results`, `security`.
- React DOM now supports these SVG attributes, which render into namespaced attributes: `xlinkActuate`, `xlinkArcrole`, `xlinkHref`, `xlinkRole`, `xlinkShow`, `xlinkTitle`, `xlinkType`, `xmlBase`, `xmlLang`, `xmlSpace`.
Expand Down Expand Up @@ -786,7 +786,7 @@ Each of these changes will continue to work as before with a new warning until t

#### Breaking Changes

- The `react-tools` package and `JSXTransformer.js` browser file [have been deprecated](https://reactjs.org/blog/2015/06/12/deprecating-jstransform-and-react-tools.html). You can continue using version `0.13.3` of both, but we no longer support them and recommend migrating to [Babel](http://babeljs.io/), which has built-in support for React and JSX.
- The `react-tools` package and `JSXTransformer.js` browser file [have been deprecated](https://reactjs.org/blog/2015/06/12/deprecating-jstransform-and-react-tools.html). You can continue using version `0.13.3` of both, but we no longer support them and recommend migrating to [Babel](https://babeljs.io), which has built-in support for React and JSX.

#### New Features

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ You'll notice that we used an HTML-like syntax; [we call it JSX](https://reactjs

## Installation

React is available as the `react` package on [npm](https://www.npmjs.com/). It is also available on a [CDN](https://reactjs.org/docs/installation.html#using-a-cdn).
React is available as the `react` package on [npm](https://www.npmjs.com/). It is also available on a [CDN](https://reactjs.org/docs/cdn-links.html).

React is flexible and can be used in a variety of projects. You can create new apps with it, but you can also gradually introduce it into an existing codebase without doing a rewrite.

The recommended way to install React depends on your project. Here you can find short guides for the most common scenarios:

* [Trying Out React](https://reactjs.org/docs/installation.html#trying-out-react)
* [Creating a New Application](https://reactjs.org/docs/installation.html#creating-a-new-application)
* [Adding React to an Existing Application](https://reactjs.org/docs/installation.html#adding-react-to-an-existing-application)
* [Trying Out React](https://reactjs.org/docs/try-react.html)
* [Creating a New Application](https://reactjs.org/docs/add-react-to-a-new-app.html)
* [Adding React to an Existing Application](https://reactjs.org/docs/add-react-to-an-existing-app.html)

## Contributing

Expand Down
6 changes: 3 additions & 3 deletions fixtures/art/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-preset-es2015": "^6.6.0",
"babel-preset-react": "^6.5.0",
"react": "file:../../build/packages/react",
"react-art": "file:../../build/packages/react-art",
"react-dom": "file:../../build/packages/react-dom",
"react": "link:../../build/node_modules/react",
"react-art": "link:../../build/node_modules/react-art/",
"react-dom": "link:../../build/node_modules/react-dom",
"webpack": "^1.14.0"
},
"scripts": {
Expand Down
32 changes: 9 additions & 23 deletions fixtures/art/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1742,31 +1742,17 @@ rc@^1.1.7:
minimist "^1.2.0"
strip-json-comments "~2.0.1"

"react-art@file:../../build/packages/react-art":
version "16.0.0"
dependencies:
art "^0.10.1"
create-react-class "^15.6.2"
fbjs "^0.8.16"
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.0"
"react-art@link:../../build/node_modules/react-art":
version "0.0.0"
uid ""

"react-dom@file:../../build/packages/react-dom":
version "16.0.0"
dependencies:
fbjs "^0.8.16"
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.0"
"react-dom@link:../../build/node_modules/react-dom":
version "0.0.0"
uid ""

"react@file:../../build/packages/react":
version "16.0.0"
dependencies:
fbjs "^0.8.16"
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.0"
"react@link:../../build/node_modules/react":
version "0.0.0"
uid ""

"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.4, readable-stream@^2.2.6:
version "2.2.6"
Expand Down
4 changes: 2 additions & 2 deletions fixtures/packaging/browserify/dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"name": "browserify-dev-fixture",
"dependencies": {
"browserify": "^13.3.0",
"react": "file:../../../../build/packages/react",
"react-dom": "file:../../../../build/packages/react-dom"
"react": "link:../../../../build/node_modules/react",
"react-dom": "link:../../../../build/node_modules/react-dom"
},
"scripts": {
"build": "rm -f output.js && browserify ./input.js -o output.js"
Expand Down
20 changes: 6 additions & 14 deletions fixtures/packaging/browserify/dev/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -739,21 +739,13 @@ randombytes@^2.0.0, randombytes@^2.0.1:
dependencies:
safe-buffer "^5.1.0"

"react-dom@file:../../../../build/packages/react-dom":
version "16.0.0"
dependencies:
fbjs "^0.8.16"
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.0"
"react-dom@link:../../../../build/node_modules/react-dom":
version "0.0.0"
uid ""

"react@file:../../../../build/packages/react":
version "16.0.0"
dependencies:
fbjs "^0.8.16"
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.0"
"react@link:../../../../build/node_modules/react":
version "0.0.0"
uid ""

read-only-stream@^2.0.0:
version "2.0.0"
Expand Down
4 changes: 2 additions & 2 deletions fixtures/packaging/browserify/prod/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"name": "browserify-prod-fixture",
"dependencies": {
"browserify": "^13.3.0",
"react": "file:../../../../build/packages/react",
"react-dom": "file:../../../../build/packages/react-dom"
"react": "link:../../../../build/node_modules/react",
"react-dom": "link:../../../../build/node_modules/react-dom"
},
"scripts": {
"build": "rm -f output.js && browserify ./input.js -g [envify --NODE_ENV 'production'] -o output.js"
Expand Down
20 changes: 6 additions & 14 deletions fixtures/packaging/browserify/prod/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -750,21 +750,13 @@ randombytes@^2.0.0, randombytes@^2.0.1:
dependencies:
safe-buffer "^5.1.0"

"react-dom@file:../../../../build/packages/react-dom":
version "16.0.0"
dependencies:
fbjs "^0.8.16"
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.0"
"react-dom@link:../../../../build/node_modules/react-dom":
version "0.0.0"
uid ""

"react@file:../../../../build/packages/react":
version "16.0.0"
dependencies:
fbjs "^0.8.16"
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.0"
"react@link:../../../../build/node_modules/react":
version "0.0.0"
uid ""

read-only-stream@^2.0.0:
version "2.0.0"
Expand Down
6 changes: 3 additions & 3 deletions fixtures/packaging/brunch/dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"devDependencies": {
"brunch": "^2.9.1",
"javascript-brunch": "^2.0.0",
"react": "file:../../../../build/packages/react",
"react-dom": "file:../../../../build/packages/react-dom"
"react": "link:../../../../build/node_modules/react",
"react-dom": "link:../../../../build/node_modules/react-dom"
},
"scripts": {
"build": "rm -rf public && brunch build"
}
}
}
20 changes: 6 additions & 14 deletions fixtures/packaging/brunch/dev/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1704,21 +1704,13 @@ rc@^1.1.7:
minimist "^1.2.0"
strip-json-comments "~2.0.1"

"react-dom@file:../../../../build/packages/react-dom":
version "16.0.0"
dependencies:
fbjs "^0.8.16"
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.0"
"react-dom@link:../../../../build/node_modules/react-dom":
version "0.0.0"
uid ""

"react@file:../../../../build/packages/react":
version "16.0.0"
dependencies:
fbjs "^0.8.16"
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.0"
"react@link:../../../../build/node_modules/react":
version "0.0.0"
uid ""

read-components@~0.7:
version "0.7.0"
Expand Down
6 changes: 3 additions & 3 deletions fixtures/packaging/brunch/prod/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"devDependencies": {
"brunch": "^2.9.1",
"javascript-brunch": "^2.0.0",
"react": "file:../../../../build/packages/react",
"react-dom": "file:../../../../build/packages/react-dom"
"react": "link:../../../../build/node_modules/react",
"react-dom": "link:../../../../build/node_modules/react-dom"
},
"scripts": {
"build": "rm -rf public && brunch build -p"
}
}
}
20 changes: 6 additions & 14 deletions fixtures/packaging/brunch/prod/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1704,21 +1704,13 @@ rc@^1.1.7:
minimist "^1.2.0"
strip-json-comments "~2.0.1"

"react-dom@file:../../../../build/packages/react-dom":
version "16.0.0"
dependencies:
fbjs "^0.8.16"
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.0"
"react-dom@link:../../../../build/node_modules/react-dom":
version "0.0.0"
uid ""

"react@file:../../../../build/packages/react":
version "16.0.0"
dependencies:
fbjs "^0.8.16"
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.0"
"react@link:../../../../build/node_modules/react":
version "0.0.0"
uid ""

read-components@~0.7:
version "0.7.0"
Expand Down
2 changes: 1 addition & 1 deletion fixtures/packaging/webpack-alias/dev/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
filename: 'output.js',
},
resolve: {
root: path.resolve('../../../../build/packages'),
root: path.resolve('../../../../build/node_modules'),
alias: {
react: 'react/umd/react.development',
'react-dom': 'react-dom/umd/react-dom.development',
Expand Down
2 changes: 1 addition & 1 deletion fixtures/packaging/webpack-alias/prod/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
filename: 'output.js',
},
resolve: {
root: path.resolve('../../../../build/packages'),
root: path.resolve('../../../../build/node_modules'),
alias: {
react: 'react/umd/react.production.min',
'react-dom': 'react-dom/umd/react-dom.production.min',
Expand Down
2 changes: 1 addition & 1 deletion fixtures/packaging/webpack/dev/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ module.exports = {
filename: 'output.js',
},
resolve: {
root: path.resolve('../../../../build/packages/'),
root: path.resolve('../../../../build/node_modules/'),
},
};
2 changes: 1 addition & 1 deletion fixtures/packaging/webpack/prod/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {
filename: 'output.js',
},
resolve: {
root: path.resolve('../../../../build/packages/'),
root: path.resolve('../../../../build/node_modules/'),
},
plugins: [
new webpack.DefinePlugin({
Expand Down
4 changes: 2 additions & 2 deletions fixtures/ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"ignore-styles": "^5.0.1",
"import-export": "^1.0.1",
"node-fetch": "^1.6.3",
"react": "file:../../build/packages/react",
"react-dom": "file:../../build/packages/react-dom"
"react": "link:../../build/node_modules/react",
"react-dom": "link:../../build/node_modules/react-dom"
},
"scripts": {
"start": "concurrently \"npm run start:server\" \"npm run start:client\"",
Expand Down
20 changes: 6 additions & 14 deletions fixtures/ssr/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4200,13 +4200,9 @@ react-dev-utils@^0.5.2:
sockjs-client "1.0.1"
strip-ansi "3.0.1"

"react-dom@file:../../build/packages/react-dom":
version "16.0.0"
dependencies:
fbjs "^0.8.16"
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.0"
"react-dom@link:../../build/node_modules/react-dom":
version "0.0.0"
uid ""

react-scripts@0.9.5:
version "0.9.5"
Expand Down Expand Up @@ -4253,13 +4249,9 @@ react-scripts@0.9.5:
optionalDependencies:
fsevents "1.0.17"

"react@file:../../build/packages/react":
version "16.0.0"
dependencies:
fbjs "^0.8.16"
loose-envify "^1.1.0"
object-assign "^4.1.1"
prop-types "^15.6.0"
"react@link:../../build/node_modules/react":
version "0.0.0"
uid ""

read-pkg-up@^1.0.1:
version "1.0.1"
Expand Down
Loading

0 comments on commit c71601b

Please sign in to comment.