From 55e602d619b05d6272b15f401633a3f0080e0a02 Mon Sep 17 00:00:00 2001 From: Bsian Date: Tue, 28 Jul 2020 20:33:29 +0100 Subject: [PATCH] Stop erroring for packages with large deps --- src/commands/npm.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/commands/npm.ts b/src/commands/npm.ts index 062f90e..7a26301 100644 --- a/src/commands/npm.ts +++ b/src/commands/npm.ts @@ -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', '') || '';