docs: restructure READMEs around the core contract - #65
Conversation
The root README now only lists packages and points to the core README, which owns the shared contract docs, including new sections on the standard-server header and how body parsing works. Adapter READMEs link to those sections instead of duplicating the resolution algorithm, which had drifted from the implementation (wrong url-search-params hint name, missing none/file/octet-stream fallback rules).
@standardserver/aws-lambda
@standardserver/core
@standardserver/fastify
@standardserver/fetch
@standardserver/node
@standardserver/peer
@standardserver/shared
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Root README — trimmed to an overview plus a package table whose rows link each adapter README; the deep request/body/parsing documentation was removed and consolidated into the core README.
packages/core/README.md— gained two new sections, Thestandard-serverheader and How body parsing works, documenting the shared contract once, with a workedresolveStandardBodyHint()example and a note that both apply only to the HTTP adapters.- Adapter READMEs (aws-lambda, fastify, fetch, node, peer, shared) — the repeated four-step resolution algorithm was replaced with a short summary and links back to the core sections; transport-specific notes are preserved.
- Fixes — the body hint name corrected from the invalid
url-encodedtourl-search-params, and the documented fallback rules updated to matchresolveStandardBodyHint()(empty body →none;content-dispositionfilename orcontent-length→file).
I verified the documentation against the implementation: url-search-params is the valid hint (packages/core/src/types.ts:12, utils.ts:58), the four inference steps mirror resolveStandardBodyHint() exactly (packages/core/src/utils.ts:74-112), the auto-stamping/clearing claims match the node and fetch adapters, and the #the-standard-server-header / #how-body-parsing-works anchors resolve correctly. The restructure is accurate and clean — mergeable as-is.
DeepSeek Flash (default — pick a model for stronger reviews) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Merged core sections — collapsed
## The \standard-server` headerand## How body parsing worksinto a single## How body parsing workswith### The `standard-server` headerand### Resolution order` subsections. The HTTP-adapter scope note now guards the whole merged section, which is clearer than the previous split. - Added intro paragraph — a short lead that names the three hint sources (explicit argument,
standard-serverheader, content-header inference) before the header and resolution details. - Polished the upload example — the inline comment now reads
// <- keep the payload a File on the server, matchingstandard-server: filein the example headers.
I confirmed the restructuring doesn't break the load-bearing links: the #the-standard-server-header (now H3) and #how-body-parsing-works (H2) anchors are derived purely from heading text — GitHub strips backticks and preserves hyphens, and level changes don't affect the slug — so every ../core/README.md#... reference from the root and adapter READMEs still resolves. No duplicate or dead anchors, and the content is accurate against resolveStandardBodyHint(). Mergeable as-is.
DeepSeek Flash (default — pick a model for stronger reviews) | 𝕏

The READMEs are restructured so the shared contract is documented once, in the core README, and everything else links to it. The root README is now just the overview and a package list; adapter READMEs keep only their transport-specific behavior.
Changes
Fixes
Badges and sponsor sections are preserved verbatim in every file; `pnpm eslint` passes on all changed files.