Merge remote-tracking branch 'upstream/dev'

This commit is contained in:
thororen1234 2024-05-15 10:26:42 -04:00
commit f0f655fa10
29 changed files with 544 additions and 143 deletions

View file

@ -258,7 +258,12 @@ function patchFactories(factories: Record<string, (module: any, exports: any, re
for (let i = 0; i < patches.length; i++) {
const patch = patches[i];
if (patch.predicate && !patch.predicate()) continue;
if (!code.includes(patch.find)) continue;
const moduleMatches = typeof patch.find === "string"
? code.includes(patch.find)
: patch.find.test(code);
if (!moduleMatches) continue;
patchedBy.add(patch.plugin);