Commit Graph
8871 Commits
Author SHA1 Message Date
Brian VaughnandDan Abramov 7dfb41e477 Fix lint error in DOM fixtures (#10369) 2017-08-03 17:32:04 +01:00
Dan AbramovandGitHub c4276007ba Add documentation about <script crossorigin> for React CDN usage (#10368) 2017-08-03 16:13:13 +01:00
Jason QuenseandDan Abramov 0889a91856 Remove old IE polyfill code (#10238)
* Upgrade DOM Fixtures

Upgrade to react-scripts v1 and include required polyfills for older
browsers

* Remove ChangeEvent polyfills for unsupported browsers
2017-08-03 13:45:41 +01:00
Dan AbramovandGitHub dfc40ab669 Fix CI maybe 2017-08-03 00:59:40 +01:00
Dan AbramovandGitHub b4cb1e90d6 Use single entry point for SSR via browser field (#10362)
* Use single entry point for SSR via browser field

* Add server.browser entry point and smoke tests

* Tweak bundle naming

* Fix import

* Re-record

* Fix the robot nits

* Add resetModules for some extra isolation
2017-08-03 00:41:09 +01:00
Brian VaughnandGitHub a9086b6a57 Wrap contents of if-DEV condition in an IIFE (#10361)
This avoids strict mode conflicts for certain browsers wrt functions being defined within an if-block.
Also re-added the if-DEV condition for the ReactNative renderer since it was removed for this reason.
2017-08-02 14:24:43 -07:00
Brian VaughnandGitHub 0e91b484b1 FB bundles wrap warning() calls in __DEV__ (#10314)
FB bundles wrap warning() calls in __DEV__

Split dev-mode transforms into separate parts:
1) umd+cjs+fb: Wrap warning calls with process.env checks
2) umd+cjs: Replace error messages with minified codes

Also updated transforms to use __DEV__ since it transforms to smaller code after stripEnvVariables is run.

Also renamed 'scripts/error-codes/dev-expression-with-codes.js' -> 'scripts/error-codes/replace-invariant-error-codes.js'
2017-08-02 14:14:26 -07:00
Dan AbramovandGitHub 976de84431 Don't suggest downloading React DevTools inside Chrome extension (#10359) 2017-08-02 20:04:49 +01:00
Dan AbramovandGitHub e1a1c170eb Upsell React DevTools in 16 (#10351)
* Upsell React DevTools

* Fix Flow

* Upsell message nits

* Avoid extra checks in onCommitRoot and onCommitUnmount
2017-08-02 18:56:24 +01:00
Dan AbramovandGitHub 7fc284400f Warn on missing Set/Map polyfills (#10356)
* Crash on missing Set/Map polyfills

* Change Map/Set to emit warnings instead

* Change rAF polyfill check to also be a warning

* Liiiiiint
2017-08-02 18:55:18 +01:00
Toru KobayashiandDan Abramov 8ea972de71 Remove an unnecessary __DEV__ condition (#10350) 2017-08-02 17:57:41 +01:00
Brian VaughnandGitHub 93a5845580 Shallow renderer passes context to componentWillReceiveProps (#10342)
This parameter was accidentally omitted before. Leland reported it because it impacts Enzyme.
I also added a basic lifecycle parameter test for shallow renderer.
2017-08-02 08:18:46 -07:00
Andrew ClarkandGitHub 87aff0fdec Remove rAF export from ReactDOMFrameScheduling (#10337)
Fiber doesn't schedule animation callbacks anymore (though it does use
the browser's requestAnimationFrame to polyfill requestIdleCallback).

This removes the rAF export from ReactDOMFrameScheduling, since it's not
being used.
2017-08-02 19:56:37 +05:30
Nathan HunzakerandDan Abramov b088308060 Remove event namespace check from react-partial-renderer (#10344) 2017-08-02 11:30:44 +01:00
Toru KobayashiandDan Abramov a87bafd125 Fix a typo (#10349) 2017-08-02 11:09:09 +01:00
Michał PierzchałaandDan Abramov 7dcc560060 Fix error-codes not updating correctly (#10348)
* Fix error-codes not updating correctly

* Revert changes to codes.json
2017-08-02 10:38:27 +01:00
Greg HurrellandDan Abramov f3c26f31c2 Grammar fixes for a code comment (#10343) 2017-08-02 01:20:53 +01:00
Dan AbramovandGitHub 2fbde1644d Remove hydrate() warning about empty container (#10345)
* Remove hydrate() warning about empty container

It used to have false positives for cases where we legitimately don't render anything.

* Use existing constant

* Test empty string case using its parent
2017-08-02 01:05:56 +01:00
Dan AbramovandGitHub 8d45680695 Add an extra test for arrays and strings from composites (#10346) 2017-08-02 01:05:42 +01:00
Dan AbramovandGitHub b4d8151b1e Add ReactDOM.hydrate() as explicit SSR hydration API (#10339)
* Add ReactDOM.hydrate()

* Deprecate ReactDOM.render() hydration in favor of ReactDOM.hydrate()

* Downgrade the warning level to console.warn()

* Warn when hydrate() is called with empty container
2017-08-01 21:17:24 +01:00
Dan AbramovandGitHub e954616919 Make unexpected console.warn() calls fail tests (#10341)
* Make console.warn() calls fail tests

* Replace matchers with a more straightforward cleanup
2017-08-01 19:53:37 +01:00
Brian VaughnandGitHub 56c910ba87 Context improvements (#10334)
Refactored fiber context to fix a nested updates bug
2017-08-01 08:38:54 -07:00
Dan AbramovandGitHub 459589fa09 Test for specific SSR warning (#10340)
* Test for specific SSR warning

* Same in another place
2017-08-01 14:38:17 +01:00
Jack FordandDan Abramov a882b522cb Remove trapBubbledEventsLocal (#10258)
* Inline trapBubbledEventsLocal

* Revert "Inline trapBubbledEventsLocal"

This reverts commit 0ee65ff491deeec70223c2e39d04ef0aeda95d73.

* Merge remove-local-trap-bubbled-events branch
2017-08-01 08:37:26 +01:00
Toru KobayashiandDan Abramov e4b1678875 Move ShallowRenderer tests (#10184) 2017-08-01 08:27:28 +01:00
Toru KobayashiandDan Abramov 8ba7e3bf45 Add tests that ShallowRenderer supports string and fragment (#10241) 2017-08-01 00:39:43 +01:00
Dan AbramovandGitHub aaa0f72328 Fix invariant parity for SSR (#10333) 2017-07-31 21:13:50 +01:00
Dan AbramovandGitHub 889fbf8b7b Fix SSR integration test swallowing lack of expected error (#10331)
* Don't catch the assertion about missing errors

Previously, even if an error was not thrown, the assertion about this was ignored.

This fix exposes two failing cases in new SSR that weren't failing in Stack.

* Add child context validation to new SSR

This fixes the error cases that were silently failing before but are now exposed.
2017-07-31 17:57:05 +01:00
guoyong yiandDan Abramov fe420ac003 fix renderToString fails with array type children when react-dom/server render (#10221)
* fix(*): fix renderToString fails with array type children when react-dom/server render

* Add an integration test that verify renderToString with array type children

* Add integration test to renderToString with array type child

* Update integration test to renderToString with array type child

* fix renderToString fails with array type children when react-dom/server render

* Update integration test to renderToString with array type child

* Add to iterate that are not arrays

* Add the validation react element

* Improve an integration test of server renderToString with array type

* prettier

* prettier

* Make SSR can handle a single array element and nested array

* prettier

* Change integeration test description

* 	modified:   src/renderers/dom/ReactDOMNodeStreamRenderer.js

* Make invariants consistent

* Gate outdated test itself by feature flag

* Change test to make sense both with old and new code

* Test more cases
2017-07-31 16:59:14 +01:00
Dominic GannawayandGitHub 6d50537009 Move line to within DEV block (#10316)
* move line to within DEV block

* addressed code review feedback
2017-07-27 17:31:34 -07:00
Dan Abramov b717ca445d Make it more specific 2017-07-27 23:44:43 +01:00
Fernando MontoyaandDan Abramov 33c15dce56 Add Babel plugin note to Error boundaries post (#10313)
* Add Babel plugin note to Error boundaries post

* Added section with screenshots

* Add context to Component stack traces

* Update 2017-07-26-error-handling-in-react-16.md

* Move section, more minor changes

* Change pics
2017-07-27 23:25:59 +01:00
Dominic GannawayandGitHub 2c13a11cca Wraps two warnings that should be removed from PROD (#10315) 2017-07-27 11:24:34 -07:00
Nathan HunzakerandGitHub a0cfa3158d Add date time test fixtures (#10154)
* Add date time test fixtures

This commit adds a new section for the DOM test fixtures specifically
for date inputs. Additionally, it adds a test case to verify that
correct transference of dates between the `"date"` and
`"datetime-locale"` input types.

* Adjust date parsing to be clearer
2017-07-27 13:24:04 -04:00
Dan Abramov b7b7e33a1b 16.0.0-beta.2 2017-07-27 18:06:26 +01:00
Dan AbramovandGitHub 5cdfb73157 Make server hydration warnings more obviously about server (#10312) 2017-07-27 18:02:16 +01:00
Sebastian MarkbĂĄgeandGitHub 3f92a53655 Remove Error event listener eagerly instead of using depth count (#10296)
A little simpler.
2017-07-27 09:45:07 -07:00
Dan AbramovandGitHub d9edb1bf0a Add smoke tests for styles (including SSR) (#10308)
* Add style to ReactDOM smoke test

* Add production smoke test for ReactDOMServer
2017-07-27 14:58:03 +01:00
Toru KobayashiandDan Abramov 6196ed26f5 Add a link for the error boundaries codemod into the blog post (#10305)
* Add a link for the error boundaries codemod into the blog post

* Update 2017-07-26-error-handling-in-react-16.md
2017-07-27 14:57:33 +01:00
Dan Abramov b2ca698f7c Reword further 2017-07-27 10:48:37 +01:00
Daniel Lo NigroandDan Abramov cebfae6fbd Replace "children (and grandchildren)" with "descendants" (#10297) 2017-07-27 10:23:36 +01:00
Keyan ZhangandDan Abramov f3a15877af Fix ReactPartialRenderer in production (#10300) 2017-07-27 10:19:05 +01:00
Dominic GannawayandGitHub 9e690584b6 Wrap "warning" call in DEV block to prevent PROD error (#10295)
* re-adds warning module to FB PROD bundle

* Wrap the warning call too
2017-07-26 14:59:44 -07:00
Dan Abramov 05a5ed1468 Link to React 16 beta 2017-07-26 21:20:12 +01:00
Dan AbramovandGitHub d7e7990b0a Blog post: Error Handling in React 16 (#10267)
* Blog post: Error Handling in React 16

* Change the date
2017-07-26 21:15:19 +01:00
Brian Vaughn 36a21342a6 Updated package versions and Rollup results 2017-07-26 12:55:31 -07:00
Dan AbramovandGitHub c4f1f04a81 Fix process override in ErrorUtils test (#10293) 2017-07-26 20:40:09 +01:00
Brian VaughnandGitHub 4c42eb9771 Fix error utils test failure caused by updating error codes (#10291) 2017-07-26 12:39:58 -07:00
Brian VaughnandGitHub 8b99ae86bc Updated error codes (after merging in missing code from 15 stable) (#10290) 2017-07-26 12:18:02 -07:00
Dan AbramovandGitHub 6b681facd3 Link warning to error boundary post (#10289) 2017-07-26 19:59:07 +01:00