Skip to content

Commit 46eebed

Browse files
author
Luca Forstner
committed
Bump limit
1 parent 8eab19f commit 46eebed

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

.size-limit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ module.exports = [
4747
path: 'packages/browser/build/npm/esm/index.js',
4848
import: createImport('init', 'browserTracingIntegration', 'replayIntegration'),
4949
gzip: true,
50-
limit: '75 KB',
50+
limit: '75.1 KB',
5151
},
5252
{
5353
name: '@sentry/browser (incl. Tracing, Replay) - with treeshaking flags',

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable complexity */
12
import { promises as fs } from 'node:fs';
23
import path from 'node:path';
34
import { fileURLToPath } from 'node:url';
@@ -182,6 +183,24 @@ async function run() {
182183
}
183184

184185
if (status > 0) {
186+
try {
187+
const results = limit.parseResults(output);
188+
const failedResults = results
189+
.filter(result => result.passed || false)
190+
.map(result => ({
191+
name: result.name,
192+
size: +result.size,
193+
sizeLimit: +result.sizeLimit,
194+
}));
195+
196+
if (failedResults.length > 0) {
197+
// eslint-disable-next-line no-console
198+
console.log('Exceeded size-limits:', failedResults);
199+
}
200+
} catch {
201+
// noop
202+
}
203+
185204
setFailed('Size limit has been exceeded.');
186205
}
187206
} catch (error) {

0 commit comments

Comments
 (0)