You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove trae.defaults() method (Not passing any arguments), In my opinion, this is kind of confusing. We can create something like getConfig, or maybe expose a config attribute.
Remove trae.baseUrl([url]) method. We can achieve the same functionality using defaults or defining it when we create a new instance.
Make trae.finally([middleware]) async. After all promises finally are async.
Use statusCode instead of status on response objects
Remove all-contributors implementation. We don't have time to update this and contributors are already shown by github
Remove the request method. I'm not entarely convinced yet, but I don't like it much
Make methods static instead of creating them as class properties.
Only keep public methods as part of the Trae class. Internal methods could be functions instead.
Agree with most of the "Personal proposals". Only question about two items:
Make trae.finally([middleware]) async: I wonder how much finally is used. Instead of making it async I would make it so accepts one function and that's the only thing it runs. If then someone wants to add multiple functions to it they can compose or composeP those functions. And now that I mention this maybe it also makes sense for the other middleware. Wdyt?
Add a timeout functionality: what do you propose? I wouldn't delay v2 for this one. Would rather have it as v2.x. I also wanted to add TypeScript support but better leave it for v2.x.
Required changes to V2:
Personal proposals:
trae.defaults()
method (Not passing any arguments), In my opinion, this is kind of confusing. We can create something likegetConfig
, or maybe expose aconfig
attribute.trae.baseUrl([url])
method. We can achieve the same functionality using defaults or defining it when we create a new instance.trae.finally([middleware])
async. After all promises finally are async.statusCode
instead ofstatus
on response objectsall-contributors
implementation. We don't have time to update this and contributors are already shown by githubrequest
method. I'm not entarely convinced yet, but I don't like it muchBranch: v2
The text was updated successfully, but these errors were encountered: