Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get to 1.0! #198

Open
3 of 6 tasks
philschatz opened this issue Jul 27, 2017 · 0 comments
Open
3 of 6 tasks

Get to 1.0! #198

philschatz opened this issue Jul 27, 2017 · 0 comments

Comments

@philschatz
Copy link
Owner

philschatz commented Jul 27, 2017

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

  • Add TypeScript definition file #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
  • Simplify the codebase a bit #197 Simplify the main codebase so it can focus on delivering data in a type-safe way
    • 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
    • snake_case 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
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

No branches or pull requests

1 participant