deps: update ada to 3.2.4

PR-URL: https://github.com/nodejs/node/pull/58152
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
Node.js GitHub Bot 2025-05-18 04:11:20 -04:00 committed by GitHub
parent a8217a9eb8
commit fdfd0fd7b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 34 additions and 40 deletions

32
deps/ada/ada.cpp vendored
View File

@ -1,4 +1,4 @@
/* auto-generated on 2025-04-24 20:04:09 -0400. Do not edit! */
/* auto-generated on 2025-04-28 12:16:36 -0400. Do not edit! */
/* begin file src/ada.cpp */
#include "ada.h"
/* begin file src/checkers.cpp */
@ -56,8 +56,8 @@ ada_really_inline constexpr bool is_ipv4(std::string_view view) noexcept {
}
// We have 0x followed by some characters, we need to check that they are
// hexadecimals.
return std::all_of(view.begin() + 2, view.end(),
ada::unicode::is_lowercase_hex);
view.remove_prefix(2);
return std::ranges::all_of(view, ada::unicode::is_lowercase_hex);
}
// for use with path_signature, we include all characters that need percent
@ -10421,6 +10421,8 @@ ADA_POP_DISABLE_WARNINGS
#include <emmintrin.h>
#endif
#include <ranges>
namespace ada::unicode {
constexpr bool is_tabs_or_newline(char c) noexcept {
@ -10461,8 +10463,7 @@ ada_really_inline bool has_tabs_or_newline(
std::string_view user_input) noexcept {
// first check for short strings in which case we do it naively.
if (user_input.size() < 16) { // slow path
return std::any_of(user_input.begin(), user_input.end(),
is_tabs_or_newline);
return std::ranges::any_of(user_input, is_tabs_or_newline);
}
// fast path for long strings (expected to be common)
size_t i = 0;
@ -10500,8 +10501,7 @@ ada_really_inline bool has_tabs_or_newline(
std::string_view user_input) noexcept {
// first check for short strings in which case we do it naively.
if (user_input.size() < 16) { // slow path
return std::any_of(user_input.begin(), user_input.end(),
is_tabs_or_newline);
return std::ranges::any_of(user_input, is_tabs_or_newline);
}
// fast path for long strings (expected to be common)
size_t i = 0;
@ -10832,8 +10832,7 @@ bool percent_encode(const std::string_view input, const uint8_t character_set[],
std::string& out) {
ada_log("percent_encode ", input, " to output string while ",
append ? "appending" : "overwriting");
auto pointer =
std::find_if(input.begin(), input.end(), [character_set](const char c) {
auto pointer = std::ranges::find_if(input, [character_set](const char c) {
return character_sets::bit_at(character_set, c);
});
ada_log("percent_encode done checking, moved to ",
@ -11850,6 +11849,7 @@ ada_warn_unused std::string to_string(ada::state state) {
#include <numeric>
#include <algorithm>
#include <ranges>
#include <string>
#include <string_view>
@ -11857,8 +11857,7 @@ namespace ada {
bool url::parse_opaque_host(std::string_view input) {
ada_log("parse_opaque_host ", input, " [", input.size(), " bytes]");
if (std::ranges::any_of(input.begin(), input.end(),
ada::unicode::is_forbidden_host_code_point)) {
if (std::ranges::any_of(input, ada::unicode::is_forbidden_host_code_point)) {
return is_valid = false;
}
@ -12725,6 +12724,7 @@ bool url::set_href(const std::string_view input) {
/* begin file src/parser.cpp */
#include <limits>
#include <ranges>
namespace ada::parser {
@ -13344,7 +13344,7 @@ result_type parse_url_impl(std::string_view user_input,
// to optimize it.
if (view.ends_with(' ')) {
std::string modified_view =
std::string(view.begin(), view.end() - 1) + "%20";
std::string(view.substr(0, view.size() - 1)) + "%20";
url.update_base_pathname(unicode::percent_encode(
modified_view, character_sets::C0_CONTROL_PERCENT_ENCODE));
} else {
@ -13694,6 +13694,7 @@ namespace ada {
/* end file src/url_components.cpp */
/* begin file src/url_aggregator.cpp */
#include <ranges>
#include <string>
#include <string_view>
@ -13913,7 +13914,7 @@ bool url_aggregator::set_protocol(const std::string_view input) {
if (pointer != view.end() && *pointer == ':') {
return parse_scheme_with_colon<true>(
std::string_view(view.data(), pointer - view.begin() + 1));
view.substr(0, pointer - view.begin() + 1));
}
return false;
}
@ -14175,7 +14176,7 @@ ada_really_inline bool url_aggregator::parse_host(std::string_view input) {
ada_log("parse_host to_ascii succeeded ", *host, " [", host->size(),
" bytes]");
if (std::any_of(host.value().begin(), host.value().end(),
if (std::ranges::any_of(host.value(),
ada::unicode::is_forbidden_domain_code_point)) {
return is_valid = false;
}
@ -14868,8 +14869,7 @@ bool url_aggregator::parse_opaque_host(std::string_view input) {
ada_log("parse_opaque_host ", input, " [", input.size(), " bytes]");
ADA_ASSERT_TRUE(validate());
ADA_ASSERT_TRUE(!helpers::overlaps(input, buffer));
if (std::any_of(input.begin(), input.end(),
ada::unicode::is_forbidden_host_code_point)) {
if (std::ranges::any_of(input, ada::unicode::is_forbidden_host_code_point)) {
return is_valid = false;
}

36
deps/ada/ada.h vendored
View File

@ -1,4 +1,4 @@
/* auto-generated on 2025-04-24 20:04:09 -0400. Do not edit! */
/* auto-generated on 2025-04-28 12:16:36 -0400. Do not edit! */
/* begin file include/ada.h */
/**
* @file ada.h
@ -4115,7 +4115,6 @@ void swap(expected<T, E> &lhs,
#endif
/* end file include/ada/expected.h */
#if ADA_INCLUDE_URL_PATTERN
/* begin file include/ada/url_pattern_regex.h */
/**
* @file url_search_params.h
@ -4131,6 +4130,7 @@ void swap(expected<T, E> &lhs,
#include <regex>
#endif // ADA_USE_UNSAFE_STD_REGEX_PROVIDER
#if ADA_INCLUDE_URL_PATTERN
namespace ada::url_pattern_regex {
template <typename T>
@ -4175,7 +4175,7 @@ class std_regex_provider final {
#endif // ADA_USE_UNSAFE_STD_REGEX_PROVIDER
} // namespace ada::url_pattern_regex
#endif // ADA_INCLUDE_URL_PATTERN
#endif // ADA_URL_PATTERN_REGEX_H
/* end file include/ada/url_pattern_regex.h */
/* begin file include/ada/url_pattern_init.h */
@ -4209,6 +4209,7 @@ enum class errors : uint8_t { type_error };
#include <iostream>
#endif // ADA_TESTING
#if ADA_INCLUDE_URL_PATTERN
namespace ada {
// Important: C++20 allows us to use concept rather than `using` or `typedef
@ -4312,10 +4313,9 @@ struct url_pattern_init {
std::optional<std::string> base_url{};
};
} // namespace ada
#endif // ADA_INCLUDE_URL_PATTERN
#endif // ADA_URL_PATTERN_INIT_H
/* end file include/ada/url_pattern_init.h */
#endif // ADA_INCLUDE_URL_PATTERN
/**
* @private
@ -4378,7 +4378,6 @@ tl::expected<url_pattern<regex_provider>, errors> parse_url_pattern_impl(
#ifndef ADA_PARSER_INL_H
#define ADA_PARSER_INL_H
#if ADA_INCLUDE_URL_PATTERN
/* begin file include/ada/url_pattern.h */
/**
* @file url_pattern.h
@ -5014,9 +5013,6 @@ inline std::ostream &operator<<(std::ostream &out, const ada::url &u);
#endif // ADA_URL_H
/* end file include/ada/url.h */
#if ADA_INCLUDE_URL_PATTERN
#endif // ADA_INCLUDE_URL_PATTERN
namespace ada {
template <class result_type = ada::url_aggregator>
@ -5088,6 +5084,7 @@ std::string href_from_file(std::string_view path);
#include <iostream>
#endif // ADA_TESTING
#if ADA_INCLUDE_URL_PATTERN
namespace ada {
enum class url_pattern_part_type : uint8_t {
@ -5420,9 +5417,8 @@ class url_pattern {
*/
bool ignore_case_ = false;
};
} // namespace ada
#endif // ADA_INCLUDE_URL_PATTERN
#endif
/* end file include/ada/url_pattern.h */
/* begin file include/ada/url_pattern_helpers.h */
@ -5438,6 +5434,7 @@ class url_pattern {
#include <tuple>
#include <vector>
#if ADA_INCLUDE_URL_PATTERN
namespace ada {
enum class errors : uint8_t;
}
@ -5769,10 +5766,9 @@ std::string generate_segment_wildcard_regexp(
url_pattern_compile_component_options options);
} // namespace ada::url_pattern_helpers
#endif // ADA_INCLUDE_URL_PATTERN
#endif
/* end file include/ada/url_pattern_helpers.h */
#endif // ADA_INCLUDE_URL_PATTERN
#include <string>
#include <string_view>
@ -8915,7 +8911,6 @@ url_search_params_entries_iter::next() {
#endif // ADA_URL_SEARCH_PARAMS_INL_H
/* end file include/ada/url_search_params-inl.h */
#if ADA_INCLUDE_URL_PATTERN
/* begin file include/ada/url_pattern-inl.h */
/**
* @file url_pattern-inl.h
@ -8929,6 +8924,7 @@ url_search_params_entries_iter::next() {
#include <string_view>
#include <utility>
#if ADA_INCLUDE_URL_PATTERN
namespace ada {
inline bool url_pattern_init::operator==(const url_pattern_init& other) const {
@ -9397,7 +9393,7 @@ result<std::optional<url_pattern_result>> url_pattern<regex_provider>::match(
}
} // namespace ada
#endif // ADA_INCLUDE_URL_PATTERN
#endif
/* end file include/ada/url_pattern-inl.h */
/* begin file include/ada/url_pattern_helpers-inl.h */
@ -9412,6 +9408,7 @@ result<std::optional<url_pattern_result>> url_pattern<regex_provider>::match(
#include <string_view>
#if ADA_INCLUDE_URL_PATTERN
namespace ada::url_pattern_helpers {
#ifdef ADA_TESTING
inline std::string to_string(token_type type) {
@ -10488,10 +10485,9 @@ constructor_string_parser<regex_provider>::parse(std::string_view input) {
}
} // namespace ada::url_pattern_helpers
#endif // ADA_INCLUDE_URL_PATTERN
#endif
/* end file include/ada/url_pattern_helpers-inl.h */
#endif // ADA_INCLUDE_URL_PATTERN
// Public API
/* begin file include/ada/ada_version.h */
@ -10502,14 +10498,14 @@ constructor_string_parser<regex_provider>::parse(std::string_view input) {
#ifndef ADA_ADA_VERSION_H
#define ADA_ADA_VERSION_H
#define ADA_VERSION "3.2.3"
#define ADA_VERSION "3.2.4"
namespace ada {
enum {
ADA_VERSION_MAJOR = 3,
ADA_VERSION_MINOR = 2,
ADA_VERSION_REVISION = 3,
ADA_VERSION_REVISION = 4,
};
} // namespace ada
@ -10523,8 +10519,6 @@ enum {
#ifndef ADA_IMPLEMENTATION_INL_H
#define ADA_IMPLEMENTATION_INL_H
#if ADA_INCLUDE_URL_PATTERN
#endif // ADA_INCLUDE_URL_PATTERN
#include <variant>