Is there an existing issue for this?
Current Behavior
npm search module_does_not_exist --json
returns invalid JSON
Expected Behavior
npm search module_does_not_exist --json
should valid JSON: []
Steps To Reproduce
npm i -g npm@7.23.0
npm search lodash --json
Outputs valid JSON
npm i -g npm@7.23.0
npm search lodash_does_not_exist --json
Outputs just ]
which is not valid json so e.g. npm search lodash_does_not_exist --json | jq fails.
Environment
Is there an existing issue for this?
Current Behavior
npm search module_does_not_exist --jsonreturns invalid JSON
Expected Behavior
npm search module_does_not_exist --jsonshould valid JSON:
[]Steps To Reproduce
Outputs valid JSON
Outputs just
]which is not valid json so e.g.
npm search lodash_does_not_exist --json | jqfails.Environment