v4.1 — a usability layer on top of the pure fetch() core
v4.0 made the right correctness call: it replaced v3's response-mutating,
404-swallowing proxy.get(req, res) with a pure proxy.fetch(req) that
throws typed errors. But it threw out v3's ergonomics without a replacement,
and quietly narrowed header passthrough.
v4.1 keeps the honest core and rebuilds the missing usability as thin,
opt-in layers — each built on the one below, none polluting fetch():
fetch() pure primitive — get a key, throw typed errors (unchanged)
└─ pipe() / middleware() one-call ergonomics, honest status codes
└─ staticSite() index + error documents (S3 website parity)
Tracked work
Design principles
- The purity guarantee lives in
fetch(); every convenience consumes it and
never leaks response-writing or S3 error classification back into the core.
- Config for website behavior rides on a dedicated factory (
staticSite()),
not the constructor (Option 2) — so index/error-document logic stays in the
layer.
- All examples are exercised by the smoke gate against a real bucket.
Implementation for all three is ready on a branch; PRs to follow.
v4.1 — a usability layer on top of the pure
fetch()corev4.0 made the right correctness call: it replaced v3's response-mutating,
404-swallowing
proxy.get(req, res)with a pureproxy.fetch(req)thatthrows typed errors. But it threw out v3's ergonomics without a replacement,
and quietly narrowed header passthrough.
v4.1 keeps the honest core and rebuilds the missing usability as thin,
opt-in layers — each built on the one below, none polluting
fetch():Tracked work
x-amz-meta-*, SSE, version-id)pipe()/middleware()convenience adapterstaticSite()static website hosting layerDesign principles
fetch(); every convenience consumes it andnever leaks response-writing or S3 error classification back into the core.
staticSite()),not the constructor (Option 2) — so index/error-document logic stays in the
layer.
Implementation for all three is ready on a branch; PRs to follow.