npm / npm/cli

Command or option to query from registry

Open
#6,015 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cmd:query Enhancement
Dominant language
JavaScript
Stars
10.1k
Forks
4.7k
Avg merge
2d 2h
Merged PRs (30d)
19

Description

I'd like a way to combine the dependency selector syntax of npm query with the registry data provided by npm view. npm query only supports locally installed packages, and npm view doesn't support dependency selectors. For example, you could use this to find all packages depending on a vulnerable version of a package, or find alternative versions of dependencies that fit your requirements with less peer dependencies (especially useful with the more strict peer dependency algorithm of npm 7).

Possible commands

  • npm view #lodash (automatically prefix with # if a package spec is given for back compatibility)
  • npm query --registry #lodash

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing npm query and npm view command entry points to understand their selector and registry behavior. Compare the proposed command forms and clarify how registry-backed dependency selection should work for package specs, vulnerable versions, and peer-dependency alternatives. Done means the behavior is implemented with coverage for the requested examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.