Skip to content

Commit 6f3a8b4

Browse files
nodejs-github-botdanielleadams
authored andcommitted
deps: update ada to 2.5.0
PR-URL: #48223 Backport-PR-URL: #48345 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>
1 parent 075b6db commit 6f3a8b4

File tree

2 files changed

+21
-16
lines changed

2 files changed

+21
-16
lines changed

deps/ada/ada.cpp

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto-generated on 2023-05-19 00:02:33 -0400. Do not edit! */
1+
/* auto-generated on 2023-05-25 16:09:25 -0400. Do not edit! */
22
/* begin file src/ada.cpp */
33
#include "ada.h"
44
/* begin file src/checkers.cpp */
@@ -9313,7 +9313,7 @@ bool is_label_valid(const std::u32string_view label) {
93139313
// - For Nontransitional Processing, each value must be either valid or
93149314
// deviation.
93159315

9316-
// If CheckJoiners, the label must satisify the ContextJ rules from Appendix
9316+
// If CheckJoiners, the label must satisfy the ContextJ rules from Appendix
93179317
// A, in The Unicode Code Points and Internationalized Domain Names for
93189318
// Applications (IDNA) [IDNA2008].
93199319
constexpr static uint32_t virama[] = {
@@ -10604,7 +10604,7 @@ ada_really_inline void remove_ascii_tab_or_newline(
1060410604
ada_really_inline std::string_view substring(std::string_view input,
1060510605
size_t pos) noexcept {
1060610606
ADA_ASSERT_TRUE(pos <= input.size());
10607-
// The following is safer but uneeded if we have the above line:
10607+
// The following is safer but unneeded if we have the above line:
1060810608
// return pos > input.size() ? std::string_view() : input.substr(pos);
1060910609
return input.substr(pos);
1061010610
}
@@ -11751,7 +11751,10 @@ namespace ada {
1175111751
if (non_special_scheme == "blob") {
1175211752
if (!path.empty()) {
1175311753
auto result = ada::parse<ada::url>(path);
11754-
if (result && result->is_special()) {
11754+
if (result &&
11755+
(result->type == scheme::HTTP || result->type == scheme::HTTPS)) {
11756+
// If pathURL’s scheme is not "http" and not "https", then return a
11757+
// new opaque origin.
1175511758
return ada::helpers::concat(result->get_protocol(), "//",
1175611759
result->get_host());
1175711760
}
@@ -13720,7 +13723,9 @@ bool url_aggregator::set_hostname(const std::string_view input) {
1372013723
std::string_view path = get_pathname();
1372113724
if (!path.empty()) {
1372213725
auto out = ada::parse<ada::url_aggregator>(path);
13723-
if (out && out->is_special()) {
13726+
if (out && (out->type == scheme::HTTP || out->type == scheme::HTTPS)) {
13727+
// If pathURL’s scheme is not "http" and not "https", then return a
13728+
// new opaque origin.
1372413729
return helpers::concat(out->get_protocol(), "//", out->get_host());
1372513730
}
1372613731
}

deps/ada/ada.h

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto-generated on 2023-05-19 00:02:33 -0400. Do not edit! */
1+
/* auto-generated on 2023-05-25 16:09:25 -0400. Do not edit! */
22
/* begin file include/ada.h */
33
/**
44
* @file ada.h
@@ -425,7 +425,7 @@ namespace ada {
425425
#define ADA_DEVELOPMENT_CHECKS 1
426426
#endif // __OPTIMIZE__
427427
#endif // _MSC_VER
428-
#endif // SIMDJSON_DEVELOPMENT_CHECKS
428+
#endif // ADA_DEVELOPMENT_CHECKS
429429

430430
#define ADA_STR(x) #x
431431

@@ -949,7 +949,7 @@ ada_really_inline bool bit_at(const uint8_t a[], const uint8_t i) {
949949
namespace ada::checkers {
950950

951951
inline bool has_hex_prefix_unsafe(std::string_view input) {
952-
// This is actualy efficient code, see has_hex_prefix for the assembly.
952+
// This is actually efficient code, see has_hex_prefix for the assembly.
953953
uint32_t value_one = 1;
954954
bool is_little_endian = (reinterpret_cast<char*>(&value_one)[0] == 1);
955955
uint16_t word0x{};
@@ -2895,7 +2895,7 @@ struct default_constructor_tag {
28952895
};
28962896

28972897
// expected_default_ctor_base will ensure that expected has a deleted default
2898-
// consturctor if T is not default constructible.
2898+
// constructor if T is not default constructible.
28992899
// This specialization is for when T is default constructible
29002900
template <class T, class E,
29012901
bool Enable =
@@ -4359,7 +4359,7 @@ contains_forbidden_domain_code_point_or_upper(const char* input,
43594359
size_t length) noexcept;
43604360

43614361
/**
4362-
* Checks if the input is a forbidden doamin code point.
4362+
* Checks if the input is a forbidden domain code point.
43634363
* @see https://url.spec.whatwg.org/#forbidden-domain-code-point
43644364
*/
43654365
ada_really_inline constexpr bool is_forbidden_domain_code_point(
@@ -4586,7 +4586,7 @@ struct url_aggregator : url_base {
45864586
*/
45874587
[[nodiscard]] std::string_view get_pathname() const noexcept;
45884588
/**
4589-
* Compute the pathname length in bytes witout instantiating a view or a
4589+
* Compute the pathname length in bytes without instantiating a view or a
45904590
* string.
45914591
* @return size of the pathname in bytes
45924592
* @see https://url.spec.whatwg.org/#dom-url-pathname
@@ -5031,7 +5031,7 @@ struct url : url_base {
50315031
[[nodiscard]] const std::string_view get_pathname() const noexcept;
50325032

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

6488-
#define ADA_VERSION "2.4.2"
6488+
#define ADA_VERSION "2.5.0"
64896489

64906490
namespace ada {
64916491

64926492
enum {
64936493
ADA_VERSION_MAJOR = 2,
6494-
ADA_VERSION_MINOR = 4,
6495-
ADA_VERSION_REVISION = 2,
6494+
ADA_VERSION_MINOR = 5,
6495+
ADA_VERSION_REVISION = 0,
64966496
};
64976497

64986498
} // namespace ada

0 commit comments

Comments
 (0)