Commit Graph

383 Commits

Author SHA1 Message Date
Nadia Osipova
a165cf7473 Renamed 4 Internal React Modules 2018-10-11 17:12:31 -07:00
Dan Abramov
c73497c3c7 Update bundle sizes for 16.6.0-alpha.8af6728 release 2018-10-10 17:19:00 +01:00
Andrew Clark
96bcae9d50
Jest + test renderer helpers for concurrent mode (#13751)
* Jest + test renderer helpers for concurrent mode

Most of our concurrent React tests use the noop renderer. But most
of those tests don't test the renderer API, and could instead be
written with the test renderer. We should switch to using the test
renderer whenever possible, because that's what we expect product devs
and library authors to do. If test renderer is sufficient for writing
most React core tests, it should be sufficient for others, too. (The
converse isn't true but we should aim to dogfood test renderer as much
as possible.)

This PR adds a new package, jest-react (thanks @cpojer). I've moved
our existing Jest matchers into that package and added some new ones.

I'm not expecting to figure out the final API in this PR. My goal is
to land something good enough that we can start dogfooding in www.

TODO: Continue migrating Suspense tests, decide on better API names

* Add additional invariants to prevent common errors

- Errors if user attempts to flush when log of yields is not empty
- Throws if argument passed to toClearYields is not ReactTestRenderer

* Better method names

- toFlushAll -> toFlushAndYield
- toFlushAndYieldThrough ->
- toClearYields -> toHaveYielded

Also added toFlushWithoutYielding

* Fix jest-react exports

* Tweak README
2018-10-03 18:37:41 -06:00
Brian Vaughn
36c5d69caa
Always warn about legacy context within StrictMode tree (#13760) 2018-10-03 08:40:45 -07:00
Maksim Markelov
3e9a5de888 UMD react-cache build (#13761) 2018-10-03 15:09:17 +01:00
Andrew Clark
ce96e2df4d
Rename simple-cache-provider to react-cache (#13755) 2018-10-01 09:07:40 -06:00
Dan
eeb817785c Remove some old files from stats 2018-09-19 01:36:31 +01:00
Dan Abramov
7ea3ca1d13
Rename schedule to scheduler (#13683) 2018-09-19 01:26:28 +01:00
Brian Vaughn
bec2ddaf15 Update bundle sizes for 16.5.2 release 2018-09-18 11:30:50 -07:00
Brian Vaughn
c3fad5acf8 Revert "Update bundle sizes for 16.6.0-alpha.0 release"
This reverts commit 42d12317a7.
2018-09-18 10:59:57 -07:00
Brian Vaughn
42d12317a7 Update bundle sizes for 16.6.0-alpha.0 release 2018-09-17 15:05:46 -07:00
Brian Vaughn
8bc0bcabe7
Add UMD production+profiling entry points (#13642)
* Added UMD_PROFILING type to react-dom and scheduling package. Added UMD shim to schedule package.
* Added new schedule umd prod+prof bundle to API test
2018-09-13 17:44:08 -07:00
Brian Vaughn
4bcee56210
Rename "tracking" API to "tracing" (#13641)
* Replaced "tracking" with "tracing" in all directory and file names
* Global rename of track/tracking/tracked to trace/tracing/traced
2018-09-13 14:23:16 -07:00
Dan Abramov
72217d0819 Update bundle sizes for 16.5.1 release 2018-09-13 19:31:18 +01:00
Dan Abramov
2282400850
Delete TapEventPlugin (#13630) 2018-09-12 19:53:29 +01:00
Dan
8a8d973d3c Use clearer wording
Fixes #13604
2018-09-09 16:54:31 +01:00
Brandon Dail
7d1169b2d7
Remove injectComponentTree from unstable-native-dependencies, add EventPluginHub (#13598)
* Remove injectComponentTree from unstable-native-dependencies, add
EventPluginHub

injectComponentTree was exposed for react-native-web, but wasn't
actually being used by the project. They were using EventPluginHub
through ReactDOM's secret internals, but that was removed in https://github.com/facebook/react/pull/13539

This removes the unused injectComponentTree export, refactors the
ResponderEventPlugin test so it doesn't depend on it, and also adds
EventPluginHub to the exports to unbreak react-native-web

* Re-export injectEventPluginsByName from ReactDOM internals
2018-09-08 12:07:59 -07:00
Héctor Ramos
b87aabdfe1
Drop the year from Facebook copyright headers and the LICENSE file. (#13593) 2018-09-07 15:11:23 -07:00
Timothy Yung
e417e0bf7c Update ReactNativeViewConfigRegistry Flow Types (#13579) 2018-09-06 12:27:44 -07:00
Brian Vaughn
71c0e05ba7 Update bundle sizes for 16.5.0 release 2018-09-06 09:34:27 -07:00
Brian Vaughn
fb88fd9d8c
Fixed schedule/tracking require for www sync script (#13556)
* Fixed schedule/tracking require for www sync script

* Remove unused remapped FB modules from bundle as well

* Remove www module rename plugin

* Revert unnecessary change to strip-unused-imports plugin
2018-09-04 10:31:52 -07:00
Dan Abramov
c1ba7b8cfd
Remove www scheduler fork (#13545)
Remove unused www scheduler fork
2018-09-03 19:55:58 +01:00
Brian Vaughn
b92f947af1 Rename "react-scheduler" package to "schedule" (#13543)
* Git moved packages/react-scheduler -> packages/schedule

* Global find+replace 'react-scheduler' -> 'schedule'

* Global find+replace 'ReactScheduler' -> 'Scheduler'

* Renamed remaining files "ReactScheduler" -> "Schedule"

* Add thank-you note to schedule package README

* Replaced schedule package versions 0.1.0-alpha-1 -> 0.2.0

* Patched our local fixtures to work around Yarn install issue

* Removed some fixture hacks
2018-09-03 19:27:50 +01:00
Brian Vaughn
8a1e3962ab
Remove negative lookbehind from Rollup plugin that broke Node <= v8.9 (#13538) 2018-09-02 17:59:29 -07:00
Brian Vaughn
46950a3dfc
Interaction tracking follow up (#13509)
* Merged interaction-tracking package into react-scheduler
* Add tracking API to FB+www builds
* Added Rollup plugin to strip no-side-effect imports from Rollup bundles
* Re-bundle tracking and scheduling APIs on SECRET_INTERNALS object for UMD build (and provide lazy forwarding methods)
* Added some additional tests and fixtures
* Fixed broken UMD fixture in master (#13512)
2018-09-01 12:00:00 -07:00
Timothy Yung
d2123d6569
Sync React Native Flow Changes (#13513) 2018-08-29 13:54:58 -07:00
Brian Vaughn
6e4f7c7886
Profiler integration with interaction-tracking package (#13253)
* Updated suspense fixture to use new interaction-tracking API

* Integrated Profiler API with interaction-tracking API (and added tests)

* Pass interaction Set (rather than Array) to Profiler onRender callback

* Removed some :any casts for enableInteractionTracking fields in FiberRoot type

* Refactored threadID calculation into a helper method

* Errors thrown by interaction tracking hooks use unhandledError to rethrow more safely.
Reverted try/finally change to ReactTestRendererScheduling

* Added a $FlowFixMe above the FiberRoot :any cast

* Reduce overhead from calling work-started hook

* Remove interaction-tracking wrap() references from unwind work in favor of managing suspense/interaction continuations in the scheduler
* Moved the logic for calling work-started hook from performWorkOnRoot() to renderRoot()

* Add interaction-tracking to bundle externals. Set feature flag to __PROFILE__

* Renamed the freezeInteractionCount flag and replaced one use-case with a method param

* let -> const

* Updated suspense fixture to handle recent API changes
2018-08-28 18:58:11 -07:00
Brian Vaughn
0da5102cf0
Add interaction-tracking/subscriptions (#13426)
* Removed enableInteractionTrackingObserver as a separate flag; only enableInteractionTracking is used now

* Added interaction-tracking/subscriptions bundle and split tests

* Added multi-subscriber support

* Moved subscriptions behind feature flag

* Fixed bug with wrap() parameters and added test

* Replaced wrap arrow function
2018-08-17 14:45:18 -06:00
Brian Vaughn
5e0f073d50
interaction-tracking package (#13234)
Add new interaction-tracking package/bundle
2018-08-17 10:16:05 -06:00
Aaron Brager
8862172fa3 Provide a better error message (#12421) 2018-08-16 14:54:45 +01:00
Dan Abramov
83e446e1d8
Refactor ReactErrorUtils (#13406)
* Refactor ReactErrorUtils

* Remove unnecessary assignments
2018-08-15 19:02:11 +01:00
Bartosz Kaszubowski
08e32263f9 Fix Prettier "No parser" warning while building (#13323) 2018-08-05 02:50:58 +01:00
Brian Vaughn
dbd16c8a96
Add @flow directive to findDOMNode shim (#13265)
* Add @flow directive to findDOMNode shim
2018-07-24 14:53:54 -07:00
Dan Abramov
5776fa3fcf
Update www warning shim (#13244) 2018-07-20 16:50:43 +01:00
Dan Abramov
f9358c51c8
Change warning() to automatically inject the stack, and add warningWithoutStack() as opt-out (#13161)
* Use %s in the console calls

* Add shared/warningWithStack

* Convert some warning callsites to warningWithStack

* Use warningInStack in shared utilities and remove unnecessary checks

* Replace more warning() calls with warningWithStack()

* Fixes after rebase + use warningWithStack in react

* Make warning have stack by default; warningWithoutStack opts out

* Forbid builds that may not use internals

* Revert newly added stacks

I changed my mind and want to keep this PR without functional changes. So we won't "fix" any warnings that are already missing stacks. We'll do it in follow-ups instead.

* Fix silly find/replace mistake

* Reorder imports

* Add protection against warning argument count mismatches

* Address review
2018-07-16 22:31:59 +01:00
Dan Abramov
659a29cecf
Reorganize how shared internals are accessed (#13201)
* Reorganize how shared internals are accessed

* Update forks.js
2018-07-13 02:45:37 +01:00
Chang Yan
449f6ddd5c
create a new FeatureFlags file for test renderer on www (#13159) 2018-07-06 12:55:29 -07:00
Brian Vaughn
6d6de6011c
Add PROFILE bundles for www+DOM and fbsource+RN/RF (#13112) 2018-06-26 13:28:41 -07:00
Dan Abramov
8e87c139b4
Remove transitive dependency on fbjs (#13075) 2018-06-19 17:52:37 +01:00
Dan Abramov
aeda7b745d
Remove fbjs dependency (#13069)
* Inline fbjs/lib/invariant

* Inline fbjs/lib/warning

* Remove remaining usage of fbjs in packages/*.js

* Fix lint

* Remove fbjs from dependencies

* Protect against accidental fbjs imports

* Fix broken test mocks

* Allow transitive deps on fbjs/ for UMD bundles

* Remove fbjs from release script
2018-06-19 16:03:45 +01:00
Flarnie Marchan
2a8085980f
Remove rAF fork (#12980)
* Remove rAF fork

**what is the change?:**
Undid https://github.com/facebook/react/pull/12837

**why make this change?:**
We originally forked rAF because we needed to pull in a particular
version of rAF internally at Facebook, to avoid grabbing the default
polyfilled version.

The longer term solution, until we can get rid of the global polyfill
behavior, is to initialize 'schedule' before the polyfilling happens.

Now that we have landed and synced
https://github.com/facebook/react/pull/12900 successfully, we can
initialize 'schedule' before the polyfill runs.
So we can remove the rAF fork. Here is how it will work:

1. Land this PR on Github.
2. Flarnie will quickly run a sync getting this change into www.
3. We delete the internal forked version of
   'requestAnimationFrameForReact'.
4. We require 'schedule' in the polyfill file itself, before the
   polyfilling happens.

**test plan:**
Flarnie will manually try the above steps locally and verify that things
work.

**issue:**
Internal task T29442940

* fix nits

* fix tests, fix changes from rebasing

* fix lint
2018-06-13 10:57:35 -07:00
Dan Abramov
9725065eb4 Update bundle sizes for 16.4.1 release 2018-06-13 17:20:35 +01:00
Brian Vaughn
d5c11193e2
Added production profiling bundle type (#12886)
* Added profiling bundle
* Turned profiling on for React Fabric OSS profiling and dev bundles
* Added new global var "__PROFILE__" for profiling DCE
2018-06-11 13:16:27 -07:00
Flarnie Marchan
ff724d3c28
[scheduler] 4/n Allow splitting out schedule in fb-www, prepare to fix polyfill issue internally (#12900)
* Use local references to global things inside 'scheduler'

**what is the change?:**
See title

**why make this change?:**
We want to avoid initially calling one version of an API and then later
accessing a polyfilled version.

**test plan:**
Run existing tests.

* Shim ReactScheduler for www

**what is the change?:**
In 'www' we want to reference the separate build of ReactScheduler,
which allows treating it as a separate module internally.

**why make this change?:**
We need to require the ReactScheduler before our rAF polyfill activates,
in order to customize which custom behaviors we want.

This is also a step towards being able to experiment with using it
outside of React.

**test plan:**
Ran tests, ran the build, and ran `test-build`.

* Generate a bundle for fb-www

**what is the change?:**
See title

**why make this change?:**
Splitting out the 'schedule' module allows us to load it before
polyfills kick in for rAF and other APIs.

And long term we want to split this into a separate module anyway, this
is a step towards that.

**test plan:**
I'll run the sync next week and verify that this all works. :)

* ran prettier

* fix rebase issues

* Change names of variables used for holding globals
2018-05-29 13:30:04 -07:00
Sebastian Markbåge
e7bd3d59a9 No longer expose ReactNativeComponentTree (#12904) 2018-05-25 21:17:37 -07:00
Andrew Clark
8765d60893 Update bundle sizes for 16.4.0 release 2018-05-23 17:35:31 -07:00
Chang Yan
7350358374
add legacy context API warning in strict mode (#12849)
* add legacy context APIs warning in strict mode

* refactor if statement and the warning message

* add other flags for type check

* add component stack tree and refactor wording

* fix the nits
2018-05-22 15:38:02 -07:00
Brian Vaughn
7c0aca289d
Rollup freeze: false (#12879)
* Tell Rollup not to freeze bundles
* Only freeze bundles for DEV builds
2018-05-22 08:16:59 -07:00
Dan Abramov
dc3b144f41
Treat Rollup "warnings" as errors (#12868) 2018-05-21 15:38:46 +01:00
Dan Abramov
47b003a828
Resolve host configs at build time (#12792)
* Extract base Jest config

This makes it easier to change the source config without affecting the build test config.

* Statically import the host config

This changes react-reconciler to import HostConfig instead of getting it through a function argument.

Rather than start with packages like ReactDOM that want to inline it, I started with React Noop and ensured that *custom* renderers using react-reconciler package still work. To do this, I'm making HostConfig module in the reconciler look at a global variable by default (which, in case of the react-reconciler npm package, ends up being the host config argument in the top-level scope).

This is still very broken.

* Add scaffolding for importing an inlined renderer

* Fix the build

* ES exports for renderer methods

* ES modules for host configs

* Remove closures from the reconciler

* Check each renderer's config with Flow

* Fix uncovered Flow issue

We know nextHydratableInstance doesn't get mutated inside this function, but Flow doesn't so it thinks it may be null.
Help Flow.

* Prettier

* Get rid of enable*Reconciler flags

They are not as useful anymore because for almost all cases (except third party renderers) we *know* whether it supports mutation or persistence.

This refactoring means react-reconciler and react-reconciler/persistent third-party packages now ship the same thing.
Not ideal, but this seems worth how simpler the code becomes. We can later look into addressing it by having a single toggle instead.

* Prettier again

* Fix Flow config creation issue

* Fix imprecise Flow typing

* Revert accidental changes
2018-05-19 11:29:11 +01:00
Gary Wang
1a0afed771 getPeerGlobals should check bundleType instead of moduleType (#12839) 2018-05-17 17:16:03 +01:00
Flarnie Marchan
7ccb37161f
Temporary fix for grabbing wrong rAF polyfill in ReactScheduler (#12837)
* Temporary fix for grabbing wrong rAF polyfill in ReactScheduler

**what is the change?:**
For now...
We need to grab a slightly different implementation of rAF internally at
FB than in Open Source. Making rAF a dependency of the ReactScheduler
module allows us to fork the dependency at FB.

NOTE: After this lands we have an alternative plan to make this module
separate from React and require it before our Facebook timer polyfills
are applied. But want to land this now to keep master in a working state
and fix bugs folks are seeing at Facebook.

Thanks @sebmarkbage @acdlite and @sophiebits for discussing the options
and trade-offs for solving this issue.

**why make this change?:**
This fixes a problem we're running into when experimenting with
ReactScheduler internally at Facebook, **and* it's part of our long term
plan to use dependency injection with the scheduler to make it easier to
test and adjust.

**test plan:**
Ran tests, lint, flow, and will manually test when syncing into
Facebook's codebase.

**issue:**
See internal task T29442940

* ran prettier
2018-05-17 08:57:45 -07:00
Andrew Clark
a5184b215d
Add FB www build of simple-cache-provider (#12822) 2018-05-15 13:21:07 -07:00
Dan Abramov
9097f3cdf0
Delete React Call/Return experiment (#12820) 2018-05-15 19:16:29 +01:00
Philipp Spieß
e96dc14059 Use browser event names for top-level event types in React DOM (#12629)
* Add TopLevelEventTypes

* Fix `ReactBrowserEventEmitter`

* Fix EventPluginUtils

* Fix TapEventPlugin

* Fix ResponderEventPlugin

* Update ReactDOMFiberComponent

* Fix BeforeInputEventPlugin

* Fix ChangeEventPlugin

* Fix EnterLeaveEventPlugin

* Add missing non top event type used in ChangeEventPlugin

* Fix SelectEventPlugin

* Fix SimpleEventPlugin

* Fix outstanding Flow issues and move TopLevelEventTypes

* Inline a list of all events in `ReactTestUtils`

* Fix tests

* Make it pretty

* Fix completly unrelated typo

* Don’t use map constructor because of IE11

* Update typings, revert changes to native code

* Make topLevelTypes in ResponderEventPlugin injectable and create DOM and ReactNative variant

* Set proper dependencies for DOMResponderEventPlugin

* Prettify

* Make some react dom tests no longer depend on internal API

* Use factories to create top level speific generic event modules

* Remove unused dependency

* Revert exposed module renaming, hide store creation, and inline dependency decleration

* Add Flow types to createResponderEventPlugin and its consumers

* Remove unused dependency

* Use opaque flow type for TopLevelType

* Add missing semis

* Use raw event names as top level identifer

* Upgrade baylon

This is required for parsing opaque flow types in our CI tests.

* Clean up flow types

* Revert Map changes of ReactBrowserEventEmitter

* Upgrade babel-* packages

Apparently local unit tests also have issues with parsing JavaScript
modules that contain opaque types (not sure why I didn't notice
earlier!?).

* Revert Map changes of SimpleEventPlugin

* Clean up ReactTestUtils

* Add missing semi

* Fix Flow issue

* Make TopLevelType clearer

* Favor for loops

* Explain the new DOMTopLevelEventTypes concept

* Use static injection for Responder plugin types

* Remove null check and rely on flow checks

* Add missing ResponderEventPlugin dependencies
2018-05-15 10:38:50 +01:00
Timothy Yung
bde4b1659f
Delete ReactPerf and ReactDebugTool Stubs (#12809) 2018-05-14 20:28:55 -07:00
Sophie Alpert
8c747d01cb
Use ReactFiberErrorDialog fork for Fabric renderer (#12807) 2018-05-14 18:47:40 -07:00
Timothy Yung
369dd4fb17 Update headers for React Native shims (#12806) 2018-05-15 01:47:47 +01:00
Brian Vaughn
0ba63aa141
Mark React Native and Fabric renderers as @generated (#12801)
Mark React Native and Fabric renderers as @generated
2018-05-14 10:39:30 -07:00
Dan Abramov
72542030cf
Use Java version of Google Closure Compiler (#12800)
* makes closure compiler threaded

* Dans PR with a closure compiler java version

* Remove unused dep

* Pin GCC

* Prettier

* Nit rename

* Fix error handling

* Name plugins consistently

* Fix lint

* Maybe this works?

* or this

* AppVeyor

* Fix lint
2018-05-14 17:49:41 +01:00
Dan Abramov
0470854f55
Split ReactNoop into normal and persistent exports (#12793)
* Copy-paste ReactNoop into ReactNoopPersistent

* Split ReactNoop into normal and persistent exports

* ReactNoopShared -> createReactNoop
2018-05-14 13:57:33 +01:00
Dan
7b19f93ab9 Record sizes 2018-05-13 21:12:25 +01:00
Andrew Clark
42a1262375 Update sizes 2018-05-10 18:08:11 -07:00
Andrew Clark
09a14eacd4 Update bundle sizes 2018-04-23 19:38:07 -07:00
Flarnie Marchan
999b656ed1
Initial commit (#12624)
This is the first step - pulling the ReactDOMFrameScheduling module out
into a separate package.

Co-authored-by: Brandon Dail <aweary@users.noreply.github.com>
2018-04-19 09:29:08 -07:00
Brian Vaughn
0887c7d56c
Fork React Native renderer into FB and OSS bundles (#12625)
* Added new "native-fb" and "native-fabric-fb" bundles.
* Split RN_DEV and RN_PROD bundle types into RN_OSS_DEV, RN_OSS_PROD, RN_FB_DEV, and RN_FB_PROD. (This is a bit redundant but it seemed the least intrusive way of supporting a forked feature flags file for these bundles.)
* Renamed FB_DEV and FB_PROD bundle types to be more explicitly for www (FB_WWW_DEV and FB_WWW_PROD)
* Removed Haste @providesModule headers from the RB-specific RN renderer bundles to avoid a duplicate name conflicts.
* Remove dynamic values from OSS RN feature flags. (Leave them in FB RN feature flags.)
* Updated the sync script(s) to account for new renderer type.
* Move ReactFeatureFlags.js shim to FB bundle only (since OSS bundle no longer needs dynamic values).
2018-04-18 13:16:50 -07:00
Dan Abramov
3232616348 Update bundle sizes for 16.3.2 release 2018-04-16 16:23:13 +01:00
Dan Abramov
1591c8ebab
Update GCC (#12618) 2018-04-16 15:42:10 +01: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
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
Sebastian Markbåge
52afbe0ebb
createReactNativeComponentClass needs to be CommonJS
oops
2018-04-09 20:41:49 -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
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
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
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
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
Dan Abramov
1c2876d5b5
Add a build step to hoist warning conditions (#12537) 2018-04-04 17:04:40 +01:00
Dan Abramov
dc059579c3 Update bundle sizes for 16.3.1 release 2018-04-04 01:33:06 +01:00
Dan Abramov
da4e85567b
Remove @providesModule in www bundles (#12529) 2018-04-03 20:12:29 +01:00
Brian Vaughn
8e3d94ffa1 Update bundle sizes for 16.3.0 release 2018-03-29 13:07:12 -07:00
Andrew Clark
268a3f60df
Add unstable APIs for async rendering to test renderer (#12478)
These are based on the ReactNoop renderer, which we use to test React
itself. This gives library authors (Relay, Apollo, Redux, et al.) a way
to test their components for async compatibility.

- Pass `unstable_isAsync` to `TestRenderer.create` to create an async
renderer instance. This causes updates to be lazily flushed.
- `renderer.unstable_yield` tells React to yield execution after the
currently rendering component.
- `renderer.unstable_flushAll` flushes all pending async work, and
returns an array of yielded values.
- `renderer.unstable_flushThrough` receives an array of expected values,
begins rendering, and stops once those values have been yielded. It
returns the array of values that are actually yielded. The user should
assert that they are equal.

Although we've used this pattern successfully in our own tests, I'm not
sure if these are the final APIs we'll make public.
2018-03-28 14:57:25 -07:00
Brian Vaughn
b3d883630c Update bundle sizes for 16.3.0-rc.0 release 2018-03-27 19:11:20 -07:00
Brian Vaughn
90c41a2e56
Rename react-is import alias in FB bundles (#12459) 2018-03-27 08:57:11 -07:00
Brian Vaughn
718d0d21f2
Include react-is in FB build targets (#12458) 2018-03-26 16:56:06 -07:00
Maël Nison
1bab82a9de Tweaks the build script (#12444)
Branch: build-tweaks
2018-03-23 19:51:04 +00:00
Brian Vaughn
cafee5cb2f Update bundle sizes for 16.3.0-alpha.3 release 2018-03-22 12:45:10 -07:00
Dan Abramov
ab4dc50146 Fix Prettier 2018-03-21 09:41:23 +00:00
Kevin Gozali
9d484edc4b [fabric] register ReactFabric to be callable module (#12405) 2018-03-20 14:56:18 +00:00
Brian Vaughn
ccec542ad3 Update bundle sizes for 16.3.0-alpha.2 release 2018-03-14 13:26:40 -07:00
Brian Vaughn
00a0e3c14f
create-subscription (#12325)
create-subscription provides an simple, async-safe interface to manage a subscription.
2018-03-13 13:59:09 -07:00
Sebastian Markbåge
ab4280b3e9
Don't expose ReactGlobalSharedState on React Native renderer (#12298)
* Don't expose ReactGlobalSharedState on React Native renderer

We should just go through the "react" package if need access to this one.

Removed the dependencies in React Native.

* No longer used by InspectorUtils
2018-02-27 07:57:50 -08:00
Sophie Alpert
2bd1222a82
Format danger percents better (#12256)
Test Plan: yolo? yarn danger pr didn't give me any useful output. :\
2018-02-21 15:48:37 -08:00
Andrew Clark
93ce76b7ea Update bundle sizes for simple-cache-provider 2018-02-15 19:19:40 -08:00
Andrew Clark
4312b82932
[experimental] simple-cache-provider (#12224)
* [experimental] simple-cache-provider

Pushing an early version of this for testing and demonstration purposes.

* Change invariant to DEV-only warning

* Use function overloading for createResource type

Expresses that primitive keys do not require a hash function, but
non-primitive keys do.

* More tests

* Use export *

* Make Record type a disjoint union

* Pass miss argument separate from key to avoid a closure
2018-02-15 16:38:15 -08:00
Brian Vaughn
fb85cf2e9c Update bundle sizes for 16.3.0-alpha.1 release 2018-02-12 10:41:41 -08:00
Brian Vaughn
d4afeb5aff
Added ReactFabric shim (#12216) 2018-02-12 10:12:46 -08:00
Brian Vaughn
41b8c65f1e
Add react-is package (#12199)
Authoritative brand checking library.

Can be used without any dependency on React. Plausible replacement for `React.isValidElement.`
2018-02-11 14:08:40 -08:00