fix: replace deprecated node:url methods#1802
Conversation
|
Hi there @alumni - it looks like |
|
I'll try to take a look. The multipart test times out for me even in the commit before the merge. |
|
I managed to replace the deprecated Regarding the linting problem - unless there's a known to be working npm lockfile, it will be quite difficult to figure out what's wrong - |
|
Hey, I am pretty sure this is a breaking change that snuck in. And unfortunately this means some tests which the In normal circumstances this is a good thing, but in this case it means we cannot use Secondly, I am not sure how we can use |
|
Ah, came to ask about this breaking change being shipped in a patch version and I see @wesleytodd already beat me. Since it's a patch of a major, fair enough I suppose. It would be nice to retroactively note this breaking change in the release notes, as well as in supertest@7.0.0 We have tests in express that break on the normalization being done by |
Checklist
This PR replaces the deprecated
node:urlmethodsparseandresolve, which, as per NodeJS documentation , they are prone to security vulnerabilities.They also have a non-standard behavior for which a workarounds are needed - e.g.: a workaround for escaping backticks was already implemented (and is being removed in this PR), but there is no similar workaround for single quotes.
To avoid the security vulnerabilities and the non-standard behavior, we can easily replace these methods with the standard-compliant URL Web API.