Skip to content

Releases: deno-libs/superfetch

2.0.1

17 Jul 23:22
Compare
Choose a tag to compare
  • Allow passing a regex to a expectBody handler

Full Changelog: 2.0.0...2.0.1

2.0.0

17 Jul 23:01
Compare
Choose a tag to compare
  • 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

04 Jan 11:55
Compare
Choose a tag to compare
bump std and deps

1.0.6

03 Aug 18:50
Compare
Choose a tag to compare
bump deps and fix types

1.0.5: Merge pull request #2 from aarontravass/aaron/makefetch

10 Jun 22:46
a42dd5c
Compare
Choose a tag to compare

1.0.4

01 May 17:27
Compare
Choose a tag to compare
handle empty response

1.0.3

01 May 14:40
Compare
Choose a tag to compare
test

1.0.2

30 Apr 11:28
Compare
Choose a tag to compare
support array in `expectHeader` and less `any`-s

1.0.1

05 Apr 10:50
Compare
Choose a tag to compare
fallback to arraybuffer if content is neither text nor json

V1: new API & Deno handlers and listeners support

03 Apr 14:03
Compare
Choose a tag to compare

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