-
Notifications
You must be signed in to change notification settings - Fork 135
Dynamic NPM Package Runner #145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@Copilot
Copilot
AI
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds functionality to dynamically detect which NPM package manager (npm, pnpm, yarn, or bun) should be used in a Laravel project by checking for the presence of their respective lock files. The implementation includes a new method in the GuidelineAssist class and updates AI guidance templates to use the detected package manager instead of hardcoded "npm" commands.
- Added
nodePackageManager()
method to detect package manager from lock files - Created comprehensive test coverage for all supported package managers
- Updated AI guidance templates to dynamically reference the correct package manager
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
src/Install/GuidelineAssist.php | Added nodePackageManager() method with file-based detection logic |
tests/Feature/Install/GuidelineAssistTest.php | Added test suite covering all package managers and edge cases |
.ai/laravel/core.blade.php | Updated Vite error guidance to use dynamic package manager |
.ai/foundation.blade.php | Updated frontend bundling guidance to use dynamic package manager |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a 100ドル gift card. Take the survey.
Great thinking @imliam 💪 Think it'd be best to compute it only once rather than on each call 👌
Great thinking @imliam 💪 Think it'd be best to compute it only once rather than on each call 👌
Consider it done @ashleyhindle!
This PR adds a helper that determines which NPM package manager should be used to run any given script out of npm, pnpm, yarn and bun. This should help AI use the correct CLI tools to use when running npm commands based on the project's existing dependencies.