Skip to content

Commit 8be7999

Browse files
committed
deps: update ada to 2.6.8
PR-URL: nodejs/node#49340 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent 193be51 commit 8be7999

File tree

3 files changed

+19
-17
lines changed

3 files changed

+19
-17
lines changed

graal-nodejs/deps/ada/ada.cpp

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto-generated on 2023-09-05 16:55:45 -0400. Do not edit! */
1+
/* auto-generated on 2023-09-19 16:48:25 -0400. Do not edit! */
22
/* begin file src/ada.cpp */
33
#include "ada.h"
44
/* begin file src/checkers.cpp */
@@ -11868,7 +11868,7 @@ bool url::set_host_or_hostname(const std::string_view input) {
1186811868
}
1186911869

1187011870
// Let host be the result of host parsing host_view with url is not special.
11871-
if (host_view.empty()) {
11871+
if (host_view.empty() && !is_special()) {
1187211872
host = "";
1187311873
return true;
1187411874
}
@@ -13629,13 +13629,12 @@ bool url_aggregator::set_host_or_hostname(const std::string_view input) {
1362913629
// empty string, and either url includes credentials or url's port is
1363013630
// non-null, return.
1363113631
else if (host_view.empty() &&
13632-
(is_special() || has_credentials() ||
13633-
components.port != url_components::omitted)) {
13632+
(is_special() || has_credentials() || has_port())) {
1363413633
return false;
1363513634
}
1363613635

1363713636
// Let host be the result of host parsing host_view with url is not special.
13638-
if (host_view.empty()) {
13637+
if (host_view.empty() && !is_special()) {
1363913638
if (has_hostname()) {
1364013639
clear_hostname(); // easy!
1364113640
} else if (has_dash_dot()) {

graal-nodejs/deps/ada/ada.h

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto-generated on 2023-09-05 16:55:45 -0400. Do not edit! */
1+
/* auto-generated on 2023-09-19 16:48:25 -0400. Do not edit! */
22
/* begin file include/ada.h */
33
/**
44
* @file ada.h
@@ -1055,9 +1055,10 @@ inline constexpr bool is_normalized_windows_drive_letter(
10551055
return input.size() >= 2 && (is_alpha(input[0]) && (input[1] == ':'));
10561056
}
10571057

1058-
ada_really_inline constexpr bool begins_with(std::string_view view,
1059-
std::string_view prefix) {
1058+
ada_really_inline bool begins_with(std::string_view view,
1059+
std::string_view prefix) {
10601060
// in C++20, you have view.begins_with(prefix)
1061+
// std::equal is constexpr in C++20
10611062
return view.size() >= prefix.size() &&
10621063
std::equal(prefix.begin(), prefix.end(), view.begin());
10631064
}
@@ -5020,10 +5021,10 @@ inline constexpr bool is_normalized_windows_drive_letter(
50205021
std::string_view input) noexcept;
50215022

50225023
/**
5023-
* @warning Will be removed when Ada supports C++20.
5024+
* @warning Will be removed when Ada requires C++20.
50245025
*/
5025-
ada_really_inline constexpr bool begins_with(std::string_view view,
5026-
std::string_view prefix);
5026+
ada_really_inline bool begins_with(std::string_view view,
5027+
std::string_view prefix);
50275028

50285029
/**
50295030
* Returns true if an input is an ipv4 address.
@@ -6561,7 +6562,9 @@ inline bool url_aggregator::has_hostname() const noexcept {
65616562

65626563
inline bool url_aggregator::has_port() const noexcept {
65636564
ada_log("url_aggregator::has_port");
6564-
return components.pathname_start != components.host_end;
6565+
// A URL cannot have a username/password/port if its host is null or the empty
6566+
// string, or its scheme is "file".
6567+
return has_hostname() && components.pathname_start != components.host_end;
65656568
}
65666569

65676570
inline bool url_aggregator::has_dash_dot() const noexcept {
@@ -6930,14 +6933,14 @@ inline void url_search_params::sort() {
69306933
#ifndef ADA_ADA_VERSION_H
69316934
#define ADA_ADA_VERSION_H
69326935

6933-
#define ADA_VERSION "2.6.7"
6936+
#define ADA_VERSION "2.6.8"
69346937

69356938
namespace ada {
69366939

69376940
enum {
69386941
ADA_VERSION_MAJOR = 2,
69396942
ADA_VERSION_MINOR = 6,
6940-
ADA_VERSION_REVISION = 7,
6943+
ADA_VERSION_REVISION = 8,
69416944
};
69426945

69436946
} // namespace ada

graal-nodejs/doc/contributing/maintaining/maintaining-dependencies.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ All dependencies are located within the `deps` directory.
99
This a list of all the dependencies:
1010

1111
* [acorn][]
12-
* [ada 2.6.7][]
12+
* [ada 2.6.8][]
1313
* [base64][]
1414
* [brotli][]
1515
* [c-ares][]
@@ -148,7 +148,7 @@ The [acorn](https://github.com/acornjs/acorn) dependency is a JavaScript parser.
148148
[acorn-walk](https://github.com/acornjs/acorn/tree/master/acorn-walk) is
149149
an abstract syntax tree walker for the ESTree format.
150150

151-
### ada 2.6.7
151+
### ada 2.6.8
152152

153153
The [ada](https://github.com/ada-url/ada) dependency is a
154154
fast and spec-compliant URL parser written in C++.
@@ -312,7 +312,7 @@ it comes from the Chromium team's zlib fork which incorporated
312312
performance improvements not currently available in standard zlib.
313313

314314
[acorn]: #acorn
315-
[ada 2.6.7]: #ada-267
315+
[ada 2.6.8]: #ada-268
316316
[base64]: #base64
317317
[brotli]: #brotli
318318
[c-ares]: #c-ares

0 commit comments

Comments
 (0)