Guard invalid route return values with ctx.json guidance#156
Open
isiliconx wants to merge 2 commits into
Open
Conversation
Author
|
Quick status check on this one: the invalid route return guard is still open/mergeable, the Bun test workflow is green, and the Algora claim is still pending. Happy to adjust the approach if you want this handled differently before merge. |
Author
|
Follow-up status: this PR is still open/mergeable, and the current head's Happy to make any final adjustments needed for merge. |
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
.statusor uses theinoperatorctx.json({...})guidance for raw objects and invalid primitive/function/null/undefined returnsTesting
npm test -- tests/errors/do-not-allow-raw-json.test.tsnpm run typechecknpx prettier --check src/create-with-winter-spec.ts src/middleware/with-response-object-check.ts src/middleware/route-return-value-error.ts tests/errors/do-not-allow-raw-json.test.tsgit diff --checkNote: on Windows,
npm run build/pretestcan prompt ifdistalready exists because the repo usesdel dist; I removed only this repo'sdistdirectory before rerunning checks./claim #30
AI-assisted; I reviewed the patch and verification results.