npm / npm/rfcs

[RRFC] Support running outdated command against a package-lock without installing

Open
#866 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
777
Forks
267
PR merge metrics
No merged PRs in 30d

Description

Motivation ("The Why")

Currently to run the outdated check the packages have to be installed first, this can be a comparatively slow process depending on the complexity of dependencies involved. To facilitate quicker checks particularly in a CI environment it would be useful to be able to execute the command and receive the same quality of output without having to run the install first.

Example

git clone some-node-repo
npm outdated

How
Current Behaviour

outdated does run but it gives a completely different result rendering it unusable

Package                             Current  Wanted  Latest  Location  Depended by
babel-plugin-syntax-dynamic-import  MISSING  6.18.0  6.18.0  -         api-data-test
Desired Behaviour
Package            Current  Wanted  Latest  Location                        Depended by
@babel/cli          7.17.6  7.28.6  7.28.6  node_modules/@babel/cli         api-data-test
@babel/core         7.17.8  7.29.0  7.29.0  node_modules/@babel/core        api-data-test
@babel/preset-env  7.16.11  7.29.5  7.29.5  node_modules/@babel/preset-env  api-data-test
References
  • n/a

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 examining the npm outdated command and how it uses a package-lock when dependencies are not installed. Compare the current and desired output shown here, and consider the work complete when outdated can produce the desired package versions and locations without installing first.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.