From dfb9c5fa531cf26186c014dd4389c0ff1a85d12c Mon Sep 17 00:00:00 2001 From: 37IulianPopovici Date: Thu, 21 Mar 2024 16:57:00 +0200 Subject: [PATCH] fix: enhance sbt output width --- lib/index.ts | 2 ++ package.json | 2 +- test/functional/sbt-plugin.test.ts | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/index.ts b/lib/index.ts index 1aabcbec..15038273 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -284,6 +284,8 @@ export function buildArgs( } else if (isCoursierProject) { args.push('coursierDependencyTree'); // coursier } else { + // enhance sbt default output width from 40 chars to the max + args.push('set asciiGraphWidth := 999999999'); args.push('dependencyTree'); // sbt native } diff --git a/package.json b/package.json index 8b84c087..8e1fdca0 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "lint": "eslint --color --cache 'lib/**/*.{js,ts}'", "format": "prettier --write '{lib,test}/**/*.{js,ts}'", "prepare": "npm run build", - "test": "jest --runInBand -b --testTimeout=100000" + "test": "jest --runInBand -b --testTimeout=200000" }, "author": "snyk.io", "license": "Apache-2.0", diff --git a/test/functional/sbt-plugin.test.ts b/test/functional/sbt-plugin.test.ts index 12f7f6a3..ad0bc453 100644 --- a/test/functional/sbt-plugin.test.ts +++ b/test/functional/sbt-plugin.test.ts @@ -6,6 +6,7 @@ test('check build args with array not coursier', () => { '-Dsbt.log.noformat=true', '-Paxis', '-Pjaxen', + 'set asciiGraphWidth := 999999999', 'dependencyTree', ]); }); @@ -15,6 +16,7 @@ test('check build args with string not coursie', () => { expect(result).toEqual([ '-Dsbt.log.noformat=true', '-Paxis -Pjaxen', + 'set asciiGraphWidth := 999999999', 'dependencyTree', ]); }); @@ -61,6 +63,7 @@ test('check build args with string for not coursier and not snykRenderTree', () expect(result).toEqual([ '-Dsbt.log.noformat=true', '-Paxis -Pjaxen', + 'set asciiGraphWidth := 999999999', 'dependencyTree', ]); });