fix(core): detect package manager properly using @nx/devkit (Fixes #74)#79
Conversation
Replace custom package manager detection heuristic with @nx/devkit's detectPackageManager and getPackageManagerCommand functions. The previous implementation checked for globally available binaries (pnpm -v, yarn -v) which didn't respect the project's actual package manager configuration based on lock files or packageManager field in package.json. Now correctly detects: - npm when package-lock.json exists - yarn when yarn.lock exists - pnpm when pnpm-lock.yaml exists - Also respects packageManager field in package.json Closes #74 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Code Review Summary ✅OverviewThis is a well-implemented fix that correctly addresses issue #74. The change from custom package manager detection to using What I Reviewed
Key Improvements
Code QualityThe implementation is clean and follows best practices. Tests properly isolate the unit under test by mocking Verdict: LGTM! Ready to merge. 🎉 Automated code review by Claude Code |
Summary
@nx/devkit'sdetectPackageManagerandgetPackageManagerCommandfunctionspnpm -v,yarn -v) which didn't respect the project's actual configurationpackage-lock.json,yarn.lock,pnpm-lock.yaml) andpackageManagerfield in package.jsonTest plan
detectPackageManager()returns correct value based on lock fileCloses #74
🤖 Generated with Claude Code