getsentry / getsentry/sentry-javascript

`project` option type should be `string | string[]` across all framework SDKs

Đang mở
#21,069 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
8.7k
Fork
1.8k
Merge trung bình
1 ngày 17 giờ
Pull request đã merge (30 ngày)
515

Mô tả

`@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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.