All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Support for Perspectives (#83).
- Support for streaming uploads via
Sanity.upload_asset/3
. This feature came for free with the switch toReq
.
- (BREAKING) The
:drafts
option has been removed and passing it will result in an error. The:perspective
option should be used instead. The default behavior is the same so you will only need to update your code if you are explicitly passing the:drafts
option. - Dropped support for Elixir 1.12.
- (BREAKING) Switch HTTP client from
finch
toreq
(#81). This introduces the following breaking changes:- The
headers
field of theSanity.Response
now returns a map instead of a list of tuples. See https://hexdocs.pm/req/changelog.html#change-headers-to-be-maps for details. - The
:http_options
option forSanity.request/2
is now passed toReq.request/1
instead of to Finch. The available options will be different. - The
:max_attempts
and:retry_delay
options have been removed fromSanity.request/2
. Passing these options will now result in an error.Req
handles retries for us. - The
source
field in theSanity.Error
may contain different values. SeeSanity.Error
for details.
- The
Sanity.list_references/1
(#72)
- Fix Elixir 1.15 deprecation warnings (#71).
- Relax
nimble_options
version requirement
- Handle HTML error response (like 414 Request-URI Too Large) (#69)
- Configure nimble_options to ensure that
:variables
option forSanity.stream/1
is a map with string or atom keys. Requires nimble_options ~> 0.5. - Bump version to 1.0.0 to indicate strict adherence to semantic versioning from this point on.
- Update warning log message.
Sanity.stream/1
, failed request retry via the:max_attempts
and:retry_delay
options, and%Response{status: _}
field (#63).
- Use
2021-10-21
as the default API version.
- BREAKING - Remove
Sanity.atomize_and_underscore/1
(#57)
- Fix bug in
Sanity.replace_references/2
when reference object doesn't have_type
field
Sanity.replace_references/2
(#54)
- Increase default HTTP receive timeout to 30 seconds
- Fix doctest format
- Add
Sanity.atomize_and_underscore/1
(#48)
- Add
Sanity.result!/1
function (#47)
- Run dialyzer on CI and update supported Elixir versions (#46)
- Relax version requirement for
nimble_options
dependency (#37)
- Drop
get_document
andget_documents
functions (#22) - Update matrix of supported Elixir/Erlang versions (#21)
- Support asset uploads (#20)
- Support API versions (#18)
- Initial Release