fix: omit 'path' in undici.request opts (ts)#559
Conversation
In undici.request|stream|pipeline helper functions, the opts param may not contain path. see https://github.com/nodejs/undici#undicirequesturl-opts-promise
|
Unfortunately the types are quite out of date from the v3 API. I'm okay with this change though to bring it closer - I'm fairly confident not a lot of folks are using undici in TS projects just yet |
mcollina
left a comment
There was a problem hiding this comment.
Could you fix the types tests?
Codecov Report
@@ Coverage Diff @@
## master #559 +/- ##
=======================================
Coverage 99.57% 99.57%
=======================================
Files 16 16
Lines 1398 1398
=======================================
Hits 1392 1392
Misses 6 6 Continue to review full report at Codecov.
|
|
@mcollina type tests updated |
mcollina
left a comment
There was a problem hiding this comment.
lgtm
@Ethan-Arrowood could you take a look?
|
Hello! I've just run in to this issue in our TS project :) I can see this code has been merged but not deployed yet, do you have a planned release date at all for this fix? Thank you! |
In
undici.request|stream|pipelinehelper functions, the opts param may not contain path.see https://github.com/nodejs/undici#undicirequesturl-opts-promise
Without this fix you get the following Typescript error:
But if you pass the path parameter you get a runtime error: https://github.com/nodejs/undici/blob/master/lib/agent.js#L86-L88