@sentry/bundler-plugins pulls @sentry/cli into consumers that only import ./babel-plugin
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- nodejs, typescript
Línea de trabajo
Start with the @sentry/bundler-plugins ./babel-plugin entry point and its component-annotation.js, constants.js, and experimental.js dependencies. Inspect how @sentry/cli is declared and which bundler integrations invoke it. Done means importing only ./babel-plugin no longer installs a duplicate release-upload CLI, while integrations that use the CLI still work; verify with a clean package-manager install and relevant tests.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
@sentry/bundler-plugins declares @sentry/cli as a hard dependency. Consumers that only import the ./babel-plugin entry point pay for a full sentry-cli install, including its platform binary, even though that entry point never invokes the CLI.
Impact
@sentry/react-native 8.21.0 migrated from @sentry/babel-plugin-component-annotate to @sentry/bundler-plugins/babel-plugin (getsentry/sentry-react-native#6501), because the old package is no longer published. It has exactly one import of the package:
// @sentry/react-native/dist/js/tools/sentryBabelTransformerUtils.js
const babel_plugin_1 = require("@sentry/bundler-plugins/babel-plugin");
The ./babel-plugin CJS entry is 20 KB and requires only ./component-annotation.js, ./constants.js and ./experimental.js. It never reaches sentry-cli.
Because @sentry/react-native 8.24.0 pins "@sentry/cli": "3.6.2" while @sentry/bundler-plugins 10.71.0 declares "@sentry/cli": "^2.58.6", package managers install two majors side by side. Measured in a real React Native app on macOS arm64 (Yarn 1.22.22):
| Size | |
|---|---|
@sentry/cli-darwin@3.6.2 (hoisted) |
27 MB |
@sentry/cli-darwin@2.58.6 (nested under @sentry/bundler-plugins) |
35 MB |
node_modulesgrew ~36 MB on the 8.18.0 -> 8.24.0 upgradeyarn.lockgrew 98 net lines, roughly 72 of which are the duplicated@sentry/clientry plus its eight platform packages
Every clean CI install now downloads both binaries.
Expected
Importing a babel plugin should not install a release-upload CLI.
Suggested fix
Any one of:
- publish the component-annotate babel plugin as a standalone package again
- move
@sentry/clito an optional or peer dependency, so only the bundler integrations that actually shell out to it require it - split the package so
./babel-pluginresolves without the upload machinery
Workaround
A package manager override pinning @sentry/cli to the version the SDK already uses:
"resolutions": { "@sentry/cli": "3.6.2" }
This removes the duplicate and reduces the lockfile growth from +98 to +26 lines, with no observed breakage, since the babel-plugin path never reaches the CLI.
Versions
@sentry/bundler-plugins: 10.71.0@sentry/react-native: 8.24.0react-native: 0.83.10
- Lenguaje dominante
- TypeScript
- Estrellas
- 8.7k
- Forks
- 1.9k
- Merge medio
- 1 d 16 h
- PR fusionados (30 d)
- 576
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de getsentry/sentry-javascript
-
Browser Bug Next.js Traces Waiting for: Product Owner
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
getsentry/sentry-javascript#24672 · 1 comentario ·
-
Flaky Test React Router Framework Spans Tests
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
getsentry/sentry-javascript#24348 · 1 comentario ·
-
javascript
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
getsentry/sentry-javascript#24200 · 2 comentarios ·
-
javascript Task
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
getsentry/sentry-javascript#24134 · 1 comentario ·
-
Cloudflare Workers javascript Tests
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
getsentry/sentry-javascript#24051 · 1 comentario ·
Todos los issues de getsentry/sentry-javascript
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
mksglu/context-mode#1200 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
anthropics/claude-code#96687 ·
-
good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
AOSSIE-Org/DebateAI#582 · 2 comentarios ·