Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

hono: Double `init()` behaves differently per runtime

Aperta
#24,049 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
76/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
bun, deno, nodejs, typescript

Direzione di ricerca

Inizia da hono/src/node/sdk.ts:15 e confrontalo con hono/src/bun/sdk.ts:17 e hono/src/deno/sdk.ts:17, quindi individua la quarta voce del runtime. Controlla il comportamento di inizializzazione e degli avvisi in tutte e quattro le voci. Il lavoro è completato quando ogni runtime emette un avviso al secondo init, mantenendo e restituendo il client esistente invece di sostituirlo.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Bug Bun javascript
node : same client after 2nd init? true  | release now: 1.0.0
bun  : same client after 2nd init? false | release now: 2.0.0
       (plus a console warning)

hono/src/node/sdk.ts:15 returns the existing client and skips re-initialization. hono/src/bun/sdk.ts:17 and hono/src/deno/sdk.ts:17 warn and then re-initialize anyway, replacing the client. Anything buffered on the first client is dropped, and its integrations stay installed against a dead client.

The Hono docs tell users to init through the sentry() middleware, so a user who also calls Sentry.init() hits exactly this path.

Work item. Make all four entries behave the same way. Returning the existing client (the Node behavior) is the safer default. Keep the loud warning from bun/deno on all of them.

**Prior art **#21176 asked for the Bun middleware to follow the Node pattern. getsentry/sentry-javascript#21195 closed it by adding the warning only. The behavior divergence this item describes is what is left over: bun and deno warn and then re-initialize anyway.

Lingua principale
TypeScript
Stelle
8.7k
Fork
1.9k
Merge medio
1g 16h
PR unite (30g)
576

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di getsentry/sentry-javascript

Tutte le issue di getsentry/sentry-javascript

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.