react-doctor 0.2.9 → 0.2.11-dev.15e5fec
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -0
- package/dist/{cli-logger-BliQX9s8.js → cli-logger-CSZagq1E.js} +598 -93
- package/dist/cli.js +194 -110
- package/dist/index.d.ts +26 -2
- package/dist/index.js +592 -94
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -232,7 +232,9 @@ interface ReactDoctorConfig {
|
|
|
232
232
|
* `categories` field, but keyed by React Doctor's display
|
|
233
233
|
* categories (`"Server"`, `"React Native"`, `"Architecture"`,
|
|
234
234
|
* `"Bundle Size"`, `"State & Effects"`, `"Security"`,
|
|
235
|
-
* `"Accessibility"`, `"Performance"`, `"Correctness"`,
|
|
235
|
+
* `"Accessibility"`, `"Performance"`, `"Correctness"`,
|
|
236
|
+
* `"Next.js"`, `"Preact"`, `"TanStack Query"`,
|
|
237
|
+
* `"TanStack Start"`, …).
|
|
236
238
|
*
|
|
237
239
|
* ```json
|
|
238
240
|
* { "categories": { "React Native": "warn", "Server": "off" } }
|
|
@@ -296,17 +298,32 @@ interface Diagnostic {
|
|
|
296
298
|
}
|
|
297
299
|
//#endregion
|
|
298
300
|
//#region src/types/project-info.d.ts
|
|
299
|
-
type Framework = "nextjs" | "vite" | "cra" | "remix" | "gatsby" | "expo" | "react-native" | "tanstack-start" | "unknown";
|
|
301
|
+
type Framework = "nextjs" | "vite" | "cra" | "remix" | "gatsby" | "expo" | "react-native" | "tanstack-start" | "preact" | "unknown";
|
|
300
302
|
interface ProjectInfo {
|
|
301
303
|
rootDirectory: string;
|
|
302
304
|
projectName: string;
|
|
303
305
|
reactVersion: string | null;
|
|
304
306
|
reactMajorVersion: number | null;
|
|
305
307
|
tailwindVersion: string | null;
|
|
308
|
+
zodVersion: string | null;
|
|
309
|
+
/** Parsed major from `zodVersion`, or `null` when absent/unparseable. Mirrors `reactMajorVersion`. */
|
|
310
|
+
zodMajorVersion: number | null;
|
|
306
311
|
framework: Framework;
|
|
307
312
|
hasTypeScript: boolean;
|
|
308
313
|
hasReactCompiler: boolean;
|
|
309
314
|
hasTanStackQuery: boolean;
|
|
315
|
+
/**
|
|
316
|
+
* The declared `preact` version spec, or `null` when Preact isn't a
|
|
317
|
+
* dependency. Parallels `reactVersion` so a React-compatible runtime is
|
|
318
|
+
* modeled the same way React is. Drives the `preact` capability in
|
|
319
|
+
* `buildCapabilities` (which gates every `preact-*` rule) — keyed off
|
|
320
|
+
* this rather than `framework` because the dominant Preact setup
|
|
321
|
+
* (Preact-on-Vite) classifies as `framework: "vite"` but still needs
|
|
322
|
+
* Preact rules to fire.
|
|
323
|
+
*/
|
|
324
|
+
preactVersion: string | null;
|
|
325
|
+
/** Parsed major from `preactVersion`, or `null` when absent/unparseable. Mirrors `reactMajorVersion`. */
|
|
326
|
+
preactMajorVersion: number | null;
|
|
310
327
|
/**
|
|
311
328
|
* `true` when the project (or any of its workspace packages) declares
|
|
312
329
|
* React Native or Expo as a dependency. Enables the `react-native`
|
|
@@ -321,6 +338,13 @@ interface ProjectInfo {
|
|
|
321
338
|
* — no `rn-*` rules load for the project at all.
|
|
322
339
|
*/
|
|
323
340
|
hasReactNativeWorkspace: boolean;
|
|
341
|
+
/**
|
|
342
|
+
* `true` when the project (or any of its workspace packages) declares
|
|
343
|
+
* `react-native-reanimated`. Lets diagnostics surface reanimated's
|
|
344
|
+
* Compiler-compatible `.get()` / `.set()` accessors only where they
|
|
345
|
+
* apply, instead of on every React Native project.
|
|
346
|
+
*/
|
|
347
|
+
hasReanimated: boolean;
|
|
324
348
|
sourceFileCount: number;
|
|
325
349
|
}
|
|
326
350
|
//#endregion
|