Skip to content

Get to 1.0! #198

@philschatz

Description

@philschatz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions