Skip to content

Conversation

@seangwright
Copy link
Owner

@seangwright seangwright commented Jan 25, 2023

This PR changes how the fetchResponse helper works by returning the Response object instead of mapping it to Unit. This lets consumers use all the Response state to make additional logic decisions.

It also makes all the error handlers callbacks for async operations optionally async.

Finally, some missing tests were added for ResultAsync.try, and the fetchResponse/fetchJsonResponse helpers. There are still more test cases that need to be added for async error handlers, but there are no regressions with existing functionality, so the additional tests can wait for a later PR.

Because of the change to fetchResponse, this will result in a major version bump to 2.0.0.

@seangwright seangwright self-assigned this Jan 25, 2023
xShivan
xShivan previously approved these changes Jan 26, 2023
@xShivan
Copy link

xShivan commented Jan 26, 2023

Node.js version in README.md should be updated too.

@seangwright
Copy link
Owner Author

Good catch! I'll also want to update the stats of the file sizes since they were modified.

Copy link
Collaborator

@KyleMcMaster KyleMcMaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@seangwright seangwright merged commit 27c3997 into main Jan 27, 2023
@seangwright seangwright deleted the feat/api-utilities-and-tests branch January 27, 2023 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants