- Add a
"react-native"
override section topackage.json
.
- BREAKING: Drop support for Node.js < 18.
- Use
[email protected]
. - Remove
ky-universal
dependency. Node.js 18+ no longer requiresfetch
polyfills.
- Use a local HTTP server for most testing.
- Use httpstat.us for valid cert HTTPS testing.
- Add local server self-signed certificate HTTPS test.
- Test on Node.js 20.x.
- Fix Node.js 19+ compatibility bug.
- Update dependencies.
- Defer importing
ky-universal
until needed.- Prevents dangling
Promise
with an import in it. - Avoids dynamic
import
when not needed. - Helps address issues when using Jest.
- PR #35
- Issue #34
- jsonld.js Issue #519
- Prevents dangling
- Update dependencies.
[email protected]
/[email protected]
: Fixes security issues and also changes the behavior of an empty response body when using.json()
. An empty string will now be returned instead of throwing.- NOTE: This is a minor release but it is possible the changed empty response body behavior could cause compatibility issues. Please check your code.
- Update development dependencies.
- Add compatibility code to convert agent options to an undici dispatcher for
use with node 18. This code enables node 18 to be used with the legacy
agent
andhttpsAgent
options.
- Remove unused dependencies.
- Always set response
data
field and default toundefined
. Addresses issue when a non-JSON response is receieved, a caller accesses thedata
field, and a lower level library prints out a one-time warning to use other fields. - Update dependencies.
- Lint module.
- Fix direct calls to
httpClient()
. If the call options use a method that is supported as a base function helper, e.g.,httpClient.get
, then it will be treated as if that helper was called just like the previous version of this library.
-
BREAKING: Convert to module (ESM) internally and use conditional exports to export a directory that has an entry point for CommonJS.
-
Use
[email protected]
and[email protected]
. -
BREAKING: Only specific methods and properties are proxied from
ky
onhttpClient
instances now. This includes the same set of functions that were proxied in previous versions:get
,post
,put
,push
,patch
,head
,delete
With the same caveat that these functions return a promise that resolves to the response (just like in previous versions, but different from
ky
which returns the response synchronously). This version also proxiescreate
andextend
, whereextend
now properly inherits options from the parentky
instance. Thestop
property is also proxied, but returns a promise that resolves to theky.stop
signal. This change was made because the latest version ofky
is ESM-only -- and to continue supporting a CJS build, it meant importing the library dynamically. Therefore, theky
instance must settle before it can be used -- requiring allhttpClient
methods and accessors to be asynchronous.
- BREAKING: Drop support for node 10 and 12.
- Remove unused
httpsAgent
param.
- BREAKING: Include full URL in
Possible CORS error.
type errors. - BREAKING: For
TimeoutError
, change the error message to include the request's url. Was:Request timed out
, now:Request to "example.com" timed out.
- BREAKING: Remove default exports.
- Add a
.requestUrl
property to all errors, for easier logging/diagnostics. - Add
PUT
to allowed proxied methods.
- Fix
.extend()
to return a proxy (with default headers, etc).
- Ensure that body parsing will occur for JSON content types
when individual method functions (e.g.,
get
,post
) are not used (e.g.,httpClient(url, {method: 'get'}
). Body parsing can be disabled by passing theparseBody
option set tofalse
.
- Updated
ky
,ky-universal
, andmocha
dependencies.
-
Add core files.
-
See git history for changes previous to this release.