bump-size-limit

por sentry

Aumenta los límites de tamaño en .size-limit.js cuando la verificación de CI de size-limit falla. Úsalo cuando el usuario mencione fallos en los límites de tamaño, comprobaciones de tamaño de paquete fallidas, tamaño de CI…

npx skills add https://github.com/getsentry/sentry-javascript --skill bump-size-limit

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.

yarn 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

yarn 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:

yarn 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.

Más skills de sentry

generate-frontend-forms
sentry
Guía para crear formularios usando el nuevo sistema de formularios de Sentry. Úsalo al implementar formularios, campos de formulario, validación o funcionalidad de guardado automático.
official
architecture-review
sentry
Revisión de salud del código a nivel de equipo. Encuentra módulos monolíticos, fallos silenciosos, brechas de seguridad de tipos, vacíos en la cobertura de pruebas y problemas de compatibilidad con LLM.
official
linear-type-labeler
sentry
Clasifica los issues de Linear y aplica una etiqueta de Tipo de la taxonomía de etiquetas del espacio de trabajo de Sentry basándose en el contenido del título y la descripción de cada issue.
official
sentry-flutter-sdk
sentry
Configuración completa del SDK de Sentry para Flutter y Dart. Úsalo cuando te pidan "agregar Sentry a Flutter", "instalar sentry_flutter", "configurar Sentry en Dart" o configurar errores…
official
sentry-svelte-sdk
sentry
Configuración completa del SDK de Sentry para Svelte y SvelteKit. Úsalo cuando te pidan "añadir Sentry a Svelte", "añadir Sentry a SvelteKit", "instalar @sentry/sveltekit" o configurar…
official
vercel-react-best-practices
sentry
Directrices de optimización de rendimiento para React y Next.js de Vercel Engineering. Esta habilidad debe usarse al escribir, revisar o refactorizar React/Next.js…
official
sentry-tanstack-start-sdk
sentry
Configuración completa del SDK de Sentry para TanStack Start React. Úsalo cuando te pidan "agregar Sentry a TanStack Start", "instalar @sentry/tanstackstart-react" o configurar errores…
official
generate-migration
sentry
Genera migraciones de base de datos de Django para Sentry. Úsalo al crear migraciones, agregar/eliminar columnas o tablas, agregar índices o resolver migraciones…
official