Skip to content

Conversation

roberto-butti
Copy link

@roberto-butti roberto-butti commented Oct 9, 2025

Thanks to the amazing PR #439 by @ludo237 , I’d like to suggest a slightly different approach to selecting the package manager, allowing developers to choose it in a more explicit and flexible way.

This PR introduces support for Yarn, PNPM, and Bun alongside npm in the Laravel Installer. Developers can now select their preferred package manager via CLI options or an interactive prompt, or skip installation of JS packages entirely.

This approach gives developers direct control over which package manager to use, instead of relying solely on lock file detection (as in the related PR). It improves flexibility while maintaining backward compatibility with npm as the default.

…ackage manager control

Thanks to the amazing PR laravel#439  by @ludo237 , I’d like to suggest a slightly different approach to selecting the package manager, allowing developers to choose it in a more explicit and flexible way.

This PR introduces support for Yarn, PNPM, and Bun alongside npm in the Laravel Installer.
Developers can now select their preferred package manager via CLI options or an interactive prompt, or skip installation of JS packages entirely.

This approach gives developers direct control over which package manager to use, instead of relying solely on lock file detection (as in the related PR).
It improves flexibility while maintaining backward compatibility with npm as the default.
@roberto-butti roberto-butti changed the title Feat/set package manager Add support for Yarn, PNPM, and Bun in Laravel Installer for better package manager control Oct 9, 2025
}

if ($runNpm) {
if ($selectedPackageManager === 'skip' || ! $selectedPackageManager) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small proposal

$shouldRunPackageManager = true;

if ($selectedPackageManager === 'skip' || ! $selectedPackageManager) {
    $shouldRunPackageManager = false;
    $selectedPackageManager = 'npm';
}

@taylorotwell taylorotwell reopened this Oct 9, 2025
@taylorotwell
Copy link
Member

I don't really want another prompt for this during the install process. NPM is fine to get started - people can switch to whatever they want after.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants