Commit Graph
63 Commits
Author SHA1 Message Date
Andrew Clark a8669ac2cd Update package.jsons for 16.13.1 patch relase 2020-03-19 12:58:31 -07:00
Sunil PaiandGitHub 73217149ad update version numbers for 16.13 (#18143)
also includes a bugfix when downloading error codes from circleci.
2020-02-26 20:33:29 +00:00
Sebastian MarkbågeandGitHub ad1819c135 Export React as Named Exports instead of CommonJS (#18106)
* Add options for forked entry points

We currently fork .fb.js entry points. This adds a few more options.

.modern.fb.js - experimental FB builds
.classic.fb.js - stable FB builds
.fb.js - if no other FB build, use this for FB builds
.experimental.js - experimental builds
.stable.js - stable builds
.js - used if no other override exists

This will be used to have different ES exports for different builds.

* Switch React to named exports

* Export named exports from the export point itself

We need to re-export the Flow exported types so we can use them in our code.

We don't want to use the Flow types from upstream since it doesn't have the non-public APIs that we have.

This should be able to use export * but I don't know why it doesn't work.

This actually enables Flow typing of React which was just "any" before.
This exposed some Flow errors that needs fixing.

* Create forks for the react entrypoint

None of our builds expose all exports and they all differ in at least one
way, so we need four forks.

* Set esModule flag to false

We don't want to emit the esModule compatibility flag on our CommonJS
output. For now we treat our named exports as if they're CommonJS.

This is a potentially breaking change for scheduler (but all those apis
are unstable), react-is and use-subscription. However, it seems unlikely
that anyone would rely on this since these only have named exports.

* Remove unused Feature Flags

* Let jest observe the stable fork for stable tests

This lets it do the negative test by ensuring that the right tests fail.

However, this in turn will make other tests that are not behind
__EXPERIMENTAL__ fail. So I need to do that next.

* Put all tests that depend on exports behind __EXPERIMENTAL__

Since there's no way to override the exports using feature flags
in .intern.js anymore we can't use these APIs in stable.

The tradeoff here is that we can either enable the negative tests on
"stable" that means experimental are expected to fail, or we can disable
tests on stable. This is unfortunate since some of these APIs now run on
a "stable" config at FB instead of the experimental.

* Switch ReactDOM to named exports

Same strategy as React.

I moved the ReactDOMFB runtime injection to classic.fb.js

Since we only fork the entrypoint, the `/testing` entrypoint needs to
be forked too to re-export the same things plus `act`. This is a bit
unfortunate. If it becomes a pattern we can consider forking in the
module resolution deeply.

fix flow

* Fix ReactDOM Flow Types

Now that ReactDOM is Flow type checked we need to fix up its types.

* Configure jest to use stable entry for ReactDOM in non-experimental

* Remove additional FeatureFlags that are no longer needed

These are only flagging the exports and no implementation details so we
can control them fully through the export overrides.
2020-02-25 13:54:27 -08:00
Dominic GannawayandGitHub 5e5d4d82ff Add React.createFactory() deprecation warning (#17878) 2020-01-21 15:51:39 +00:00
Dominic GannawayandGitHub 9797e80e64 Add feature flag around React.createFactory (#17873) 2020-01-20 15:00:18 +00:00
Dan AbramovandGitHub d90d691d4a 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 bunsandDan Abramov 96b5edde35 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
Luna Ruan 6bc8c5187c update version numbers for 16.12 2019-11-14 16:02:18 -08:00
Brian VaughnandGitHub d9a4275e43 Fix react-is memo and lazy type checks (#17278) 2019-11-05 10:37:12 -08:00
Andrew Clark c6b2227932 Update local package versions for 16.10 release 2019-10-22 14:30:06 -07:00
Andrew Clark ffd1822d25 Update local version numbers for 16.10.2 release 2019-10-03 14:14:10 -07:00
Andrew Clark c7a1929dda Update local version numbers for 16.10.1 release 2019-09-28 21:41:42 -07:00
Andrew Clark 96287996ae Update local version numbers for 16.10 release 2019-09-27 13:31:35 -07:00
Jessica FrancoandDan Abramov 8db3f52ec3 Warning system refactoring (part 1) (#16799)
* Rename lowPriorityWarning to lowPriorityWarningWithoutStack

This maintains parity with the other warning-like functions.

* Duplicate the toWarnDev tests to test toLowPriorityWarnDev

* Make a lowPriorityWarning version of warning.js

* Extract both variants in print-warning

Avoids parsing lowPriorityWarning.js itself as the way it forwards the
call to lowPriorityWarningWithoutStack is not analyzable.
2019-09-24 13:45:38 +01:00
Andrew Clark 8a63f54e24 Bump package.json versions 2019-08-08 14:24:39 -07:00
Veniamin KrolandBrandon Dail e83577d9e7 Rename StatelessComponent to FunctionComponent in react-is/README.md (#15963) 2019-06-24 16:21:58 -07:00
Andrew ClarkandGitHub a5dc5b0014 Remove <ConcurrentMode /> (#15532)
Use createSyncRoot instead.
2019-05-13 16:10:00 -07:00
Dan Abramov 1da28eeab0 Update versions for 16.8.6 2019-03-27 23:58:16 -07:00
Dan Abramov 60a61fe73f Release 16.8.5 2019-03-22 16:47:59 +00:00
Brian VaughnandGitHub 3305a14e54 unstable_Profiler -> Profiler (#15172) 2019-03-21 09:18:34 -07:00
Brian Vaughn cc639a0d55 16.8.4 and changelog 2019-03-05 15:17:42 -08:00
Dan Abramov c268429792 Release 16.8.3 2019-02-21 18:09:18 +00:00
Dan Abramov 0448d1f099 Release 16.8.2 2019-02-14 19:13:15 +00:00
Brian Vaughn 10792d5a91 16.8.1 packages 2019-02-06 18:21:33 +00:00
Brian Vaughn da0e88304b 16.8.0 2019-02-06 08:04:00 +00:00
Ramón Chancay OrtegaandSunil Pai e1d5f781a9 Importing React for the first example. (#14346) 2019-01-23 14:10:03 +00:00
Grey BakerandDan Abramov 20c6fd146b Add directory details to the package.json of all packages (#14628)
Specifying the directory as part of the `repository` field in a `package.json`
allows third party tools to provide better support when working with monorepos.
For example, it allows them to correctly construct a commit diff for a specific
package.

This format was accepted by npm in https://github.com/npm/rfcs/pull/19.
2019-01-18 20:21:12 +00:00
Andrew Clark 98bb25c411 React v16.7.0 2018-12-19 17:23:14 -08:00
Pleun VanderbauwhedeandBrian Vaughn 77c14709ef Add support for Suspense & lazy() to the react-is package (#14423)
* Add support for lazy & Suspense to react-is
2018-12-12 10:56:52 -08:00
Jinto JoseandSebastian Markbåge 2fb9f46aeb Adding isMemo check to react-is package (#14313) 2018-11-28 12:51:21 -08:00
Brian VaughnandGitHub 3f246c8122 Publish a local release (canary or stable) to NPM (#14260)
New release scripts.

Learn more at https://github.com/facebook/react/blob/master/scripts/release/README.md
2018-11-23 12:37:18 -08:00
Andrew Clark 1fcd68a613 Updating package versions for release 16.6.1 2018-11-06 18:19:57 -08:00
Jordan HarbandandDan Abramov 2911440eed [react-is] add back proper AsyncMode symbol, for back compat (#13959)
- Partial revert of #13732
 - Fixes #13958.
2018-10-31 19:03:50 +00:00
Dan Abramov 4985ccf91b Updating package versions for release 16.6.0 2018-10-23 16:23:41 -07:00
Dan Abramov 3762c14b3f Revert all package versions to 16.5.2 state
Our release script is getting really confused so I'm resetting to last working state.
2018-10-23 16:18:28 -07:00
Dan AbramovandGitHub 820bec4ebb Bump version to 16.6.0-beta.0 (#13906)
* Bump version to 16.6.0-beta.0

* Root too
2018-10-20 13:03:15 -04:00
Dan Abramov 68f8da07b2 Updating package versions for release 16.6.0-alpha.01fb17f 2018-10-10 17:12:05 +01:00
Dan AbramovandGitHub eaa8b6f259 Terminology: Functional -> Function Component (#13775)
* Terminology: Functional -> Function Component

* Drop the "stateless" (functions are already stateless, right?)
2018-10-04 22:44:46 +01:00
Joe CortopassiandDan Abramov 97ca6ff8fa --save is no longer needed (#13756)
`--save` is on by default as of [npm 5](https://blog.npmjs.org/post/161081169345/v500), and `npm install aphrodite` is functionally equivalent to `npm install --save aphrodite` now
2018-10-01 19:15:11 +01:00
Dominic GannawayandGitHub e9ab29e0f6 Rename AsyncMode -> ConcurrentMode (#13732)
* Rename AsyncMode -> ConcurrentMode
2018-09-26 17:13:02 +01:00
Brian Vaughn 94916e4c79 Updating package versions for release 16.5.2 2018-09-18 11:24:33 -07:00
Brian Vaughn 28ebb62640 Revert "Updating package versions for release 16.6.0-alpha.0"
This reverts commit 31b9c40bd7.
2018-09-18 11:00:13 -07:00
Brian Vaughn 31b9c40bd7 Updating package versions for release 16.6.0-alpha.0 2018-09-17 14:59:57 -07:00
Dan Abramov 4a6e52eea0 Updating package versions for release 16.5.1 2018-09-13 19:31:18 +01:00
Héctor RamosandGitHub 7353a5add1 Drop the year from Facebook copyright headers and the LICENSE file. (#13593) 2018-09-07 15:11:23 -07:00
Brian Vaughn 94e698bf8d Updating package versions for release 16.5.0 2018-09-06 09:29:36 -07:00
Brian VaughnandGitHub ef3a387221 Bumped version to 16.4.3-alpha.0 (#13448)
* Bumped version to 16.4.3-alpha.0
* Bump react-is peer dep version in react-test-renderer
2018-08-20 14:28:43 -07:00
Dan Abramov b9187cd83a Updating package versions for release 16.4.1 2018-06-13 17:16:10 +01:00
Andrew Clark 7e3d2d6202 Updating package versions for release 16.4.0 2018-05-23 17:30:33 -07:00
Brian VaughnandGitHub 0272a35b3e Add Profiler component for collecting new render timing info (#12745)
Add a new component type, Profiler, that can be used to collect new render time metrics. Since this is a new, experimental API, it will be exported as React.unstable_Profiler initially.

Most of the functionality for this component has been added behind a feature flag, enableProfileModeMetrics. When the feature flag is disabled, the component will just render its children with no additional behavior. When the flag is enabled, React will also collect timing information and pass it to the onRender function (as described below).
2018-05-10 15:25:32 -07:00