Skip to content

v2.0.0

Compare
Choose a tag to compare
@courcelan courcelan released this 05 Feb 19:05
· 39 commits to master since this release

Now supporting Node 18.17.1+ with native fetch support.

We have removed the Axios dependencies and support for Node prior to version 18.17.1.

This release is a breaking change from ButterCMS-js version v1.2.16. If you need to continue to use Node prior to version 18, please use our v1.2.16 release.

New configuration options include the use of lifecycle hooks in our requests for onError, onRequest, and onResponse. Additionally you are able to cancel a fetch request via .cancelRequest for all resource types: butter.<resource>.cancelRequest().cancelRequest is also available in each onRequest hook.

Error reporting has been refined for use with rejecting the request and is returned via a Promise.reject. You can now tap into the returned error lifecycle using onError before the Promise is fully rejected. onError will run before an onResponse and will ensure that no onResponse is run.

Please see our updated ReadMe for updated functionality, installation, and structure.

Thank you!