From 13930f092f40c847734b4b38546b3bd8160f69ec Mon Sep 17 00:00:00 2001 From: "Node.js GitHub Bot" Date: Tue, 30 May 2023 01:38:37 +0100 Subject: [PATCH] deps: update ada to 2.5.0 PR-URL: https://github.com/nodejs/node/pull/48223 Reviewed-By: Yagiz Nizipli Reviewed-By: Matthew Aitken Reviewed-By: Rich Trott Reviewed-By: Mestery Reviewed-By: James M Snell Reviewed-By: Luigi Pinca --- deps/ada/ada.cpp | 15 ++++++++++----- deps/ada/ada.h | 22 +++++++++++----------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/deps/ada/ada.cpp b/deps/ada/ada.cpp index 1759de2a1317d4..570a659d118de5 100644 --- a/deps/ada/ada.cpp +++ b/deps/ada/ada.cpp @@ -1,4 +1,4 @@ -/* auto-generated on 2023-05-19 00:02:33 -0400. Do not edit! */ +/* auto-generated on 2023-05-25 16:09:25 -0400. Do not edit! */ /* begin file src/ada.cpp */ #include "ada.h" /* begin file src/checkers.cpp */ @@ -9313,7 +9313,7 @@ bool is_label_valid(const std::u32string_view label) { // - For Nontransitional Processing, each value must be either valid or // deviation. - // If CheckJoiners, the label must satisify the ContextJ rules from Appendix + // If CheckJoiners, the label must satisfy the ContextJ rules from Appendix // A, in The Unicode Code Points and Internationalized Domain Names for // Applications (IDNA) [IDNA2008]. constexpr static uint32_t virama[] = { @@ -10604,7 +10604,7 @@ ada_really_inline void remove_ascii_tab_or_newline( ada_really_inline std::string_view substring(std::string_view input, size_t pos) noexcept { ADA_ASSERT_TRUE(pos <= input.size()); - // The following is safer but uneeded if we have the above line: + // The following is safer but unneeded if we have the above line: // return pos > input.size() ? std::string_view() : input.substr(pos); return input.substr(pos); } @@ -11751,7 +11751,10 @@ namespace ada { if (non_special_scheme == "blob") { if (!path.empty()) { auto result = ada::parse(path); - if (result && result->is_special()) { + if (result && + (result->type == scheme::HTTP || result->type == scheme::HTTPS)) { + // If pathURL’s scheme is not "http" and not "https", then return a + // new opaque origin. return ada::helpers::concat(result->get_protocol(), "//", result->get_host()); } @@ -13720,7 +13723,9 @@ bool url_aggregator::set_hostname(const std::string_view input) { std::string_view path = get_pathname(); if (!path.empty()) { auto out = ada::parse(path); - if (out && out->is_special()) { + if (out && (out->type == scheme::HTTP || out->type == scheme::HTTPS)) { + // If pathURL’s scheme is not "http" and not "https", then return a + // new opaque origin. return helpers::concat(out->get_protocol(), "//", out->get_host()); } } diff --git a/deps/ada/ada.h b/deps/ada/ada.h index cd9a69a1e09a05..e48e9e6ee2d265 100644 --- a/deps/ada/ada.h +++ b/deps/ada/ada.h @@ -1,4 +1,4 @@ -/* auto-generated on 2023-05-19 00:02:33 -0400. Do not edit! */ +/* auto-generated on 2023-05-25 16:09:25 -0400. Do not edit! */ /* begin file include/ada.h */ /** * @file ada.h @@ -425,7 +425,7 @@ namespace ada { #define ADA_DEVELOPMENT_CHECKS 1 #endif // __OPTIMIZE__ #endif // _MSC_VER -#endif // SIMDJSON_DEVELOPMENT_CHECKS +#endif // ADA_DEVELOPMENT_CHECKS #define ADA_STR(x) #x @@ -949,7 +949,7 @@ ada_really_inline bool bit_at(const uint8_t a[], const uint8_t i) { namespace ada::checkers { inline bool has_hex_prefix_unsafe(std::string_view input) { - // This is actualy efficient code, see has_hex_prefix for the assembly. + // This is actually efficient code, see has_hex_prefix for the assembly. uint32_t value_one = 1; bool is_little_endian = (reinterpret_cast(&value_one)[0] == 1); uint16_t word0x{}; @@ -2895,7 +2895,7 @@ struct default_constructor_tag { }; // expected_default_ctor_base will ensure that expected has a deleted default -// consturctor if T is not default constructible. +// constructor if T is not default constructible. // This specialization is for when T is default constructible template