Skip to content

fix(inspector): hide dedupe command when package manager is unknown - #216

Open
kael-wq wants to merge 1 commit into
antfu:mainfrom
kael-wq:fix/hide-dedupe-command-for-unknown-package-manager
Open

kael-wq wants to merge 1 commit into
antfu:mainfrom
kael-wq:fix/hide-dedupe-command-for-unknown-package-manager

Conversation

@kael-wq

@kael-wq kael-wq commented Sep 25, 2026

Copy link
Copy Markdown

🔗 Linked issue

Closes #213

🧭 Context

When you generate a report on node-modules.dev (no local project), the
package manager field is set to npm-registry — an internal value used
by the registry resolver, not a real CLI command. The Multiple Versions
page then renders npm-registry dedupe as the suggested command, which
you can't actually run.

📚 Description

Added npm-registry to the existing v-if condition that already hides
the dedupe hint for bun. Same idea: if we don't know the real package
manager, don't show a command the user can't run.

One-line change in MultipleVersions.vue, no other files affected.

The Multiple Versions page was showing "npm-registry dedupe" when viewing
reports generated via the browser, where the package manager is not known.
`npm-registry` is an internal value, not a runnable command.

Now the dedupe hint is only shown when the package manager is known and
supports the dedupe command (i.e., not `bun` and not `npm-registry`).

Closes antfu#213
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.

Multiple Versions page shows incorrect 'npm-registry dedupe' command

1 participant