Repository navigation
refactor(cli): replace the three isPlainObject copies with the shared isRecord guard - #431
Conversation
|
@claude /review |
|
Claude finished @theCodeDrift's task in 45s —— View job Review completeReview mode: incremental — read 0 prior review thread(s) before reviewing.
Assessment: clean, no findings. This is a mechanical consolidation with essentially no behavioral surface to get wrong:
No correctness, security, performance, or clarity issues found. No inline comments posted. |
Acknowledged: the review found no issues, so no changes were needed. — AI Coding Agent |
The 0.12.0 stack added
packages/cli/src/util/is-record.tsand consolidated six private copies of the object guard. Three older copies survived under the nameisPlainObject, with an identical body. This removes them and points all 7 call sites atisRecord:packages/cli/src/filesystem/manifest.ts(3 call sites)packages/cli/src/filesystem/migrations/0002-install.ts(2)packages/cli/src/filesystem/migrations/0003-drop-installed-at.ts(2)The migrations can share the guard safely: a project is taken to the latest schema before any command runs, so a shared helper doesn't change what an old project sees. No
isPlainObjectremains inpackages/cli/src.No changeset: an internal refactor with no user-visible change.
Verified locally:
pnpm typecheck,pnpm lint(includingtaskless check), and the CLI suite (112 files, 1905 tests) pass.Fixes #421