9811 Commits

Author SHA1 Message Date
Dan Abramov 3232616348 Update bundle sizes for 16.3.2 release v16.3.2 2018-04-16 16:23:13 +01:00
Dan Abramov 6494f6b6b8 Update error codes for 16.3.2 release 2018-04-16 16:23:12 +01:00
Dan Abramov 82f67d65fd Updating package versions for release 16.3.2 2018-04-16 16:14:28 +01:00
Dan Abramov 66c44a7bc3 Updating yarn.lock file for 16.3.2 release 2018-04-16 16:12:35 +01:00
Floris Doolaard 1e97a71a82 Fix documentation of the release process (#12337)
* Adusted grammar in release script readme.

* Adjusts title and explanation about the release process.
2018-04-16 15:45:13 +01:00
Alex Zherdev 2e1cc28027 Fix small typos in create-subscription readme (#12399) 2018-04-16 15:44:38 +01:00
Rauno Freiberg a4cef29703 tests: add regression test for reading ReactCurrentOwner stateNode (#12412)
* tests: add regression test for reading ReactCurrentOwner stateNode

* tests: replace expect with just rendering the component
2018-04-16 15:44:17 +01:00
Dan Abramov 1591c8ebab Update GCC (#12618) 2018-04-16 15:42:10 +01:00
Brian Vaughn 5dfbfe9da7 Fixed debug performance labels for new component types (#12609)
* Added new debug performance tests for AsyncMode, StrictMode, forwardRef, and context provider/consumer components.
* Updated performance labels to exclude AsyncMode and StrictMode.
* Added labels for forwardRef (and inner function) that mirror DevTools labels.
2018-04-12 09:39:05 -07:00
Dan Abramov c27a99812e [Danger] Minor fixes (#12606)
* Don't download bundle stats from master on CI

This was temporarily necessary in the past because we didn't have the logic that downloads actual *merge base* stats.

We do have that now as part of the Danger script. So we can remove this.

* Use absolute threshold for whether to show a change

* Download master stats, but only for other master builds

* Rewrite sizes
2018-04-11 18:46:02 +01:00
Flarnie Marchan 915bb5321a Bump expiration for interactive updates to 150ms in production (#12599)
* Bump expiration for interactive updates to 150ms in production

**what is the change?:**
Changes the expiration deadline from 500ms to 150ms, only in production.
In development it will still be 500ms.

I'm thinking we may want to change the 'bucket size' too, will look into
that a bit.

**why make this change?:**
We need to ensure interactions are responsive enough in order to gather
more test data on async. mode.

**test plan:**
No tests failed - where shall we add a test for this?

* Add comments
2018-04-11 07:27:16 -07:00
Dan Abramov 3e9515eede Remove @providesModule in www shims 2018-04-10 16:53:36 +01:00
Brian Vaughn b8461524db Added UMD build to test renderer package (#12594) 2018-04-10 07:49:19 -07:00
Steven Frieson 3eae866e03 Fixes language in error message. (#12590) 2018-04-10 15:09:45 +01:00
Sebastian Markbåge 52afbe0ebb createReactNativeComponentClass needs to be CommonJS
oops
2018-04-09 20:41:49 -07:00
Sebastian Markbåge 725c054d4d Refactor findHostInstance and findNodeHandle (#12575)
* Move findNodeHandle into the renderers and use instantiation

This is just like ReactDOM does it. This also lets us get rid of injection
for findNodeHandle. Instead I move NativeMethodsMixin and ReactNativeComponent
to use instantiation.

* Refactor findHostInstance

The reconciler shouldn't expose the Fiber data structure. We should pass
the component instance to the reconciler, since the reconciler is the
thing that is supposed to be instancemap aware.

* Fix devtools injection
2018-04-09 20:15:10 -07:00
Sebastian Markbåge b99d0b1416 [RN] Move view config registry to shims (#12569)
* Move view config registry to shims

This ensures that both Fabric and RN renderers share the same view config
registry since it is stateful.

I had to duplicate in the mocks for testing.

* Move createReactNativeComponentClass to shims and delete internal usage

Since createReactNativeComponentClass is just an alias for the register
there's no need to bundle it. This file should probably just move back
to RN too.
2018-04-09 20:05:57 -07:00
Sebastian Markbåge b6e0512a81 Consolidate eventTypes registry with view configs (#12556)
We already have one stateful module that contains all the view config.
We might as well store the event types there too. That way the shared
state is compartmentalized (and I can move it out in a follow up PR).

The view config registry also already has an appropriate place to call
processEventTypes so now we no longer have to do it in RN.

Will follow up with a PR to RN to remove that call.
2018-04-09 19:42:23 -07:00
Sebastian Markbåge 40d07724fc [RN] Remove unstable_batchedUpdates and unmountComponentAtNodeAndRemoveContainer from Fabric (#12571)
These don't make much sense in Fabric, since Fabric will be async by default only.

And unmount+remove container is a sketchy API we should remove so we might
as well make sure modern containers enforce that.
2018-04-09 19:36:13 -07:00
Sebastian Markbåge 933f882a9d Remove ReactNativePropRegistry (#12559)
This has always been an unnecessary indirection to protect opaqueness,
which hasn't really worked out.
2018-04-09 19:02:46 -07:00
Sebastian Markbåge 2f7bca0eb2 Allocate unique reactTags for RN and Fabric (#12587)
Took this opportunity to remove some abstract overhead.

In Fabric it is extra simple since they no longer overlap with root tags.
2018-04-09 18:41:13 -07:00
Nicole Levy f88deda83b Throw more specific error if passed undefined in React.cloneElement (#12534)
* throw error if passed undefined

* should be TypeError

* simplify

* use invariant

* editor messed up spacing

* better check

* Revert "better check"

This reverts commit 273370758e.

* yarn prettier test was failing

* more explicit copy

* es6 import

* tests

* formatting

* Move import
2018-04-10 02:16:36 +01:00
Dan Abramov 8dfb057881 Unfork invariant and instead use it from reactProdInvariant (#12585) 2018-04-09 23:58:34 +01:00
Dan Abramov 76b4ba0129 Preserve error codes for invariants on www (#12539)
* Preserve error codes for invariants on www

* Remove unintentional change
2018-04-09 18:57:52 +01:00
Rafael Hovhannisyan ea37545037 Must be *a* before PlacementAndUpdate (#12580) 2018-04-08 18:29:37 +01:00
Heaven 20c5d97bb6 Keep consistency in the comment (#12579) 2018-04-08 17:29:02 +01:00
Sebastian Markbåge 181747a6cc [RN] Move takeSnapshot to RN (#12574)
It only uses public APIs. I have a diff on the other side.
2018-04-07 23:13:34 -07:00
Sebastian Markbåge bc753a716e Support findNodeHandle in Fabric (#12573)
This doesn't actually need to share any state because it goes through
the instance to the fiber structure. Since Fabric is on the same version
as RN, calling it on either renderer works.
2018-04-07 22:33:49 -07:00
Sebastian Markbåge 6bf2797d6c Remove flushSync from React Native (#12565)
There are no plans to enable async in the old renderer. In the new renderer
it only really makes sense to do from the main thread and probably from
native since it'll have to yield to native first.
2018-04-06 17:10:16 -07:00
Sebastian Markbåge 5b16b39508 Bug fix 2018-04-06 14:26:00 -07:00
Sebastian Markbåge cf649b40a5 Move TouchHistoryMath to React Native repo (#12557)
This isn't used by React core and is just a pure helper so it might as
well live where it's used. The React Native repo.
2018-04-05 20:29:04 -07:00
Sebastian Markbåge 7a3416f275 Expose component stack from reactTag to React Native renderer (#12549)
This is not safe in general and therefore shouldn't be exposed to anything
other than React Native internals.

It will also need a different version in Fabric that will not have the
reactTag exposed.
2018-04-04 17:18:44 -07:00
Nicole Levy 27535e7bfc Clarify ReactDOM's case warning for html tags (#12533)
* update warning text

* update tests to match

* `yarn prettier`

* include note on HTML5 custom elements

* dan’s copy suggestion

* remove ‘letters’
2018-04-04 22:21:06 +01:00
Brian Vaughn 8ec0e4a99d Removed Array.from() usage (#12546) 2018-04-04 13:54:27 -07:00
Brian Vaughn d328e362e8 Removed duplicate typeof check (#12541) 2018-04-04 13:30:48 -07:00
Dan Abramov e932e321a8 facebook.github.io/react -> reactjs.org (#12545) 2018-04-04 21:20:41 +01:00
Dan Abramov 5e3706cca0 Don't render bitmask-bailing consumers even if there's a deeper matching child (#12543)
* Don't render consumers that bailed out with bitmask even if there's a deeper matching child

* Use a render prop in the test

Without it, <Indirection> doesn't do anything because we bail out on constant element anyway.
That's not what we're testing, and could be confusing.
2018-04-04 19:44:14 +01:00
Dan Abramov 1c2876d5b5 Add a build step to hoist warning conditions (#12537) 2018-04-04 17:04:40 +01:00
Dan Abramov b15b165e07 Changelog for 16.3.1 2018-04-04 01:35:36 +01:00
Dan Abramov dc059579c3 Update bundle sizes for 16.3.1 release v16.3.1 2018-04-04 01:33:06 +01:00
Dan Abramov 787b343f67 Updating package versions for release 16.3.1 2018-04-04 01:22:30 +01:00
Dan Abramov 2279843ef9 Updating yarn.lock file for 16.3.1 release 2018-04-04 01:20:48 +01:00
Dan Abramov a2cc3c38e2 Follow up: make new warning less wordy (#12532) 2018-04-03 21:56:21 +01:00
Dan Abramov 36c2939372 Improve not-yet-mounted setState warning (#12531)
* Tweak not-yet-mounted setState warning

* Add \n\n
2018-04-03 21:22:44 +01:00
Andrew Clark 0f2f90bd9a getDerivedStateFrom{Props,Catch} should update updateQueue.baseState (#12528)
Based on a bug found in UFI2.

There have been several bugs related to the update queue (and
specifically baseState) recently, so I'm going to follow-up with some
refactoring to clean it up. This is a quick fix so we can ship a
patch release.
2018-04-03 13:02:46 -07:00
Dan Abramov da4e85567b Remove @providesModule in www bundles (#12529) 2018-04-03 20:12:29 +01:00
Brian Vaughn eb6e752cab Bumped create-subscription package version (#12526) 2018-04-03 11:06:52 -07:00
Mateusz Burzyński ba245f6f9b Prefix _context property on returned ReactContext from createContext - it's private (#12501) 2018-04-03 01:47:25 +01:00
Andrew Clark 6f2ea73978 Extract throw to separate function so performUnitOfWork does not deopt (#12521)
Only affects DEV mode, but still important I think.
2018-04-03 01:45:52 +01:00
Dan Abramov 4ccf58a94d Fix context stack misalignment caused by error replay (#12508)
* Add regression tests for error boundary replay bugs

* Ensure the context stack is aligned if renderer throws

* Always throw when replaying a failed unit of work

Replaying a failed unit of work should always throw, because the render
phase is meant to be idempotent, If it doesn't throw, rethrow the
original error, so React's internal stack is not misaligned.

* Reset originalReplayError after replaying

* Typo fix
2018-04-03 00:08:30 +01:00