Commit Graph
782 Commits
Author SHA1 Message Date
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
Rick Hanlon IIandDan Abramov 6347f5343b Plug ~100 test leaks (#12020) 2018-01-15 11:15:19 +00:00
Semen ZhydenkoandDan Abramov dfa2adf298 Minor typos fixed (#12005)
* commiting -> committing

* doens't -> doesn't

* interuption -> interruption

* inital -> initial

* statment -> statement
2018-01-11 12:24:49 +00:00
Dan AbramovandGitHub 785ab7d9a6 Use 2 workers for all tests on CI (#11990) 2018-01-10 23:54:23 +00:00
Brian VaughnandGitHub 08680c7f43 Upgrade to ESLint 4.1 and add no-focused-tests rule (#11977)
* Runs a lint rule on tests only that errors if it sees `fdescribe` or `fit` calls.
* Changes `file:` to `link:` for our custom, internal rules (just to simplify updating these in the future).
* Updates `eslint` from 3.10 -> 4.1 and `babel-eslint` from 7.1 -> 8.0 so that we can run this new rule only against tests.
2018-01-09 10:55:51 -08:00
Md Zubair AhmedandDan Abramov f570a192cb changed {} in pck.json and split them with && in fixtures (#11982) 2018-01-09 11:15:09 +00:00
Rick Hanlon IIandDan Abramov bcac3fd743 Enable coverage, set jest maxWorkers to 2 (#11983) 2018-01-08 02:27:24 +00:00
Lucas AzzolaandDan Abramov 787eb8e849 Use Prettier Config API (#11980) 2018-01-07 11:51:59 +00:00
Dan AbramovandGitHub 16b4135d19 Disable coverage again (#11974)
* Disable coverage again

* Update test_entry_point.sh
2018-01-05 18:59:13 +00:00
Brian VaughnandGitHub 5c5038632d Fixed potential false-positive in toWarnDev matcher (#11898)
* Warn about spying on the console

* Added suppress warning flag for spyOn(console)

* Nits

* Removed spy-on-console guard

* Fixed a potential source of false-positives in toWarnDev() matcher
Also updated (most of) ReactIncrementalErrorLogging-test.internal to use the new matcher

* Removed unused third param to spyOn

* Improved clarity of inline comments

* Removed unused normalizeCodeLocInfo() method
2018-01-05 09:44:45 -08:00
Dan AbramovandGitHub 03d40e960c Move npm output from build/packages/* to build/node_modules/* (#11962)
* Move build/packages/* to build/node_modules/*

This fixes Node resolution in that folder and lets us require() packages in it in Node shell for manual testing.

* Link fixtures to packages/node_modules

This updates the location and also uses link: instead of file: to avoid Yarn caching the folder contents.
2018-01-04 19:01:31 +00:00
Dan AbramovandGitHub 4b7dac44bc Update to Jest 22 (#11956)
* Bump deps to Jest 22

* Prevent jsdom from logging intentionally thrown errors

This relies on our existing special field that we use to mute errors.
Perhaps, it would be better to instead rely on preventDefault() directly.
I outlined a possible strategy here: https://github.com/facebook/react/issues/11098#issuecomment-355032539

* Update snapshots

* Mock out a method called by ReactART that now throws

* Calling .click() no longer works, dispatch event instead

* Fix incorrect SVG element creation in test

* Render SVG elements inside <svg> to avoid extra warnings

* Fix range input test to use numeric value

* Fix creating SVG element in test

* Replace brittle test that relied on jsdom behavior

The test passed in jsdom due to its implementation details.

The original intention was to test the mutation method, but it was removed a while ago.

Following @nhunzaker's suggestion, I moved the tests to ReactDOMInput and adjusted them to not rely on implementation details.

* Add a workaround for the expected extra client-side warning

This is a bit ugly but it's just two places. I think we can live with this.

* Only warn once for mismatches caused by bad attribute casing

We used to warn both about bad casing and about a mismatch.
The mismatch warning was a bit confusing. We didn't know we warned twice because jsdom didn't faithfully emulate SVG.

This changes the behavior to only leave the warning about bad casing if that's what caused the mismatch.
It also adjusts the test to have an expectation that matches the real world behavior.

* Add an expected warning per comment in the same test
2018-01-04 18:57:30 +00:00
Brian VaughnandGitHub 6cafc0712c Updated toWarnDev matcher so that ReactFiberScheduler won't suppress its errors (#11958) 2018-01-03 15:23:05 -08:00
Brian VaughnandGitHub 4accda965b toWarnInDev matcher; throw on unexpected console.error (#11786)
* Added toWarnInDev matcher and connected to 1 test
* Added .toLowPriorityWarnDev() matcher
* Reply Jest spy with custom spy. Unregister spy after toWarnDev() so unexpected console.error/warn calls will fail tests.
* console warn/error throws immediately in tests by default (if not spied on)
* Pass-thru console message before erroring to make it easier to identify
* More robustly handle unexpected warnings within try/catch
* Error message includes remaining expected warnings in addition to unexpected warning
2018-01-02 11:06:41 -08:00
Brandon DailandGitHub b16094f757 Return event name from getVendorPrefixedEventName (#11951) 2018-01-02 10:46:51 -08:00
Dan AbramovandGitHub 4fbcd266ec Run some tests in Node environment (#11948)
* Run some tests in Node environment

* Separate SSR tests that require DOM

This allow us to run others with Node environment.
2018-01-02 18:42:18 +00:00
Dan AbramovandGitHub f2021d6c68 Reënable stats downloading
I'm running out of ideas to keep these commit messages entertaining. Thankfully this should keep the CI green and we can forget any of it ever happened.
2017-12-24 02:09:01 +00:00
Dan AbramovandGitHub 02259ae410 Temporarily disable downloading the results file
I promise, we're close to fixing this. I fixed the last bug and now just need to run this to upload a "good" file and then re-enable it again...
2017-12-24 01:52:37 +00:00
Dan 17d07943e9 Record sizes 2017-12-24 01:47:49 +00:00
Dan 77a0f71920 Fix writing stats to the file 2017-12-24 01:44:08 +00:00
Dan AbramovandGitHub 68c071c4c1 We can reenable this now 2017-12-24 01:25:06 +00:00
Dan c3c1b05421 Fix a few more issues that should fix the CI 2017-12-24 01:16:13 +00:00
Dan AbramovandGitHub c823429939 This will fix CI, this time for real 2017-12-24 00:41:03 +00:00
Dan AbramovandGitHub ed69806d5f We can add this back now (should fix CI) 2017-12-23 22:31:37 +00:00
Dan AbramovandGitHub e665feec60 Temporarily remove a script section that crashes
This will let us upload the updated stats to the server to fix this script
2017-12-23 22:22:24 +00:00
OrtaandDan Abramov 35b1a7c400 [Dev] Adds module and bundle type metadata to the rollup results json (#11914) 2017-12-23 19:22:59 +00:00
Dan AbramovandGitHub f9e9b54f3c Update results.json from master before the build (#11882) 2017-12-18 18:56:38 +00:00
Dan AbramovandGitHub 9d3c04cac5 Upload build stats to the server (#11880) 2017-12-18 18:17:27 +00:00