fix(build): develop não compila — Express 5 quebra rotas EvoHub e tsup.config.ts com erro de sintaxe#2635
Merged
Merged
Conversation
…pendências - tsup.config.ts: fecha esbuildOptions antes do bloco define (erro de sintaxe derrubava o parse do config e abortava o tsup) - evohub.controlplane.router.ts: normaliza req.params.id com String() — no Express 5 req.params é tipado string | string[] e o tsc falhava (TS2345) - package-lock.json: sincroniza version com o package.json (2.4.0) Refs EVO-2097
Contributor
There was a problem hiding this comment.
Sorry @pastoriniMatheus, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
The Check Code Quality job has been red since dd552c7 and never reached its "Check build" step: Prisma 7's prisma.config.ts resolves datasource.url via env("DATABASE_CONNECTION_URI"), which throws PrismaConfigEnvError when the variable is absent, and the runner has no .env (the Dockerfile copies .env.example, which is why image builds got past this point). prisma generate never opens a connection, so a syntactically valid URI is enough. Without this the build gate stays dead and the next dependency bump breaks develop unnoticed, exactly as this one did. Also aligns the EvoHub req.params.id cast with the convention used by the other 30 call sites in src (as string), instead of String().
gomessguii
approved these changes
Jul 13, 2026
gomessguii
added a commit
that referenced
this pull request
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problema
O
developnão compila desde odd552c77(upgrade agressivo de dependências — Express 5, Prisma 7, TS 6, ESLint 10).npm run build(tsc --noEmit && tsup) falha em dois pontos independentes, bloqueando qualquer release/deploy a partir do branch:1. Express 5 mudou a tipagem de
req.params— agora éstring | string[](path-to-regexp v8 suporta params repetidos). As duas rotas do control-plane EvoHub passavamreq.params.iddireto para métodos que exigemstring:2.
tsup.config.tscom erro de sintaxe — a funçãoesbuildOptions(options) { ... }não era fechada antes do blocodefine:(faltava},). O esbuild abortava o parse do próprio config:Correção
evohub.controlplane.router.ts:String(req.params.id)nas rotasGET /evohub/channels/:idePOST /evohub/channels/:id/meta-connect. Em runtime o param é sempre um único segmento — oString()só satisfaz a tipagem nova, sem mudança de comportamento.tsup.config.ts: fechaesbuildOptionsantes dodefine(que é opção top-level do tsup, não do esbuild) — intenção original do código preservada.package-lock.json: sincronizaversioncom opackage.json(2.4.0) — lockfile ficou defasado no mesmo upgrade.Validação
npx tsc --noEmit→ exit 0 (antes: 2× TS2345)npm run build→ "Build success" do tsup (antes: parse error)npm run lint:check→ exit 0Sugestão de follow-up
Adicionar step de
npm run buildno CI de PR — o develop ficou quebrado sem detecção justamente por não haver esse gate.Refs EVO-2097