Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
./scripts/fiber/find-errors to make future Umbrella task easier
In facebook#7925 there is a task to: > Ensure we replace errors with invariant calls and they have sensible > messages While it is likely a bit premature to begin that work, this script will make it easier to find and replace the exact call sites to manage. Usage: ``` sh $ ./scripts/fiber/find-errors ...lots of output... src/renderers/shared/fiber/ReactFiberScheduler.js#921: throw new Error('No error for given unit of work.'); src/renderers/shared/fiber/ReactFiberScheduler.js#940: throw new Error('Invalid type of work.'); src/renderers/shared/utils/ReactErrorUtils.js#55: throw error; All done. Results: 6 errors 0 unmodified 380 skipped 0 ok Stats: error: 42 Time elapsed: 4.031seconds 42 throw statements to to convert to `invariant` ``` ``` sh $ ./scripts/fiber/find-errors --quiet ...lots of output... src/renderers/shared/fiber/ReactFiberScheduler.js#780: src/renderers/shared/fiber/ReactFiberScheduler.js#785: src/renderers/shared/fiber/ReactFiberScheduler.js#921: src/renderers/shared/fiber/ReactFiberScheduler.js#940: src/renderers/shared/utils/ReactErrorUtils.js#55: All done. Results: 6 errors 0 unmodified 380 skipped 0 ok Stats: error: 42 Time elapsed: 3.728seconds 42 throw statements to to convert to `invariant` ```
- Loading branch information