Skip to main content

bump-size-limit

Bump size limits in .size-limit.js when the size-limit CI check is failing. Use when the user mentions size limit failures, bundle size checks failing, CI size check errors, or needs to update size-limit thresholds. Also use when the user says "bumpSizeLimit", "fix size limit", "size check failing", or "update bundle size limits".

소스 정보

저장소
getsentry/sentry-javascript
최근 소스 활동
2026년 10월 19일 06:56
감지된 SKILL.md 언어
영어
스타
8,769
포크
1,878

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
bump-size-limit
description
Bump size limits in .size-limit.js when the size-limit CI check is failing. Use when the user mentions size limit failures, bundle size checks failing, CI size check errors, or needs to update size-limit thresholds. Also use when the user says "bumpSizeLimit", "fix size limit", "size check failing", or "update bundle size limits".
# Bump Size Limit When the size-limit GitHub Action fails, it means one or more bundle scenarios exceed their configured byte thresholds in `.size-limit.js`. This skill walks through building, measuring, and bumping only the limits that need it. ## Workflow ### Step 1: Build all packages (including CDN bundles) A full build is required because size-limit measures the actual compiled artifacts. ```bash pnpm run build ``` This takes a few minutes. CDN bundles in `packages/browser/build/bundles/` must be up to date — a dev build is not sufficient. ### Step 2: Run the size check in JSON mode ```bash pnpm run test:size-limit ``` The JSON output is an array of objects. Each object has: - `name` — the scenario label - `passed` — whether it's within the limit - `size` — actual size in bytes - `sizeLimit` — configured limit in bytes ### Step 3: Identify failed scenarios Filter for entries where `"passed": false`. These are the only ones that need bumping. ### Step 4: Calculate new limits For each failed scenario, round the actual size **up to the next full KB** (1 KB = 1000 bytes in this context, matching how size-limit interprets the limits in `.size-limit.js`). **Example:** If actual size is `129,127` bytes, the new limit is `130 KB` (i.e. 130,000 bytes). The heuristic is intentionally conservative — it gives just enough headroom without inflating limits unnecessarily. ### Step 5: Update `.size-limit.js` Open `.size-limit.js` at the repository root and update the `limit` field for each failed scenario. Limits are strings like `'130 KB'`. Only change limits for scenarios that actually failed. Do not touch passing scenarios. ### Step 6: Verify the fix Re-run size-limit to confirm everything passes: ```bash pnpm run test:size-limit ``` If any scenario still fails (e.g., due to rounding edge cases), bump that specific limit by another 1 KB and re-run.
GitHub에서 보기