Skip to content

Commit

Permalink
deps: update ada to 2.6.8
Browse files Browse the repository at this point in the history
PR-URL: #49340
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
nodejs-github-bot authored and targos committed Oct 26, 2023
1 parent 8e7dcba commit 597ea77
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
9 changes: 4 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-09-05 16:55:45 -0400. Do not edit! */
/* auto-generated on 2023-09-19 16:48:25 -0400. Do not edit! */
/* begin file src/ada.cpp */
#include "ada.h"
/* begin file src/checkers.cpp */
Expand Down Expand Up @@ -11864,7 +11864,7 @@ bool url::set_host_or_hostname(const std::string_view input) {
}

// Let host be the result of host parsing host_view with url is not special.
if (host_view.empty()) {
if (host_view.empty() && !is_special()) {
host = "";
return true;
}
Expand Down Expand Up @@ -13625,13 +13625,12 @@ bool url_aggregator::set_host_or_hostname(const std::string_view input) {
// empty string, and either url includes credentials or url's port is
// non-null, return.
else if (host_view.empty() &&
(is_special() || has_credentials() ||
components.port != url_components::omitted)) {
(is_special() || has_credentials() || has_port())) {
return false;
}

// Let host be the result of host parsing host_view with url is not special.
if (host_view.empty()) {
if (host_view.empty() && !is_special()) {
if (has_hostname()) {
clear_hostname(); // easy!
} else if (has_dash_dot()) {
Expand Down
21 changes: 12 additions & 9 deletions deps/ada/ada.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* auto-generated on 2023-09-05 16:55:45 -0400. Do not edit! */
/* auto-generated on 2023-09-19 16:48:25 -0400. Do not edit! */
/* begin file include/ada.h */
/**
* @file ada.h
Expand Down Expand Up @@ -1055,9 +1055,10 @@ inline constexpr bool is_normalized_windows_drive_letter(
return input.size() >= 2 && (is_alpha(input[0]) && (input[1] == ':'));
}

ada_really_inline constexpr bool begins_with(std::string_view view,
std::string_view prefix) {
ada_really_inline bool begins_with(std::string_view view,
std::string_view prefix) {
// in C++20, you have view.begins_with(prefix)
// std::equal is constexpr in C++20
return view.size() >= prefix.size() &&
std::equal(prefix.begin(), prefix.end(), view.begin());
}
Expand Down Expand Up @@ -5020,10 +5021,10 @@ inline constexpr bool is_normalized_windows_drive_letter(
std::string_view input) noexcept;

/**
* @warning Will be removed when Ada supports C++20.
* @warning Will be removed when Ada requires C++20.
*/
ada_really_inline constexpr bool begins_with(std::string_view view,
std::string_view prefix);
ada_really_inline bool begins_with(std::string_view view,
std::string_view prefix);

/**
* Returns true if an input is an ipv4 address.
Expand Down Expand Up @@ -6557,7 +6558,9 @@ inline bool url_aggregator::has_hostname() const noexcept {

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

inline bool url_aggregator::has_dash_dot() const noexcept {
Expand Down Expand Up @@ -6926,14 +6929,14 @@ inline void url_search_params::sort() {
#ifndef ADA_ADA_VERSION_H
#define ADA_ADA_VERSION_H

#define ADA_VERSION "2.6.7"
#define ADA_VERSION "2.6.8"

namespace ada {

enum {
ADA_VERSION_MAJOR = 2,
ADA_VERSION_MINOR = 6,
ADA_VERSION_REVISION = 7,
ADA_VERSION_REVISION = 8,
};

} // namespace ada
Expand Down
6 changes: 3 additions & 3 deletions doc/contributing/maintaining/maintaining-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ All dependencies are located within the `deps` directory.
This a list of all the dependencies:

* [acorn][]
* [ada 2.6.7][]
* [ada 2.6.8][]
* [base64][]
* [brotli][]
* [c-ares][]
Expand Down Expand Up @@ -148,7 +148,7 @@ The [acorn](https://github.com/acornjs/acorn) dependency is a JavaScript parser.
[acorn-walk](https://github.com/acornjs/acorn/tree/master/acorn-walk) is
an abstract syntax tree walker for the ESTree format.

### ada 2.6.7
### ada 2.6.8

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

[acorn]: #acorn
[ada 2.6.7]: #ada-267
[ada 2.6.8]: #ada-268
[base64]: #base64
[brotli]: #brotli
[c-ares]: #c-ares
Expand Down

0 comments on commit 597ea77

Please sign in to comment.