Commit Graph
809 Commits
Author SHA1 Message Date
Dan AbramovandGitHub 1a32fc019a Add a build step to hoist warning conditions (#12537) 2018-04-04 17:04:40 +01:00
Dan Abramov 0ad850cbe6 Update bundle sizes for 16.3.1 release 2018-04-04 01:33:06 +01:00
Dan AbramovandGitHub a75d5aecf8 Remove @providesModule in www bundles (#12529) 2018-04-03 20:12:29 +01:00
Brian Vaughn 91a8e3fec9 Update bundle sizes for 16.3.0 release 2018-03-29 13:07:12 -07:00
Andrew ClarkandGitHub 44de2c3251 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 VaughnandGitHub 33738b790c Fix build script to handle react-is (no peer deps) (#12471) 2018-03-27 19:19:34 -07:00
Brian Vaughn 0a41c3fafa Update bundle sizes for 16.3.0-rc.0 release 2018-03-27 19:11:20 -07:00
Brian VaughnandGitHub f96c7d6326 Rename react-is import alias in FB bundles (#12459) 2018-03-27 08:57:11 -07:00
Brian VaughnandGitHub 9da74bb21e Include react-is in FB build targets (#12458) 2018-03-26 16:56:06 -07:00
Brian VaughnandGitHub 33c2306a86 Workaround jest-diff single line string limitation (#12456) 2018-03-26 10:48:36 -07:00
Maël NisonandDan Abramov 29f98c7be2 Tweaks the build script (#12444)
Branch: build-tweaks
2018-03-23 19:51:04 +00:00
Brian Vaughn 015f5f29a3 Update bundle sizes for 16.3.0-alpha.3 release 2018-03-22 12:45:10 -07:00
Léo AndrèsandNathan Hunzaker f80535a5b1 Clean shell scripts (#12365) 2018-03-21 12:03:09 -04:00
Dan Abramov 2c3050b117 Fix Prettier 2018-03-21 09:41:23 +00:00
Kevin GozaliandDan Abramov a4e228665b [fabric] register ReactFabric to be callable module (#12405) 2018-03-20 14:56:18 +00:00
Jason QuenseandBrian Vaughn 1d33d6f54c Support ForwardRef type of work in TestRenderer (#12392)
* Support ForwardRef type of work in TestRenderer and ShallowRenderer.
* Release script now updates inter-package dependencies too (e.g. react-test-renderer depends on react-is).
2018-03-16 11:18:50 -07:00
Brian Vaughn 830a75b5a2 Update bundle sizes for 16.3.0-alpha.2 release 2018-03-14 13:26:40 -07:00
Brian Vaughn 3695803a6b Update error codes for 16.3.0-alpha.2 release 2018-03-14 13:26:40 -07:00
Brian VaughnandGitHub 1237a999bc 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ågeandGitHub e6dd314f4d 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
Brandon DailandGitHub 38ac49db91 Revert "Temporarily disable Danger in CI" (#12296)
* Revert "Replace danger token with a refreshed facebook-open-source-bot token (#12295)"

This reverts commit 59e75ce9c9.

* Revert "Temporarily disable Danger in CI (#12291)"

This reverts commit 6932720d66.
2018-02-26 16:33:50 -08:00
Héctor RamosandBrandon Dail 59e75ce9c9 Replace danger token with a refreshed facebook-open-source-bot token (#12295) 2018-02-26 16:20:54 -08:00
Brandon DailandGitHub 6932720d66 Temporarily disable Danger in CI (#12291) 2018-02-26 11:40:23 -08:00
Sophie AlpertandGitHub 17048b998c 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 54aa6c5c66 Update bundle sizes for simple-cache-provider 2018-02-15 19:19:40 -08:00
Andrew ClarkandGitHub e66aac9e0c [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
Andrew ClarkandGitHub 41afd96feb Additional release script options for publishing canary versions (#12219)
* Additional release script options for publishing canary versions

- `branch` specifies a branch other than master
- `local` skips pulling from the remote branch and checking CircleCI
- `tag` specifies an npm dist tag other than `latest` or `next`

We may add a higher-level `canary` option in the future.

* Address Brian's feedback:

- Updated description of `local` option
- Throws if the `latest` tag is specified for a prerelease version
2018-02-13 11:44:27 -08:00
Brian VaughnandGitHub 5ed757a510 Handle packages without dependencies (#12217) 2018-02-12 15:46:43 -08:00
Brian Vaughn 05e0999e39 Update bundle sizes for 16.3.0-alpha.1 release 2018-02-12 10:41:41 -08:00
Brian VaughnandGitHub 66ae6ba8e6 Added ReactFabric shim (#12216) 2018-02-12 10:12:46 -08:00
Brian VaughnandGitHub 5ec35f6d82 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
OrtaandDan Abramov 8d02f6996f [Danger] Use the PR's mergebase for a branch in the dangerfile (#12049)
* [Danger] Use the PR's mergebase for a branch in the dangerfile instead of
the root commit's parent.

* [Danger] Get the full history to find the merge base
2018-02-11 19:43:29 +00:00
Dan Abramov 92928127e2 Update sizes 2018-02-10 13:48:07 +00:00
Dan Abramov 0519660413 Fix build stats display 2018-02-10 13:37:33 +00:00
Dan AbramovandGitHub a81365c84e Disable for...of by default, rewrite cases where it matters (#12198)
* Add no-for-of lint rule

* Ignore legit use cases of for..of

* Rewrite for..of in source code
2018-02-09 16:11:22 +00:00
Sophie AlpertandGitHub 1d4dc6def6 Fix finding Fabric feature flags (#12189)
Test Plan: yarn build fabric, inspect build/react-native/ReactFabric-dev.js to see enablePersistentReconciler = true.
2018-02-08 13:28:17 -08:00
Brian VaughnandGitHub af1d9b3ed1 Enable warnAboutDeprecatedLifecycles for ReactNative (#12186) 2018-02-08 10:48:18 -08:00
Dan AbramovandGitHub 2eb12cb9e9 Expose persistent reconciler to custom renderers (#12156) 2018-02-05 16:56:21 +00:00
Brian VaughnandGitHub 8813aa6cbe Release script does a fresh Yarn install of deps (#12149)
This would have caught the recent Yarn workspaces / semver issue sooner.
2018-02-04 17:06:14 -08:00
Brian VaughnandGitHub ab47d4a63f Pre-release version fix (#12148)
* Ran updated release script to fix deps
* Release script handles prerelease deps correctly
* Update noop-renderer dependencies on reconciler package
2018-02-04 08:54:42 -08:00
Ivan StarkovandDan Abramov c05d317b67 Fix process.CI typo (#12146) 2018-02-04 01:56:06 +00:00
Brian Vaughn 1e6425adb7 Update bundle sizes for 16.3.0-alpha.0 release 2018-02-02 13:01:34 -08:00
Brian Vaughn 2d578b8e56 Update error codes for 16.3.0-alpha.0 release 2018-02-02 13:01:33 -08:00
Brian VaughnandGitHub 2e56b1e418 updated ReactFeatureFlags shim (#12116) 2018-01-29 16:11:18 -08:00
Brian VaughnandGitHub 462cbe918f Improve toWarnDev matcher DX for unexpected warnings (#12082)
Use jest-diff to format the warnings in a way that makes it easier to spot the differences.
2018-01-23 14:46:58 -08:00
Brian VaughnandGitHub e9604fbaa0 Improved toWarnDev matcher to avoid swallowing errors (#12081)
While writing tests for unsafe async warnings, I noticed that in certain cases, errors were swallowed by the toWarnDev matcher and resulted in confusing test failures. For example, if an error prevented the code being tested from logging an expected warning- the test would fail saying that the warning hadn't been logged rather than reporting the unexpected error. I think a better approach for this is to always treat caught errors as the highest-priority reason for failing a test.

I reran all of the test cases for this matcher that I originally ran with PR #11786 and ensured they all still pass.
2018-01-23 14:46:50 -08:00
Dan AbramovandGitHub 1cf0908c58 Temporarily disable Danger
Its calculation is currently a bit misleading.
@orta plans to look into this but for now I'll disable.
2018-01-22 19:31:35 +00:00
Sebastian MarkbågeandGitHub 1a8b90aa99 Add Experimental Fabric Renderer (#12069) 2018-01-22 09:58:35 -08:00
Sebastian MarkbågeandGitHub bc497c8b52 Remove experimental RT/CS renderers (#12032)
Will follow up with adding a new one.
2018-01-17 18:07:25 -08:00
OrtaandDan Abramov 97a0c15574 Adds Danger and a rule showing build size differences (#11865)
* Adds danger_js with an initial rule for warning about large PRs

Signed-off-by: Anandaroop Roy <[email protected]>

* [WIP] Get the before and after for the build results

* [Dev] More work on the Dangerfile

* [Danger] Split the reports into sections based on their package

* Remove the --extract-errors on the circle build

* [Danger] Improve the lookup for previous -> current build to also include the environment

* Fix rebase
2018-01-17 01:49:38 +00:00