Commit Graph

1192 Commits

Author SHA1 Message Date
Dominic Gannaway
9def56ec0e Refactor DOM plugin system to single module (#18025) 2020-02-14 08:10:42 +00:00
Eli White
2d6be757df [Native] Delete NativeComponent and NativeMethodsMixin (#18036)
* [Native] Delete NativeComponent and NativeMethodsMixin

* Remove more files
2020-02-13 15:09:25 -08:00
Dan Abramov
8777b44e98 Add Modern WWW build (#18028)
* Build both stable and experimental WWW builds

* Flip already experimental WWW flags to true

* Remove FB-specific internals from modern FB builds

We think we're not going to need these.

* Disable classic features in modern WWW builds

* Disable legacy ReactDOM API for modern WWW build

* Don’t include user timing in prod

* Fix bad copy paste and add missing flags to test renderer

* Add testing WWW feature flag file

We need it because WWW has a different meaning of experimental now.
2020-02-13 20:33:53 +00:00
Dominic Gannaway
529e58ab0a Remove legacy www config from Rollup build (#18016) 2020-02-11 13:42:19 +00:00
Dominic Gannaway
42918f40aa Change build from babylon to babel (#18015) 2020-02-11 11:56:26 +00:00
Dan Abramov
d1bfdfb861 Ignore react-native-web in Flow checks (#17999) 2020-02-07 16:24:25 +00:00
Dominic Gannaway
256d78d11f Add feature flag for removing children Map support (#17990) 2020-02-06 13:19:35 +00:00
Dominic Gannaway
df134d31cb Use babel parser rather than Babylon in extract errors (#17988) 2020-02-06 12:46:32 +00:00
Brian Vaughn
9e158c091b Updated release script documentation and command names (#17929)
* Updated release script documentation and command names

* Update scripts/release/README.md

Co-Authored-By: Sunil Pai <threepointone@oculus.com>

* Updated README

Co-authored-by: Sunil Pai <threepointone@oculus.com>
2020-02-05 08:52:31 -08:00
Brian Vaughn
613cbd3ace Formatting fix (Prettier) to build script 2020-02-04 11:37:38 -08:00
Brian Vaughn
562d2fbc49 Fix release scripts (#17972)
Circle CI seems to have changed the reported artifact path which broke our scripts.
2020-02-04 11:36:49 -08:00
Sunil Pai
3e9251d605 make testing builds for React/ReactDOM (#17915)
This PR introduces adds `react/testing` and `react-dom/testing`.
- changes infra to generate these builds
- exports act on ReactDOM in these testing builds
- uses the new test builds in fixtures/dom

In the next PR -

- I'll use the new builds for all our own tests
- I'll replace usages of TestUtils.act with ReactDOM.act.
2020-02-03 23:31:31 +00:00
Dan Abramov
241c4467ee Add a note about expiring OTP codes 2020-01-29 16:31:51 +00:00
Dan Abramov
faabe22b4f Use next tag for canary releases in the doc (#17923) 2020-01-29 16:09:05 +00:00
Dan Abramov
a8fce06d3e Fix Jest diff call (#17921) 2020-01-29 14:38:22 +00:00
Simen Bekkhus
cf0081263c Upgrade to jest 25 (#17896)
The changes to the test code relate to changes in JSDOM that come with Jest 25:

* Several JSDOM workarounds are no longer needed.
* Several tests made assertions to match incorrect JSDOM behavior (e.g. setAttribute calls) that JSDOM has now patched to match browsers.
  * https://codesandbox.io/s/resets-value-of-datetime-input-to-fix-bugs-in-ios-safari-1ppwh
* JSDOM no longer triggers default actions when dispatching click events.
  * https://codesandbox.io/s/beautiful-cdn-ugn8f
* JSDOM fixed (jsdom/jsdom#2700) a bug so that calling focus() on an already focused element does not dispatch a FocusEvent.
* JSDOM now supports passive events.
* JSDOM has improved support for custom CSS properties.
  * But requires jsdom/cssstyle#112 to land to support webkit prefixed properties.
2020-01-25 08:43:02 -08:00
Nicolas Gallagher
6faf6f5eb1 Update to flow 0.97 (#17892) 2020-01-24 10:52:38 -08:00
Nicolas Gallagher
81e30c7ff6 Remove unused modules from legacy event responders (#17907) 2020-01-24 10:50:27 -08:00
Nicolas Gallagher
6c00c5bba4 Update to flow-bin@0.89 (#17842) 2020-01-22 10:02:30 -08:00
Dominic Gannaway
c322f5913f Add unstable_renderSubtreeIntoContainer and unstable_createPortal feature flags (#17880) 2020-01-21 21:17:42 +00:00
Dominic Gannaway
b43b36dd91 Remove ReactInstanceMap_DO_NOT_USE shim (#17861) 2020-01-17 12:37:55 +00:00
Nicolas Gallagher
3bd6adceda Update typescript package and jest preprocessor (#17839) 2020-01-14 13:52:52 -08:00
Nicolas Gallagher
50eafef07e Update babel-eslint and eslint packages (#17829) 2020-01-14 09:26:44 -08:00
Emily
d8570ec6ea Create ReactFabric.stopSurface and use that for bridgeless mode binding (#16164) 2020-01-10 10:21:32 -08:00
Dan Abramov
e706721490 Update Flow to 0.84 (#17805)
* Update Flow to 0.84

* Fix violations

* Use inexact object syntax in files from fbsource

* Fix warning extraction to use a modern parser

* Codemod inexact objects to new syntax

* Tighten types that can be exact

* Revert unintentional formatting changes from codemod
2020-01-09 14:50:44 +00:00
Dan Abramov
b979db4e72 Bump Prettier (#17811)
* Bump Prettier

* Reformat

* Use non-deprecated option
2020-01-09 13:54:11 +00:00
Brian Vaughn
6250462bed Renamed "ReactDOM-fb" imports to "ReactDOM" in www shims (#17797)
* Renamed "ReactDOM-fb" imports to "ReactDOM" in www shims

* Removed ReactDOMComponentTree_DO_NOT_USE.js
2020-01-07 13:05:36 -08:00
Brian Vaughn
b05cd611ba Fixed CircleCI DevTools build artifact tar internal structure (#17758) 2020-01-02 09:28:20 -08:00
Brian Vaughn
2c1e5d2b22 Build and store DevTools artifacts in Circle CI (#17746) 2020-01-01 07:58:47 -08:00
Karan Sharma
d259f45813 Fix various typos (#17724) 2019-12-29 13:47:51 -08:00
Nicolas Gallagher
31350237fa Add unit tests to dom-event-testing-library (#17680)
Unit tests for the simple event mocks
2019-12-20 16:35:02 +00:00
Brian Vaughn
95056b6836 DevTools build script enhancements (#17653)
* Updated DevTools local development instructions to mention experimental build step

* Added a command to download latest experimental release (for DevTools)

* Updated build instructions for clarity

* Added build-for-devtools package alias
2019-12-18 14:34:40 -08:00
Dan Abramov
4b0cdf29a8 Build FB RN targets only in experimental mode (#17641) 2019-12-17 20:22:49 +00:00
Dan Abramov
0253ee9a2e Additional test infra changes for toErrorDev rename (#17632) 2019-12-17 13:31:47 +00:00
Dan Abramov
36a6e29bb3 Fix test_build_devtools CI job to run test-build-devtools (#17631)
* Skip abandoned project folders in Jest config

This fixes a problem that occurs after renaming a package.

* Fix test_build_devtools to run test-build-devtools

* Exclude console.error plugin for DevTools packages

* Use correct release channel for DevTools tests

This should fix the createRoot error.

* Fix TZ dependent test

* Change DT job dependencies
2019-12-16 16:03:12 -08:00
Dan Abramov
7c21bf72ac Fix release script to ignore empty package folders 2019-12-16 19:16:58 +00:00
Dan Abramov
0b5a26a489 Rename toWarnDev -> toErrorDev, toLowPriorityWarnDev -> toWarnDev (#17605)
* Rename toWarnDev -> toErrorDev in tests

* Rename toWarnDev matcher implementation to toErrorDev

* Rename toLowPriorityWarnDev -> toWarnDev in tests and implementation
2019-12-16 12:48:16 +00:00
Dan Abramov
0cf22a56a1 Use console directly instead of warning() modules (#17599)
* Replace all warning/lowPriWarning with console calls

* Replace console.warn/error with a custom wrapper at build time

* Fail the build for console.error/warn() where we can't read the stack
2019-12-14 18:09:25 +00:00
Laura buns
9ac42dd074 Remove the condition argument from warning() (#17568)
* prep for codemod

* prep warnings

* rename lint rules

* codemod for ifs

* shim www functions

* Handle more cases in the transform

* Thanks De Morgan

* Run the codemod

* Delete the transform

* Fix up confusing conditions manually

* Fix up www shims to match expected API

* Also check for low-pri warning in the lint rule
2019-12-11 03:28:14 +00:00
Laura buns
b43eec7eaa Replace wrap-warning-with-env-check with an eslint plugin (#17540)
* Replace Babel plugin with an ESLint plugin

* Fix ESLint rule violations

* Move shared conditions higher

* Test formatting nits

* Tweak ESLint rule

* Bugfix: inside else branch, 'if' tests are not satisfactory

* Use a stricter check for exactly if (__DEV__)

This makes it easier to see what's going on and matches dominant style in the codebase.

* Fix remaining files after stricter check
2019-12-06 18:25:54 +00:00
Andrew Clark
54f66731c8 Update release script URL (#17428)
CircleCI API endpoint changed
2019-11-21 13:19:03 -08:00
Sebastian Markbåge
39dbb14da3 [Flight] Move Flight DOM to a Webpack Specific Package (#17372)
* Move Flight DOM to Webpack Specific Packagee

We'll have Webpack specific coupling so we need to ensure that it can be
versioned separately from various Webpack versions. We'll also have builds
for other bundlers in the future.

* Move to peerDep

* Move DOM Flight Tests

* Merge ReactFlightIntegration into ReactFlightDOM

This was an integration test. We can add to it.

* Fix fixture paths
2019-11-15 11:46:07 -08:00
Eli White
2c6ea0b3ff [Native] Add FeatureFlag to dispatch events with instance targets (#17323)
* [Native] Add FeatureFlag to dispatch events with instance targets

* Prettier
2019-11-11 11:35:29 -08:00
Dan Abramov
6cb6b1d668 Add yarn build --unsafe-partial (#17316)
* Add yarn build --partial

* unsafe-partial
2019-11-08 19:41:40 +00:00
Moti Zilberman
61d3dd0e08 Update deepDiffer usage in React Native renderer (#17282)
* Add RN prop diffing test with function values

* Update RN deepDiffer mock

* Explicitly ignore functions in RN prop differ
2019-11-07 04:00:20 -08:00
Sebastian Markbåge
f4148b2561 [Flight] Move around the Server side a bit (#17251)
* Rename ReactFlightStreamer -> ReactFlightServer

* Unify Browser/Node stream tests into one file and use the client reader

* Defer to the actual ReactDOM for HTML rendering for now

This will need to use a variant of Fizz to do inline SSR in Flight.
However, I don't want to build the whole impl right now but also don't
want to exclude the use case yet. So I outsource it to the existing
renderer. Ofc, this doesn't work with Suspense atm.
2019-11-01 17:39:24 -07:00
Sebastian Markbåge
fadc97167f [Flight] Add Client Infrastructure (#17234)
* Change demo to server

* Expose client in package.json

* Reorganize tests

We don't want unit tests but instead test how both server and clients work
together. So this merges server/client test files.

* Fill in the client implementation a bit

* Use new client in fixture

* Add Promise/Uint8Array to lint rule

I'll probably end up deleting these deps later but they're here for now.
2019-11-01 16:05:07 -07:00
Sebastian Markbåge
f4e974d26e Add Experimental Flight Infrastructure (#16398)
* Add Flight Build and Unify HostFormat Config between Flight and Fizz

* Add basic resolution of models

* Add basic Flight fixture

Demonstrates the streaming protocol.

* Rename to flight-server to distinguish from the client parts

* Add Flight Client package and entry point

* Fix fixture
2019-10-29 14:45:47 -07:00
Andrew Clark
349cf5acc3 Experimental test helper: it.experimental (#17149)
Special version of Jest's `it` for experimental tests. Tests marked as
experimental will run **both** stable and experimental modes. In
experimental mode, they work the same as the normal Jest methods. In
stable mode, they are **expected to fail**. This means we can detect
when a test previously marked as experimental can be un-marked when the
feature becomes stable. It also reduces the chances that we accidentally
add experimental APIs to the stable builds before we intend.

I added corresponding methods for the focus and skip APIs:

- `fit` -> `fit.experimental`
- `it.only` -> `it.only.experimental` or `it.experimental.only`
- `xit` -> `xit.experimental`
- `it.skip` -> `it.skip.experimental` or `it.experimental.skip`

Since `it` is an alias of `test`, `test.experimental` works, too.
2019-10-19 16:08:08 -07:00
Andrew Clark
edc234c730 Build script should default to experimental (#17144)
`yarn build` defaults to building in experimental mode. To opt-out, set
the `RELEASE_CHANNEL` environment variable to `stable`. This is the same
as what we do when running tests via `yarn test`, to make local
development easier.
2019-10-18 19:35:33 -07:00