Open jacob418 opened 2 years ago
npm list [pkg] list only packages that have name = pkg but not packages with alias = pkg
npm list [pkg]
name = pkg
alias = pkg
Example:
$ npm list uuid 1Independent@0.8.3 /path/to/my/project ├─┬ @vue/cli-plugin-babel@4.5.13 │ └─┬ @vue/cli-shared-utils@4.5.13 │ └─┬ request@2.88.2 │ └── uuid@3.4.0 ├─┬ @vue/cli-plugin-e2e-cypress@4.5.13 │ └─┬ cypress@3.8.3 │ └─┬ request@2.88.0 │ └── uuid@3.4.0 ├─┬ @vue/cli-service@4.5.13 │ ├─┬ copy-webpack-plugin@5.1.2 │ │ └─┬ webpack-log@2.0.0 │ │ └── uuid@3.4.0 │ └─┬ webpack-dev-server@3.11.2 │ └─┬ sockjs@0.3.21 │ └── uuid@3.4.0 └─┬ cordova@10.0.0 └─┬ insight@0.10.3 └── uuid@3.4.0
I would expect the command to also list installations of the package with name = pkg where alias != pkg, indicating, it has been aliased on the entry of the package tree.
alias != pkg
$ npm list uuid 1Independent@0.8.3 /path/to/my/project ├─┬ @vue/cli-plugin-babel@4.5.13 │ └─┬ @vue/cli-shared-utils@4.5.13 │ └─┬ request@2.88.2 │ └── uuid@3.4.0 ├─┬ @vue/cli-plugin-e2e-cypress@4.5.13 │ └─┬ cypress@3.8.3 │ └─┬ request@2.88.0 │ └── uuid@3.4.0 ├─┬ @vue/cli-service@4.5.13 │ ├─┬ copy-webpack-plugin@5.1.2 │ │ └─┬ webpack-log@2.0.0 │ │ └── uuid@3.4.0 │ └─┬ webpack-dev-server@3.11.2 │ └─┬ sockjs@0.3.21 │ └── uuid@3.4.0 ├─┬ cordova@10.0.0 │ └─┬ insight@0.10.3 │ └── uuid@3.4.0 └── uuid@8.3.2 as uuid8
Notice the last line (new):
└── uuid@8.3.2 as uuid8
*the part as uuid8 indicates the alias and is only a suggestion, it might look completely different.
as uuid8
uuid
npm install uuid8@npm:uuid@8
npm list uuid
Me too, and what's the plan to this issue?
Is there an existing issue for this?
Current Behavior
npm list [pkg]
list only packages that havename = pkg
but not packages withalias = pkg
Example:
Expected Behavior
I would expect the command to also list installations of the package with
name = pkg
wherealias != pkg
, indicating, it has been aliased on the entry of the package tree.Example:
Notice the last line (new):
*the part
as uuid8
indicates the alias and is only a suggestion, it might look completely different.Steps To Reproduce
uuid
package with alias (npm install uuid8@npm:uuid@8
)npm list uuid
uuid
is not showing upEnvironment