Releases: deno-libs/superfetch
Releases · deno-libs/superfetch
2.0.1
- Allow passing a regex to a
expectBody
handler
Full Changelog: 2.0.0...2.0.1
2.0.0
- Move to JSR
- Properly detect content-type header value
- Don't load expect dependency as it is not used
- Setup E2E tests
Full Changelog: 1.0.7...2.0.0
1.0.7
bump std and deps
1.0.6
bump deps and fix types
1.0.5: Merge pull request #2 from aarontravass/aaron/makefetch
Used random port for initialization
1.0.4
handle empty response
1.0.3
test
1.0.2
support array in `expectHeader` and less `any`-s
1.0.1
fallback to arraybuffer if content is neither text nor json
V1: new API & Deno handlers and listeners support
1.0.0
Breaking changes
Deno handlers and listeners
Old version only worked with a std/node/http
server, the V1 one supports Deno handlers and listeners but doesn't support node servers anymore.
New API
New fetch
API is slightly different.
Before it was like this:
await fetch('/hello').expect(200).expect('content-type', 'application/json').expect({ greeting: 'Hello!' })
Now it is like this:
const res = await fetch('/hello')
res.expect(200).expect('content-type', 'application/json').expect({ greeting: 'Hello!' })
Fewer deps and smaller size
Since the new API is much more minimal, the amount of dependencies was cut from 192 (on v0.1.6) to 14 (on v1.0.0). The code size decreased from 1.75MB to 109.74KB