Skip to content

Commit

Permalink
deps: update ada to 2.5.0
Browse files Browse the repository at this point in the history
PR-URL: #48223
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
nodejs-github-bot authored and targos committed May 30, 2023
1 parent 11918d7 commit 13930f0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
15 changes: 10 additions & 5 deletions deps/ada/ada.cpp
Original file line number Diff line number Diff line change
@@ -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 */
Expand Down Expand Up @@ -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[] = {
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -11751,7 +11751,10 @@ namespace ada {
if (non_special_scheme == "blob") {
if (!path.empty()) {
auto result = ada::parse<ada::url>(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());
}
Expand Down Expand Up @@ -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<ada::url_aggregator>(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());
}
}
Expand Down
22 changes: 11 additions & 11 deletions deps/ada/ada.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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<char*>(&value_one)[0] == 1);
uint16_t word0x{};
Expand Down Expand Up @@ -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 <class T, class E,
bool Enable =
Expand Down Expand Up @@ -4359,7 +4359,7 @@ contains_forbidden_domain_code_point_or_upper(const char* input,
size_t length) noexcept;

/**
* Checks if the input is a forbidden doamin code point.
* Checks if the input is a forbidden domain code point.
* @see https://url.spec.whatwg.org/#forbidden-domain-code-point
*/
ada_really_inline constexpr bool is_forbidden_domain_code_point(
Expand Down Expand Up @@ -4586,7 +4586,7 @@ struct url_aggregator : url_base {
*/
[[nodiscard]] std::string_view get_pathname() const noexcept;
/**
* Compute the pathname length in bytes witout instantiating a view or a
* Compute the pathname length in bytes without instantiating a view or a
* string.
* @return size of the pathname in bytes
* @see https://url.spec.whatwg.org/#dom-url-pathname
Expand Down Expand Up @@ -5031,7 +5031,7 @@ struct url : url_base {
[[nodiscard]] const std::string_view get_pathname() const noexcept;

/**
* Compute the pathname length in bytes witout instantiating a view or a
* Compute the pathname length in bytes without instantiating a view or a
* string.
* @return size of the pathname in bytes
* @see https://url.spec.whatwg.org/#dom-url-pathname
Expand Down Expand Up @@ -6318,7 +6318,7 @@ inline void ada::url_aggregator::add_authority_slashes_if_needed() noexcept {
ADA_ASSERT_TRUE(validate());
// Protocol setter will insert `http:` to the URL. It is up to hostname setter
// to insert
// `//` initially to the buffer, since it depends on the hostname existance.
// `//` initially to the buffer, since it depends on the hostname existence.
if (has_authority()) {
return;
}
Expand Down Expand Up @@ -6485,14 +6485,14 @@ inline std::ostream &operator<<(std::ostream &out,
#ifndef ADA_ADA_VERSION_H
#define ADA_ADA_VERSION_H

#define ADA_VERSION "2.4.2"
#define ADA_VERSION "2.5.0"

namespace ada {

enum {
ADA_VERSION_MAJOR = 2,
ADA_VERSION_MINOR = 4,
ADA_VERSION_REVISION = 2,
ADA_VERSION_MINOR = 5,
ADA_VERSION_REVISION = 0,
};

} // namespace ada
Expand Down

0 comments on commit 13930f0

Please sign in to comment.