[BUG] npm list -g
missing resolved
field for Github-based dependencies
#8173
Labels
npm list -g
missing resolved
field for Github-based dependencies
#8173
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
If I install a package from Github URL globally, then use
npm list -g --json <package_name>
, npm does NOT include the fieldresolved
and thus I lose out on important information, including which commit hash was this package installed from. (more details in reproduction steps below)This only happens on a global level. If I installed the package to a local node project (i.e. without
-g
flag), thennpm list
correctly shows the commit hash information.Expected Behavior
npm list --global
should behave likenpm list
and showsresolved
field and commit hash for package installed from Github URLI dug through some
npm
versions and discovered that up until v7.5.5,npm list --global
still works as expected and shows the commit hash for global packages. However, since v7.5.6 until now, this behavior no longer exists.Steps To Reproduce
test-node-app
&& cdtest-node-app
&&npm init
npm install [email protected]:bhuynhdev/test-pkg-public.git
npm list --json test-pkg-public
npm install --global [email protected]:bhuynhdev/test-pkg-public.git
npm list --global --json test-pkg-public
Environment
The text was updated successfully, but these errors were encountered: