Add completions for npm why|explain

Fixes #284905
This commit is contained in:
Daniel Imms 2025-12-24 12:26:59 -08:00
parent 9de6f4eeae
commit 4ec1d67e71
No known key found for this signature in database
GPG Key ID: 5F0FF45B19E3A5D2

View File

@ -789,6 +789,18 @@ const completionSpec: Fig.Spec = {
},
],
},
{
name: ['explain', 'why'],
description: 'Explain installed packages',
args: {
name: 'package-spec',
description: 'Package name or path to folder within node_modules',
isVariadic: true,
filterStrategy: 'fuzzy',
generators: dependenciesGenerator,
},
options: [jsonOption, ...workSpaceOptions],
},
{
name: 'explore',
description: 'Browse an installed package',