react/scripts
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
..
babel Add comment support to `@gate` pragma (#21881) 2021-07-14 10:36:24 -07:00
bench Bump ecstatic from 2.2.1 to 2.2.2 in /scripts/bench (#20468) 2021-06-29 16:53:31 -04:00
circleci [build2 -> build] Local scripts 2021-09-21 15:14:09 -04:00
devtools React DevTools 4.19.2 -> 4.20.2 (#22569) 2021-10-15 12:50:17 -04:00
error-codes [Fizz/Flight] pipeToNodeWritable(..., writable).startWriting() -> renderToPipeableStream(...).pipe(writable) (#22450) 2021-10-06 00:31:06 -04:00
eslint Pass extra CLI args through to ESLint (#20250) 2020-11-13 11:00:45 -08:00
eslint-rules [RFC] Codemod invariant -> throw new Error (#22435) 2021-09-30 12:01:28 -07:00
flow Improve DEV errors if string coercion throws (Temporal.*, Symbol, etc.) (#22064) 2021-09-27 10:05:07 -07:00
git Remove leftover env variable logic in pre-commit hook 2015-09-01 14:35:47 -07:00
jest Update test and stack frame code to support newer V8 stack formats (#22477) 2021-10-11 18:40:42 -04:00
merge-fork Improve DEV errors if string coercion throws (Temporal.*, Symbol, etc.) (#22064) 2021-09-27 10:05:07 -07:00
perf-counters Drop the year from Facebook copyright headers and the LICENSE file. (#13593) 2018-09-07 15:11:23 -07:00
prettier DevTools: Update named hooks match to use column number also (#21833) 2021-07-08 16:12:22 -04:00
print-warnings [RFC] Codemod invariant -> throw new Error (#22435) 2021-09-30 12:01:28 -07:00
release Increase polling threshold for publish-prereleases (#22392) 2021-09-21 18:43:59 -07:00
rollup Support disabling spurious act warnings with a global environment flag (#22561) 2021-10-18 08:27:26 -07:00
shared [RFC] Codemod invariant -> throw new Error (#22435) 2021-09-30 12:01:28 -07:00
tasks Parallelize Flow in CI (#20794) 2021-02-10 17:54:58 -06:00
yarn chore: upgrade to jest 24 (#15778) 2019-10-03 22:44:18 +05:30
authors AUTHORS 2013-09-09 23:42:54 -07:00