Skip to content

Releases: serviejs/popsicle

Make Error Cause

20 Jul 23:46
Compare
Choose a tag to compare

Fixed

  • Bumping make-error-cause typings definition

Native Typings

20 Jul 23:33
Compare
Choose a tag to compare

Changed

  • Remove typings dependencies with native typings

Parse Middleware

12 Jul 02:43
Compare
Choose a tag to compare

Sometimes, you release something and it's not until you take a nap that you realise there's a better pattern to use. This was one of those times. Refactored text parsing methods (JSON and URL-encoded responses) back into a middleware method.

Changed

  • Removed urlencoded and json types from transport, moved to a middleware plugin (popsicle.plugins.parse('json')) - this is pretty nifty because now you can use Popsicle like 6.x again by doing .use(popsicle.plugins.parse(['json', 'urlencoded'], false))

Cookie `getAll`

11 Jul 01:48
Compare
Choose a tag to compare

Changed

  • Use getAll for existing cookies in request (in case the user has already set multiple cookie fields)

Transports

11 Jul 01:38
Compare
Choose a tag to compare

Changed

  • Aborts are no longer be emitted as errors into the response stream (08e68a8)
  • Persist the original cookie header and append new cookies headers during redirect (avoids wiping the header) (898f3b6)
  • Add getAll method for retrieving all headers by a key, while get will always return the first header (c180f08#diff-49b580f166912fd1e84bdacd4857fedaR179)
  • Allow the response class of a transport response to be changed (c180f08)
  • Moved response parsing and transport options into the transport layer - create a transport using createTransport({ type: string }) (bcc9e29)
  • Tweak progress tracker to persist lengths (previous they were reset to known lengths when the response finished) (124d0bd)
  • Removed the popsicle.browser export (you can use process.browser or require('is-browser') easily enough) (c7af7e4)
  • Removed process.nextTick for starting the request, rely on nextTick behaviour of promises instead (saves 400kB) (8a0fba6)

Fixed

  • Getting cookies are handled across different domains (via redirects) better (898f3b6)

Added

  • Handle "JSON protection prefix" when parsing JSON responses (4cd1e2a)
  • Implement a max buffer size for node response bodies (5e2f4e2)

Ignore Cookie Errors

07 Jul 21:40
Compare
Choose a tag to compare

Changed

  • Ignore cookie errors (E.g. when the cookie is setting an invalid domain)

Inline Sources

20 Jun 18:32
Compare
Choose a tag to compare

Changed

  • Remember to publish source map sources with package

Remove dead dependencies

11 May 22:24
Compare
Choose a tag to compare

Changed

  • Remove no longer used dependencies
  • Upgrade dependency with type definition support (since [email protected])

Expose `request.middleware`

08 May 18:49
Compare
Choose a tag to compare

Changed

  • Expose request.middleware as a public property

New Middleware Pattern

08 May 00:16
Compare
Choose a tag to compare

Changed

  • Change middleware pattern, using throwback (#49)