From bbb9cb116dbf7b6247721aa0c4bcb6ec249aa8af Mon Sep 17 00:00:00 2001 From: Jack Pope Date: Fri, 17 Nov 2023 09:00:56 -0500 Subject: [PATCH] Update fork for ReactSharedInternalsClient export (#27717) ## Summary After changes in https://github.com/facebook/react/pull/27436, UMD builds no longer expose Scheduler from ReactSharedInternals. This module is forked in rollup for UMD builds and the path no longer matches. This PR updates the path name to match the new module: ReactSharedInternalsClient. ## How did you test this change? - `yarn build` - Inspect `react.development.js` UMD build, observe `Scheduler: Scheduler` is set in `ReactSharedInternals`, matching [18.2.0](https://unpkg.com/react@18.2.0/umd/react.development.js) - ran attribute-behavior fixture app - Observe no more error `Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'unstable_cancelCallback')` Co-authored-by: Jack Pope --- scripts/rollup/forks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/rollup/forks.js b/scripts/rollup/forks.js index fa9a232bef..22d7d4c3e9 100644 --- a/scripts/rollup/forks.js +++ b/scripts/rollup/forks.js @@ -217,7 +217,7 @@ const forks = Object.freeze({ } }, - './packages/react/src/ReactSharedInternals.js': (bundleType, entry) => { + './packages/react/src/ReactSharedInternalsClient.js': (bundleType, entry) => { switch (bundleType) { case UMD_DEV: case UMD_PROD: