Skip to content

Commit 99f93af

Browse files
anonrigaduh95
authored andcommitted
deps: update ada to v3.2.1
PR-URL: #57429 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 8cb3441 commit 99f93af

15 files changed

+8400
-5379
lines changed

deps/ada/ada.cpp

+2,504-2,483
Large diffs are not rendered by default.

deps/ada/ada.h

+208-179
Large diffs are not rendered by default.

src/node_url_pattern.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ void URLPattern::New(const FunctionCallbackInfo<Value>& args) {
264264
}
265265

266266
auto url_pattern = parse_url_pattern<URLPatternRegexProvider>(
267-
arg0,
267+
std::move(arg0),
268268
base_url ? &base_url_view : nullptr,
269269
options.has_value() ? &options.value() : nullptr);
270270

test/fixtures/wpt/README.md

+2-2
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/a23788b77a/url
32-
- urlpattern: https://github.com/web-platform-tests/wpt/tree/3b6b19853a/urlpattern
31+
- url: https://github.com/web-platform-tests/wpt/tree/d86fcc9e87/url
32+
- urlpattern: https://github.com/web-platform-tests/wpt/tree/827d52cc6e/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

test/fixtures/wpt/url/IdnaTestV2.window.js

+2-19
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,5 @@
11
promise_test(() => fetch("resources/IdnaTestV2.json").then(res => res.json()).then(runTests), "Loading data…");
22

3-
// Performance impact of this seems negligible (performance.now() diff in WebKit went from 48 to 52)
4-
// and there was a preference to let more non-ASCII hit the parser.
5-
function encodeHostEndingCodePoints(input) {
6-
let output = "";
7-
for (const codePoint of input) {
8-
if ([":", "/", "?", "#", "\\"].includes(codePoint)) {
9-
output += encodeURIComponent(codePoint);
10-
} else {
11-
output += codePoint;
12-
}
13-
}
14-
return output;
15-
}
16-
173
function runTests(idnaTests) {
184
for (const idnaTest of idnaTests) {
195
if (typeof idnaTest === "string") {
@@ -22,15 +8,12 @@ function runTests(idnaTests) {
228
if (idnaTest.input === "") {
239
continue // cannot test empty string input through new URL()
2410
}
25-
// Percent-encode the input such that ? and equivalent code points do not end up counting as
26-
// part of the URL, but are parsed through the host parser instead.
27-
const encodedInput = encodeHostEndingCodePoints(idnaTest.input);
2811

2912
test(() => {
3013
if (idnaTest.output === null) {
31-
assert_throws_js(TypeError, () => new URL(`https://${encodedInput}/x`));
14+
assert_throws_js(TypeError, () => new URL(`https://${idnaTest.input}/x`));
3215
} else {
33-
const url = new URL(`https://${encodedInput}/x`);
16+
const url = new URL(`https://${idnaTest.input}/x`);
3417
assert_equals(url.host, idnaTest.output);
3518
assert_equals(url.hostname, idnaTest.output);
3619
assert_equals(url.pathname, "/x");

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

+5,562-2,513
Large diffs are not rendered by default.

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

+74-2
Original file line numberDiff line numberDiff line change
@@ -1141,6 +1141,42 @@
11411141
"host": "example.com",
11421142
"hostname": "example.com"
11431143
}
1144+
},
1145+
{
1146+
"href": "https://test.invalid/",
1147+
"new_value": "*",
1148+
"expected": {
1149+
"href": "https://*/",
1150+
"host": "*",
1151+
"hostname": "*"
1152+
}
1153+
},
1154+
{
1155+
"href": "https://test.invalid/",
1156+
"new_value": "x@x",
1157+
"expected": {
1158+
"href": "https://test.invalid/",
1159+
"host": "test.invalid",
1160+
"hostname": "test.invalid"
1161+
}
1162+
},
1163+
{
1164+
"href": "https://test.invalid/",
1165+
"new_value": "foo\t\r\nbar",
1166+
"expected": {
1167+
"href": "https://foobar/",
1168+
"host": "foobar",
1169+
"hostname": "foobar"
1170+
}
1171+
},
1172+
{
1173+
"href": "https://test.invalid/",
1174+
"new_value": "><",
1175+
"expected": {
1176+
"href": "https://test.invalid/",
1177+
"host": "test.invalid",
1178+
"hostname": "test.invalid"
1179+
}
11441180
}
11451181
],
11461182
"hostname": [
@@ -1552,6 +1588,42 @@
15521588
"host": "example.com",
15531589
"hostname": "example.com"
15541590
}
1591+
},
1592+
{
1593+
"href": "https://test.invalid/",
1594+
"new_value": "*",
1595+
"expected": {
1596+
"href": "https://*/",
1597+
"host": "*",
1598+
"hostname": "*"
1599+
}
1600+
},
1601+
{
1602+
"href": "https://test.invalid/",
1603+
"new_value": "x@x",
1604+
"expected": {
1605+
"href": "https://test.invalid/",
1606+
"host": "test.invalid",
1607+
"hostname": "test.invalid"
1608+
}
1609+
},
1610+
{
1611+
"href": "https://test.invalid/",
1612+
"new_value": "foo\t\r\nbar",
1613+
"expected": {
1614+
"href": "https://foobar/",
1615+
"host": "foobar",
1616+
"hostname": "foobar"
1617+
}
1618+
},
1619+
{
1620+
"href": "https://test.invalid/",
1621+
"new_value": "><",
1622+
"expected": {
1623+
"href": "https://test.invalid/",
1624+
"host": "test.invalid",
1625+
"hostname": "test.invalid"
1626+
}
15551627
}
15561628
],
15571629
"port": [
@@ -1921,8 +1993,8 @@
19211993
"href": "a:/",
19221994
"new_value": "\u0000\u0001\t\n\r\u001f !\"#$%&'()*+,-./09:;<=>?@AZ[\\]^_`az{|}~\u007f\u0080\u0081Éé",
19231995
"expected": {
1924-
"href": "a:/%00%01%1F%20!%22%23$%&'()*+,-./09:;%3C=%3E%3F@AZ[\\]^_%60az%7B|%7D~%7F%C2%80%C2%81%C3%89%C3%A9",
1925-
"pathname": "/%00%01%1F%20!%22%23$%&'()*+,-./09:;%3C=%3E%3F@AZ[\\]^_%60az%7B|%7D~%7F%C2%80%C2%81%C3%89%C3%A9"
1996+
"href": "a:/%00%01%1F%20!%22%23$%&'()*+,-./09:;%3C=%3E%3F@AZ[\\]%5E_%60az%7B|%7D~%7F%C2%80%C2%81%C3%89%C3%A9",
1997+
"pathname": "/%00%01%1F%20!%22%23$%&'()*+,-./09:;%3C=%3E%3F@AZ[\\]%5E_%60az%7B|%7D~%7F%C2%80%C2%81%C3%89%C3%A9"
19261998
}
19271999
},
19282000
{

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

+4-5
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@
259259
},
260260
{
261261
"input": "look\u180Eout.net",
262-
"output": null
262+
"output": "lookout.net"
263263
},
264264
{
265265
"input": "look\u2060out.net",
@@ -291,7 +291,7 @@
291291
},
292292
{
293293
"input": "look\u206Bout.net",
294-
"output": null
294+
"output": "lookout.net"
295295
},
296296
{
297297
"input": "look\uDB40\uDC01out.net",
@@ -319,16 +319,15 @@
319319
},
320320
{
321321
"input": "\u04C0.com",
322-
"output": null
322+
"output": "xn--s5a.com"
323323
},
324324
{
325-
"comment": "This is U+2F868 (which is mapped to U+36FC starting with Unicode 16.0)",
326325
"input": "\uD87E\uDC68.com",
327326
"output": "xn--snl.com"
328327
},
329328
{
330329
"input": "\u2183.com",
331-
"output": null
330+
"output": "xn--r5g.com"
332331
},
333332
{
334333
"input": "look\u034Fout.net",

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

+19-4
Original file line numberDiff line numberDiff line change
@@ -8507,6 +8507,21 @@
85078507
"search": "",
85088508
"username": ""
85098509
},
8510+
{
8511+
"input": "non-special:cannot-be-a-base-url-!\"$%&'()*+,-.;<=>@[\\]^_`{|}~@/",
8512+
"base": null,
8513+
"hash": "",
8514+
"host": "",
8515+
"hostname": "",
8516+
"href": "non-special:cannot-be-a-base-url-!\"$%&'()*+,-.;<=>@[\\]^_`{|}~@/",
8517+
"origin": "null",
8518+
"password": "",
8519+
"pathname": "cannot-be-a-base-url-!\"$%&'()*+,-.;<=>@[\\]^_`{|}~@/",
8520+
"port": "",
8521+
"protocol": "non-special:",
8522+
"search": "",
8523+
"username": ""
8524+
},
85108525
{
85118526
"input": "https://www.example.com/path{\u007Fpath.html?query'\u007F=query#fragment<\u007Ffragment",
85128527
"base": null,
@@ -8634,10 +8649,10 @@
86348649
"hash": "",
86358650
"host": "host",
86368651
"hostname": "host",
8637-
"href": "foo://host/%20!%22$%&'()*+,-./:;%3C=%3E@[\\]^_%60%7B|%7D~",
8652+
"href": "foo://host/%20!%22$%&'()*+,-./:;%3C=%3E@[\\]%5E_%60%7B|%7D~",
86388653
"origin": "null",
86398654
"password": "",
8640-
"pathname": "/%20!%22$%&'()*+,-./:;%3C=%3E@[\\]^_%60%7B|%7D~",
8655+
"pathname": "/%20!%22$%&'()*+,-./:;%3C=%3E@[\\]%5E_%60%7B|%7D~",
86418656
"port":"",
86428657
"protocol": "foo:",
86438658
"search": "",
@@ -8649,10 +8664,10 @@
86498664
"hash": "",
86508665
"host": "host",
86518666
"hostname": "host",
8652-
"href": "wss://host/%20!%22$%&'()*+,-./:;%3C=%3E@[/]^_%60%7B|%7D~",
8667+
"href": "wss://host/%20!%22$%&'()*+,-./:;%3C=%3E@[/]%5E_%60%7B|%7D~",
86538668
"origin": "wss://host",
86548669
"password": "",
8655-
"pathname": "/%20!%22$%&'()*+,-./:;%3C=%3E@[/]^_%60%7B|%7D~",
8670+
"pathname": "/%20!%22$%&'()*+,-./:;%3C=%3E@[/]%5E_%60%7B|%7D~",
86568671
"port":"",
86578672
"protocol": "wss:",
86588673
"search": "",

test/fixtures/wpt/urlpattern/resources/urlpatterntestdata.json

+19-2
Original file line numberDiff line numberDiff line change
@@ -2432,8 +2432,10 @@
24322432
},
24332433
{
24342434
"pattern": [{ "hostname": "bad#hostname" }],
2435-
"inputs": [{ "hostname": "bad" }],
2436-
"exactly_empty_components": ["port"],
2435+
"inputs": [{ "hostname": "bad" }],
2436+
"expected_obj": {
2437+
"hostname": "bad"
2438+
},
24372439
"expected_match": {
24382440
"hostname": { "input": "bad", "groups": {} }
24392441
}
@@ -2445,6 +2447,9 @@
24452447
{
24462448
"pattern": [{ "hostname": "bad/hostname" }],
24472449
"inputs": [{ "hostname": "bad" }],
2450+
"expected_obj": {
2451+
"hostname": "bad"
2452+
},
24482453
"expected_match": {
24492454
"hostname": { "input": "bad", "groups": {} }
24502455
}
@@ -2480,6 +2485,9 @@
24802485
{
24812486
"pattern": [{ "hostname": "bad\\\\hostname" }],
24822487
"inputs": [{ "hostname": "badhostname" }],
2488+
"expected_obj": {
2489+
"hostname": "bad"
2490+
},
24832491
"expected_match": null
24842492
},
24852493
{
@@ -2493,20 +2501,29 @@
24932501
{
24942502
"pattern": [{ "hostname": "bad\nhostname" }],
24952503
"inputs": [{ "hostname": "badhostname" }],
2504+
"expected_obj": {
2505+
"hostname": "badhostname"
2506+
},
24962507
"expected_match": {
24972508
"hostname": { "input": "badhostname", "groups": {} }
24982509
}
24992510
},
25002511
{
25012512
"pattern": [{ "hostname": "bad\rhostname" }],
25022513
"inputs": [{ "hostname": "badhostname" }],
2514+
"expected_obj": {
2515+
"hostname": "badhostname"
2516+
},
25032517
"expected_match": {
25042518
"hostname": { "input": "badhostname", "groups": {} }
25052519
}
25062520
},
25072521
{
25082522
"pattern": [{ "hostname": "bad\thostname" }],
25092523
"inputs": [{ "hostname": "badhostname" }],
2524+
"expected_obj": {
2525+
"hostname": "badhostname"
2526+
},
25102527
"expected_match": {
25112528
"hostname": { "input": "badhostname", "groups": {} }
25122529
}

test/fixtures/wpt/versions.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@
7272
"path": "streams"
7373
},
7474
"url": {
75-
"commit": "a23788b77a947304b2b3159d8efda492727ab623",
75+
"commit": "d86fcc9e8764155485975a2a9bbfc5ec4aa9e75b",
7676
"path": "url"
7777
},
7878
"urlpattern": {
79-
"commit": "3b6b19853a928ec9bfa28e9046c3cf601f160e42",
79+
"commit": "827d52cc6e31939974f91cda7c0c77ef61d4444b",
8080
"path": "urlpattern"
8181
},
8282
"user-timing": {

test/known_issues/test-whatwg-url-custom-domainto.js

-57
This file was deleted.

0 commit comments

Comments
 (0)