feat(nodejs): add pnpm support with auto-detection in Node.js plugin - #2
Merged
Merged
Conversation
|
✅ Clean PR, @bruno-archastro! No blocking findings on
Reply |
Auto-detect whether a Node.js project uses npm or pnpm and emit matching commands instead of hardcoding npm. A new PackageManager enum is the single source of truth for command strings (install/test/run/exec) and the install lock resource; detect_package_manager walks up to the workspace root, preferring the packageManager field, then a lockfile, defaulting to npm. Workspace members inherit the root's manager. Existing behavior is preserved (no lockfile/field => npm). Added tests for field/lockfile detection, pnpm exec, the per-manager install lock, and workspace inheritance.
bruno-archastro
force-pushed
the
bruno/2026-06-24/pnpm-support
branch
from
June 24, 2026 15:57
f2ac019 to
f777a4b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for pnpm alongside npm in the Node.js plugin, with automatic detection of the package manager used by each project. Key changes:
PackageManagerenum as the single source of truth for all npm/pnpm command strings and install lock resources.detect_package_manager, which walks up from the project directory to the workspace root, preferring thepackageManagerfield inpackage.json, then falling back to lockfiles (pnpm-lock.yaml→ pnpm,package-lock.json→ npm), defaulting to npm if nothing matches.install,test,run,exec) now use the detected package manager.packageManagerfield and lockfilesExisting behavior is preserved for projects without a lockfile or
packageManagerfield (defaults to npm). This enables seamless support for both npm and pnpm workflows.