url.parse() is deemed insecure and has been deprecated.#662
url.parse() is deemed insecure and has been deprecated.#662oelderinkX wants to merge 3 commits intomicrosoft:masterfrom
Conversation
url.parse() calls have been replaced with new URL
|
@microsoft-github-policy-service agree |
|
/azp run |
|
Commenter does not have sufficient privileges for PR 662 in repo microsoft/azure-devops-node-api |
I'm wondering if the pipeline isn't running because my branch name possibly ? |
|
/azp run |
let me know if I need to fix anything on my side |
|
/azp run |
|
do I need to convert my pull request to Draft for it to be review ? |
|
@tarunramsinghani would you have time to review ? I have made the changes you suggested |
|
@tarunramsinghani @adeolemon @peterblazejewicz @nguerrera is anyone available for a review and pull request approval ? I'm new at pull requests for other peoples repos, so apologies in advance |
|
/azp run |
|
@oelderinkX I am bit pressed for time, so could not spend time to review... I wanted to make sure this does not have any implications specially with the behaviour change i.e. url.parse returned null in case of invalid url but URL() throws exception so validating those will need some additional test cases or handling in the code. |
Thanks @tarunramsinghani for your comment. url.parse does not return null for invalid urls, but URL.parse does. if you: and you'll be hitting an error somewhere else in the code. If you wanted to switch to URL.parse (you might need to update your typescript + settings) you'd need to do something like:
and you'd still be hitting an error somewhere else. I'm happy with the Fast-Fail approach here, but are you?. If someone tries setting an invalid Url it will throw a TypeError with a message like: I don't believe a unit test is needed for this change at the moment |
url.parse()calls have been replaced withnew URL.See documentation on deprecation at: