From 4c740b1dd8d8a831e2a325ac7a5757df73e85410 Mon Sep 17 00:00:00 2001 From: "Node.js GitHub Bot" Date: Tue, 19 Sep 2023 23:52:22 +0000 Subject: [PATCH] deps: update ada to 2.6.8 PR-URL: https://github.com/nodejs/node/pull/49340 Reviewed-By: Yagiz Nizipli Reviewed-By: Luigi Pinca Reviewed-By: Trivikram Kamat --- deps/ada/ada.cpp | 9 ++++---- deps/ada/ada.h | 21 +++++++++++-------- .../maintaining/maintaining-dependencies.md | 6 +++--- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/deps/ada/ada.cpp b/deps/ada/ada.cpp index 5eb0a3f2ad0b27..1a028b200bc960 100644 --- a/deps/ada/ada.cpp +++ b/deps/ada/ada.cpp @@ -1,4 +1,4 @@ -/* auto-generated on 2023-09-05 16:55:45 -0400. Do not edit! */ +/* auto-generated on 2023-09-19 16:48:25 -0400. Do not edit! */ /* begin file src/ada.cpp */ #include "ada.h" /* begin file src/checkers.cpp */ @@ -11864,7 +11864,7 @@ bool url::set_host_or_hostname(const std::string_view input) { } // Let host be the result of host parsing host_view with url is not special. - if (host_view.empty()) { + if (host_view.empty() && !is_special()) { host = ""; return true; } @@ -13625,13 +13625,12 @@ bool url_aggregator::set_host_or_hostname(const std::string_view input) { // empty string, and either url includes credentials or url's port is // non-null, return. else if (host_view.empty() && - (is_special() || has_credentials() || - components.port != url_components::omitted)) { + (is_special() || has_credentials() || has_port())) { return false; } // Let host be the result of host parsing host_view with url is not special. - if (host_view.empty()) { + if (host_view.empty() && !is_special()) { if (has_hostname()) { clear_hostname(); // easy! } else if (has_dash_dot()) { diff --git a/deps/ada/ada.h b/deps/ada/ada.h index 1485e37356bcd5..b3ae3d0aa7635b 100644 --- a/deps/ada/ada.h +++ b/deps/ada/ada.h @@ -1,4 +1,4 @@ -/* auto-generated on 2023-09-05 16:55:45 -0400. Do not edit! */ +/* auto-generated on 2023-09-19 16:48:25 -0400. Do not edit! */ /* begin file include/ada.h */ /** * @file ada.h @@ -1055,9 +1055,10 @@ inline constexpr bool is_normalized_windows_drive_letter( return input.size() >= 2 && (is_alpha(input[0]) && (input[1] == ':')); } -ada_really_inline constexpr bool begins_with(std::string_view view, - std::string_view prefix) { +ada_really_inline bool begins_with(std::string_view view, + std::string_view prefix) { // in C++20, you have view.begins_with(prefix) + // std::equal is constexpr in C++20 return view.size() >= prefix.size() && std::equal(prefix.begin(), prefix.end(), view.begin()); } @@ -5020,10 +5021,10 @@ inline constexpr bool is_normalized_windows_drive_letter( std::string_view input) noexcept; /** - * @warning Will be removed when Ada supports C++20. + * @warning Will be removed when Ada requires C++20. */ -ada_really_inline constexpr bool begins_with(std::string_view view, - std::string_view prefix); +ada_really_inline bool begins_with(std::string_view view, + std::string_view prefix); /** * Returns true if an input is an ipv4 address. @@ -6557,7 +6558,9 @@ inline bool url_aggregator::has_hostname() const noexcept { inline bool url_aggregator::has_port() const noexcept { ada_log("url_aggregator::has_port"); - return components.pathname_start != components.host_end; + // A URL cannot have a username/password/port if its host is null or the empty + // string, or its scheme is "file". + return has_hostname() && components.pathname_start != components.host_end; } inline bool url_aggregator::has_dash_dot() const noexcept { @@ -6926,14 +6929,14 @@ inline void url_search_params::sort() { #ifndef ADA_ADA_VERSION_H #define ADA_ADA_VERSION_H -#define ADA_VERSION "2.6.7" +#define ADA_VERSION "2.6.8" namespace ada { enum { ADA_VERSION_MAJOR = 2, ADA_VERSION_MINOR = 6, - ADA_VERSION_REVISION = 7, + ADA_VERSION_REVISION = 8, }; } // namespace ada diff --git a/doc/contributing/maintaining/maintaining-dependencies.md b/doc/contributing/maintaining/maintaining-dependencies.md index 2f50cbea429c35..b6c9d732da3a29 100644 --- a/doc/contributing/maintaining/maintaining-dependencies.md +++ b/doc/contributing/maintaining/maintaining-dependencies.md @@ -9,7 +9,7 @@ All dependencies are located within the `deps` directory. This a list of all the dependencies: * [acorn 8.10.0][] -* [ada 2.6.7][] +* [ada 2.6.8][] * [base64 0.5.0][] * [brotli 1.0.9][] * [c-ares 1.19.0][] @@ -150,7 +150,7 @@ The [acorn](https://github.com/acornjs/acorn) dependency is a JavaScript parser. [acorn-walk](https://github.com/acornjs/acorn/tree/master/acorn-walk) is an abstract syntax tree walker for the ESTree format. -### ada 2.6.7 +### ada 2.6.8 The [ada](https://github.com/ada-url/ada) dependency is a fast and spec-compliant URL parser written in C++. @@ -319,7 +319,7 @@ it comes from the Chromium team's zlib fork which incorporated performance improvements not currently available in standard zlib. [acorn 8.10.0]: #acorn-8100 -[ada 2.6.7]: #ada-267 +[ada 2.6.8]: #ada-268 [base64 0.5.0]: #base64-050 [brotli 1.0.9]: #brotli-109 [c-ares 1.19.0]: #c-ares-1190