Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Npm Bundle Laravel Package

hshn/npm-bundle

Integrates npm package management into Symfony projects by exposing npm commands and configuration through the framework, letting PHP developers install, update, and manage JavaScript dependencies without leaving their existing Symfony workflow.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. Unchanged. hshn/npm-bundle remains a Symfony bundle: entry point is a Bundle subclass registered via AppKernel, configuration under the hshn_npm key in Symfony's config.yml/config/packages tree. Laravel's extension surface — service providers, facades, config/*.php, the Illuminate\Container — has no supported path to loading it. Nothing in v0.3.0 touches this; the release is a feature addition inside the Symfony configuration/DI model, which is precisely the layer that does not port.

What v0.3.0 changes. A single feature: package-manager switching to yarn (issue #2). Technically this means the bundle now abstracts over npm vs yarn invocation — likely a config key selecting the binary plus a branch in its process runner. Assessed on its merits:

  • It is a configuration-surface expansion, not a capability unlock. The bundle already ran npm scripts; it can now run them via yarn.
  • It is anachronistic. Yarn support written in this era almost certainly targets Yarn Classic (1.x). Yarn Berry (2+/3+/4) changed resolution, PnP, and lockfile semantics materially, and the modern default in Laravel projects is npm or pnpm. Supporting yarn 1.x in 2025 is not a differentiator.
  • It increases fork cost. Any Laravel-side re-implementation now inherits a package-manager indirection layer with its own test matrix (npm, yarn, two lockfile formats, differing node_modules layouts), for zero incremental capability over npm ci && npm run build or yarn install --frozen-lockfile.
  • It raises a versioning question. Adding a feature and shipping 0.3.0 implies semver discipline of some kind, but there is no evidence in the notes of a PHP/Symfony constraint bump, PHP 8.x testing, or CI. A minor feature release without a dependency-refresh story is a maintenance signal of "still breathing," not "supported."

Integration feasibility. Still effectively zero as a drop-in. The realistic work is unchanged and now slightly larger:

  • Extract dependency-resolution and script-runner semantics.
  • Re-express configuration as config/assets.php plus an AssetServiceProvider.
  • Replace Symfony Process usage with Illuminate\Process.
  • Rework Symfony event-dispatcher hooks onto Laravel's dispatcher.
  • New: replicate or deliberately drop the package-manager selection layer, and decide whether yarn support is a requirement anyone actually stated.

That is a multi-day fork for functionality Vite provides in under an hour of setup, plus a new axis to test.

Technical risk. High, and the release does not move any of the three drivers:

  1. Dependency graph. No indication the symfony/* constraint has been widened from the 2.x/3.x line. That still collides with Laravel 9+ (Symfony 6) and current symfony/process, and Composer will still refuse or force a downgrade cascade. A feature release that does not touch constraints is a strong signal the constraint problem is not being worked.
  2. Bus-factor and cadence. The "archived, no activity since 2017" framing should be softened to "minimal, single-maintainer activity" given v0.3.0 exists. The operational conclusion does not change: one feature in the review window, no advisory channel, no release cadence you can plan against, no PHP 8.x evidence. Treat it as an unmaintained fork you would own.
  3. Semantic drift. Adding a second package manager doubles the surface that must track upstream npm/yarn behavior change, with no upstream commitment to doing so.

Key questions for the requesting team.

  • Is yarn a hard requirement? If the requester is on Yarn Classic specifically, that is a project-level choice we can satisfy in the Vite pipeline without adopting this bundle — and if they are on Yarn Berry, this release likely does not help them at all.
  • What specific capability do you believe this bundle provides that Vite, plus a packageManager field in package.json, does not?
  • Is the target application actually Laravel, or a legacy Symfony app where the bundle would be native? (If Symfony 2/3, the calculus changes — but the abandonment risk does not.)
  • Who owns the fork, and what is the budget for maintaining a bespoke asset pipeline with a two-package-manager test matrix indefinitely?
  • Does your security policy permit a dependency with no CVE response channel?

Verdict on the release. v0.3.0 is a minor, low-signal feature that neither mitigates nor addresses the disqualifying risks. It does not warrant revisiting the recommendation.

Integration Approach

Stack fit. Poor, unchanged. The package assumes a Symfony kernel, configuration tree, console, and process/event components. Laravel shares only the PHP runtime and Composer. No shared abstraction to bridge.

Migration path. Still: do not migrate the package — migrate the requirement.

  1. Inventory what the bundle is doing in any legacy app that uses it: declared npm packages, invoked scripts, lifecycle point (install, build, deploy), and which package manager it is configured for — v0.3.0 makes that an explicit, enumerable setting, which is genuinely useful for the inventory step.
  2. Port declarations to package.json plus vite.config.js (or webpack.mix.js for a Mix-era app).
  3. Wire the build into the deploy pipeline as an explicit npm ci && npm run build (or yarn install --frozen-lockfile && yarn build) step, and pin the choice with the packageManager field so it is declarative rather than hidden in PHP config.
  4. Use laravel-vite-plugin's manifest handling for any PHP-side asset awareness.

If the team insists on salvaging the bundle's logic, scope it as a fork with a rename and a Laravel service provider wrapper, treated as an internal package with a named owner — never a composer require of upstream.

Compatibility. Assume no compatibility with Laravel 9, 10, or 11, and none with PHP 8.1+. The v0.3.0 notes contain no constraint changes, so treat the earlier dry-run expectation as unchanged: expect composer require --dry-run to fail. Re-run it anyway — it is cheap and it is the only way to confirm nothing shifted.

Sequencing. (1) Dry-run dependency resolution as a go/no-go gate — unchanged and still the cheapest kill point; (2) capture the package-manager setting during requirement inventory, since v0.3.0 exposes it; (3) if resolution succeeds, isolate behind an interface; (4) build a parallel Vite path and cut over; for yarn users, set packageManager: "[email protected]" rather than reproducing the bundle's selector; (5) retire the wrapper.

Operational Impact

Maintenance. Wholly on you. v0.3.0 demonstrates the maintainer is reachable, but a single feature in the review window with no test, CI, or constraint-refresh evidence does not constitute a supportable cadence. Budget ongoing ownership, not a one-time integration cost.

Support. None material. No issue triage commitment, no security advisories, no roadmap. Any vulnerability in the transitive Symfony 2/3 tree — itself end-of-life — is yours to detect and patch. The new package-manager path also means yarn-specific npm-side advisories apply to you with no upstream coverage.

Scaling. Unchanged and unfavourable. Running npm/yarn from PHP couples a slow, I/O-heavy Node invocation to the PHP process lifecycle, invites lock contention on concurrent builds across app servers, and yields non-deterministic artifacts across environments. A CI-stage install-and-build is faster and reproducible. The yarn option adds a second toolchain to provision on build hosts; it does not improve parallelism, caching, or determinism. There is no dimension in which this scales better than the standard pipeline it replaces.

Failure modes.

  • Composer resolution failure on any Laravel or PHP upgrade — blocks the whole application, not just assets.
  • Silent asset drift — npm/yarn lockfile and resolution semantics have moved substantially; a 2017-era abstraction may produce subtly wrong output rather than a clean error.
  • Package-manager misconfiguration (new in v0.3.0) — selecting yarn while the project's toolchain, CI image, or lockfile is npm-shaped produces either a build failure or, worse, a successful build from an inconsistent lockfile. This is a new misconfiguration class introduced by the release.
  • Yarn version mismatch (new) — "yarn" is ambiguous between Classic and Berry; if the bundle targets Classic, a Berry-configured project will fail in a confusing place.
  • Build-time coupling — an npm failure surfacing as a PHP exception during boot, taking down more than the asset path.
  • Security exposure — unpatched transitive dependencies with no advisory channel.

Ramp-up. Deceptively high, marginally higher than before. The codebase is small and reads quickly, but it requires Symfony 2/3-era idioms most Laravel teams no longer carry, and the real cost is reverse-engineering intent from a thinly maintained codebase with no trustworthy tests and no author to ask. The yarn selector adds a branch you must reason about with no documentation of its intended semantics.

Recommendation. Reject — unchanged. The new release is a real but minor feature that fails to address the framework mismatch, the Symfony version constraint, or the security posture, and it enlarges the fork surface with a package-manager abstraction that the standard toolchain already solves via package.json's packageManager field. The correct TPM action remains: close the request with a pointer to laravel-vite-plugin, and if the requester can articulate a gap Vite does not cover — a Yarn Classic constraint would be the one worth hearing out — reopen as a scoped internal configuration decision, not a dependency adoption.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera
lonely-lights/prosetta
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log
hsluv/hsluv
seampact/codegen