From baba49ff8d02ea04de596ca1573dbd4244d763ea Mon Sep 17 00:00:00 2001 From: Aviv Keller <38299977+RedYetiDev@users.noreply.github.com> Date: Fri, 12 Apr 2024 14:03:46 -0400 Subject: [PATCH 1/3] doc: alphabetize triagers + add self (RedYetiDev) --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a3ee8b7444bfb4..2c644c46a5287b 100644 --- a/README.md +++ b/README.md @@ -735,16 +735,18 @@ maintaining the Node.js project. **Frank Qiu** <> (he/him) * [marsonya](https://github.com/marsonya) - **Akhil Marsonya** <> (he/him) +* [Mesteery](https://github.com/Mesteery) - + **Mestery** <> (he/him) * [meixg](https://github.com/meixg) - **Xuguang Mei** <> (he/him) * [mertcanaltin](https://github.com/mertcanaltin) - **Mert Can Altin** <> -* [Mesteery](https://github.com/Mesteery) - - **Mestery** <> (he/him) -* [preveen-stack](https://github.com/preveen-stack) - - **Preveen Padmanabhan** <> (he/him) * [PoojaDurgad](https://github.com/PoojaDurgad) - **Pooja Durgad** <> +* [preveen-stack](https://github.com/preveen-stack) - + **Preveen Padmanabhan** <> (he/him) +* [RedYetiDev](https://github.com/redyetidev) - + **Aviv Keller** <> (they/them) * [VoltrexKeyva](https://github.com/VoltrexKeyva) - **Mohammed Keyvanzadeh** <> (he/him) From 207375c83a923ae4e73266b57b3489bc15f31413 Mon Sep 17 00:00:00 2001 From: Aviv Keller <38299977+RedYetiDev@users.noreply.github.com> Date: Sat, 13 Apr 2024 15:20:41 -0400 Subject: [PATCH 2/3] alphabet --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1f38c88c921f0f..6e2e24a39a6322 100644 --- a/README.md +++ b/README.md @@ -737,10 +737,10 @@ maintaining the Node.js project. **Akhil Marsonya** <> (he/him) * [meixg](https://github.com/meixg) - **Xuguang Mei** <> (he/him) -* [Mesteery](https://github.com/Mesteery) - - **Mestery** <> (he/him) * [mertcanaltin](https://github.com/mertcanaltin) - **Mert Can Altin** <> +* [Mesteery](https://github.com/Mesteery) - + **Mestery** <> (he/him) * [PoojaDurgad](https://github.com/PoojaDurgad) - **Pooja Durgad** <> * [preveen-stack](https://github.com/preveen-stack) - From 40b5a6e54e71b423e001fe49da6bd5fc5a2e22f6 Mon Sep 17 00:00:00 2001 From: RedYetiDev <38299977+RedYetiDev@users.noreply.github.com> Date: Tue, 16 Apr 2024 09:27:40 -0400 Subject: [PATCH 3/3] Revert "Merge branch 'main' into patch-9" This reverts commit 2a6eb2dd29039bab6b6c9ec58bcd01009675e126, reversing changes made to baba49ff8d02ea04de596ca1573dbd4244d763ea. --- .github/workflows/linters.yml | 7 - README.md | 16 +- benchmark/compare.js | 5 +- benchmark/run.js | 5 +- deps/simdutf/simdutf.cpp | 12 +- deps/simdutf/simdutf.h | 45 ++--- lib/buffer.js | 2 +- lib/internal/url.js | 24 +-- src/node_url.cc | 11 +- test/fixtures/wpt/README.md | 2 +- .../wpt/url/resources/urltestdata.json | 185 ------------------ .../fixtures/wpt/url/url-statics-parse.any.js | 50 ----- test/fixtures/wpt/versions.json | 2 +- tools/lint-readme-lists.mjs | 48 ----- 14 files changed, 41 insertions(+), 373 deletions(-) delete mode 100644 test/fixtures/wpt/url/url-statics-parse.any.js delete mode 100755 tools/lint-readme-lists.mjs diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index dd1f9ee1ae6533..bfc1cd66785863 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -179,10 +179,3 @@ jobs: persist-credentials: false # GH Actions squashes all PR commits, HEAD^ refers to the base branch. - run: git diff HEAD^ HEAD -G"pr-url:" -- "*.md" | ./tools/lint-pr-url.mjs ${{ github.event.pull_request.html_url }} - lint-readme: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - persist-credentials: false - - run: tools/lint-readme-lists.mjs diff --git a/README.md b/README.md index 6e2e24a39a6322..ab9e50aaa2e890 100644 --- a/README.md +++ b/README.md @@ -343,10 +343,10 @@ For information about the governance of the Node.js project, see **Erick Wendel** <> (he/him) * [Ethan-Arrowood](https://github.com/Ethan-Arrowood) - **Ethan Arrowood** <> (he/him) -* [F3n67u](https://github.com/F3n67u) - - **Feng Yu** <> (he/him) * [fhinkel](https://github.com/fhinkel) - **Franziska Hinkelmann** <> (she/her) +* [F3n67u](https://github.com/F3n67u) - + **Feng Yu** <> (he/him) * [Flarna](https://github.com/Flarna) - **Gerhard Stöbich** <> (he/they) * [gabrielschulhof](https://github.com/gabrielschulhof) - @@ -429,12 +429,12 @@ For information about the governance of the Node.js project, see **Stephen Belanger** <> (he/him) * [RafaelGSS](https://github.com/RafaelGSS) - **Rafael Gonzaga** <> (he/him) +* [rluvaton](https://github.com/rluvaton) - + **Raz Luvaton** <> (he/him) * [richardlau](https://github.com/richardlau) - **Richard Lau** <> * [rickyes](https://github.com/rickyes) - **Ricky Zhou** <<0x19951125@gmail.com>> (he/him) -* [rluvaton](https://github.com/rluvaton) - - **Raz Luvaton** <> (he/him) * [ronag](https://github.com/ronag) - **Robert Nagy** <> * [ruyadorno](https://github.com/ruyadorno) - @@ -477,10 +477,10 @@ For information about the governance of the Node.js project, see **Khaidi Chu** <> (he/him) * [yashLadha](https://github.com/yashLadha) - **Yash Ladha** <> (he/him) -* [zcbenz](https://github.com/zcbenz) - - **Cheng Zhao** <> (he/him) * [ZYSzys](https://github.com/ZYSzys) - **Yongsheng Zhang** <> (he/him) +* [zcbenz](https://github.com/zcbenz) - + **Cheng Zhao** <> (he/him)
@@ -495,10 +495,10 @@ For information about the governance of the Node.js project, see **Aleksei Koziatinskii** <> * [andrasq](https://github.com/andrasq) - **Andras** <> -* [AndreasMadsen](https://github.com/AndreasMadsen) - - **Andreas Madsen** <> (he/him) * [AnnaMag](https://github.com/AnnaMag) - **Anna M. Kedzierska** <> +* [AndreasMadsen](https://github.com/AndreasMadsen) - + **Andreas Madsen** <> (he/him) * [aqrln](https://github.com/aqrln) - **Alexey Orlenko** <> (he/him) * [bcoe](https://github.com/bcoe) - diff --git a/benchmark/compare.js b/benchmark/compare.js index ad3084db390414..1efff9e85c072f 100644 --- a/benchmark/compare.js +++ b/benchmark/compare.js @@ -83,8 +83,11 @@ if (showProgress) { const spawnArgs = ['-c', cpuCore, cli.optional[job.binary], resolvedPath, ...cli.optional.set]; child = spawn('taskset', spawnArgs, { env: process.env, - stdio: ['inherit', 'inherit', 'inherit', 'ipc'], + stdio: ['inherit', 'pipe', 'pipe'], }); + + child.stdout.pipe(process.stdout); + child.stderr.pipe(process.stderr); } else { child = fork(resolvedPath, cli.optional.set, { execPath: cli.optional[job.binary], diff --git a/benchmark/run.js b/benchmark/run.js index 6a61df71221710..11f95d8e71f035 100644 --- a/benchmark/run.js +++ b/benchmark/run.js @@ -54,8 +54,11 @@ if (format === 'csv') { let child; if (cpuCore !== null) { child = spawn('taskset', ['-c', cpuCore, 'node', scriptPath, ...args], { - stdio: ['inherit', 'inherit', 'inherit', 'ipc'], + stdio: ['inherit', 'pipe', 'pipe'], }); + + child.stdout.pipe(process.stdout); + child.stderr.pipe(process.stderr); } else { child = fork( scriptPath, diff --git a/deps/simdutf/simdutf.cpp b/deps/simdutf/simdutf.cpp index 13c408263e7ac4..c4d4ed3f7ae481 100644 --- a/deps/simdutf/simdutf.cpp +++ b/deps/simdutf/simdutf.cpp @@ -1,4 +1,4 @@ -/* auto-generated on 2024-04-11 09:56:55 -0400. Do not edit! */ +/* auto-generated on 2024-04-05 16:29:02 -0400. Do not edit! */ /* begin file src/simdutf.cpp */ #include "simdutf.h" // We include base64_tables once. @@ -13665,6 +13665,7 @@ inline size_t convert(const char *buf, size_t len, char32_t *utf32_output) { /* begin file src/scalar/utf8_to_latin1/utf8_to_latin1.h */ #ifndef SIMDUTF_UTF8_TO_LATIN1_H #define SIMDUTF_UTF8_TO_LATIN1_H +#include namespace simdutf { namespace scalar { @@ -16714,17 +16715,8 @@ size_t encode_base64(char *dst, const char *src, size_t srclen, 'N', 'd', 't', '9', 'O', 'e', 'u', '-', 'P', 'f', 'v', '_', }; const uint8x16_t v3f = vdupq_n_u8(0x3f); -#ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - // When trying to load a uint8_t array, Visual Studio might - // error with: error C2664: '__n128x4 neon_ld4m_q8(const char *)': - // cannot convert argument 1 from 'const uint8_t [64]' to 'const char * - const uint8x16x4_t table = - vld4q_u8((reinterpret_cast( - options & base64_url) ? source_table_url : source_table)); -#else const uint8x16x4_t table = vld4q_u8((options & base64_url) ? source_table_url : source_table); -#endif size_t i = 0; for (; i + 16 * 3 <= srclen; i += 16 * 3) { const uint8x16x3_t in = vld3q_u8((const uint8_t *)src + i); diff --git a/deps/simdutf/simdutf.h b/deps/simdutf/simdutf.h index 7a4a3a2cf45033..8bc2061a4bca8e 100644 --- a/deps/simdutf/simdutf.h +++ b/deps/simdutf/simdutf.h @@ -1,4 +1,4 @@ -/* auto-generated on 2024-04-11 09:56:55 -0400. Do not edit! */ +/* auto-generated on 2024-04-05 16:29:02 -0400. Do not edit! */ /* begin file include/simdutf.h */ #ifndef SIMDUTF_H #define SIMDUTF_H @@ -130,9 +130,9 @@ #include #endif -#if (defined(__x86_64__) || defined(_M_AMD64)) && !defined(_M_ARM64EC) +#if defined(__x86_64__) || defined(_M_AMD64) #define SIMDUTF_IS_X86_64 1 -#elif defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC) +#elif defined(__aarch64__) || defined(_M_ARM64) #define SIMDUTF_IS_ARM64 1 #elif defined(__PPC64__) || defined(_M_PPC64) //#define SIMDUTF_IS_PPC64 1 @@ -594,7 +594,7 @@ SIMDUTF_DISABLE_UNDESIRED_WARNINGS #define SIMDUTF_SIMDUTF_VERSION_H /** The version of simdutf being used (major.minor.revision) */ -#define SIMDUTF_VERSION "5.2.4" +#define SIMDUTF_VERSION "5.2.3" namespace simdutf { enum { @@ -609,7 +609,7 @@ enum { /** * The revision (major.minor.REVISION) of simdutf being used. */ - SIMDUTF_VERSION_REVISION = 4 + SIMDUTF_VERSION_REVISION = 3 }; } // namespace simdutf @@ -748,7 +748,7 @@ static inline uint32_t detect_supported_architectures() { return host_isa; } -#elif defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC) +#elif defined(__aarch64__) || defined(_M_ARM64) static inline uint32_t detect_supported_architectures() { return instruction_set::NEON; @@ -1170,7 +1170,7 @@ simdutf_warn_unused result validate_utf32_with_errors(const char32_t *buf, size_ * @param input the UTF-8 string to convert * @param length the length of the string in bytes * @param latin1_output the pointer to buffer that can hold conversion result - * @return the number of written char; 0 if the input was not valid UTF-8 string or if it cannot be represented as Latin1 + * @return the number of written char; 0 if the input was not valid UTF-8 string */ simdutf_warn_unused size_t convert_utf8_to_latin1(const char * input, size_t length, char* latin1_output) noexcept; @@ -1227,8 +1227,6 @@ simdutf_warn_unused size_t convert_utf8_to_utf16be(const char * input, size_t le /** * Convert possibly broken UTF-8 string into latin1 string with errors. - * If the string cannot be represented as Latin1, an error - * code is returned. * * During the conversion also validation of the input string is done. * This function is suitable to work with inputs from untrusted sources. @@ -1448,14 +1446,12 @@ simdutf_warn_unused size_t convert_utf16_to_utf8(const char16_t * input, size_t * @param input the UTF-16 string to convert * @param length the length of the string in 2-byte code units (char16_t) * @param latin1_buffer the pointer to buffer that can hold conversion result - * @return number of written code units; 0 if input is not a valid UTF-16 string or if it cannot be represented as Latin1 + * @return number of written code units; 0 if input is not a valid UTF-16LE string */ simdutf_warn_unused size_t convert_utf16_to_latin1(const char16_t * input, size_t length, char* latin1_buffer) noexcept; /** * Convert possibly broken UTF-16LE string into Latin1 string. - * If the string cannot be represented as Latin1, an error - * is returned. * * During the conversion also validation of the input string is done. * This function is suitable to work with inputs from untrusted sources. @@ -1465,7 +1461,7 @@ simdutf_warn_unused size_t convert_utf16_to_latin1(const char16_t * input, size_ * @param input the UTF-16LE string to convert * @param length the length of the string in 2-byte code units (char16_t) * @param latin1_buffer the pointer to buffer that can hold conversion result - * @return number of written code units; 0 if input is not a valid UTF-16LE string or if it cannot be represented as Latin1 + * @return number of written code units; 0 if input is not a valid UTF-16LE string */ simdutf_warn_unused size_t convert_utf16le_to_latin1(const char16_t * input, size_t length, char* latin1_buffer) noexcept; @@ -1480,7 +1476,7 @@ simdutf_warn_unused size_t convert_utf16le_to_latin1(const char16_t * input, siz * @param input the UTF-16BE string to convert * @param length the length of the string in 2-byte code units (char16_t) * @param latin1_buffer the pointer to buffer that can hold conversion result - * @return number of written code units; 0 if input is not a valid UTF-16BE string or if it cannot be represented as Latin1 + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char written if successful. */ simdutf_warn_unused size_t convert_utf16be_to_latin1(const char16_t * input, size_t length, char* latin1_buffer) noexcept; @@ -1545,8 +1541,6 @@ simdutf_warn_unused result convert_utf16le_to_latin1_with_errors(const char16_t /** * Convert possibly broken UTF-16BE string into Latin1 string. - * If the string cannot be represented as Latin1, an error - * is returned. * * During the conversion also validation of the input string is done. * This function is suitable to work with inputs from untrusted sources. @@ -1957,14 +1951,13 @@ simdutf_warn_unused size_t convert_utf32_to_utf16le(const char32_t * input, size * @param input the UTF-32 string to convert * @param length the length of the string in 4-byte code units (char32_t) * @param latin1_buffer the pointer to buffer that can hold conversion result - * @return number of written code units; 0 if input is not a valid UTF-32 string or if it cannot be represented as Latin1 + * @return number of written code units; 0 if input is not a valid UTF-32 string */ simdutf_warn_unused size_t convert_utf32_to_latin1(const char32_t * input, size_t length, char* latin1_buffer) noexcept; /** * Convert possibly broken UTF-32 string into Latin1 string and stop on error. - * If the string cannot be represented as Latin1, an error is returned. * * During the conversion also validation of the input string is done. * This function is suitable to work with inputs from untrusted sources. @@ -2688,14 +2681,12 @@ class implementation { * @param input the UTF-8 string to convert * @param length the length of the string in bytes * @param latin1_output the pointer to buffer that can hold conversion result - * @return the number of written char; 0 if the input was not valid UTF-8 string or if it cannot be represented as Latin1 + * @return the number of written char; 0 if the input was not valid UTF-8 string */ simdutf_warn_unused virtual size_t convert_utf8_to_latin1(const char * input, size_t length, char* latin1_output) const noexcept = 0; /** - * Convert possibly broken UTF-8 string into latin1 string with errors. - * If the string cannot be represented as Latin1, an error - * code is returned. + * Convert possibly broken UTF-8 string into latin1 string with errors * * During the conversion also validation of the input string is done. * This function is suitable to work with inputs from untrusted sources. @@ -2871,7 +2862,7 @@ class implementation { * @param input the UTF-16LE string to convert * @param length the length of the string in 2-byte code units (char16_t) * @param latin1_buffer the pointer to buffer that can hold conversion result - * @return number of written code units; 0 if input is not a valid UTF-16LE string or if it cannot be represented as Latin1 + * @return number of written code units; 0 if input is not a valid UTF-16LE string */ simdutf_warn_unused virtual size_t convert_utf16le_to_latin1(const char16_t * input, size_t length, char* latin1_buffer) const noexcept = 0; @@ -2886,14 +2877,12 @@ class implementation { * @param input the UTF-16BE string to convert * @param length the length of the string in 2-byte code units (char16_t) * @param latin1_buffer the pointer to buffer that can hold conversion result - * @return number of written code units; 0 if input is not a valid UTF-16BE string or if it cannot be represented as Latin1 + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char written if successful. */ simdutf_warn_unused virtual size_t convert_utf16be_to_latin1(const char16_t * input, size_t length, char* latin1_buffer) const noexcept = 0; /** * Convert possibly broken UTF-16LE string into Latin1 string. - * If the string cannot be represented as Latin1, an error - * is returned. * * During the conversion also validation of the input string is done. * This function is suitable to work with inputs from untrusted sources. @@ -2908,8 +2897,6 @@ class implementation { /** * Convert possibly broken UTF-16BE string into Latin1 string. - * If the string cannot be represented as Latin1, an error - * is returned. * * During the conversion also validation of the input string is done. * This function is suitable to work with inputs from untrusted sources. @@ -3170,7 +3157,6 @@ class implementation { /** * Convert possibly broken UTF-32 string into Latin1 string and stop on error. - * If the string cannot be represented as Latin1, an error is returned. * * During the conversion also validation of the input string is done. * This function is suitable to work with inputs from untrusted sources. @@ -3182,6 +3168,7 @@ class implementation { * @param latin1_buffer the pointer to buffer that can hold conversion result * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char written if successful. */ + simdutf_warn_unused virtual result convert_utf32_to_latin1_with_errors(const char32_t * input, size_t length, char* latin1_buffer) const noexcept = 0; /** diff --git a/lib/buffer.js b/lib/buffer.js index fb0697d69adf79..d66d5650f30e73 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -1284,7 +1284,7 @@ function isUtf8(input) { return bindingIsUtf8(input); } - throw new ERR_INVALID_ARG_TYPE('input', ['ArrayBuffer', 'Buffer', 'TypedArray'], input); + throw new ERR_INVALID_ARG_TYPE('input', ['TypedArray', 'Buffer'], input); } function isAscii(input) { diff --git a/lib/internal/url.js b/lib/internal/url.js index 39d79392bd86bc..0e69ff52b5edef 100644 --- a/lib/internal/url.js +++ b/lib/internal/url.js @@ -769,14 +769,6 @@ function isURL(self) { return Boolean(self?.href && self.protocol && self.auth === undefined && self.path === undefined); } -/** - * A unique symbol used as a private identifier to safely invoke the URL constructor - * with a special parsing behavior. When passed as the third argument to the URL - * constructor, it signals that the constructor should not throw an exception - * for invalid URL inputs. - */ -const kParseURLSymbol = Symbol('kParseURL'); - class URL { #context = new URLContext(); #searchParams; @@ -795,7 +787,7 @@ class URL { }; } - constructor(input, base = undefined, parseSymbol = undefined) { + constructor(input, base = undefined) { markTransferMode(this, false, false); if (arguments.length === 0) { @@ -809,19 +801,7 @@ class URL { base = `${base}`; } - const raiseException = parseSymbol !== kParseURLSymbol; - const href = bindingUrl.parse(input, base, raiseException); - if (href) { - this.#updateContext(href); - } - } - - static parse(input, base = undefined) { - if (arguments.length === 0) { - throw new ERR_MISSING_ARGS('url'); - } - const parsedURLObject = new URL(input, base, kParseURLSymbol); - return parsedURLObject.href ? parsedURLObject : null; + this.#updateContext(bindingUrl.parse(input, base)); } [inspect.custom](depth, opts) { diff --git a/src/node_url.cc b/src/node_url.cc index 74b639c23084b5..95d15c78407359 100644 --- a/src/node_url.cc +++ b/src/node_url.cc @@ -233,9 +233,6 @@ void BindingData::Parse(const FunctionCallbackInfo& args) { CHECK_GE(args.Length(), 1); CHECK(args[0]->IsString()); // input // args[1] // base url - // args[2] // raise Exception - - const bool raise_exception = args.Length() > 2 && args[2]->IsTrue(); Realm* realm = Realm::GetCurrent(args); BindingData* binding_data = realm->GetBindingData(); @@ -248,20 +245,16 @@ void BindingData::Parse(const FunctionCallbackInfo& args) { if (args[1]->IsString()) { base_ = Utf8Value(isolate, args[1]).ToString(); base = ada::parse(*base_); - if (!base && raise_exception) { + if (!base) { return ThrowInvalidURL(realm->env(), input.ToStringView(), base_); - } else if (!base) { - return; } base_pointer = &base.value(); } auto out = ada::parse(input.ToStringView(), base_pointer); - if (!out && raise_exception) { + if (!out) { return ThrowInvalidURL(realm->env(), input.ToStringView(), base_); - } else if (!out) { - return; } binding_data->UpdateComponents(out->get_components(), out->type); diff --git a/test/fixtures/wpt/README.md b/test/fixtures/wpt/README.md index 3a2bb782480ef6..a4ca98dc7ffa4f 100644 --- a/test/fixtures/wpt/README.md +++ b/test/fixtures/wpt/README.md @@ -28,7 +28,7 @@ Last update: - resource-timing: https://github.com/web-platform-tests/wpt/tree/22d38586d0/resource-timing - resources: https://github.com/web-platform-tests/wpt/tree/1e140d63ec/resources - streams: https://github.com/web-platform-tests/wpt/tree/3df6d94318/streams -- url: https://github.com/web-platform-tests/wpt/tree/0f550ab9f5/url +- url: https://github.com/web-platform-tests/wpt/tree/c2d7e70b52/url - user-timing: https://github.com/web-platform-tests/wpt/tree/5ae85bf826/user-timing - wasm/jsapi: https://github.com/web-platform-tests/wpt/tree/cde25e7e3c/wasm/jsapi - wasm/webapi: https://github.com/web-platform-tests/wpt/tree/fd1b23eeaa/wasm/webapi diff --git a/test/fixtures/wpt/url/resources/urltestdata.json b/test/fixtures/wpt/url/resources/urltestdata.json index 9f1be0449c63d3..287a84b467a48b 100644 --- a/test/fixtures/wpt/url/resources/urltestdata.json +++ b/test/fixtures/wpt/url/resources/urltestdata.json @@ -734,36 +734,6 @@ "search": "", "hash": "" }, - { - "input": "http://a:b@c\\", - "base": null, - "href": "http://a:b@c/", - "origin": "http://c", - "protocol": "http:", - "username": "a", - "password": "b", - "host": "c", - "hostname": "c", - "port": "", - "pathname": "/", - "search": "", - "hash": "" - }, - { - "input": "ws://a@b\\c", - "base": null, - "href": "ws://a@b/c", - "origin": "ws://b", - "protocol": "ws:", - "username": "a", - "password": "", - "host": "b", - "hostname": "b", - "port": "", - "pathname": "/c", - "search": "", - "hash": "" - }, { "input": "foo:/", "base": "http://example.org/foo/bar", @@ -9559,160 +9529,5 @@ "pathname": "", "search": "", "hash": "" - }, - "Scheme relative path starting with multiple slashes", - { - "input": "///test", - "base": "http://example.org/", - "href": "http://test/", - "protocol": "http:", - "username": "", - "password": "", - "host": "test", - "hostname": "test", - "port": "", - "pathname": "/", - "search": "", - "hash": "" - }, - { - "input": "///\\//\\//test", - "base": "http://example.org/", - "href": "http://test/", - "protocol": "http:", - "username": "", - "password": "", - "host": "test", - "hostname": "test", - "port": "", - "pathname": "/", - "search": "", - "hash": "" - }, - { - "input": "///example.org/path", - "base": "http://example.org/", - "href": "http://example.org/path", - "protocol": "http:", - "username": "", - "password": "", - "host": "example.org", - "hostname": "example.org", - "port": "", - "pathname": "/path", - "search": "", - "hash": "" - }, - { - "input": "///example.org/../path", - "base": "http://example.org/", - "href": "http://example.org/path", - "protocol": "http:", - "username": "", - "password": "", - "host": "example.org", - "hostname": "example.org", - "port": "", - "pathname": "/path", - "search": "", - "hash": "" - }, - { - "input": "///example.org/../../", - "base": "http://example.org/", - "href": "http://example.org/", - "protocol": "http:", - "username": "", - "password": "", - "host": "example.org", - "hostname": "example.org", - "port": "", - "pathname": "/", - "search": "", - "hash": "" - }, - { - "input": "///example.org/../path/../../", - "base": "http://example.org/", - "href": "http://example.org/", - "protocol": "http:", - "username": "", - "password": "", - "host": "example.org", - "hostname": "example.org", - "port": "", - "pathname": "/", - "search": "", - "hash": "" - }, - { - "input": "///example.org/../path/../../path", - "base": "http://example.org/", - "href": "http://example.org/path", - "protocol": "http:", - "username": "", - "password": "", - "host": "example.org", - "hostname": "example.org", - "port": "", - "pathname": "/path", - "search": "", - "hash": "" - }, - { - "input": "/\\/\\//example.org/../path", - "base": "http://example.org/", - "href": "http://example.org/path", - "protocol": "http:", - "username": "", - "password": "", - "host": "example.org", - "hostname": "example.org", - "port": "", - "pathname": "/path", - "search": "", - "hash": "" - }, - { - "input": "///abcdef/../", - "base": "file:///", - "href": "file:///", - "protocol": "file:", - "username": "", - "password": "", - "host": "", - "hostname": "", - "port": "", - "pathname": "/", - "search": "", - "hash": "" - }, - { - "input": "/\\//\\/a/../", - "base": "file:///", - "href": "file://////", - "protocol": "file:", - "username": "", - "password": "", - "host": "", - "hostname": "", - "port": "", - "pathname": "////", - "search": "", - "hash": "" - }, - { - "input": "//a/../", - "base": "file:///", - "href": "file://a/", - "protocol": "file:", - "username": "", - "password": "", - "host": "a", - "hostname": "a", - "port": "", - "pathname": "/", - "search": "", - "hash": "" } ] diff --git a/test/fixtures/wpt/url/url-statics-parse.any.js b/test/fixtures/wpt/url/url-statics-parse.any.js deleted file mode 100644 index 0822e9da07af6a..00000000000000 --- a/test/fixtures/wpt/url/url-statics-parse.any.js +++ /dev/null @@ -1,50 +0,0 @@ -// This intentionally does not use resources/urltestdata.json to preserve resources. -[ - { - "url": undefined, - "base": undefined, - "expected": false - }, - { - "url": "aaa:b", - "base": undefined, - "expected": true - }, - { - "url": undefined, - "base": "aaa:b", - "expected": false - }, - { - "url": "aaa:/b", - "base": undefined, - "expected": true - }, - { - "url": undefined, - "base": "aaa:/b", - "expected": true - }, - { - "url": "https://test:test", - "base": undefined, - "expected": false - }, - { - "url": "a", - "base": "https://b/", - "expected": true - } -].forEach(({ url, base, expected }) => { - test(() => { - if (expected == false) { - assert_equals(URL.parse(url, base), null); - } else { - assert_equals(URL.parse(url, base).href, new URL(url, base).href); - } - }, `URL.parse(${url}, ${base})`); -}); - -test(() => { - assert_not_equals(URL.parse("https://example/"), URL.parse("https://example/")); -}, `URL.parse() should return a unique object`); diff --git a/test/fixtures/wpt/versions.json b/test/fixtures/wpt/versions.json index 5f65dd1a829c58..a7c655125b5c22 100644 --- a/test/fixtures/wpt/versions.json +++ b/test/fixtures/wpt/versions.json @@ -72,7 +72,7 @@ "path": "streams" }, "url": { - "commit": "0f550ab9f5a07ed293926a306e914866164b346b", + "commit": "c2d7e70b52cbd9a5b938aa32f37078d7a71e0b21", "path": "url" }, "user-timing": { diff --git a/tools/lint-readme-lists.mjs b/tools/lint-readme-lists.mjs deleted file mode 100755 index 8859d2097c4e79..00000000000000 --- a/tools/lint-readme-lists.mjs +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env node - -// Validates the list in the README are in the correct order. - -import { open } from 'node:fs/promises'; - -const lists = [ - 'TSC voting members', - 'TSC regular members', - 'TSC emeriti members', - 'Collaborators', - 'Collaborator emeriti', - 'Triagers', -]; -const tscMembers = new Set(); - -const readme = await open(new URL('../README.md', import.meta.url), 'r'); - -let currentList = null; -let previousGithubHandle; -let lineNumber = 0; - -for await (const line of readme.readLines()) { - lineNumber++; - if (line.startsWith('### ')) { - currentList = lists[lists.indexOf(line.slice(4))]; - previousGithubHandle = null; - } else if (line.startsWith('#### ')) { - currentList = lists[lists.indexOf(line.slice(5))]; - previousGithubHandle = null; - } else if (currentList && line.startsWith('* [')) { - const currentGithubHandle = line.slice(3, line.indexOf(']')).toLowerCase(); - if (previousGithubHandle && previousGithubHandle >= currentGithubHandle) { - throw new Error(`${currentGithubHandle} should be listed before ${previousGithubHandle} in the ${currentList} list (README.md:${lineNumber})`); - } - - if (currentList === 'TSC voting members' || currentList === 'TSC regular members') { - tscMembers.add(currentGithubHandle); - } else if (currentList === 'Collaborators') { - tscMembers.delete(currentGithubHandle); - } - previousGithubHandle = currentGithubHandle; - } -} - -if (tscMembers.size !== 0) { - throw new Error(`Some TSC members are not listed as Collaborators: ${Array.from(tscMembers)}`); -}