react/scripts/rollup
Andrew Clark 163e81c1f8
Support disabling spurious act warnings with a global environment flag (#22561)
* Extract `act` environment check into function

`act` checks the environment to determine whether to fire a warning.
We're changing how this check works in React 18. As a first step, this
refactors the logic into a single function. No behavior changes yet.

* Use IS_REACT_ACT_ENVIRONMENT to disable warnings

If `IS_REACT_ACT_ENVIRONMENT` is set to `false`, we will suppress
any `act` warnings. Otherwise, the behavior of `act` is the same as in
React 17: if `jest` is defined, it warns.

In concurrent mode, the plan is to remove the `jest` check and only warn
if `IS_REACT_ACT_ENVIRONMENT` is true. I have not implemented that
part yet.
2021-10-18 08:27:26 -07:00
..
plugins Upgrade Closure Compiler (#19041) 2020-05-29 09:17:14 -07:00
shims Add concurrentRoot property to ReactNativeTypes (#21648) 2021-06-10 08:59:22 -04:00
validate Support disabling spurious act warnings with a global environment flag (#22561) 2021-10-18 08:27:26 -07:00
build-all-release-channels.js Improve DEV errors if string coercion throws (Temporal.*, Symbol, etc.) (#22064) 2021-09-27 10:05:07 -07:00
build.js [RFC] Codemod invariant -> throw new Error (#22435) 2021-09-30 12:01:28 -07:00
bundles.js [RFC] Codemod invariant -> throw new Error (#22435) 2021-09-30 12:01:28 -07:00
forks.js Remove unstable scheduler/tracing API (#20037) 2021-04-26 19:16:18 -04:00
modules.js Re-add old Fabric Offscreen impl behind flag (#22018) 2021-08-03 19:30:20 -07:00
packaging.js [Flight] Rename react-transport-... packages to react-server-... (#20403) 2020-12-08 08:08:57 -05:00
stats.js Fix sizebot (#15771) 2019-05-29 21:30:16 -07:00
sync.js Fork React Native renderer into FB and OSS bundles (#12625) 2018-04-18 13:16:50 -07:00
utils.js Fixed broken build script --unsafe-partial flag (#22324) 2021-09-15 13:32:09 -04:00
wrappers.js Add Node ESM build option (#20243) 2020-11-13 05:57:45 -08:00