Releases: serviejs/popsicle
Releases · serviejs/popsicle
Make Error Cause
Fixed
- Bumping
make-error-cause
typings definition
Native Typings
Changed
- Remove typings dependencies with native typings
Parse Middleware
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
andjson
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`
Changed
- Use
getAll
for existing cookies in request (in case the user has already set multiple cookie fields)
Transports
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, whileget
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 useprocess.browser
orrequire('is-browser')
easily enough) (c7af7e4) - Removed
process.nextTick
for starting the request, rely onnextTick
behaviour of promises instead (saves 400kB) (8a0fba6)
Fixed
- Getting cookies are handled across different domains (via redirects) better (898f3b6)
Added
Ignore Cookie Errors
Changed
- Ignore cookie errors (E.g. when the cookie is setting an invalid domain)
Inline Sources
Changed
- Remember to publish source map sources with package
Remove dead dependencies
Changed
- Remove no longer used dependencies
- Upgrade dependency with type definition support (since
[email protected]
)
Expose `request.middleware`
Changed
- Expose
request.middleware
as a public property
New Middleware Pattern
Changed
- Change middleware pattern, using
throwback
(#49)