Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

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

Aberta
#24,049 1 comentário 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
76/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
bun, deno, nodejs, typescript

Direção de pesquisa

Comece com hono/src/node/sdk.ts:15 e compare-o com hono/src/bun/sdk.ts:17 e hono/src/deno/sdk.ts:17; em seguida, localize a quarta entrada de runtime. Verifique o comportamento de inicialização e de aviso nas quatro entradas. Está concluído quando cada runtime emitir um aviso em um segundo init, preservando e retornando o cliente existente em vez de substituí-lo.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
TypeScript
Estrelas
8.7k
Forks
1.9k
Merge médio
1d 16h
PRs com merge (30d)
576

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de getsentry/sentry-javascript

Todas as issues de getsentry/sentry-javascript

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.