getsentry / getsentry/sentry-javascript
`project` option type should be `string | string[]` across all framework SDKs
- Linguagem predominante
- TypeScript
- Estrelas
- 8.7k
- Forks
- 1.8k
- Merge médio
- 1d 18h
- PRs com merge (30d)
- 541
Descrição
`@sentry/bundler-plugin-core` accepts `string | string[]` for the `project` option, but our SDK types narrow it to `string`, causing a TypeScript error when users pass an array.
[https://github.com/getsentry/sentry-javascript/pull/21067]() fixes this for Next.js. The same mismatch exists in:
**Top-level options:**
* `packages/core/src/build-time-plugins/buildTimeOptionsBase.ts:40` (root cause — inherited by nuxt, sveltekit, astro)
* `packages/solidstart/src/vite/types.ts:111` (standalone definition)
**Deprecated** `sourceMapsUploadOptions.project`**:**
* `packages/astro/src/integration/types.ts:66`
* `packages/nuxt/src/common/types.ts:118`
* `packages/sveltekit/src/vite/types.ts:42`
These deprecated options are still live code paths — each SDK falls back to them via `topLevel.project ?? sourceMapsUploadOptions.project ?? env`, so users who haven't migrated hit the same TS error.
All locations forward `project` verbatim to the bundler plugin, so the fix is type-only: widen to `string | string[]` in each location.
Guia de contribuição
Direção de pesquisa
Revise a correção do Next.js no pull request 21067 e, em seguida, inspecione as definições de tipo listadas em packages/core/src/build-time-plugins/buildTimeOptionsBase.ts, packages/solidstart/src/vite/types.ts e os arquivos de integração do Astro, Nuxt e SvelteKit. Atualize o tipo de opções de cada projeto de forma consistente e verifique se todos os locais de SDK listados aceitam os mesmos valores que o plugin do bundler.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- typescript
- Domínio
- frontend
- Tipo de issue
- Bug
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Status de atividade
- Pouca atividade
- Clareza
- Claramente especificada
- Facilidade para iniciantes
- 76/100