[healthcheck] Clean up ignorelist and check if deps exist
ghstack-source-id: b6d58988eeb86e657a6db2a481b6c2fe2fba0344 Pull Request resolved: https://github.com/facebook/react-forget/pull/2962
Lauren Tan committed
May 13, 2024 at 17:01 UTC
ce0c08eaad59122422a98b0103e96aa15ff29166
2 files changed
+11
-13
compiler/packages/react-compiler-healthcheck/src/checks/libraryCompat.ts
+5
-3
@@ -16,9 +16,11 @@ export default {
16
if (packageJsonRE.exec(path) !== null) {
17
const contents = JSON.parse(source);
18
const deps = contents.dependencies;
19
- for (const library of config.knownIncompatibleLibraries) {
20
- if (Object.hasOwn(deps, library)) {
21
- knownIncompatibleLibrariesUsage.add(library);
19
+ if (deps != null) {
20
+ for (const library of config.knownIncompatibleLibraries) {
21
+ if (Object.hasOwn(deps, library)) {
22
+ knownIncompatibleLibrariesUsage.add(library);
23
+ }
24
}
25
}
26
}
compiler/packages/react-compiler-healthcheck/src/index.ts
+6
-10
@@ -30,16 +30,12 @@ async function main() {
30
const globOptions = {
31
onlyFiles: true,
32
ignore: [
33
- "*/node_modules/**",
34
- "*/dist/**",
35
- "*/tests/**",
36
- "*/__tests__/**",
37
- "node_modules/**",
38
- "dist/**",
39
- "tests/**",
40
- "__tests__/**",
41
- "__mocks__/**",
42
- "__e2e__/**",
33
+ "**/node_modules/**",
34
+ "**/dist/**",
35
+ "**/tests/**",
36
+ "**/__tests__/**",
37
+ "**/__mocks__/**",
38
+ "**/__e2e__/**",
39
],
40
};
41