[ci] Reduce non-deterministic builds for eslint-plugin-react-hooks

See https://github.com/rollup/plugins/issues/1425

Currently, `@babel/helper-string-parser/lib/index.js` is either emitted as a wrapped esmodule or inline depending on the ordering of async functions in `rollup/commonjs`. Specifically, `@babel/types/lib/definitions/core.js` is cyclic (i.e. transitively depends upon itself), but sometimes `@babel/helper-string-parser/lib/index.js` is emitted before this is realized.


A relatively straightforward patch is to wrap all modules (see https://github.com/rollup/plugins/issues/1425#issuecomment-1465626736)
This commit is contained in:
Mofei Zhang committed 2025-04-25 14:01:15 -04:00
1 parent 693803a9bb
commit 52aeda58ad
1 file changed
+2 -1
+2 -1
View File
@@ -393,7 +393,8 @@ function getPlugins(
};
},
},
bundle.tsconfig != null ? commonjs() : false,
// See https://github.com/rollup/plugins/issues/1425
bundle.tsconfig != null ? commonjs({strictRequires: true}) : false,
// Shim any modules that need forking in this environment.
useForks(forks),
// Ensure we don't try to bundle any fbjs modules.