-
Notifications
You must be signed in to change notification settings - Fork 26
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
Upgrade Undici to v6.7.0 #85
Conversation
💚 CLA has been signed |
@@ -165,6 +164,7 @@ export default class Connection extends BaseConnection { | |||
if (timeoutId != null) clearTimeout(timeoutId) | |||
switch (err.code) { | |||
case 'UND_ERR_ABORTED': | |||
case DOMException.ABORT_ERR: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain why you added DOM support? This library is not intended to be run in a browser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because Undici's request
seems to possibly throw a DOMException also in the node environment, which causes the unit test to fail if the DOMException is not caught here.
I see in Undici's own test that they test it against DOMException as well: https://github.com/nodejs/undici/blob/main/test/node-test/abort-controller.js (Line 126).
Node.js supports DOMException in the globals since v17. That's why I added it here.
Any update on this? |
Finally got a chance to pull this down and test it against the client. All unit and integration tests pass smoothly! Just need @cosieLq to sign that CLA and I can merge this for the next minor release. |
@cosieLq Additionally, if you merge main into this branch, those Node 16 tests will be removed. |
Closes #82
This PR tries to upgrade Undici to v6.7.0. I haven't run integration tests, and I'm curious if everything is still working well.
This is my first commit to this repo, and comments are very welcome!☺️