url: use ada::url_aggregator for parsing urls

PR-URL: https://github.com/nodejs/node/pull/47339
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
Yagiz Nizipli 2023-03-31 09:03:06 -04:00 committed by Rich Trott
parent 26a967f6d0
commit 3867641c14
9 changed files with 481 additions and 266 deletions

View file

@ -58,9 +58,7 @@ const {
urlToHttpOptions,
} = require('internal/url');
const {
formatUrl,
} = internalBinding('url');
const bindingUrl = internalBinding('url');
const { getOptionValue } = require('internal/options');
@ -635,7 +633,7 @@ function urlFormat(urlObject, options) {
}
}
return formatUrl(urlObject.href, fragment, unicode, search, auth);
return bindingUrl.format(urlObject.href, fragment, unicode, search, auth);
}
return Url.prototype.format.call(urlObject);