Skip to content

Commit ec29f56

Browse files
anonrigRafaelGSS
authored andcommitted
deps: update ada to 3.2.2
PR-URL: #57693 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Lemire <daniel@lemire.me> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
1 parent 50f5707 commit ec29f56

15 files changed

+424
-98
lines changed

deps/ada/ada.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto-generated on 2025-03-10 13:14:56 -0400. Do not edit! */
1+
/* auto-generated on 2025-03-30 13:24:42 -0400. Do not edit! */
22
/* begin file src/ada.cpp */
33
#include "ada.h"
44
/* begin file src/checkers.cpp */
@@ -13334,10 +13334,18 @@ result_type parse_url_impl(std::string_view user_input,
1333413334
input_position = input_size + 1;
1333513335
}
1333613336
url.has_opaque_path = true;
13337+
1333713338
// This is a really unlikely scenario in real world. We should not seek
1333813339
// to optimize it.
13339-
url.update_base_pathname(unicode::percent_encode(
13340-
view, character_sets::C0_CONTROL_PERCENT_ENCODE));
13340+
if (view.ends_with(' ')) {
13341+
std::string modified_view =
13342+
std::string(view.begin(), view.end() - 1) + "%20";
13343+
url.update_base_pathname(unicode::percent_encode(
13344+
modified_view, character_sets::C0_CONTROL_PERCENT_ENCODE));
13345+
} else {
13346+
url.update_base_pathname(unicode::percent_encode(
13347+
view, character_sets::C0_CONTROL_PERCENT_ENCODE));
13348+
}
1334113349
break;
1334213350
}
1334313351
case state::PORT: {

deps/ada/ada.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto-generated on 2025-03-10 13:14:56 -0400. Do not edit! */
1+
/* auto-generated on 2025-03-30 13:24:42 -0400. Do not edit! */
22
/* begin file include/ada.h */
33
/**
44
* @file ada.h
@@ -5859,7 +5859,6 @@ tl::expected<url_pattern<regex_provider>, errors> parse_url_pattern_impl(
58595859
// TODO: Optimization opportunity.
58605860
if (scheme::is_special(*processed_init->protocol)) {
58615861
std::string_view port = processed_init->port.value();
5862-
helpers::trim_c0_whitespace(port);
58635862
if (std::to_string(scheme::get_special_port(*processed_init->protocol)) ==
58645863
port) {
58655864
processed_init->port->clear();
@@ -10503,14 +10502,14 @@ constructor_string_parser<regex_provider>::parse(std::string_view input) {
1050310502
#ifndef ADA_ADA_VERSION_H
1050410503
#define ADA_ADA_VERSION_H
1050510504

10506-
#define ADA_VERSION "3.2.1"
10505+
#define ADA_VERSION "3.2.2"
1050710506

1050810507
namespace ada {
1050910508

1051010509
enum {
1051110510
ADA_VERSION_MAJOR = 3,
1051210511
ADA_VERSION_MINOR = 2,
10513-
ADA_VERSION_REVISION = 1,
10512+
ADA_VERSION_REVISION = 2,
1051410513
};
1051510514

1051610515
} // namespace ada

test/fixtures/wpt/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ Last update:
2828
- resource-timing: https://github.com/web-platform-tests/wpt/tree/22d38586d0/resource-timing
2929
- resources: https://github.com/web-platform-tests/wpt/tree/1e140d63ec/resources
3030
- streams: https://github.com/web-platform-tests/wpt/tree/bc9dcbbf1a/streams
31-
- url: https://github.com/web-platform-tests/wpt/tree/d86fcc9e87/url
32-
- urlpattern: https://github.com/web-platform-tests/wpt/tree/6ceca69d26/urlpattern
31+
- url: https://github.com/web-platform-tests/wpt/tree/9504a83e01/url
32+
- urlpattern: https://github.com/web-platform-tests/wpt/tree/f07d05f49c/urlpattern
3333
- user-timing: https://github.com/web-platform-tests/wpt/tree/5ae85bf826/user-timing
3434
- wasm/jsapi: https://github.com/web-platform-tests/wpt/tree/cde25e7e3c/wasm/jsapi
3535
- wasm/webapi: https://github.com/web-platform-tests/wpt/tree/fd1b23eeaa/wasm/webapi
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
promise_test(() => fetch("resources/IdnaTestV2-removed.json").then(res => res.json()).then(runTests), "Loading data…");
2+
3+
function runTests(idnaTests) {
4+
for (const idnaTest of idnaTests) {
5+
if (typeof idnaTest === "string") {
6+
continue // skip comments
7+
}
8+
9+
test(() => {
10+
if (idnaTest.output === null) {
11+
assert_throws_js(TypeError, () => new URL(`https://${idnaTest.input}/x`));
12+
} else {
13+
const url = new URL(`https://${idnaTest.input}/x`);
14+
assert_equals(url.host, idnaTest.output);
15+
assert_equals(url.hostname, idnaTest.output);
16+
assert_equals(url.pathname, "/x");
17+
assert_equals(url.href, `https://${idnaTest.output}/x`);
18+
}
19+
}, `ToASCII("${idnaTest.input}")${idnaTest.comment ? " " + idnaTest.comment : ""}`);
20+
}
21+
}
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
[
2+
"This is generated with the help from ../tools/IdnaTestV2-compare.py.",
3+
"These tests are from an older IdnaTestV2 and thus the comment line may no longer be accurate.",
4+
{
5+
"comment": "P1; V6; V3 (ignored)",
6+
"input": "-\udb40\ude56\ua867\uff0e\udb40\ude82\ud8dc\udd83\ud83c\udd09",
7+
"output": null
8+
},
9+
{
10+
"comment": "P1; V5; V6",
11+
"input": "\ud83c\udd04\uff0e\u1cdc\u2488\u00df",
12+
"output": null
13+
},
14+
{
15+
"comment": "P1; V5; V6",
16+
"input": "\ud83c\udd04\uff0e\u1cdc\u2488SS",
17+
"output": null
18+
},
19+
{
20+
"comment": "P1; V5; V6",
21+
"input": "\ud83c\udd04\uff0e\u1cdc\u2488ss",
22+
"output": null
23+
},
24+
{
25+
"comment": "P1; V5; V6",
26+
"input": "\ud83c\udd04\uff0e\u1cdc\u2488Ss",
27+
"output": null
28+
},
29+
{
30+
"comment": "C2; P1; V6",
31+
"input": "\u0756\u3002\u3164\u200d\u03c2",
32+
"output": null
33+
},
34+
{
35+
"comment": "C2; P1; V6",
36+
"input": "\u0756\u3002\u1160\u200d\u03c2",
37+
"output": null
38+
},
39+
{
40+
"comment": "C2; P1; V6",
41+
"input": "\u0756\u3002\u1160\u200d\u03a3",
42+
"output": null
43+
},
44+
{
45+
"comment": "C2; P1; V6",
46+
"input": "\u0756\u3002\u1160\u200d\u03c3",
47+
"output": null
48+
},
49+
{
50+
"comment": "C2; P1; V6",
51+
"input": "\u0756\u3002\u3164\u200d\u03a3",
52+
"output": null
53+
},
54+
{
55+
"comment": "C2; P1; V6",
56+
"input": "\u0756\u3002\u3164\u200d\u03c3",
57+
"output": null
58+
},
59+
{
60+
"comment": "P1; V6",
61+
"input": "\ud83c\udd07\u4f10\ufe12.\ud831\ude5a\ua8c4",
62+
"output": null
63+
},
64+
{
65+
"comment": "P1; V5; V6",
66+
"input": "\ud802\ude3f.\ud83c\udd06\u2014",
67+
"output": null
68+
},
69+
{
70+
"comment": "C2; P1; V5; V6",
71+
"input": "\u1c32\ud83c\udd08\u2f9b\u05a6\uff0e\u200d\uda7e\udd64\u07fd",
72+
"output": null
73+
},
74+
{
75+
"comment": "C2; P1; V5; V6",
76+
"input": "\ud83e\udc9f\ud83c\udd08\u200d\ua84e\uff61\u0f84",
77+
"output": null
78+
},
79+
{
80+
"comment": "P1; V6",
81+
"input": "\udaa5\udeaa\uff61\ud83c\udd02",
82+
"output": null
83+
},
84+
{
85+
"comment": "C2; P1; V6",
86+
"input": "\u186f\u2689\u59f6\ud83c\udd09\uff0e\u06f7\u200d\ud83c\udfaa\u200d",
87+
"output": null
88+
},
89+
{
90+
"comment": "C1; P1; V5; V6",
91+
"input": "\ua67d\u200c\ud87e\uddf5\ud83c\udd06\uff61\u200c\ud804\udc42\u1b01",
92+
"output": null
93+
},
94+
{
95+
"comment": "C1; P1; V5; V6",
96+
"input": "\ua67d\u200c\u9723\ud83c\udd06\uff61\u200c\ud804\udc42\u1b01",
97+
"output": null
98+
},
99+
{
100+
"comment": "C1; P1; V5; V6; V3 (ignored)",
101+
"input": "-\u1897\u200c\ud83c\udd04.\ud805\udf22",
102+
"output": null
103+
}
104+
]

test/fixtures/wpt/url/resources/setters_tests.json

Lines changed: 52 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1177,6 +1177,24 @@
11771177
"host": "test.invalid",
11781178
"hostname": "test.invalid"
11791179
}
1180+
},
1181+
{
1182+
"href": "https://test.invalid/",
1183+
"new_value": "test/@aaa",
1184+
"expected": {
1185+
"href": "https://test/",
1186+
"host": "test",
1187+
"hostname": "test"
1188+
}
1189+
},
1190+
{
1191+
"href": "https://test.invalid/",
1192+
"new_value": "test/:aaa",
1193+
"expected": {
1194+
"href": "https://test/",
1195+
"host": "test",
1196+
"hostname": "test"
1197+
}
11801198
}
11811199
],
11821200
"hostname": [
@@ -1624,6 +1642,24 @@
16241642
"host": "test.invalid",
16251643
"hostname": "test.invalid"
16261644
}
1645+
},
1646+
{
1647+
"href": "https://test.invalid/",
1648+
"new_value": "test/@aaa",
1649+
"expected": {
1650+
"href": "https://test/",
1651+
"host": "test",
1652+
"hostname": "test"
1653+
}
1654+
},
1655+
{
1656+
"href": "https://test.invalid/",
1657+
"new_value": "test/:aaa",
1658+
"expected": {
1659+
"href": "https://test/",
1660+
"host": "test",
1661+
"hostname": "test"
1662+
}
16271663
}
16281664
],
16291665
"port": [
@@ -2241,38 +2277,38 @@
22412277
}
22422278
},
22432279
{
2244-
"comment": "Drop trailing spaces from trailing opaque paths",
2280+
"comment": "Trailing spaces and opaque paths",
22452281
"href": "data:space ?query",
22462282
"new_value": "",
22472283
"expected": {
2248-
"href": "data:space",
2249-
"pathname": "space",
2284+
"href": "data:space%20",
2285+
"pathname": "space%20",
22502286
"search": ""
22512287
}
22522288
},
22532289
{
22542290
"href": "sc:space ?query",
22552291
"new_value": "",
22562292
"expected": {
2257-
"href": "sc:space",
2258-
"pathname": "space",
2293+
"href": "sc:space%20",
2294+
"pathname": "space%20",
22592295
"search": ""
22602296
}
22612297
},
22622298
{
2263-
"comment": "Do not drop trailing spaces from non-trailing opaque paths",
2299+
"comment": "Trailing spaces and opaque paths",
22642300
"href": "data:space ?query#fragment",
22652301
"new_value": "",
22662302
"expected": {
2267-
"href": "data:space #fragment",
2303+
"href": "data:space %20#fragment",
22682304
"search": ""
22692305
}
22702306
},
22712307
{
22722308
"href": "sc:space ?query#fragment",
22732309
"new_value": "",
22742310
"expected": {
2275-
"href": "sc:space #fragment",
2311+
"href": "sc:space %20#fragment",
22762312
"search": ""
22772313
}
22782314
},
@@ -2429,38 +2465,38 @@
24292465
}
24302466
},
24312467
{
2432-
"comment": "Drop trailing spaces from trailing opaque paths",
2468+
"comment": "Trailing spaces and opaque paths",
24332469
"href": "data:space #fragment",
24342470
"new_value": "",
24352471
"expected": {
2436-
"href": "data:space",
2437-
"pathname": "space",
2472+
"href": "data:space %20",
2473+
"pathname": "space %20",
24382474
"hash": ""
24392475
}
24402476
},
24412477
{
24422478
"href": "sc:space #fragment",
24432479
"new_value": "",
24442480
"expected": {
2445-
"href": "sc:space",
2446-
"pathname": "space",
2481+
"href": "sc:space %20",
2482+
"pathname": "space %20",
24472483
"hash": ""
24482484
}
24492485
},
24502486
{
2451-
"comment": "Do not drop trailing spaces from non-trailing opaque paths",
2487+
"comment": "Trailing spaces and opaque paths",
24522488
"href": "data:space ?query#fragment",
24532489
"new_value": "",
24542490
"expected": {
2455-
"href": "data:space ?query",
2491+
"href": "data:space %20?query",
24562492
"hash": ""
24572493
}
24582494
},
24592495
{
24602496
"href": "sc:space ?query#fragment",
24612497
"new_value": "",
24622498
"expected": {
2463-
"href": "sc:space ?query",
2499+
"href": "sc:space %20?query",
24642500
"hash": ""
24652501
}
24662502
},

test/fixtures/wpt/url/resources/toascii.json

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
[
22
"This contains assorted IDNA tests that IdnaTestV2 might not cover.",
33
"Feel free to deduplicate with a clear commit message.",
4+
"",
5+
"If the test only applies to the URL Standard's 'domain to ASCII', ",
6+
"and not to TR46's ToASCII, then tag it with `urlStandardOnly`",
47
{
58
"comment": "Label with hyphens in 3rd and 4th position",
69
"input": "aa--",
@@ -239,19 +242,22 @@
239242
},
240243
{
241244
"input": "www.lookout.net\u2A7480",
242-
"output": null
245+
"output": null,
246+
"urlStandardOnly": true
243247
},
244248
{
245249
"input": "www\u00A0.lookout.net",
246-
"output": null
250+
"output": null,
251+
"urlStandardOnly": true
247252
},
248253
{
249254
"input": "\u1680lookout.net",
250255
"output": null
251256
},
252257
{
253258
"input": "\u001flookout.net",
254-
"output": null
259+
"output": null,
260+
"urlStandardOnly": true
255261
},
256262
{
257263
"input": "look\u06DDout.net",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy