Commit Graph

9472 Commits

Author SHA1 Message Date
Whien 3f736c360e Test: create TapEventPlugin-test (#11727)
* Test: create TapEventPlugin-test

* move TapEventPlugin to TapEventPlugin-test.internal.js from ReactBrowserEventEmitter-test.internal.js

* Prittier: run prittier

* run prittier

* Fix: fix CI test error

fix CI test error by lint

* Test: remove TapEventPlugin test code

* remove TapEventPlugin test code from ReactBrowserEventEmitter-test.internal.js
2017-11-30 21:22:58 +00:00
Dan Abramov 46b3c3e4ae Use static injection for ReactErrorUtils (#11725)
* Use `this` inside invokeGuardedCallback

It's slightly odd but that's exactly how our www fork works.
Might as well do it in the open source version to make it clear we rely on context here.

* Move invokeGuardedCallback into a separate file

This lets us introduce forks for it.

* Add a www fork for invokeGuardedCallback

* Fix Flow
2017-11-30 19:10:46 +00:00
abiduzz420 f57d963cce Rewrote ReactIncrementalPerf-test using only public API.(#11299) (#11724)
* WIP:use public API

* ReactPortal shifted to shared:all passed

* wrote createPortal method for ReactNoop.(#11299)

* imported ReactNodeList type into ReactNoop.(#11299)

* createPortal method implemented.(#11299)

* exec yarn prettier-all.(#11299)
2017-11-30 18:10:04 +00:00
Dan Abramov 7d6b24332b Ensure ReactFiberErrorDialogWWW.showErrorDialog exists 2017-11-30 18:09:51 +00:00
Dan Abramov 642a678a80 Replace ReactFiberErrorLogger injection with static forks (#11717) 2017-11-30 17:57:13 +00:00
Dan Abramov 060581b128 Fix issues with the new fork plugin (#11723) 2017-11-30 16:20:09 +00:00
Raphael Amorim e997756e2a react-art: convert var to let/const (#11720) 2017-11-30 15:23:24 +00:00
Dan Abramov 8cbc16f0fa Unify the way we fork modules (#11711)
* Unify the way we fork modules

* Replace rollup-plugin-alias with our own plugin

This does exactly what we need and doesn't suffer from https://github.com/rollup/rollup-plugin-alias/issues/34.

* Move the new plugin to its own file

* Rename variable for consistency

I settled on calling them "forks" since we already have a different concept of "shims".

* Move fork config into its own file
2017-11-30 12:11:00 +00:00
Raphael Amorim 3c977dea6b react: convert var to let/const (#11715) 2017-11-30 12:08:58 +00:00
Raphael Amorim 2decfe97dc events: convert var to let/const (#11714) 2017-11-30 12:07:40 +00:00
Dan Abramov c78db58a61 Record sizes 2017-11-30 01:18:55 +00:00
Sotiris Kiritsis d83916e4aa Rewrite SelectEventPlugin-test to test behavior using Public API (#11299) (#11676)
* Rewrite SelectEventPlugin-test to test behavior using Public API

* Minor refactor

* Make sure that we test that "focus" event is ignored
Use newer API when creating events

* Rewrote the other test to use Public API as well

* Tweak the test

* Remove -internal suffix

* Oops
2017-11-29 22:17:46 +00:00
Dan Abramov c3f1b6cd91 Prevent infinite loop when SSR-rendering a portal (#11709) 2017-11-29 21:45:38 +00:00
Brandon Dail e0c3113743 Remove empty value for boolean attributes in SSR (#11708) 2017-11-29 09:59:56 -08:00
Dan Abramov 3e64b18540 Deprecate injecting custom event plugins (#11690)
* Deprecate injecting custom event plugins

* Fix up tests

* Fix CI

* oh noes
2017-11-29 17:48:16 +00:00
Artem Fitiskin 8c1c5d7a5a Fixes path in package.json build script (#11707) 2017-11-29 17:32:47 +00:00
Dan Abramov 9491dee795 Throw if document is missing by the time invokeGuardedCallbackDev runs (#11677)
* Warn if `document` is missing by the time invokeGuardedCallback runs in DEV

* Typo

* Add a comment

* Use invariant() instead

* Create event immediately for clarity
2017-11-29 15:53:16 +00:00
Dan Abramov 6340d6cf2e Delete Fiber test tracker (#11704) 2017-11-29 15:27:16 +00:00
Dan Abramov 9e07008df5 Disable Flow on AppVeyor 2017-11-29 14:38:52 +00:00
Dan Abramov bc21578fad Add more tasks to AppVeyor 2017-11-29 14:33:07 +00:00
Dan Abramov bc1b7f3c38 Try to fix AppVeyor (#11702) 2017-11-29 14:19:33 +00:00
Tim Jacobi c1b2a347be Rewrite ReactTreeTraversal-test.js using public APIs (#11664)
* rewrite two phase traversal tests with public APIs

* rewrite enter/leave tests

* lift render into beforeEach, organise variables

* move getLowestCommonAncestor test

* remove internal tree traversal test

* fix linter errors

* move creation of outer nodes into {before,after}Each

* explain why getLowestCommonAncestor test was moved

* remove unnessecary ARG and ARG2 token

these were used for testing the internal API to simulate synthetic
events passed to traverseEnterLeave. since we're now dealing with
actual synthetic events we can remove them.

* run prettier
2017-11-29 14:04:18 +00:00
Gabriel Kalani b097a34eba refactor: scripts/error-codes (#11697)
Convert scripts/error-codes to use ES6 syntax
2017-11-29 01:13:12 +00:00
Andrew Clark 2ae4c62158 Always set pendingProps to the next props (#11580)
In the current implementation, pendingProps is null if there are no new
props since the last commit. When that happens, we bail out and reuse
the current props.

But it makes more sense to always set pendingProps to whatever the next
props will be. In other words, pendingProps is never null: it points to
either new props, or to the current props. Modeling it this way lets us
delete lots of code branches and is easier to reason about bail outs:
just compare the pending props to the current props.
2017-11-28 16:50:23 -08:00
Andrew Clark 1b55ad2a4b root.createBatch (#11473)
API for batching top-level updates and deferring the commit.

- `root.createBatch` creates a batch with an async expiration time
  associated with it.
- `batch.render` updates the children that the batch renders.
- `batch.then` resolves when the root has completed.
- `batch.commit` synchronously flushes any remaining work and commits.

No two batches can have the same expiration time. The only way to
commit a batch is by calling its `commit` method. E.g. flushing one
batch will not cause a different batch to also flush.
2017-11-28 16:48:35 -08:00
Brian Vaughn 9895a0ff63 Added ReactFeatureFlags shim for React Native (#11694)
* Added ReactFeatureFlags shim for React Native

* Fixed header license comment
2017-11-28 15:16:53 -08:00
Dan Abramov 18bbd644a2 Add 16.2.0 to changelog 2017-11-28 23:04:07 +00:00
Sotiris Kiritsis e5cacb2036 Stop ESLint from looking for a configuration file in parent folders (#11695) 2017-11-28 22:56:29 +00:00
Dan Abramov 5f9b4934a0 Fix CI fact uploading (#11693) 2017-11-28 22:39:43 +00:00
Brian Vaughn 53ab1948b5 Blacklist spyOn(). Add explicit spyOnProd() and spyOnDevAndProd() (#11691)
* Blacklist spyOn(). Add explicit spyOnProd() and spyOnDevAndProd()

* Wording tweak.

* Fixed lint no-shadow warning
2017-11-28 14:06:26 -08:00
Clement Hoang edb2b3d3a7 Update bundle sizes for 16.2.0 release v16.2.0 2017-11-28 13:29:23 -08:00
Clement Hoang 5a42586178 Updating package versions for release 16.2.0 2017-11-28 13:26:36 -08:00
Dominic Gannaway 363f4f14dc [WIP] Fix for fiber root scheduling memory leak (#11644)
* Fix for root memory leak

* forgot to add code
2017-11-28 12:57:32 -08:00
Dan Abramov c611d2c215 Amend changelog 2017-11-28 19:09:23 +00:00
rivenhk 8e876d244c Move ReactFiberTreeReflection to react-reconciler/reflection (#11683)
* Move ReactFiberTreeReflection to react-reconciler/reflection #11659

* Use * for react-reconciler

We don't know the latest local version, and release script currently doesn't bump deps automatically.

* Remove unused field

* Use CommonJS in entry point for consistency

* Undo the CommonJS change

I didn't realize it would break the build.

* Record sizes

* Remove reconciler fixtures

They're unnecessary now that we run real tests on reconciler bundles.
2017-11-28 16:57:22 +00:00
Michał Pierzchała db0454134c CI: remove unnecessary Yarn download (#11684) 2017-11-28 16:08:08 +00:00
Dan Abramov b89dc25e3f Record sizes 2017-11-28 16:03:30 +00:00
Raphael Amorim a2b6b6b206 Migrate to CircleCI2.0 and Add AppVeyor for master-only branch (#11605)
* add appveyor config file

* migrate circleci 1.0 to circleci 2.0

* remove upload step in favour of #11666
2017-11-28 14:39:18 +00:00
Jordan Tepper 7788bcdb26 Do not fail yarn linc for ignored file warning (#11615) (#11641)
* Add rule to ignore default handling of not linting hidden files

* Undo changes

* Add function to validate warnings

* Use validateWarnings when reporting linc command

* Restore files

* Contain code to line file
2017-11-28 13:54:46 +00:00
Ronald Eddy Jr b542f42a0f Update README URLS to HTTPS (#11635)
URLs were updated to use HTTPS protocol in README files.
2017-11-27 18:13:41 -08:00
Alex Cordeiro 158f040d54 Lint untracked files with yarn linc (#11665)
* Lint untracked files with yarn linc (#11646)

* Run prettier on untracked files

* Unify code for listing changed files into shared utility
2017-11-27 23:30:36 +00:00
Dan Abramov 878feebe34 Remove accidentally duplicated tests (#11675)
* Remove accidentally duplicated tests

* Refactor: move unmock() call into the only test needing it

This makes the intent more explicit.
2017-11-27 22:38:50 +00:00
Dan Abramov fe551de273 Enable bundle tests for React.Fragment (#11673) 2017-11-27 21:44:13 +00:00
Clement Hoang f6894dc48b Set fragment export flags to true (#11672) 2017-11-27 13:09:15 -08:00
Dan Abramov a65a8abc65 Use async/await in Rollup scripts (#11669) 2017-11-27 17:57:28 +00:00
Dan Abramov 018276976c Show nicer message on syntax errors 2017-11-27 15:55:46 +00:00
Dan Abramov d445cd6ea3 Bump Node devEngines to 8.x 2017-11-27 15:22:42 +00:00
Dan Abramov 0c164bb485 Upload build on the same node where it happens (#11666) 2017-11-26 18:03:30 +00:00
Adrian Carolli 53ef71b8e8 Add bundle linting and tests to the release script (#11662)
* Add bundle linting and tests to the release script

 - add yarn lint-build
- use yarn lint-build in circle ci build.sh
- add yarn lint-build, yarn test-prod, yarn test-build, and yarn test-build-prod to the realse script

* Improve readability of release test messages

* Run prettier

* Updating package versions for release 16.2.0

* Seperate bundle specific tests

- Moved the runYarnTask into utils since its being used two files now
- Uncomment out checks I mistakenly committed

* Revert a bunch of version bump changes

Mistakenly commited by release script

* .js for consistency
2017-11-26 16:47:20 +00:00
Dan Abramov f53bd033e7 Fix Jest call in the release script
Just running jest binary will no longer work
2017-11-25 16:13:28 +00:00