diff --git a/dist/index.js b/dist/index.js index 2c4f635..4f37388 100644 --- a/dist/index.js +++ b/dist/index.js @@ -30762,7 +30762,9 @@ class SizeLimit { ]; } parseResults(output) { - const results = JSON.parse(output); + const begin = output.indexOf("["); + const end = output.lastIndexOf("]"); + const results = JSON.parse(output.slice(begin, end + 1)); return results.reduce((current, result) => { let time = {}; if (result.loading !== undefined && result.running !== undefined) { diff --git a/src/SizeLimit.ts b/src/SizeLimit.ts index f7feb41..2b2b34e 100644 --- a/src/SizeLimit.ts +++ b/src/SizeLimit.ts @@ -102,7 +102,9 @@ class SizeLimit { } parseResults(output: string): { [name: string]: IResult } { - const results = JSON.parse(output); + const begin = output.indexOf("["); + const end = output.lastIndexOf("]"); + const results = JSON.parse(output.slice(begin, end + 1)); return results.reduce( (current: { [name: string]: IResult }, result: any) => {