fix: repair red CI (Express 5 validation, pagination, build config, frontend types)#1048
Closed
ogazboiz wants to merge 1 commit into
Closed
fix: repair red CI (Express 5 validation, pagination, build config, frontend types)#1048ogazboiz wants to merge 1 commit into
ogazboiz wants to merge 1 commit into
Conversation
… config, frontend types Backend - validation: req.query/req.params are getter-only in Express 5, so reassigning them threw and every validateQuery/validateParams route returned 500. Shadow them with Object.defineProperty so coerced/validated values persist. - pagination: parsePositiveInteger now accepts Zod-coerced numbers, so ?limit=N is honored instead of silently falling back to the default. - build script points at tsconfig.build.json so it emits dist/ and excludes tests (previously used the noEmit, test-including config and failed). - tests: fix shadowed mockQuery in remittanceService, key digest mock by user, complete db/connection ESM mocks, and align LoanRequested event shape with the contract emission (Symbol, loan_id, borrower) plus its supported-types mock. Frontend - CreditScoreGauge: remove duplicated component body left by a bad merge (variable redeclarations and a rules-of-hooks violation). - charts: use recharts 3 TooltipContentProps with a function content prop.
Contributor
Author
|
closing — main is now green (RemitLend CI success on e3adff0) so the CI repair this PR represented either landed through other PRs or is no longer applicable. starting fresh is cleaner than rebasing a multi-file diff with conflicts. |
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.
Summary
CI on
mainwas red. This restores it to green so contributors can build on a passing baseline. The fixes include real runtime bugs, not just test tweaks.Backend
req.queryandreq.paramsare getter-only in Express 5, soreq[source] = schema.parse(...)threw, and every route usingvalidateQuery/validateParamsreturned 500. They are now shadowed withObject.definePropertyso coerced and validated values persist for handlers.parsePositiveIntegeronly accepted strings, but the Zod query schema coerceslimitto a number, so?limit=Nsilently fell back to the default. It now accepts coerced numbers too.buildpointed at thenoEmit: true, test-including tsconfig, so it failed and emitted nodist/. It now usestsconfig.build.json(emits production code, excludes tests).mockQueryinremittanceService, keyed the digest mock by user id (a user has one digest frequency), completed thedb/connectionESM mocks, and aligned theLoanRequestedtest event with the actual contract emission(Symbol, loan_id, borrower)plus its supported-types mock.Frontend
TooltipContentPropswith a functioncontentprop.Verification (local)
https://t.me/+DOylgFv1jyJlNzM0