Skip to content

7.0.0

Choose a tag to compare

@oschwald oschwald released this 29 Jun 19:00
Immutable release. Only release title and notes can be modified.
b016a48
  • Breaking Dropped support for Node.js 18 and 20. Node.js 22 or greater is now
  • Breaking Dropped commonjs support. The package is now only available as an ES module.
  • Breaking Errors from the WebServiceClient are now thrown as
    WebServiceError instances, which extend Error, rather than as plain
    objects. The code, error, status, and url properties are preserved,
    so existing field access continues to work, but the thrown value is now an
    Error. The original error is now preserved as the standard cause
    property (for example, the network error behind a FETCH_ERROR). The
    WebServiceError class and the WebServiceClientError type are now exported
    from the package.
  • The code property on WebServiceError and the WebServiceClientError
    interface is now typed as WebServiceErrorCode
    (ClientErrorCode | (string & {})) instead of string, providing
    autocompletion for the client-generated codes while still accepting any
    code returned by the web service. The ClientErrorCode and
    WebServiceErrorCode types are exported from the package.
  • The AddressNotFoundError, BadMethodCallError, InvalidDbBufferError,
    and ValueError classes now accept an optional cause and forward it to
    Error. Reader.openBuffer() now preserves the underlying parsing error as
    the cause of the InvalidDbBufferError it throws.
  • Added a fetcher option to the WebServiceClient options, allowing a
    custom fetch implementation to be supplied (for example, to route requests
    through a custom dispatcher or proxy, or for testing). It defaults to the
    global fetch. The WebServiceClientOptions type is exported from the
    package.