Commit Graph

9580 Commits

Author SHA1 Message Date
Jason Quense
2f5d455e44 Initial 2018-01-08 10:36:24 -05:00
Rick Hanlon II
26185759e4 Enable coverage, set jest maxWorkers to 2 (#11983) 2018-01-08 02:27:24 +00:00
Reinier Hartog
08c86dd76b Reconcile Call component children with current (#11979)
* Add test for un- and remounting children of Call

* Reconcile Call component children with `current`
2018-01-07 20:15:05 +00:00
Shi Yan
65aeb70195 Deduplicate warning on invalid callback (#11833) (#11833) 2018-01-07 11:52:52 +00:00
Lucas Azzola
052a5f27f3 Use Prettier Config API (#11980) 2018-01-07 11:51:59 +00:00
Dan Abramov
301edeaac8
Run "yarn prettier" on Appveyor
Ensures we don't break the command on Windows by accident.
2018-01-07 11:50:24 +00:00
Dan Abramov
48833f698d
Disable coverage again (#11974)
* Disable coverage again

* Update test_entry_point.sh
2018-01-05 18:59:13 +00:00
Haisheng Wu
96d7e53e69 topLevelUpdateWarnings is only for dev mode hence not necessary to have extra dev mode check. (#11924) 2018-01-05 18:51:02 +00:00
Toru Kobayashi
9d310e0bc7 ShallowRenderer should filter context by contextTypes (#11922) 2018-01-05 18:49:57 +00:00
jwbay
39be83565c align shallow renderer with other renderers in defaulting state to null on mount (#11965) 2018-01-05 18:44:44 +00:00
Dan Abramov
808f31af5c
Reduce the handleTopLevel() event code indirection (#11915)
* Refactor event emitters to reduce indirection

* Remove unused handleTopLevel() injection

* Rename handleTopLevel() to runExtractedEventsInBatch() and remove import indirection
2018-01-05 18:37:13 +00:00
Jason Quense
1c7c38c82a Remove extra loop (?) (#11889)
* Remove extra loop (?)

* prettier
2018-01-05 18:35:43 +00:00
Md Zubair Ahmed
ce40f4eafe issue 11768 - Error Rendering Inputs in Separate Window using Portals in ie11 (#11870)
Work around IE/Edge bug when rendering inputs in separate windows via portals
2018-01-05 18:32:43 +00:00
Roderick Hsiao
e74f3ce565 Support onLoad and onError on <link> (#11825)
* Support link event on Fiber component

* Update unit test

* prettier format

* Update test description

* Update ReactDOMComponent-test.js
2018-01-05 18:14:16 +00:00
Jason Quense
4e044f553f Clarify reason for setTextContent helper (#11813)
* Update comment on setTextContent

update the comment explaining the reason for the helper

* Use `setTextContent` in ReactDOM for consistency
2018-01-05 18:10:12 +00:00
Sotiris Kiritsis
588198d266 Updated misleading error message in production environment when adding ref to a functional component (#11761) (#11782)
* Updated misleading error message in production environment when adding ref to a functional component

* Reverted changes to codes.json

* Updated error message
2018-01-05 18:07:58 +00:00
Brian Vaughn
c94b4b8b86
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
Ronald Eddy Jr
ede0b87cd1 Update HTTP to HTTPs in CHANGELOG.md (#11634)
Several URL were updated to use HTTPS protocol in CHANGELOG.md.
2018-01-05 17:26:53 +00:00
Dan Abramov
fe10b8d0cd
Remove IE8 event.target polyfill via srcElement (#11515) 2018-01-05 17:21:33 +00:00
Nicolas Straub
43af41be53 enables ctrl + enter for keypress event on browsers other than firefox (#10514)
* enables ctrl + enter for keypress event on browsers other than firefox

* makes comment more descriptive as to affected platforms

* reverting fiber results

* Reset changes to results.json

* Remove old test file

* Add tests in the right place
2018-01-05 16:31:25 +00:00
Jason Quense
8d336aa97e
pass host context to finalizeInitialChildren (#11970)
* pass host context to finalizeInitialChildren

* don't retrieve context an extra time
2018-01-05 10:52:19 -05:00
Santosh Venkatraman
30dac4e78d Removes legacy TODOs in createfactory methods (#11942)
* Removes legacy TODO from createFactory()

* Removes legacy TODO from createFactoryWithValidation()

* Adds comment "Legacy hook: remove it"

This is based on Dan Abramov's suggestion (source:
https://github.com/facebook/react/pull/11942#issuecomment-354818632)
2018-01-04 19:40:02 +00:00
Dan Abramov
1ebeb0542f
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 Abramov
d289d4b634
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
Sotiris Kiritsis
4d37040cbf Removed Presto check (#11921) 2018-01-04 08:28:42 -05:00
Brian Vaughn
bb881f2de7
Updated toWarnDev matcher so that ReactFiberScheduler won't suppress its errors (#11958) 2018-01-03 15:23:05 -08:00
Brian Vaughn
9f848f8ebe
Update additional tests to use .toWarnDev() matcher (#11957)
* Migrated several additional tests to use new .toWarnDev() matcher

* Migrated ReactDOMComponent-test to use .toWarnDev() matcher

Note this test previous had some hacky logic to verify errors were reported against unique line numbers. Since the new matcher doesn't suppor this, I replaced this check with an equivalent (I think) comparison of unique DOM elements (eg div -> span)

* Updated several additional tests to use the new .toWarnDev() matcher

* Updated many more tests to use .toWarnDev()

* Updated several additional tests to use .toWarnDev() matcher

* Updated ReactElementValidator to distinguish between Array and Object in its warning. Also updated its test to use .toWarnDev() matcher.

* Updated a couple of additional tests

* Removed unused normalizeCodeLocInfo() methods
2018-01-03 13:55:37 -08:00
Brian Vaughn
a442d9bc08
Update additional tests to use .toWarnDev() matcher (#11952)
* Migrated several additional tests to use new .toWarnDev() matcher

* Migrated ReactDOMComponent-test to use .toWarnDev() matcher

Note this test previous had some hacky logic to verify errors were reported against unique line numbers. Since the new matcher doesn't suppor this, I replaced this check with an equivalent (I think) comparison of unique DOM elements (eg div -> span)

* Updated several additional tests to use the new .toWarnDev() matcher

* Updated many more tests to use .toWarnDev()
2018-01-03 10:08:24 -08:00
Dan Abramov
2517be99ac
Reword issue template 2018-01-03 15:58:07 +00:00
Taehwan, No
dd3e34e832 Fix links in README.md (#11954) 2018-01-03 14:02:33 +00:00
Brian Vaughn
b5334a44e9
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 Dail
22e2bf7684
Return event name from getVendorPrefixedEventName (#11951) 2018-01-02 10:46:51 -08:00
Dan Abramov
0deea32667
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 Abramov
dd8b387b69
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 Abramov
d88a033cc3
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
e5cd4dd23e Record sizes 2017-12-24 01:47:49 +00:00
Dan
251193d4fc Fix writing stats to the file 2017-12-24 01:44:08 +00:00
Dan Abramov
32797fd3a3
We can reenable this now 2017-12-24 01:25:06 +00:00
Dan
5bf608723d Fix a few more issues that should fix the CI 2017-12-24 01:16:13 +00:00
Dan Abramov
bf9b0adcbd
This will fix CI, this time for real 2017-12-24 00:41:03 +00:00
Dan Abramov
021a567793
We can add this back now (should fix CI) 2017-12-23 22:31:37 +00:00
Dan Abramov
25321dcb23
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
Thomas Broadley
0280e93b11 Fix typos (#11868) 2017-12-23 20:32:33 +00:00
Orta
cf96d84040 [Dev] Adds module and bundle type metadata to the rollup results json (#11914) 2017-12-23 19:22:59 +00:00
Brandon Dail
9ff3ce67ea Add noModule boolean attribute (#11900) 2017-12-22 18:18:51 +00:00
alisherdavronov
faa4218632 Fixed an issue #11853 - window.opera=null problem (#11854) 2017-12-18 22:18:30 -05:00
Dan Abramov
247c524170
Update results.json from master before the build (#11882) 2017-12-18 18:56:38 +00:00
Dan Abramov
e40f6a9568
Upload build stats to the server (#11880) 2017-12-18 18:17:27 +00:00
Raphael Amorim
ef9f1b6e23 Update flow (0.61.0) and declare context type (#11840) 2017-12-18 12:04:16 +00:00
Alexey Raspopov
7242a5caa7 Use binary numbers representation directly (#11873) 2017-12-17 17:56:16 -08:00