Commit Graph

4 Commits

Author SHA1 Message Date
Joseph Savona a7450572fa import runtime from "React.unstable_ForgetRuntime"
Imports the runtime from `React.unstable_ForgetRuntime` rather than from a 
separate module. The hope is that any code that gets transformed already has a 
dependency on React anyway, so we can avoid adding a new dependency that other 
systems don't know about. 

While here, i also cleaned up the `guardThrows` flag (we still parse it if 
present and warn, rather than throwing, to make it easier to adopt the latest 
version in various places).
2022-10-21 09:13:37 -07:00
Jan Kassens 90e189ae82 Add react-forget-runtime
This is a new module that holds: 

- the `useMemoCache` stub (hopefully to be deleted next week) 

- various helpers that can be imported by the compiler, e.g. the dispatcher 
guard `$startLazy` 

- skipped the implementation of `makeReadOnly` for now as there's already 
multiple copies and I wanted to avoid typescript in this file for now to make 
the build easier (i.e. no build)
2022-10-17 13:08:34 -04:00
Jan Kassens e575e22925 Add hash of Babel plugin to Jest transform
Jest caches based on the hash of the babel config. This caused us to not break 
that cache when the we made changes to the plugin. 

Fixes #643
2022-10-06 16:59:12 -04:00
Xuan Huang (黄玄) a33c0b897c Initial commit 2024-03-25 10:39:47 +00:00