Skip to content

Commit 2f84b69

Browse files
committed
fix size limit creation
1 parent a9cb55a commit 2f84b69

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

dev-packages/size-limit-gh-action/index.mjs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,7 @@ class SizeLimit {
8181
}
8282

8383
parseResults(output) {
84-
// Ignore any output before `[`, as the command itself may be logged...
85-
const stripped = output.slice(output.indexOf('[')).trim();
86-
87-
const results = JSON.parse(stripped);
84+
const results = JSON.parse(output);
8885

8986
return results.reduce((current, result) => {
9087
let time = {};
@@ -154,7 +151,7 @@ class SizeLimit {
154151
async function execSizeLimit() {
155152
let output = '';
156153

157-
const status = await exec('yarn', ['size-limit', '--json'], {
154+
const status = await exec('yarn run --silent size-limit --json', {
158155
windowsVerbatimArguments: false,
159156
ignoreReturnCode: true,
160157
cwd: process.cwd(),

0 commit comments

Comments
 (0)