refactor!: simplify functor implementation #27
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There's a bit going on in this PR.
One of the motivations behind these changes is that in order to create an implementation for BuckleScript, as there's no equivalent of
dune
's(modules_without_implementation)
, that had to be removed.Simplifies the Fetchify-functor a bit (very much inspired by @aantron's efforts from Luv).
Adds some documentation (ODOC): https://github.com/lessp/fetch/pull/27/files#diff-e7aa0a2cc3a43c46e03abce08219a5d7R69
Fixes an oversight where headers were not included in the request: 746fe7f#diff-979fa451f04b87e867ffba4b8812290dR68
Included in this change, is also a breaking change which I'm wondering if it might be a good idea to break out into a separate issue. It's the fact thatCreate a separate issue for this.Body.toString
returnsPromise.t(string)
instead of astring
which was previously used for a simpler API, but might not be the best way forward: https://github.com/lessp/fetch/pull/27/files#diff-e7aa0a2cc3a43c46e03abce08219a5d7R7Moves quite a lot of files around, especially esy-manifests have been separated. An example is that tests for
fetch-core
are now run from thefetch-core
-manifest instead of a global esy-manifest.