Stop erroring for packages with large deps

merge-requests/15/head
Bsian 2020-07-28 20:33:29 +01:00
parent 0a35b339f4
commit 55e602d619
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
1 changed files with 1 additions and 0 deletions

View File

@ -36,6 +36,7 @@ export default class NPM extends Command {
let dependencies: string = 'None';
if (version !== 'Unknown' && data.versions[version].dependencies !== undefined && Object.keys(data.versions[version].dependencies).length > 0) {
dependencies = Object.keys(data.versions[version].dependencies).join(', ');
if (dependencies.length > 1024) dependencies = `${dependencies.substr(0, 1021)}...`;
}
const name: string = data.name || 'None';
const repository: string = bugs.replace('/issues', '') || '';