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
It seems that a PR to http-client could be made that did something to the internals ... like making _createHttpClient take a function that returned a (possibly memoized) kyPromise rather than taking a promise directly. That would allow the original import of ky-universal to also be moved within that function for the default case where the parent is the original / base ky instance:
Unfortunately, it seems this would mean that the kyPromise exported by the library would also need to become such a function, which would be a breaking change. Maybe we can figure out a way around that -- but even if we can't, a major version could be released that avoids the problem you identified.
Any further discussion that relates to http-client specifically should be taken over here: digitalbazaar/http-client#34
The text was updated successfully, but these errors were encountered:
I'm not sure we intended for kyPromise to be a used export (though we didn't underscore-prefix it) ... maybe we exposed it for internal / testing usage only?
Perhaps we'd just make it so that the exported kyPromise would never resolve until some call was made to import ky-universal... which is already true, but we currently always make that call. So what would be changing would be when / what triggers the resolution of that Promise. We may be able to get away with that as a non-breaking change.
See: digitalbazaar/jsonld.js#516 (comment)
The text was updated successfully, but these errors were encountered: