Last 12 weeks · 42 commits
5 of 6 standards met
Description Closes #139 Add support for Rush monorepos by detecting and using as the executable in the pnpm agent. How it works Rush provides — a transparent wrapper around the user's binary that configures it to work within the Rush monorepo. Since accepts the same CLI arguments as , we only need to swap the executable. Detection strategy: 1. Before falling back to , check for by traversing up from . 2. If found, set and return as the agent. 3. The pnpm agent reads and uses instead of . Changes — Add optional to — New module: and — Pre-check for Rush before — Resolve executable dynamically via Notes is CLI-compatible with , so , , etc. work identically. No argument construction logic changes. returns automatically for Rush projects since they don't have . No new dependency is introduced. Validations [x] Follow our [Code of Conduct] [x] Read the [Contributing Guide] [x] Check that there isn't already a PR that addresses the same issue [Code of Conduct]: https://github.com/antfu/.github/blob/main/CODE_OF_CONDUCT.md [Contributing Guide]: https://github.com/antfu/contribute
Describe the bug appears to use the resolved package name from package metadata as the package identity. For aliases and pnpm overrides, that name can differ from the declared dependency name. Example: should appear as , while still using for npm metadata. When the alias identity is lost, dependency graph edges can be attached to the wrong package or dropped, and “open local folder” can resolve to the virtual-store real package path instead of the alias folder under . Minimal reproduction Direct alias case: Override alias case: Run: Expected The graph keeps declared names as package identity: , , , . npm metadata/external links use the real package name when different: , , . “Open local folder” opens the alias symlink, for example or . Actual Alias packages may be shown/keyed as the real package name from . Dependency edges can be missing or merged when multiple aliases resolve to the same real package. Some packages can appear with no dependencies after pnpm returns a deduped alias entry first. Local folder resolution can point at instead of . Notes In pnpm data, the dependency map key is the declared alias, while the package object/installed uses the real package name. These need to be tracked separately: graph identity: declared alias name npm identity: real package name local path: alias path from the parent relationship This issue was created with assistance from a code agent.*
In pnpm ls output, the dependency map key is the declared alias name while / use the resolved real package name. This caused aliases like to be keyed as , merging distinct aliases and breaking graph edges. Use dependency map key as graph identity (alias name) Store real package name as for npm metadata Fix filepath to point at alias symlink under node_modules Remove WeakMap dedup that caused aliases to share nodes Fixes #185 🔗 Linked issue Resolves #185 🧭 Context In output, the dependency map key is the declared alias name (e.g. ), while and use the resolved real package name (e.g. ). This caused aliases like to be keyed as , merging distinct aliases into a single node and breaking graph edges. 📚 Description Use dependency map key as graph identity (alias name) Store real package name as for npm metadata and external links Fix filepath to point at alias symlink under instead of the virtual store path Remove dedup that caused aliases to share nodes
Repository: antfu/node-modules-inspector. Description: Interactive UI for local node modules inspection Stars: 2929, Forks: 87. Primary language: TypeScript. Languages: TypeScript (53.7%), Vue (43%), JavaScript (2.7%), CSS (0.3%), MDX (0.2%). License: MIT. Homepage: https://node-modules.dev Topics: devframe, devtools, inspector, node-modules, npm. Latest release: v2.4.4 (22h ago). Open PRs: 3, open issues: 18. Last activity: 4h ago. Community health: 85%. Top contributors: antfu, antfubot, OrbisK, sxzz, ilyaliao, userquin, Joery-M, feidianbo, elio-Wang, aojunhao123 and others.