mirror of
https://github.com/millionco/react-doctor.git
synced 2026-09-14 20:00:24 +08:00
a3539c9afb
Standing up packages/api/ as the home of the programmatic public API. Moves diagnose() into it as a thin Effect.runPromise shell around #412's runInspect orchestrator, with tagged-error translation back to legacy thrown classes (NoReactDependencyError / ProjectNotFoundError / AmbiguousProjectError) for backwards compat. inspect() stays in react-doctor/src/ for now (CLI rendering coupled in). PR 6 (cli package) moves it. ## Files - packages/api/ (private workspace package) - src/diagnose.ts: pre-resolves rootDir redirect + resolveDiagnoseTarget, then runInspect, translates tagged failures, returns DiagnoseResult. - src/index.ts: re-exports diagnose + public types + legacy errors. - tests/diagnose.test.ts: 4 tests — happy path, NoReactDependency, ProjectNotFound, elapsedMilliseconds positive. - packages/react-doctor/src/index.ts: deletes ~120-line local diagnose, re-exports from @react-doctor/api. - packages/core/src/run-inspect.ts: rejects projects without React via tagged NoReactDependency (used to happen in the legacy diagnose). ## Validation - pnpm typecheck (12/12) - pnpm test — 123 files / 1485 pass / 3 skipped - pnpm lint, format:check, build, smoke:json-report — all green Co-authored-by: Cursor <cursoragent@cursor.com>
55 lines
1.6 KiB
JSON
55 lines
1.6 KiB
JSON
{
|
|
"name": "react-doctor",
|
|
"private": true,
|
|
"homepage": "https://github.com/millionco/react-doctor#readme",
|
|
"bugs": {
|
|
"url": "https://github.com/millionco/react-doctor/issues"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/millionco/react-doctor.git"
|
|
},
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "turbo run dev --filter=react-doctor",
|
|
"build": "turbo run build",
|
|
"test": "turbo run test --filter=react-doctor --filter=@react-doctor/core --filter=@react-doctor/api",
|
|
"typecheck": "turbo run typecheck",
|
|
"lint": "vp lint",
|
|
"lint:fix": "vp lint --fix",
|
|
"format": "vp fmt",
|
|
"format:check": "vp fmt --check",
|
|
"check": "vp check",
|
|
"changeset": "changeset",
|
|
"version": "changeset version",
|
|
"release": "pnpm build && changeset publish",
|
|
"leaderboard:update": "node --experimental-strip-types --no-warnings scripts/update-leaderboard.ts",
|
|
"smoke:json-report": "node --experimental-strip-types --no-warnings scripts/smoke-json-report.ts"
|
|
},
|
|
"devDependencies": {
|
|
"@changesets/changelog-github": "^0.7.0",
|
|
"@changesets/cli": "^2.31.0",
|
|
"@types/node": "^25.6.0",
|
|
"@voidzero-dev/vite-plus-core": "^0.1.15",
|
|
"turbo": "^2.9.7",
|
|
"typescript": "^6.0.3",
|
|
"vite-plus": "^0.1.15"
|
|
},
|
|
"engines": {
|
|
"node": ">=22",
|
|
"pnpm": ">=8"
|
|
},
|
|
"packageManager": "pnpm@10.29.1",
|
|
"pnpm": {
|
|
"onlyBuiltDependencies": [
|
|
"@parcel/watcher",
|
|
"esbuild",
|
|
"unrs-resolver"
|
|
],
|
|
"overrides": {
|
|
"oxlint": "^1.66.0",
|
|
"oxlint-tsgolint": "^0.23.0"
|
|
}
|
|
}
|
|
}
|