Thanks to great feedback from folks working on the GitHub Desktop app it seems this library has gotten a bit bloated over the years.
It will still take a bit of time to get all of these features in but any feedback or ideas would be appreciated!
TODO
[x] #176 Generate TypeScript (and eventually FlowType) description files
The source of these will likely be a set of JSON configuration files which describe the arguments and HTTP Responses
[x] #197 Simplify the main codebase so it can focus on delivering data in a type-safe way
[x] Remove the automatic inclusion of plugins like camelCasing, hypermedia, and cache handling. These significantly increase the runtime overhead and cause the typescript definition files to be wrong
[ ] Add a utils subpackage that contains helpers like fetchAll(octo) and fetchUntil(octo, conditionFn)
[ ] Add a middleware way to add in plugins like the cacheHandler and authorization
[ ] Change the response to return the data, response object, and maybe parsed headers
Likely Breaking Changes
The JSON in the Promise returned by a call to .fetch() and others others will be:
much faster because there is no conversion
_snakecase just like the GitHub API
a dictionary of the form {data: ${JSON}, response: ${window.Response}}
not contain functions that were created by parsing the HyperMedia URL templates
Thanks to great feedback from folks working on the GitHub Desktop app it seems this library has gotten a bit bloated over the years.
It will still take a bit of time to get all of these features in but any feedback or ideas would be appreciated!
TODO
utils
subpackage that contains helpers likefetchAll(octo)
andfetchUntil(octo, conditionFn)
Likely Breaking Changes
Promise
returned by a call to.fetch()
and others others will be:{data: ${JSON}, response: ${window.Response}}