diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 191cfc5e5dfddc..969ec37ee63ece 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -27,15 +27,15 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18 + uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2 with: languages: ${{ matrix.language }} config-file: ./.github/codeql-config.yml - name: Autobuild - uses: github/codeql-action/autobuild@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18 + uses: github/codeql-action/autobuild@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18 + uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2 with: category: /language:${{matrix.language}} diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 574703f4b0227b..45a5ab30e74ff6 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -33,7 +33,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0 + uses: step-security/harden-runner@6c439dc8bdf85cadbbce9ed30d1c7b959517bc49 # v2.12.2 with: egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs @@ -73,6 +73,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: Upload to code-scanning - uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18 + uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2 with: sarif_file: results.sarif diff --git a/.mailmap b/.mailmap index ec877b4c767a83..c0aac7e9647a69 100644 --- a/.mailmap +++ b/.mailmap @@ -436,7 +436,8 @@ Rebecca Turner Refael Ackermann Reza Akhavan Ricardo Sánchez Gregorio -Richard Lau +Richard Lau +Richard Lau Rick Olson rickyes <0x19951125@gmail.com> rickyes <0x19951125@gmail.com> diff --git a/CHANGELOG.md b/CHANGELOG.md index d23604a323cbc9..64ef13016f3a45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,7 +40,8 @@ release. -24.3.0
+24.4.0
+24.3.0
24.2.0
24.1.0
24.0.2
diff --git a/GOVERNANCE.md b/GOVERNANCE.md index cf5bc188ad3055..a1fd4148aaeed4 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -97,9 +97,17 @@ Charter need approval by the OpenJS Foundation Cross-Project Council (CPC). The TSC meets in a video conference call. Each year, the TSC elects a chair to run the meetings. The TSC streams its meetings for public viewing on YouTube. +TSC meetings may consist of a public portion and a private portion. The private +portion is used to discuss sensitive topics, such as personnel issues, +security vulnerabilities, or other confidential matters. Private discussions +should be avoided as much as possible, and the TSC should strive to keep +discussions in the public portion of the meeting, but there are times when +private discussions are necessary. + The TSC agenda includes issues that are at an impasse. The intention of the agenda is not to review or approve all patches. Collaborators review and approve -patches on GitHub. +patches on GitHub. The preference is to minimize the need for TSC meetings to +make decisions that can otherwise be made by collaborators on GitHub. Any community member can create a GitHub issue asking that the TSC review something. If consensus-seeking fails for an issue, a collaborator may apply the @@ -109,21 +117,55 @@ Before each TSC meeting, the meeting chair will share the agenda with members of the TSC. TSC members can also add items to the agenda at the beginning of each meeting. The meeting chair and the TSC cannot veto or remove items. -The TSC may invite people to take part in a non-voting capacity. - -During the meeting, the TSC chair ensures that someone takes minutes. After the -meeting, the TSC chair ensures that someone opens a pull request with the -minutes. - -The TSC seeks to resolve as many issues as possible outside meetings using -[the TSC issue tracker](https://github.com/nodejs/TSC/issues). The process in -the issue tracker is: +The TSC may invite people to take part in a non-voting capacity in either the +public or private portions of the meeting. + +During the public portion of the meeting, the TSC chair ensures that someone +takes minutes that include a summary of the discussion and any +decisions made. After the meeting, the TSC chair ensures that someone opens a +public pull request with the minutes from the public portion of the meeting. + +The public portion of the TSC meeting is expected to be recorded and made +available for live streaming during the meeting or download by anyone after. +This expectation is to be announced to all participants at the start of the +each meeting before the recording is started. Continued participation in the +public portion of the meeting after this announcement is interpreted as consent to the +recording. + +For the private portion of the meeting, the TSC chair ensures that someone +produces a summary of the discussions, gets it reviewed by the attendees, +and shares it to all the TSC members once approved by the attendees via a +private discussion channel such as the TSC private mailing list. The summary +may be made public if there is consensus within the TSC and the non-TSC +attendees to make it public. + +Recording the private portion of a meeting or maintaining or publishing a +detailed transcript is only permitted when all participants present during the +private portion of the meeting explicitly agree to the recording and/or +transcript, in order to comply to privacy regulations. + +All discussions made during meetings are considered provisional, receiving no +objections from folks at the TSC meeting to take an action is not equivalent to +the TSC endorsing that action. + +If a quorum of TSC voting members is present, it is possible to call for an +explicit vote, and take the vote immediately if there are no objections. The +decision is considered confirmed once the rest of the TSC voting members have +been informed and no objection for taking that vote has been raised in 48 hours. +To clarify, TSC voting members can object to the vote taking place during the +meeting, but not to the vote itself. + +For discussions outside of meetings, the TSC uses +[the TSC issue tracker](https://github.com/nodejs/TSC/issues) for public +issues, and the private TSC email list for private matters. The process for +public issues in the issue tracker is: * A TSC member opens an issue explaining the proposal/issue and @-mentions @nodejs/tsc. * The proposal passes if, after 72 hours, there are two or more TSC voting member approvals and no TSC voting member opposition. -* If there is an extended impasse, a TSC member may make a motion for a vote. +* If there is an extended impasse, a TSC member may ask for the issue to be + added to the TSC agenda, or make a motion for a vote. ## Collaborator nominations diff --git a/README.md b/README.md index 9866060f7577b9..89409939276585 100644 --- a/README.md +++ b/README.md @@ -187,7 +187,7 @@ For information about the governance of the Node.js project, see * [RaisinTen](https://github.com/RaisinTen) - **Darshan Sen** <> (he/him) * [richardlau](https://github.com/richardlau) - - **Richard Lau** <> + **Richard Lau** <> * [ronag](https://github.com/ronag) - **Robert Nagy** <> * [ruyadorno](https://github.com/ruyadorno) - @@ -355,6 +355,8 @@ For information about the governance of the Node.js project, see **Harshitha K P** <> (she/her) * [himself65](https://github.com/himself65) - **Zeyu "Alex" Yang** <> (he/him) +* [IlyasShabi](https://github.com/IlyasShabi) - + **Ilyas Shabi** <> (he/him) * [islandryu](https://github.com/islandryu) - **Ryuhei Shima** <> (he/him) * [jakecastelli](https://github.com/jakecastelli) - @@ -409,6 +411,8 @@ For information about the governance of the Node.js project, see **Moshe Atlow** <> (he/him) * [MrJithil](https://github.com/MrJithil) - **Jithil P Ponnan** <> (he/him) +* [ovflowd](https://github.com/ovflowd) - + **Claudio Wunder** <> (he/they) * [panva](https://github.com/panva) - **Filip Skokan** <> (he/him) - [Support me](https://github.com/sponsors/panva) * [pimterry](https://github.com/pimterry) - @@ -424,7 +428,7 @@ For information about the governance of the Node.js project, see * [RaisinTen](https://github.com/RaisinTen) - **Darshan Sen** <> (he/him) - [Support me](https://github.com/sponsors/RaisinTen) * [richardlau](https://github.com/richardlau) - - **Richard Lau** <> + **Richard Lau** <> * [rluvaton](https://github.com/rluvaton) - **Raz Luvaton** <> (he/him) * [ronag](https://github.com/ronag) - @@ -637,8 +641,6 @@ For information about the governance of the Node.js project, see **Alexis Campailla** <> * [othiym23](https://github.com/othiym23) - **Forrest L Norvell** <> (they/them/themself) -* [ovflowd](https://github.com/ovflowd) - - **Claudio Wunder** <> (he/they) * [oyyd](https://github.com/oyyd) - **Ouyang Yadong** <> (he/him) * [petkaantonov](https://github.com/petkaantonov) - @@ -797,7 +799,7 @@ Primary GPG keys for Node.js Releasers (some Releasers sign with subkeys): `8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600` * **Rafael Gonzaga** <> `890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4` -* **Richard Lau** <> +* **Richard Lau** <> `C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C` * **Ruy Adorno** <> `108F52B48DB57BB0CC439B2997B01419BD92F80A` diff --git a/benchmark/source_map/source-map-cache.js b/benchmark/source_map/source-map-cache.js new file mode 100644 index 00000000000000..aee4155471a02f --- /dev/null +++ b/benchmark/source_map/source-map-cache.js @@ -0,0 +1,60 @@ +'use strict'; + +const common = require('../common.js'); +const assert = require('assert'); +const fixtures = require('../../test/common/fixtures'); + +const bench = common.createBenchmark( + main, + { + operation: [ + 'findSourceMap-valid', + 'findSourceMap-generated-source', + ], + n: [1e5], + }, +); + +function main({ operation, n }) { + const Module = require('node:module'); + + Module.setSourceMapsSupport(true, { + generatedCode: true, + }); + const validFileName = fixtures.path('test-runner/source-maps/line-lengths/index.js'); + + const fileNameKey = '/source-map/disk.js'; + const generatedFileName = fixtures.path(fileNameKey); + const generatedFileContent = fixtures.readSync(fileNameKey, 'utf8'); + const sourceMapUrl = generatedFileName.replace(/\.js$/, '.map'); + const sourceWithGeneratedSourceMap = + `${generatedFileContent}\n//# sourceMappingURL=${sourceMapUrl}\n//# sourceURL=${generatedFileName}`; + const generatedExpectedUrl = `file://${generatedFileName}`; + + let sourceMap; + switch (operation) { + case 'findSourceMap-valid': + require(validFileName); + + bench.start(); + for (let i = 0; i < n; i++) { + sourceMap = Module.findSourceMap(validFileName); + } + bench.end(n); + break; + + case 'findSourceMap-generated-source': + eval(sourceWithGeneratedSourceMap); + + bench.start(); + for (let i = 0; i < n; i++) { + sourceMap = Module.findSourceMap(generatedExpectedUrl); + } + bench.end(n); + break; + + default: + throw new Error(`Unknown operation: ${operation}`); + } + assert.ok(sourceMap); +} diff --git a/benchmark/source_map/source-map.js b/benchmark/source_map/source-map.js new file mode 100644 index 00000000000000..54f78f300f9746 --- /dev/null +++ b/benchmark/source_map/source-map.js @@ -0,0 +1,95 @@ +'use strict'; + +const common = require('../common.js'); +const assert = require('assert'); +const fixtures = require('../../test/common/fixtures'); + +const bench = common.createBenchmark( + main, + { + operation: [ + 'parse', + 'parse-sectioned', + 'findEntry', + 'findEntry-sectioned', + 'findOrigin', + 'findOrigin-sectioned', + ], + n: [1e5], + }, +); + +function main({ operation, n }) { + const { SourceMap } = require('node:module'); + + const samplePayload = JSON.parse( + fixtures.readSync('source-map/no-source.js.map', 'utf8'), + ); + const sectionedPayload = JSON.parse( + fixtures.readSync('source-map/disk-index.map', 'utf8'), + ); + + let sourceMap; + let sourceMapMethod; + switch (operation) { + case 'parse': + bench.start(); + for (let i = 0; i < n; i++) { + sourceMap = new SourceMap(samplePayload); + } + bench.end(n); + break; + + case 'parse-sectioned': + bench.start(); + for (let i = 0; i < n; i++) { + sourceMap = new SourceMap(sectionedPayload); + } + bench.end(n); + break; + + case 'findEntry': + sourceMap = new SourceMap(samplePayload); + bench.start(); + for (let i = 0; i < n; i++) { + sourceMapMethod = sourceMap.findEntry(i, i); + } + bench.end(n); + assert.ok(sourceMapMethod); + break; + + case 'findEntry-sectioned': + sourceMap = new SourceMap(sectionedPayload); + bench.start(); + for (let i = 0; i < n; i++) { + sourceMapMethod = sourceMap.findEntry(i, i); + } + bench.end(n); + assert.ok(sourceMapMethod); + break; + + case 'findOrigin': + sourceMap = new SourceMap(samplePayload); + bench.start(); + for (let i = 0; i < n; i++) { + sourceMapMethod = sourceMap.findOrigin(i, i); + } + bench.end(n); + assert.ok(sourceMapMethod); + break; + + case 'findOrigin-sectioned': + sourceMap = new SourceMap(sectionedPayload); + bench.start(); + for (let i = 0; i < n; i++) { + sourceMapMethod = sourceMap.findOrigin(i, i); + } + bench.end(n); + assert.ok(sourceMapMethod); + break; + + default: + throw new Error(`Unknown operation: ${operation}`); + } + assert.ok(sourceMap); +} diff --git a/common.gypi b/common.gypi index 9904ad4ce35fc6..5bffe1c6eee7d8 100644 --- a/common.gypi +++ b/common.gypi @@ -38,7 +38,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.18', + 'v8_embedder_string': '-node.17', ##### V8 defaults for Node.js ##### @@ -115,6 +115,7 @@ # V8 pointer compression only supports 64bit architectures. ['target_arch in "arm ia32 mips mipsel"', { 'v8_enable_pointer_compression': 0, + 'v8_enable_pointer_compression_shared_cage': 0, 'v8_enable_31bit_smis_on_64bit_arch': 0, 'v8_enable_external_code_space': 0, 'v8_enable_sandbox': 0 diff --git a/deps/googletest/include/gtest/gtest-matchers.h b/deps/googletest/include/gtest/gtest-matchers.h index 78160f0e418da6..93643dba1d3a07 100644 --- a/deps/googletest/include/gtest/gtest-matchers.h +++ b/deps/googletest/include/gtest/gtest-matchers.h @@ -773,6 +773,35 @@ class GeMatcher static const char* NegatedDesc() { return "isn't >="; } }; +// Same as `EqMatcher`, except that the `rhs` is stored as `StoredRhs` and +// must be implicitly convertible to `Rhs`. +template +class ImplicitCastEqMatcher { + public: + explicit ImplicitCastEqMatcher(const StoredRhs& rhs) : stored_rhs_(rhs) {} + + using is_gtest_matcher = void; + + template + bool MatchAndExplain(const Lhs& lhs, std::ostream*) const { + return lhs == rhs(); + } + + void DescribeTo(std::ostream* os) const { + *os << "is equal to "; + UniversalPrint(rhs(), os); + } + void DescribeNegationTo(std::ostream* os) const { + *os << "isn't equal to "; + UniversalPrint(rhs(), os); + } + + private: + Rhs rhs() const { return ImplicitCast_(stored_rhs_); } + + StoredRhs stored_rhs_; +}; + template ::value>::type> using StringLike = T; diff --git a/deps/googletest/src/gtest.cc b/deps/googletest/src/gtest.cc index 6be9300e09d1d4..9300e5c0945dd0 100644 --- a/deps/googletest/src/gtest.cc +++ b/deps/googletest/src/gtest.cc @@ -269,6 +269,13 @@ GTEST_DEFINE_bool_( "True if and only if the test should fail if no test case (including " "disabled test cases) is linked."); +GTEST_DEFINE_bool_( + fail_if_no_test_selected, + testing::internal::BoolFromGTestEnv("fail_if_no_test_selected", false), + "True if and only if the test should fail if no test case is selected to " + "run. A test case is selected to run if it is not disabled and is matched " + "by the filter flag so that it starts executing."); + GTEST_DEFINE_bool_( also_run_disabled_tests, testing::internal::BoolFromGTestEnv("also_run_disabled_tests", false), @@ -6079,6 +6086,14 @@ bool UnitTestImpl::RunAllTests() { TearDownEnvironment); repeater->OnEnvironmentsTearDownEnd(*parent_); } + } else if (GTEST_FLAG_GET(fail_if_no_test_selected)) { + // If there were no tests to run, bail if we were requested to be strict. + constexpr char kNoTestsSelectedMessage[] = + "No tests were selected to run. Please make sure at least one test " + "exists and is not disabled! If the test is sharded, you may have " + "defined more shards than test cases, which is wasteful."; + ColoredPrintf(GTestColor::kRed, "%s\n", kNoTestsSelectedMessage); + return false; } elapsed_time_ = timer.Elapsed(); @@ -6763,6 +6778,7 @@ static bool ParseGoogleTestFlag(const char* const arg) { GTEST_INTERNAL_PARSE_FLAG(death_test_use_fork); GTEST_INTERNAL_PARSE_FLAG(fail_fast); GTEST_INTERNAL_PARSE_FLAG(fail_if_no_test_linked); + GTEST_INTERNAL_PARSE_FLAG(fail_if_no_test_selected); GTEST_INTERNAL_PARSE_FLAG(filter); GTEST_INTERNAL_PARSE_FLAG(internal_run_death_test); GTEST_INTERNAL_PARSE_FLAG(list_tests); diff --git a/deps/inspector_protocol/BUILD.gn b/deps/inspector_protocol/BUILD.gn index 974471bf2718d5..ee03d87826b952 100644 --- a/deps/inspector_protocol/BUILD.gn +++ b/deps/inspector_protocol/BUILD.gn @@ -1,34 +1,95 @@ -# Copyright 2019 the V8 project authors. All rights reserved. +# Copyright 2018 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -static_library("encoding") { +# This BUILD.gn file is specific to the standalone project. Do not +# copy this downstream. + +import("//testing/test.gni") + +static_library("crdtp") { sources = [ - "encoding/encoding.cc", - "encoding/encoding.h", + "crdtp/cbor.cc", + "crdtp/cbor.h", + "crdtp/dispatch.cc", + "crdtp/dispatch.h", + "crdtp/error_support.cc", + "crdtp/error_support.h", + "crdtp/export.h", + "crdtp/find_by_first.h", + "crdtp/frontend_channel.h", + "crdtp/glue.h", + "crdtp/json.cc", + "crdtp/json.h", + "crdtp/parser_handler.h", + "crdtp/protocol_core.cc", + "crdtp/protocol_core.h", + "crdtp/serializable.cc", + "crdtp/serializable.h", + "crdtp/span.cc", + "crdtp/span.h", + "crdtp/status.cc", + "crdtp/status.h", ] + deps = [ ":crdtp_platform" ] } -# encoding_test is part of the unittests, defined in -# test/unittests/BUILD.gn. +# A small adapter library which only :crdtp may depend on. +static_library("crdtp_platform") { + sources = [ + "crdtp/json_platform.cc", + "crdtp/json_platform.h", + ] +} -import("../../gni/v8.gni") +# In this (upstream) standalone package, we declare crdtp_test, and a +# few minimal files in testing (accessed via test_platform.{h,cc}) to +# make it look like Chromium's testing package. In Chromium, +# we run these tests as part of the content_unittests, declared in +# content/test/BUILD.gn, and in V8, we run them via unittests, declared +# in test/unittests/BUILD.gn. -v8_source_set("encoding_test") { +test("crdtp_test") { sources = [ - "encoding/encoding_test.cc", - "encoding/encoding_test_helper.h", - ] - configs = [ - "../..:external_config", - "../..:internal_config_base", + "crdtp/cbor_test.cc", + "crdtp/dispatch_test.cc", + "crdtp/error_support_test.cc", + "crdtp/find_by_first_test.cc", + "crdtp/json_test.cc", + "crdtp/protocol_core_test.cc", + "crdtp/serializable_test.cc", + "crdtp/span_test.cc", + "crdtp/status_test.cc", + "crdtp/status_test_support.cc", + "crdtp/status_test_support.h", + "crdtp/test_string_traits.cc", + "crdtp/test_string_traits.h", ] + include_dirs = [ "." ] deps = [ - ":encoding", - "../..:v8_libbase", - "../../src/inspector:inspector_string_conversions", + ":crdtp", + ":crdtp_test_platform", + ] +} + +# A small adapter library which only :crdtp_test may depend on. +static_library("crdtp_test_platform") { + sources = [ + "crdtp/test_platform.cc", + "crdtp/test_platform.h", + ] + testonly = true + include_dirs = [ "." ] + public_deps = [ + "//base", "//testing/gmock", "//testing/gtest", + "//testing/gtest:gtest_main", ] - testonly = true +} + +# A command line utility for converting between JSON and CBOR. +executable("transcode") { + sources = [ "crdtp/transcode.cc" ] + deps = [ ":crdtp" ] } diff --git a/deps/inspector_protocol/LICENSE b/deps/inspector_protocol/LICENSE index 800468e5763479..4d9a34a914c948 100644 --- a/deps/inspector_protocol/LICENSE +++ b/deps/inspector_protocol/LICENSE @@ -1,4 +1,4 @@ -// Copyright 2016 The Chromium Authors. All rights reserved. +// Copyright 2016 The Chromium Authors. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are diff --git a/deps/inspector_protocol/README.node b/deps/inspector_protocol/README.node index 5d5b486b512297..af4618cd6160e5 100644 --- a/deps/inspector_protocol/README.node +++ b/deps/inspector_protocol/README.node @@ -2,7 +2,7 @@ Name: inspector protocol Short Name: inspector_protocol URL: https://chromium.googlesource.com/deps/inspector_protocol/ Version: 0 -Revision: 64cc2301620c04f0fe0313ae94a9319f003603cf +Revision: 69d69ddf3aa698b171886551a4a672c5af1ad902 License: BSD License File: LICENSE Security Critical: no diff --git a/deps/inspector_protocol/code_generator.py b/deps/inspector_protocol/code_generator.py index 53beb861259af5..ce989e4869002e 100755 --- a/deps/inspector_protocol/code_generator.py +++ b/deps/inspector_protocol/code_generator.py @@ -147,7 +147,7 @@ def dash_to_camelcase(word): def to_snake_case(name): name = re.sub(r"([A-Z]{2,})([A-Z][a-z])", r"\1_\2", name) - return re.sub(r"([a-z0-9])([A-Z])", r"\1_\2", name, sys.maxsize).lower() + return re.sub(r"([a-z0-9])([A-Z])", r"\1_\2", name, count=sys.maxsize).lower() def to_method_case(config, name): @@ -542,6 +542,12 @@ def resolve_type(self, prop): return wrap_array_definition(self.resolve_type(prop["items"])) return self.type_definitions[prop["type"]] + def optional_type(self, prop): + type = self.resolve_type(prop) + template = ("std::optional<{}>" if type.get('is_primitive', False) + else "std::unique_ptr<{}>") + return template.format(type.get("raw_type")) + def generate_command(self, domain, command): if not self.config.protocol.options: return domain in self.generate_domains diff --git a/deps/inspector_protocol/crdtp/README.md b/deps/inspector_protocol/crdtp/README.md index a9bbc9e8865fd2..a3bc75943fd213 100644 --- a/deps/inspector_protocol/crdtp/README.md +++ b/deps/inspector_protocol/crdtp/README.md @@ -51,10 +51,10 @@ to fetch the package (and dependencies) and build and run the tests: ninja -C out/Release crdtp_test out/Release/crdtp_test -You'll probably also need to install g++, since Clang uses this to find the +You'll probably also need to install libstdc++, since Clang uses this to find the standard C++ headers. E.g., - sudo apt-get install g++-8 + sudo apt-get install libstdc++-14-dev # Purpose of the tests diff --git a/deps/inspector_protocol/crdtp/cbor.h b/deps/inspector_protocol/crdtp/cbor.h index 471aa78e605298..2d925fad5cc30b 100644 --- a/deps/inspector_protocol/crdtp/cbor.h +++ b/deps/inspector_protocol/crdtp/cbor.h @@ -255,7 +255,8 @@ class CRDTP_EXPORT CBORTokenizer { span GetString8() const; // Wire representation for STRING16 is low byte first (little endian). - // To be called only if ::TokenTag() == CBORTokenTag::STRING16. + // To be called only if ::TokenTag() == CBORTokenTag::STRING16. The result is + // guaranteed to have even length. span GetString16WireRep() const; // To be called only if ::TokenTag() == CBORTokenTag::BINARY. diff --git a/deps/inspector_protocol/crdtp/dispatch_test.cc b/deps/inspector_protocol/crdtp/dispatch_test.cc index 03c8792a8ee1c3..c7290f92961367 100644 --- a/deps/inspector_protocol/crdtp/dispatch_test.cc +++ b/deps/inspector_protocol/crdtp/dispatch_test.cc @@ -169,10 +169,11 @@ TEST(DispatchableTest, MessageWithUnknownProperty) { } TEST(DispatchableTest, DuplicateMapKey) { - for (const std::string& json : - {"{\"id\":42,\"id\":42}", "{\"params\":null,\"params\":null}", - "{\"method\":\"foo\",\"method\":\"foo\"}", - "{\"sessionId\":\"42\",\"sessionId\":\"42\"}"}) { + const std::array jsons = { + {"{\"id\":42,\"id\":42}", "{\"params\":null,\"params\":null}", + "{\"method\":\"foo\",\"method\":\"foo\"}", + "{\"sessionId\":\"42\",\"sessionId\":\"42\"}"}}; + for (const std::string& json : jsons) { SCOPED_TRACE("json = " + json); std::vector cbor; ASSERT_TRUE(json::ConvertJSONToCBOR(SpanFrom(json), &cbor).ok()); @@ -185,11 +186,12 @@ TEST(DispatchableTest, DuplicateMapKey) { } TEST(DispatchableTest, ValidMessageParsesOK_NoParams) { - for (const std::string& json : - {"{\"id\":42,\"method\":\"Foo.executeBar\",\"sessionId\":" - "\"f421ssvaz4\"}", - "{\"id\":42,\"method\":\"Foo.executeBar\",\"sessionId\":\"f421ssvaz4\"," - "\"params\":null}"}) { + const std::array jsons = { + {"{\"id\":42,\"method\":\"Foo.executeBar\",\"sessionId\":" + "\"f421ssvaz4\"}", + "{\"id\":42,\"method\":\"Foo.executeBar\",\"sessionId\":\"f421ssvaz4\"," + "\"params\":null}"}}; + for (const std::string& json : jsons) { SCOPED_TRACE("json = " + json); std::vector cbor; ASSERT_TRUE(json::ConvertJSONToCBOR(SpanFrom(json), &cbor).ok()); diff --git a/deps/inspector_protocol/crdtp/frontend_channel.h b/deps/inspector_protocol/crdtp/frontend_channel.h index 0aa7480c943237..652c65219d4d4c 100644 --- a/deps/inspector_protocol/crdtp/frontend_channel.h +++ b/deps/inspector_protocol/crdtp/frontend_channel.h @@ -24,7 +24,7 @@ class CRDTP_EXPORT FrontendChannel { // responses may be sent from an untrusted source to a trusted process (e.g. // from Chromium's renderer (blink) to the browser process), which needs // to be able to match the response to an earlier request without parsing the - // messsage. + // message. virtual void SendProtocolResponse(int call_id, std::unique_ptr message) = 0; virtual void SendProtocolNotification( diff --git a/deps/inspector_protocol/crdtp/json_test.cc b/deps/inspector_protocol/crdtp/json_test.cc index 64362d391bf7b6..08f65e48a20147 100644 --- a/deps/inspector_protocol/crdtp/json_test.cc +++ b/deps/inspector_protocol/crdtp/json_test.cc @@ -704,15 +704,16 @@ using ContainerTestTypes = ::testing::Types, std::string>; TYPED_TEST_SUITE(ConvertJSONToCBORTest, ContainerTestTypes); TYPED_TEST(ConvertJSONToCBORTest, RoundTripValidJson) { - for (const std::string& json_in : { - "{\"msg\":\"Hello, world.\",\"lst\":[1,2,3]}", - "3.1415", - "false", - "true", - "\"Hello, world.\"", - "[1,2,3]", - "[]", - }) { + const std::array jsons = {{ + "{\"msg\":\"Hello, world.\",\"lst\":[1,2,3]}", + "3.1415", + "false", + "true", + "\"Hello, world.\"", + "[1,2,3]", + "[]", + }}; + for (const std::string& json_in : jsons) { SCOPED_TRACE(json_in); TypeParam json(json_in.begin(), json_in.end()); std::vector cbor; diff --git a/deps/inspector_protocol/crdtp/maybe.h b/deps/inspector_protocol/crdtp/maybe.h deleted file mode 100644 index ecdfb4fd89fe8f..00000000000000 --- a/deps/inspector_protocol/crdtp/maybe.h +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright 2019 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -#ifndef CRDTP_MAYBE_H_ -#define CRDTP_MAYBE_H_ - -#include -#include - -namespace crdtp { - -// ============================================================================= -// detail::PtrMaybe, detail::ValueMaybe, templates for optional -// pointers / values which are used in ../lib/Forward_h.template. -// ============================================================================= - -namespace detail { -template -class PtrMaybe { - public: - PtrMaybe() = default; - PtrMaybe(std::unique_ptr value) : value_(std::move(value)) {} - PtrMaybe(PtrMaybe&& other) noexcept : value_(std::move(other.value_)) {} - void operator=(std::unique_ptr value) { value_ = std::move(value); } - - // std::optional<>-compatible accessors (preferred). - bool has_value() const { return !!value_; } - operator bool() const { return has_value(); } - const T& value() const& { - assert(has_value()); - return *value_; - } - T& value() & { - assert(has_value()); - return *value_; - } - T&& value() && { - assert(has_value()); - return std::move(*value_); - } - const T& value_or(const T& default_value) const { - return has_value() ? *value_ : default_value; - } - T* operator->() { return &value(); } - const T* operator->() const { return &value(); } - - T& operator*() & { return value(); } - const T& operator*() const& { return value(); } - T&& operator*() && { return std::move(value()); } - - // Legacy Maybe<> accessors (deprecated). - T* fromJust() const { - assert(value_); - return value_.get(); - } - T* fromMaybe(T* default_value) const { - return value_ ? value_.get() : default_value; - } - bool isJust() const { return value_ != nullptr; } - - private: - std::unique_ptr value_; -}; - -template -class ValueMaybe { - public: - ValueMaybe() : is_just_(false), value_() {} - ValueMaybe(T value) : is_just_(true), value_(std::move(value)) {} - ValueMaybe(ValueMaybe&& other) noexcept - : is_just_(other.is_just_), value_(std::move(other.value_)) {} - void operator=(T value) { - value_ = std::move(value); - is_just_ = true; - } - - // std::optional<>-compatible accessors (preferred). - bool has_value() const { return is_just_; } - operator bool() const { return has_value(); } - const T& value() const& { - assert(is_just_); - return value_; - } - T& value() & { - assert(is_just_); - return value_; - } - T&& value() && { - assert(is_just_); - return *std::move(value_); - } - template - T value_or(U&& default_value) const& { - return is_just_ ? value_ : std::forward(default_value); - } - template - T value_or(U&& default_value) && { - return is_just_ ? std::move(value_) : std::forward(default_value); - } - T* operator->() { return &value(); } - const T* operator->() const { return &value(); } - - T& operator*() & { return value(); } - const T& operator*() const& { return value(); } - T&& operator*() && { return std::move(value()); } - - // Legacy Maybe<> accessors (deprecated). - const T& fromJust() const { - assert(is_just_); - return value_; - } - const T& fromMaybe(const T& default_value) const { - return is_just_ ? value_ : default_value; - } - bool isJust() const { return is_just_; } - - private: - bool is_just_; - T value_; -}; - -template -struct MaybeTypedef { - typedef PtrMaybe type; -}; - -template <> -struct MaybeTypedef { - typedef ValueMaybe type; -}; - -template <> -struct MaybeTypedef { - typedef ValueMaybe type; -}; - -template <> -struct MaybeTypedef { - typedef ValueMaybe type; -}; - -template <> -struct MaybeTypedef { - typedef ValueMaybe type; -}; - -} // namespace detail - -template -using Maybe = typename detail::MaybeTypedef::type; - -} // namespace crdtp - -#endif // CRDTP_MAYBE_H_ diff --git a/deps/inspector_protocol/crdtp/maybe_test.cc b/deps/inspector_protocol/crdtp/maybe_test.cc deleted file mode 100644 index d606692b51a1c5..00000000000000 --- a/deps/inspector_protocol/crdtp/maybe_test.cc +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2019 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "maybe.h" - -#include -#include - -#include "test_platform.h" - -namespace crdtp { - -// ============================================================================= -// detail::PtrMaybe, detail::ValueMaybe, templates for optional -// pointers / values which are used in ../lib/Forward_h.template. -// ============================================================================= -TEST(PtrMaybeTest, SmokeTest) { - detail::PtrMaybe> example; - EXPECT_FALSE(example.has_value()); - std::unique_ptr> v(new std::vector); - v->push_back(42); - v->push_back(21); - example = std::move(v); - EXPECT_TRUE(example.has_value()); - EXPECT_THAT(example.value(), testing::ElementsAre(42, 21)); - std::vector out = *std::move(example); - EXPECT_TRUE(example.has_value()); - EXPECT_THAT(*example, testing::IsEmpty()); - EXPECT_THAT(out, testing::ElementsAre(42, 21)); -} - -TEST(ValueMaybeTest, SmokeTest) { - detail::ValueMaybe example; - EXPECT_FALSE(example.has_value()); - EXPECT_EQ(-1, example.value_or(-1)); - example = 42; - EXPECT_TRUE(example.has_value()); - EXPECT_EQ(42, example.value()); - int32_t out = *std::move(example); - EXPECT_EQ(out, 42); -} - -} // namespace crdtp diff --git a/deps/inspector_protocol/crdtp/protocol_core.cc b/deps/inspector_protocol/crdtp/protocol_core.cc index d9cc3b11360087..69773593ded162 100644 --- a/deps/inspector_protocol/crdtp/protocol_core.cc +++ b/deps/inspector_protocol/crdtp/protocol_core.cc @@ -280,10 +280,10 @@ bool ProtocolTypeTraits>::Deserialize( return true; } -void ProtocolTypeTraits>::Serialize( - const std::unique_ptr& value, +void ProtocolTypeTraits::Serialize( + const DeferredMessage& value, std::vector* bytes) { - value->AppendSerialized(bytes); + value.AppendSerialized(bytes); } } // namespace crdtp diff --git a/deps/inspector_protocol/crdtp/protocol_core.h b/deps/inspector_protocol/crdtp/protocol_core.h index e89e0b2d9516eb..f8283367773a42 100644 --- a/deps/inspector_protocol/crdtp/protocol_core.h +++ b/deps/inspector_protocol/crdtp/protocol_core.h @@ -8,12 +8,12 @@ #include #include +#include #include #include #include #include "cbor.h" -#include "maybe.h" #include "serializable.h" #include "span.h" #include "status.h" @@ -84,7 +84,7 @@ class CRDTP_EXPORT ContainerSerializer { ProtocolTypeTraits::Serialize(value, bytes_); } template - void AddField(span field_name, const detail::ValueMaybe& value) { + void AddField(span field_name, const std::optional& value) { if (!value.has_value()) { return; } @@ -92,11 +92,11 @@ class CRDTP_EXPORT ContainerSerializer { } template - void AddField(span field_name, const detail::PtrMaybe& value) { - if (!value.has_value()) { + void AddField(span field_name, const std::unique_ptr& value) { + if (!value) { return; } - AddField(field_name, value.value()); + AddField(field_name, *value); } void EncodeStop(); @@ -209,14 +209,18 @@ template <> struct CRDTP_EXPORT ProtocolTypeTraits> { static bool Deserialize(DeserializerState* state, std::unique_ptr* value); - static void Serialize(const std::unique_ptr& value, +}; + +template <> +struct CRDTP_EXPORT ProtocolTypeTraits { + static void Serialize(const DeferredMessage& value, std::vector* bytes); }; template -struct ProtocolTypeTraits> { +struct ProtocolTypeTraits> { static bool Deserialize(DeserializerState* state, - detail::ValueMaybe* value) { + std::optional* value) { T res; if (!ProtocolTypeTraits::Deserialize(state, &res)) return false; @@ -224,24 +228,7 @@ struct ProtocolTypeTraits> { return true; } - static void Serialize(const detail::ValueMaybe& value, - std::vector* bytes) { - ProtocolTypeTraits::Serialize(value.value(), bytes); - } -}; - -template -struct ProtocolTypeTraits> { - static bool Deserialize(DeserializerState* state, - detail::PtrMaybe* value) { - std::unique_ptr res; - if (!ProtocolTypeTraits>::Deserialize(state, &res)) - return false; - *value = std::move(res); - return true; - } - - static void Serialize(const detail::PtrMaybe& value, + static void Serialize(const std::optional& value, std::vector* bytes) { ProtocolTypeTraits::Serialize(value.value(), bytes); } diff --git a/deps/inspector_protocol/crdtp/protocol_core_test.cc b/deps/inspector_protocol/crdtp/protocol_core_test.cc index 2d9246b4b85998..dbe99be634b8f0 100644 --- a/deps/inspector_protocol/crdtp/protocol_core_test.cc +++ b/deps/inspector_protocol/crdtp/protocol_core_test.cc @@ -7,7 +7,6 @@ #include #include "cbor.h" -#include "maybe.h" #include "status_test_support.h" #include "test_platform.h" #include "test_string_traits.h" @@ -359,10 +358,9 @@ class TestTypeOptional : public ProtocolObject { const std::string& GetStrField() const { return str_field_.value(); } void SetStrField(std::string value) { str_field_ = std::move(value); } - bool HasTestTypeBasicField() { return test_type_basic_field_.has_value(); } + bool HasTestTypeBasicField() { return !!test_type_basic_field_; } const TestTypeBasic* GetTestTypeBasicField() const { - return test_type_basic_field_.has_value() ? &test_type_basic_field_.value() - : nullptr; + return test_type_basic_field_.get(); } void SetTestTypeBasicField(std::unique_ptr value) { test_type_basic_field_ = std::move(value); @@ -371,9 +369,9 @@ class TestTypeOptional : public ProtocolObject { private: DECLARE_SERIALIZATION_SUPPORT(); - Maybe int_field_; - Maybe str_field_; - Maybe test_type_basic_field_; + std::optional int_field_; + std::optional str_field_; + std::unique_ptr test_type_basic_field_; }; // clang-format off diff --git a/deps/inspector_protocol/inspector_protocol.gni b/deps/inspector_protocol/inspector_protocol.gni index 4e2547a09ad658..15ffbf923ce3b8 100644 --- a/deps/inspector_protocol/inspector_protocol.gni +++ b/deps/inspector_protocol/inspector_protocol.gni @@ -2,11 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -declare_args() { - # Where jinja2 is located, in chromium it is //third_party. - jinja_dir = "//third_party" -} - # This template will generate inspector protocol source code. The code will # not be compiled, use get_target_outputs() to compile them. # @@ -24,6 +19,9 @@ declare_args() { # # inputs (optional) # Extra inputs specified by the config file. +# +# jinja_dir (optional) +# Custom path to jinja (defaults to "//third_party"). template("inspector_protocol_generate") { assert(defined(invoker.config_file)) assert(defined(invoker.out_dir)) @@ -32,6 +30,12 @@ template("inspector_protocol_generate") { inspector_protocol_dir = invoker.inspector_protocol_dir use_embedder_types = defined(invoker.use_embedder_types) && invoker.use_embedder_types + + if (defined(invoker.jinja_dir)) { + jinja_dir = invoker.jinja_dir + } else { + jinja_dir = "//third_party" + } action(target_name) { script = "$inspector_protocol_dir/code_generator.py" diff --git a/deps/inspector_protocol/lib/Forward_h.template b/deps/inspector_protocol/lib/Forward_h.template index 4de0eeb803174b..247bc03c790b03 100644 --- a/deps/inspector_protocol/lib/Forward_h.template +++ b/deps/inspector_protocol/lib/Forward_h.template @@ -54,12 +54,6 @@ class StringValue; class Value; {% endif %} -using {{config.crdtp.namespace}}::detail::PtrMaybe; -using {{config.crdtp.namespace}}::detail::ValueMaybe; - -template -using Maybe = {{config.crdtp.namespace}}::Maybe; - namespace detail { template diff --git a/deps/inspector_protocol/lib/Values_cpp.template b/deps/inspector_protocol/lib/Values_cpp.template index dbc51694db2fa6..0c409295d52ae3 100644 --- a/deps/inspector_protocol/lib/Values_cpp.template +++ b/deps/inspector_protocol/lib/Values_cpp.template @@ -87,8 +87,7 @@ class ValueParserHandler : public ParserHandler { } void HandleBinary(span bytes) override { - AddValueToParent( - BinaryValue::create(Binary::fromSpan(bytes.data(), bytes.size()))); + AddValueToParent(BinaryValue::create(Binary::fromSpan(bytes))); } void HandleDouble(double value) override { diff --git a/deps/inspector_protocol/templates/TypeBuilder_cpp.template b/deps/inspector_protocol/templates/TypeBuilder_cpp.template index 27a8f1f12b7e76..a38182c311ae6e 100644 --- a/deps/inspector_protocol/templates/TypeBuilder_cpp.template +++ b/deps/inspector_protocol/templates/TypeBuilder_cpp.template @@ -116,7 +116,7 @@ const char* {{ literal | to_title_case}} = "{{literal}}"; void Frontend::{{event.name | to_method_case}}( {%- for parameter in event.parameters %} {% if "optional" in parameter -%} - Maybe<{{protocol.resolve_type(parameter).raw_type}}> + {{protocol.optional_type(parameter)}} {%- else -%} {{protocol.resolve_type(parameter).pass_type}} {%- endif %} {{parameter.name}}{%- if not loop.last -%}, {% endif -%} @@ -215,7 +215,7 @@ public: void sendSuccess( {%- for parameter in command.returns -%} {%- if "optional" in parameter -%} - Maybe<{{protocol.resolve_type(parameter).raw_type}}> {{parameter.name}} + {{protocol.optional_type(parameter)}} {{parameter.name}} {%- else -%} {{protocol.resolve_type(parameter).pass_type}} {{parameter.name}} {%- endif -%} @@ -249,7 +249,7 @@ struct {{command.name}}Params : public {{config.crdtp.namespace}}::Deserializabl {% for parameter in command.parameters %} {% set parameter_type = protocol.resolve_type(parameter) %} {% if parameter.optional %} - Maybe<{{parameter_type.raw_type}}> {{parameter.name}}; + {{protocol.optional_type(parameter)}} {{parameter.name}}; {% else %} {{parameter_type.type}} {{parameter.name}}; {% endif %} @@ -286,7 +286,7 @@ void DomainDispatcherImpl::{{command.name}}(const {{config.crdtp.namespace}}::Di // Declare output parameters. {% for parameter in command.returns %} {% if "optional" in parameter %} - Maybe<{{protocol.resolve_type(parameter).raw_type}}> out_{{parameter.name}}; + {{protocol.optional_type(parameter)}} out_{{parameter.name}}; {% else %} {{protocol.resolve_type(parameter).type}} out_{{parameter.name}}; {% endif %} diff --git a/deps/inspector_protocol/templates/TypeBuilder_h.template b/deps/inspector_protocol/templates/TypeBuilder_h.template index e23567a5732d76..7c2a696ad0cbe4 100644 --- a/deps/inspector_protocol/templates/TypeBuilder_h.template +++ b/deps/inspector_protocol/templates/TypeBuilder_h.template @@ -89,16 +89,19 @@ public: {% endif %} {% if property.optional %} - bool {{"has" | to_method_case}}{{property_name}}() { return {{property_field}}.has_value(); } + bool {{"has" | to_method_case}}{{property_name}}() { return !!{{property_field}}; } {% if property_type.is_primitive %} {{property_type.raw_return_type}} {{"get" | to_method_case}}{{property_name}}({{property_type.raw_pass_type}} defaultValue) const { return {{property_field}}.value_or(defaultValue); } {% else %} {{property_type.raw_return_type}} {{"get" | to_method_case}}{{property_name}}({{property_type.raw_pass_type}} defaultValue) { - return {{property_field}}.has_value() ? &{{property_field}}.value() : defaultValue; + return {{property_field}} ? {{property_field}}.get() : defaultValue; } {% endif %} + const {{protocol.optional_type(property)}}& {{"get" | to_method_case}}{{property_name}}() const { + return {{property_field}}; + } {% else %} {{property_type.raw_return_type}} {{"get" | to_method_case}}{{property_name}}() { return {{property_type.to_raw_type % property_field}}; } {% endif %} @@ -175,7 +178,7 @@ private: {% for property in type.properties %} {% if property.optional %} - Maybe<{{protocol.resolve_type(property).raw_type}}> m_{{property.name}}; + {{protocol.optional_type(property)}} m_{{property.name}}; {% else %} {{protocol.resolve_type(property).type}} m_{{property.name}}; {% endif %} @@ -199,7 +202,7 @@ public: virtual void sendSuccess( {%- for parameter in command.returns -%} {%- if "optional" in parameter -%} - Maybe<{{protocol.resolve_type(parameter).raw_type}}> {{parameter.name}} + {{protocol.optional_type(parameter)}} {{parameter.name}} {%- else -%} {{protocol.resolve_type(parameter).pass_type}} {{parameter.name}} {%- endif -%} @@ -219,7 +222,7 @@ public: {%- for parameter in command.parameters -%} {%- if not loop.first -%}, {% endif -%} {%- if "optional" in parameter -%} - Maybe<{{protocol.resolve_type(parameter).raw_type}}> in_{{parameter.name}} + {{protocol.optional_type(parameter)}} in_{{parameter.name}} {%- else -%} {{protocol.resolve_type(parameter).pass_type}} in_{{parameter.name}} {%- endif -%} @@ -231,7 +234,7 @@ public: {%- for parameter in command.returns -%} {%- if (not loop.first) or command.parameters -%}, {% endif -%} {%- if "optional" in parameter -%} - Maybe<{{protocol.resolve_type(parameter).raw_type}}>* out_{{parameter.name}} + {{protocol.optional_type(parameter)}}* out_{{parameter.name}} {%- else -%} {{protocol.resolve_type(parameter).type}}* out_{{parameter.name}} {%- endif -%} @@ -258,7 +261,7 @@ public: void {{event.name | to_method_case}}( {%- for parameter in event.parameters -%} {%- if "optional" in parameter -%} - Maybe<{{protocol.resolve_type(parameter).raw_type}}> {{parameter.name}} = Maybe<{{protocol.resolve_type(parameter).raw_type}}>() + {{protocol.optional_type(parameter)}} {{parameter.name}} = {} {%- else -%} {{protocol.resolve_type(parameter).pass_type}} {{parameter.name}} {%- endif -%}{%- if not loop.last -%}, {% endif -%} diff --git a/deps/minimatch/dist/commonjs/index.js b/deps/minimatch/dist/commonjs/index.js index 64a0f1f833222e..f58fb8616aa9ab 100644 --- a/deps/minimatch/dist/commonjs/index.js +++ b/deps/minimatch/dist/commonjs/index.js @@ -1,10 +1,7 @@ "use strict"; -var __importDefault = (this && this.__importDefault) || function (mod) { - return (mod && mod.__esModule) ? mod : { "default": mod }; -}; Object.defineProperty(exports, "__esModule", { value: true }); exports.unescape = exports.escape = exports.AST = exports.Minimatch = exports.match = exports.makeRe = exports.braceExpand = exports.defaults = exports.filter = exports.GLOBSTAR = exports.sep = exports.minimatch = void 0; -const brace_expansion_1 = __importDefault(require("brace-expansion")); +const brace_expansion_1 = require("@isaacs/brace-expansion"); const assert_valid_pattern_js_1 = require("./assert-valid-pattern.js"); const ast_js_1 = require("./ast.js"); const escape_js_1 = require("./escape.js"); @@ -157,7 +154,7 @@ const braceExpand = (pattern, options = {}) => { // shortcut. no need to expand. return [pattern]; } - return (0, brace_expansion_1.default)(pattern); + return (0, brace_expansion_1.expand)(pattern); }; exports.braceExpand = braceExpand; exports.minimatch.braceExpand = exports.braceExpand; diff --git a/deps/minimatch/dist/commonjs/index.js.map b/deps/minimatch/dist/commonjs/index.js.map index 5e9676935a3463..96ae5accf6a889 100644 --- a/deps/minimatch/dist/commonjs/index.js.map +++ b/deps/minimatch/dist/commonjs/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,sEAAoC;AACpC,uEAA8D;AAC9D,qCAA2C;AAC3C,2CAAoC;AACpC,+CAAwC;AAsCjC,MAAM,SAAS,GAAG,CACvB,CAAS,EACT,OAAe,EACf,UAA4B,EAAE,EAC9B,EAAE;IACF,IAAA,4CAAkB,EAAC,OAAO,CAAC,CAAA;IAE3B,oCAAoC;IACpC,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;QACpD,OAAO,KAAK,CAAA;IACd,CAAC;IAED,OAAO,IAAI,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACjD,CAAC,CAAA;AAbY,QAAA,SAAS,aAarB;AAED,wDAAwD;AACxD,MAAM,YAAY,GAAG,uBAAuB,CAAA;AAC5C,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,CAAS,EAAE,EAAE,CACpD,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;AACvC,MAAM,iBAAiB,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,CAAS,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ert-valid-pattern.js'\nimport { AST, ExtglobType } from './ast.js'\nimport { escape } from './escape.js'\nimport { unescape } from './unescape.js'\n\ntype Platform =\n | 'aix'\n | 'android'\n | 'darwin'\n | 'freebsd'\n | 'haiku'\n | 'linux'\n | 'openbsd'\n | 'sunos'\n | 'win32'\n | 'cygwin'\n | 'netbsd'\n\nexport interface MinimatchOptions {\n nobrace?: boolean\n nocomment?: boolean\n nonegate?: boolean\n debug?: boolean\n noglobstar?: boolean\n noext?: boolean\n nonull?: boolean\n windowsPathsNoEscape?: boolean\n allowWindowsEscape?: boolean\n partial?: boolean\n dot?: boolean\n nocase?: boolean\n nocaseMagicOnly?: boolean\n magicalBraces?: boolean\n matchBase?: boolean\n flipNegate?: boolean\n preserveMultipleSlashes?: boolean\n optimizationLevel?: number\n platform?: Platform\n windowsNoMagicRoot?: boolean\n}\n\nexport const minimatch = (\n p: string,\n pattern: string,\n options: MinimatchOptions = {}\n) => {\n assertValidPattern(pattern)\n\n // shortcut: comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n return false\n }\n\n return new Minimatch(pattern, options).match(p)\n}\n\n// Optimized checking for the most common glob patterns.\nconst starDotExtRE = /^\\*+([^+@!?\\*\\[\\(]*)$/\nconst starDotExtTest = (ext: string) => (f: string) =>\n !f.startsWith('.') && f.endsWith(ext)\nconst starDotExtTestDot = (ext: string) => (f: string) => f.endsWith(ext)\nconst starDotExtTestNocase = (ext: string) => {\n ext = ext.toLowerCase()\n return (f: string) => !f.startsWith('.') && f.toLowerCase().endsWith(ext)\n}\nconst starDotExtTestNocaseDot = (ext: string) => {\n ext = ext.toLowerCase()\n return (f: string) => f.toLowerCase().endsWith(ext)\n}\nconst starDotStarRE = /^\\*+\\.\\*+$/\nconst starDotStarTest = (f: string) => !f.startsWith('.') && f.includes('.')\nconst starDotStarTestDot = (f: string) =>\n f !== '.' && f !== '..' && f.includes('.')\nconst dotStarRE = /^\\.\\*+$/\nconst dotStarTest = (f: string) => f !== '.' && f !== '..' && f.startsWith('.')\nconst starRE = /^\\*+$/\nconst starTest = (f: string) => f.length !== 0 && !f.startsWith('.')\nconst starTestDot = (f: string) => f.length !== 0 && f !== '.' && f !== '..'\nconst qmarksRE = /^\\?+([^+@!?\\*\\[\\(]*)?$/\nconst qmarksTestNocase = ([$0, ext = '']: RegExpMatchArray) => {\n const noext = qmarksTestNoExt([$0])\n if (!ext) return noext\n ext = ext.toLowerCase()\n return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestNocaseDot = ([$0, ext = '']: RegExpMatchArray) => {\n const noext = qmarksTestNoExtDot([$0])\n if (!ext) return noext\n ext = ext.toLowerCase()\n return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestDot = ([$0, ext = '']: RegExpMatchArray) => {\n const noext = qmarksTestNoExtDot([$0])\n return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTest = ([$0, ext = '']: RegExpMatchArray) => {\n const noext = qmarksTestNoExt([$0])\n return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTestNoExt = ([$0]: RegExpMatchArray) => {\n const len = $0.length\n return (f: string) => f.length === len && !f.startsWith('.')\n}\nconst qmarksTestNoExtDot = ([$0]: RegExpMatchArray) => {\n const len = $0.length\n return (f: string) => f.length === len && f !== '.' && f !== '..'\n}\n\n/* c8 ignore start */\nconst defaultPlatform: Platform = (\n typeof process === 'object' && process\n ? (typeof process.env === 'object' &&\n process.env &&\n process.env.__MINIMATCH_TESTING_PLATFORM__) ||\n process.platform\n : 'posix'\n) as Platform\ntype Sep = '\\\\' | '/'\nconst path: { [k: string]: { sep: Sep } } = {\n win32: { sep: '\\\\' },\n posix: { sep: '/' },\n}\n/* c8 ignore stop */\n\nexport const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep\nminimatch.sep = sep\n\nexport const GLOBSTAR = Symbol('globstar **')\nminimatch.GLOBSTAR = GLOBSTAR\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n\n// ** when dots are allowed. Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nconst twoStarDot = '(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nconst twoStarNoDot = '(?:(?!(?:\\\\/|^)\\\\.).)*?'\n\nexport const filter =\n (pattern: string, options: MinimatchOptions = {}) =>\n (p: string) =>\n minimatch(p, pattern, options)\nminimatch.filter = filter\n\nconst ext = (a: MinimatchOptions, b: MinimatchOptions = {}) =>\n Object.assign({}, a, b)\n\nexport const defaults = (def: MinimatchOptions): typeof minimatch => {\n if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n return minimatch\n }\n\n const orig = minimatch\n\n const m = (p: string, pattern: string, options: MinimatchOptions = {}) =>\n orig(p, pattern, ext(def, options))\n\n return Object.assign(m, {\n Minimatch: class Minimatch extends orig.Minimatch {\n constructor(pattern: string, options: MinimatchOptions = {}) {\n super(pattern, ext(def, options))\n }\n static defaults(options: MinimatchOptions) {\n return orig.defaults(ext(def, options)).Minimatch\n }\n },\n\n AST: class AST extends orig.AST {\n /* c8 ignore start */\n constructor(\n type: ExtglobType | null,\n parent?: AST,\n options: MinimatchOptions = {}\n ) {\n super(type, parent, ext(def, options))\n }\n /* c8 ignore stop */\n\n static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n return orig.AST.fromGlob(pattern, ext(def, options))\n }\n },\n\n unescape: (\n s: string,\n options: Pick = {}\n ) => orig.unescape(s, ext(def, options)),\n\n escape: (\n s: string,\n options: Pick = {}\n ) => orig.escape(s, ext(def, options)),\n\n filter: (pattern: string, options: MinimatchOptions = {}) =>\n orig.filter(pattern, ext(def, options)),\n\n defaults: (options: MinimatchOptions) => orig.defaults(ext(def, options)),\n\n makeRe: (pattern: string, options: MinimatchOptions = {}) =>\n orig.makeRe(pattern, ext(def, options)),\n\n braceExpand: (pattern: string, options: MinimatchOptions = {}) =>\n orig.braceExpand(pattern, ext(def, options)),\n\n match: (list: string[], pattern: string, options: MinimatchOptions = {}) =>\n orig.match(list, pattern, ext(def, options)),\n\n sep: orig.sep,\n GLOBSTAR: GLOBSTAR as typeof GLOBSTAR,\n })\n}\nminimatch.defaults = defaults\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nexport const braceExpand = (\n pattern: string,\n options: MinimatchOptions = {}\n) => {\n assertValidPattern(pattern)\n\n // Thanks to Yeting Li for\n // improving this regexp to avoid a ReDOS vulnerability.\n if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n // shortcut. no need to expand.\n return [pattern]\n }\n\n return expand(pattern)\n}\nminimatch.braceExpand = braceExpand\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion. Otherwise, any series\n// of * is equivalent to a single *. Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\n\nexport const makeRe = (pattern: string, options: MinimatchOptions = {}) =>\n new Minimatch(pattern, options).makeRe()\nminimatch.makeRe = makeRe\n\nexport const match = (\n list: string[],\n pattern: string,\n options: MinimatchOptions = {}\n) => {\n const mm = new Minimatch(pattern, options)\n list = list.filter(f => mm.match(f))\n if (mm.options.nonull && !list.length) {\n list.push(pattern)\n }\n return list\n}\nminimatch.match = match\n\n// replace stuff like \\* with *\nconst globMagic = /[?*]|[+@!]\\(.*?\\)|\\[|\\]/\nconst regExpEscape = (s: string) =>\n s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\nexport type MMRegExp = RegExp & {\n _src?: string\n _glob?: string\n}\n\nexport type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR\nexport type ParseReturn = ParseReturnFiltered | false\n\nexport class Minimatch {\n options: MinimatchOptions\n set: ParseReturnFiltered[][]\n pattern: string\n\n windowsPathsNoEscape: boolean\n nonegate: boolean\n negate: boolean\n comment: boolean\n empty: boolean\n preserveMultipleSlashes: boolean\n partial: boolean\n globSet: string[]\n globParts: string[][]\n nocase: boolean\n\n isWindows: boolean\n platform: Platform\n windowsNoMagicRoot: boolean\n\n regexp: false | null | MMRegExp\n constructor(pattern: string, options: MinimatchOptions = {}) {\n assertValidPattern(pattern)\n\n options = options || {}\n this.options = options\n this.pattern = pattern\n this.platform = options.platform || defaultPlatform\n this.isWindows = this.platform === 'win32'\n this.windowsPathsNoEscape =\n !!options.windowsPathsNoEscape || options.allowWindowsEscape === false\n if (this.windowsPathsNoEscape) {\n this.pattern = this.pattern.replace(/\\\\/g, '/')\n }\n this.preserveMultipleSlashes = !!options.preserveMultipleSlashes\n this.regexp = null\n this.negate = false\n this.nonegate = !!options.nonegate\n this.comment = false\n this.empty = false\n this.partial = !!options.partial\n this.nocase = !!this.options.nocase\n this.windowsNoMagicRoot =\n options.windowsNoMagicRoot !== undefined\n ? options.windowsNoMagicRoot\n : !!(this.isWindows && this.nocase)\n\n this.globSet = []\n this.globParts = []\n this.set = []\n\n // make the set of regexps etc.\n this.make()\n }\n\n hasMagic(): boolean {\n if (this.options.magicalBraces && this.set.length > 1) {\n return true\n }\n for (const pattern of this.set) {\n for (const part of pattern) {\n if (typeof part !== 'string') return true\n }\n }\n return false\n }\n\n debug(..._: any[]) {}\n\n make() {\n const pattern = this.pattern\n const options = this.options\n\n // empty patterns and comments match nothing.\n if (!options.nocomment && pattern.charAt(0) === '#') {\n this.comment = true\n return\n }\n\n if (!pattern) {\n this.empty = true\n return\n }\n\n // step 1: figure out negation, etc.\n this.parseNegate()\n\n // step 2: expand braces\n this.globSet = [...new Set(this.braceExpand())]\n\n if (options.debug) {\n this.debug = (...args: any[]) => console.error(...args)\n }\n\n this.debug(this.pattern, this.globSet)\n\n // step 3: now we have a set, so turn each one into a series of\n // path-portion matching patterns.\n // These will be regexps, except in the case of \"**\", which is\n // set to the GLOBSTAR object for globstar behavior,\n // and will not contain any / characters\n //\n // First, we preprocess to make the glob pattern sets a bit simpler\n // and deduped. There are some perf-killing patterns that can cause\n // problems with a glob walk, but we can simplify them down a bit.\n const rawGlobParts = this.globSet.map(s => this.slashSplit(s))\n this.globParts = this.preprocess(rawGlobParts)\n this.debug(this.pattern, this.globParts)\n\n // glob --> regexps\n let set = this.globParts.map((s, _, __) => {\n if (this.isWindows && this.windowsNoMagicRoot) {\n // check if it's a drive or unc path.\n const isUNC =\n s[0] === '' &&\n s[1] === '' &&\n (s[2] === '?' || !globMagic.test(s[2])) &&\n !globMagic.test(s[3])\n const isDrive = /^[a-z]:/i.test(s[0])\n if (isUNC) {\n return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]\n } else if (isDrive) {\n return [s[0], ...s.slice(1).map(ss => this.parse(ss))]\n }\n }\n return s.map(ss => this.parse(ss))\n })\n\n this.debug(this.pattern, set)\n\n // filter out everything that didn't compile properly.\n this.set = set.filter(\n s => s.indexOf(false) === -1\n ) as ParseReturnFiltered[][]\n\n // do not treat the ? in UNC paths as magic\n if (this.isWindows) {\n for (let i = 0; i < this.set.length; i++) {\n const p = this.set[i]\n if (\n p[0] === '' &&\n p[1] === '' &&\n this.globParts[i][2] === '?' &&\n typeof p[3] === 'string' &&\n /^[a-z]:$/i.test(p[3])\n ) {\n p[2] = '?'\n }\n }\n }\n\n this.debug(this.pattern, this.set)\n }\n\n // various transforms to equivalent pattern sets that are\n // faster to process in a filesystem walk. The goal is to\n // eliminate what we can, and push all ** patterns as far\n // to the right as possible, even if it increases the number\n // of patterns that we have to process.\n preprocess(globParts: string[][]) {\n // if we're not in globstar mode, then turn all ** into *\n if (this.options.noglobstar) {\n for (let i = 0; i < globParts.length; i++) {\n for (let j = 0; j < globParts[i].length; j++) {\n if (globParts[i][j] === '**') {\n globParts[i][j] = '*'\n }\n }\n }\n }\n\n const { optimizationLevel = 1 } = this.options\n\n if (optimizationLevel >= 2) {\n // aggressive optimization for the purpose of fs walking\n globParts = this.firstPhasePreProcess(globParts)\n globParts = this.secondPhasePreProcess(globParts)\n } else if (optimizationLevel >= 1) {\n // just basic optimizations to remove some .. parts\n globParts = this.levelOneOptimize(globParts)\n } else {\n // just collapse multiple ** portions into one\n globParts = this.adjascentGlobstarOptimize(globParts)\n }\n\n return globParts\n }\n\n // just get rid of adjascent ** portions\n adjascentGlobstarOptimize(globParts: string[][]) {\n return globParts.map(parts => {\n let gs: number = -1\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let i = gs\n while (parts[i + 1] === '**') {\n i++\n }\n if (i !== gs) {\n parts.splice(gs, i - gs)\n }\n }\n return parts\n })\n }\n\n // get rid of adjascent ** and resolve .. portions\n levelOneOptimize(globParts: string[][]) {\n return globParts.map(parts => {\n parts = parts.reduce((set: string[], part) => {\n const prev = set[set.length - 1]\n if (part === '**' && prev === '**') {\n return set\n }\n if (part === '..') {\n if (prev && prev !== '..' && prev !== '.' && prev !== '**') {\n set.pop()\n return set\n }\n }\n set.push(part)\n return set\n }, [])\n return parts.length === 0 ? [''] : parts\n })\n }\n\n levelTwoFileOptimize(parts: string | string[]) {\n if (!Array.isArray(parts)) {\n parts = this.slashSplit(parts)\n }\n let didSomething: boolean = false\n do {\n didSomething = false\n //
// -> 
/\n      if (!this.preserveMultipleSlashes) {\n        for (let i = 1; i < parts.length - 1; i++) {\n          const p = parts[i]\n          // don't squeeze out UNC patterns\n          if (i === 1 && p === '' && parts[0] === '') continue\n          if (p === '.' || p === '') {\n            didSomething = true\n            parts.splice(i, 1)\n            i--\n          }\n        }\n        if (\n          parts[0] === '.' &&\n          parts.length === 2 &&\n          (parts[1] === '.' || parts[1] === '')\n        ) {\n          didSomething = true\n          parts.pop()\n        }\n      }\n\n      // 
/

/../ ->

/\n      let dd: number = 0\n      while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n        const p = parts[dd - 1]\n        if (p && p !== '.' && p !== '..' && p !== '**') {\n          didSomething = true\n          parts.splice(dd - 1, 2)\n          dd -= 2\n        }\n      }\n    } while (didSomething)\n    return parts.length === 0 ? [''] : parts\n  }\n\n  // First phase: single-pattern processing\n  // 
 is 1 or more portions\n  //  is 1 or more portions\n  // 

is any portion other than ., .., '', or **\n // is . or ''\n //\n // **/.. is *brutal* for filesystem walking performance, because\n // it effectively resets the recursive walk each time it occurs,\n // and ** cannot be reduced out by a .. pattern part like a regexp\n // or most strings (other than .., ., and '') can be.\n //\n //

/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n //

// -> 
/\n  // 
/

/../ ->

/\n  // **/**/ -> **/\n  //\n  // **/*/ -> */**/ <== not valid because ** doesn't follow\n  // this WOULD be allowed if ** did follow symlinks, or * didn't\n  firstPhasePreProcess(globParts: string[][]) {\n    let didSomething = false\n    do {\n      didSomething = false\n      // 
/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n for (let parts of globParts) {\n let gs: number = -1\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let gss: number = gs\n while (parts[gss + 1] === '**') {\n //

/**/**/ -> 
/**/\n            gss++\n          }\n          // eg, if gs is 2 and gss is 4, that means we have 3 **\n          // parts, and can remove 2 of them.\n          if (gss > gs) {\n            parts.splice(gs + 1, gss - gs)\n          }\n\n          let next = parts[gs + 1]\n          const p = parts[gs + 2]\n          const p2 = parts[gs + 3]\n          if (next !== '..') continue\n          if (\n            !p ||\n            p === '.' ||\n            p === '..' ||\n            !p2 ||\n            p2 === '.' ||\n            p2 === '..'\n          ) {\n            continue\n          }\n          didSomething = true\n          // edit parts in place, and push the new one\n          parts.splice(gs, 1)\n          const other = parts.slice(0)\n          other[gs] = '**'\n          globParts.push(other)\n          gs--\n        }\n\n        // 
// -> 
/\n        if (!this.preserveMultipleSlashes) {\n          for (let i = 1; i < parts.length - 1; i++) {\n            const p = parts[i]\n            // don't squeeze out UNC patterns\n            if (i === 1 && p === '' && parts[0] === '') continue\n            if (p === '.' || p === '') {\n              didSomething = true\n              parts.splice(i, 1)\n              i--\n            }\n          }\n          if (\n            parts[0] === '.' &&\n            parts.length === 2 &&\n            (parts[1] === '.' || parts[1] === '')\n          ) {\n            didSomething = true\n            parts.pop()\n          }\n        }\n\n        // 
/

/../ ->

/\n        let dd: number = 0\n        while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n          const p = parts[dd - 1]\n          if (p && p !== '.' && p !== '..' && p !== '**') {\n            didSomething = true\n            const needDot = dd === 1 && parts[dd + 1] === '**'\n            const splin = needDot ? ['.'] : []\n            parts.splice(dd - 1, 2, ...splin)\n            if (parts.length === 0) parts.push('')\n            dd -= 2\n          }\n        }\n      }\n    } while (didSomething)\n\n    return globParts\n  }\n\n  // second phase: multi-pattern dedupes\n  // {
/*/,
/

/} ->

/*/\n  // {
/,
/} -> 
/\n  // {
/**/,
/} -> 
/**/\n  //\n  // {
/**/,
/**/

/} ->

/**/\n  // ^-- not valid because ** doens't follow symlinks\n  secondPhasePreProcess(globParts: string[][]): string[][] {\n    for (let i = 0; i < globParts.length - 1; i++) {\n      for (let j = i + 1; j < globParts.length; j++) {\n        const matched = this.partsMatch(\n          globParts[i],\n          globParts[j],\n          !this.preserveMultipleSlashes\n        )\n        if (matched) {\n          globParts[i] = []\n          globParts[j] = matched\n          break\n        }\n      }\n    }\n    return globParts.filter(gs => gs.length)\n  }\n\n  partsMatch(\n    a: string[],\n    b: string[],\n    emptyGSMatch: boolean = false\n  ): false | string[] {\n    let ai = 0\n    let bi = 0\n    let result: string[] = []\n    let which: string = ''\n    while (ai < a.length && bi < b.length) {\n      if (a[ai] === b[bi]) {\n        result.push(which === 'b' ? b[bi] : a[ai])\n        ai++\n        bi++\n      } else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {\n        result.push(a[ai])\n        ai++\n      } else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {\n        result.push(b[bi])\n        bi++\n      } else if (\n        a[ai] === '*' &&\n        b[bi] &&\n        (this.options.dot || !b[bi].startsWith('.')) &&\n        b[bi] !== '**'\n      ) {\n        if (which === 'b') return false\n        which = 'a'\n        result.push(a[ai])\n        ai++\n        bi++\n      } else if (\n        b[bi] === '*' &&\n        a[ai] &&\n        (this.options.dot || !a[ai].startsWith('.')) &&\n        a[ai] !== '**'\n      ) {\n        if (which === 'a') return false\n        which = 'b'\n        result.push(b[bi])\n        ai++\n        bi++\n      } else {\n        return false\n      }\n    }\n    // if we fall out of the loop, it means they two are identical\n    // as long as their lengths match\n    return a.length === b.length && result\n  }\n\n  parseNegate() {\n    if (this.nonegate) return\n\n    const pattern = this.pattern\n    let negate = false\n    let negateOffset = 0\n\n    for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {\n      negate = !negate\n      negateOffset++\n    }\n\n    if (negateOffset) this.pattern = pattern.slice(negateOffset)\n    this.negate = negate\n  }\n\n  // set partial to true to test if, for example,\n  // \"/a/b\" matches the start of \"/*/b/*/d\"\n  // Partial means, if you run out of file before you run\n  // out of pattern, then that's fine, as long as all\n  // the parts match.\n  matchOne(file: string[], pattern: ParseReturn[], partial: boolean = false) {\n    const options = this.options\n\n    // UNC paths like //?/X:/... can match X:/... and vice versa\n    // Drive letters in absolute drive or unc paths are always compared\n    // case-insensitively.\n    if (this.isWindows) {\n      const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0])\n      const fileUNC =\n        !fileDrive &&\n        file[0] === '' &&\n        file[1] === '' &&\n        file[2] === '?' &&\n        /^[a-z]:$/i.test(file[3])\n\n      const patternDrive =\n        typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0])\n      const patternUNC =\n        !patternDrive &&\n        pattern[0] === '' &&\n        pattern[1] === '' &&\n        pattern[2] === '?' &&\n        typeof pattern[3] === 'string' &&\n        /^[a-z]:$/i.test(pattern[3])\n\n      const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined\n      const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined\n      if (typeof fdi === 'number' && typeof pdi === 'number') {\n        const [fd, pd]: [string, string] = [file[fdi], pattern[pdi] as string]\n        if (fd.toLowerCase() === pd.toLowerCase()) {\n          pattern[pdi] = fd\n          if (pdi > fdi) {\n            pattern = pattern.slice(pdi)\n          } else if (fdi > pdi) {\n            file = file.slice(fdi)\n          }\n        }\n      }\n    }\n\n    // resolve and reduce . and .. portions in the file as well.\n    // dont' need to do the second phase, because it's only one string[]\n    const { optimizationLevel = 1 } = this.options\n    if (optimizationLevel >= 2) {\n      file = this.levelTwoFileOptimize(file)\n    }\n\n    this.debug('matchOne', this, { file, pattern })\n    this.debug('matchOne', file.length, pattern.length)\n\n    for (\n      var fi = 0, pi = 0, fl = file.length, pl = pattern.length;\n      fi < fl && pi < pl;\n      fi++, pi++\n    ) {\n      this.debug('matchOne loop')\n      var p = pattern[pi]\n      var f = file[fi]\n\n      this.debug(pattern, p, f)\n\n      // should be impossible.\n      // some invalid regexp stuff in the set.\n      /* c8 ignore start */\n      if (p === false) {\n        return false\n      }\n      /* c8 ignore stop */\n\n      if (p === GLOBSTAR) {\n        this.debug('GLOBSTAR', [pattern, p, f])\n\n        // \"**\"\n        // a/**/b/**/c would match the following:\n        // a/b/x/y/z/c\n        // a/x/y/z/b/c\n        // a/b/x/b/x/c\n        // a/b/c\n        // To do this, take the rest of the pattern after\n        // the **, and see if it would match the file remainder.\n        // If so, return success.\n        // If not, the ** \"swallows\" a segment, and try again.\n        // This is recursively awful.\n        //\n        // a/**/b/**/c matching a/b/x/y/z/c\n        // - a matches a\n        // - doublestar\n        //   - matchOne(b/x/y/z/c, b/**/c)\n        //     - b matches b\n        //     - doublestar\n        //       - matchOne(x/y/z/c, c) -> no\n        //       - matchOne(y/z/c, c) -> no\n        //       - matchOne(z/c, c) -> no\n        //       - matchOne(c, c) yes, hit\n        var fr = fi\n        var pr = pi + 1\n        if (pr === pl) {\n          this.debug('** at the end')\n          // a ** at the end will just swallow the rest.\n          // We have found a match.\n          // however, it will not swallow /.x, unless\n          // options.dot is set.\n          // . and .. are *never* matched by **, for explosively\n          // exponential reasons.\n          for (; fi < fl; fi++) {\n            if (\n              file[fi] === '.' ||\n              file[fi] === '..' ||\n              (!options.dot && file[fi].charAt(0) === '.')\n            )\n              return false\n          }\n          return true\n        }\n\n        // ok, let's see if we can swallow whatever we can.\n        while (fr < fl) {\n          var swallowee = file[fr]\n\n          this.debug('\\nglobstar while', file, fr, pattern, pr, swallowee)\n\n          // XXX remove this slice.  Just pass the start index.\n          if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {\n            this.debug('globstar found match!', fr, fl, swallowee)\n            // found a match.\n            return true\n          } else {\n            // can't swallow \".\" or \"..\" ever.\n            // can only swallow \".foo\" when explicitly asked.\n            if (\n              swallowee === '.' ||\n              swallowee === '..' ||\n              (!options.dot && swallowee.charAt(0) === '.')\n            ) {\n              this.debug('dot detected!', file, fr, pattern, pr)\n              break\n            }\n\n            // ** swallows a segment, and continue.\n            this.debug('globstar swallow a segment, and continue')\n            fr++\n          }\n        }\n\n        // no match was found.\n        // However, in partial mode, we can't say this is necessarily over.\n        /* c8 ignore start */\n        if (partial) {\n          // ran out of file\n          this.debug('\\n>>> no match, partial?', file, fr, pattern, pr)\n          if (fr === fl) {\n            return true\n          }\n        }\n        /* c8 ignore stop */\n        return false\n      }\n\n      // something other than **\n      // non-magic patterns just have to match exactly\n      // patterns with magic have been turned into regexps.\n      let hit: boolean\n      if (typeof p === 'string') {\n        hit = f === p\n        this.debug('string match', p, f, hit)\n      } else {\n        hit = p.test(f)\n        this.debug('pattern match', p, f, hit)\n      }\n\n      if (!hit) return false\n    }\n\n    // Note: ending in / means that we'll get a final \"\"\n    // at the end of the pattern.  This can only match a\n    // corresponding \"\" at the end of the file.\n    // If the file ends in /, then it can only match a\n    // a pattern that ends in /, unless the pattern just\n    // doesn't have any more for it. But, a/b/ should *not*\n    // match \"a/b/*\", even though \"\" matches against the\n    // [^/]*? pattern, except in partial mode, where it might\n    // simply not be reached yet.\n    // However, a/b/ should still satisfy a/*\n\n    // now either we fell off the end of the pattern, or we're done.\n    if (fi === fl && pi === pl) {\n      // ran out of pattern and filename at the same time.\n      // an exact hit!\n      return true\n    } else if (fi === fl) {\n      // ran out of file, but still had pattern left.\n      // this is ok if we're doing the match as part of\n      // a glob fs traversal.\n      return partial\n    } else if (pi === pl) {\n      // ran out of pattern, still have file left.\n      // this is only acceptable if we're on the very last\n      // empty segment of a file with a trailing slash.\n      // a/* should match a/b/\n      return fi === fl - 1 && file[fi] === ''\n\n      /* c8 ignore start */\n    } else {\n      // should be unreachable.\n      throw new Error('wtf?')\n    }\n    /* c8 ignore stop */\n  }\n\n  braceExpand() {\n    return braceExpand(this.pattern, this.options)\n  }\n\n  parse(pattern: string): ParseReturn {\n    assertValidPattern(pattern)\n\n    const options = this.options\n\n    // shortcuts\n    if (pattern === '**') return GLOBSTAR\n    if (pattern === '') return ''\n\n    // far and away, the most common glob pattern parts are\n    // *, *.*, and *.  Add a fast check method for those.\n    let m: RegExpMatchArray | null\n    let fastTest: null | ((f: string) => boolean) = null\n    if ((m = pattern.match(starRE))) {\n      fastTest = options.dot ? starTestDot : starTest\n    } else if ((m = pattern.match(starDotExtRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? starDotExtTestNocaseDot\n            : starDotExtTestNocase\n          : options.dot\n          ? starDotExtTestDot\n          : starDotExtTest\n      )(m[1])\n    } else if ((m = pattern.match(qmarksRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? qmarksTestNocaseDot\n            : qmarksTestNocase\n          : options.dot\n          ? qmarksTestDot\n          : qmarksTest\n      )(m)\n    } else if ((m = pattern.match(starDotStarRE))) {\n      fastTest = options.dot ? starDotStarTestDot : starDotStarTest\n    } else if ((m = pattern.match(dotStarRE))) {\n      fastTest = dotStarTest\n    }\n\n    const re = AST.fromGlob(pattern, this.options).toMMPattern()\n    if (fastTest && typeof re === 'object') {\n      // Avoids overriding in frozen environments\n      Reflect.defineProperty(re, 'test', { value: fastTest })\n    }\n    return re\n  }\n\n  makeRe() {\n    if (this.regexp || this.regexp === false) return this.regexp\n\n    // at this point, this.set is a 2d array of partial\n    // pattern strings, or \"**\".\n    //\n    // It's better to use .match().  This function shouldn't\n    // be used, really, but it's pretty convenient sometimes,\n    // when you just want to work with a regex.\n    const set = this.set\n\n    if (!set.length) {\n      this.regexp = false\n      return this.regexp\n    }\n    const options = this.options\n\n    const twoStar = options.noglobstar\n      ? star\n      : options.dot\n      ? twoStarDot\n      : twoStarNoDot\n    const flags = new Set(options.nocase ? ['i'] : [])\n\n    // regexpify non-globstar patterns\n    // if ** is only item, then we just do one twoStar\n    // if ** is first, and there are more, prepend (\\/|twoStar\\/)? to next\n    // if ** is last, append (\\/twoStar|) to previous\n    // if ** is in the middle, append (\\/|\\/twoStar\\/) to previous\n    // then filter out GLOBSTAR symbols\n    let re = set\n      .map(pattern => {\n        const pp: (string | typeof GLOBSTAR)[] = pattern.map(p => {\n          if (p instanceof RegExp) {\n            for (const f of p.flags.split('')) flags.add(f)\n          }\n          return typeof p === 'string'\n            ? regExpEscape(p)\n            : p === GLOBSTAR\n            ? GLOBSTAR\n            : p._src\n        }) as (string | typeof GLOBSTAR)[]\n        pp.forEach((p, i) => {\n          const next = pp[i + 1]\n          const prev = pp[i - 1]\n          if (p !== GLOBSTAR || prev === GLOBSTAR) {\n            return\n          }\n          if (prev === undefined) {\n            if (next !== undefined && next !== GLOBSTAR) {\n              pp[i + 1] = '(?:\\\\/|' + twoStar + '\\\\/)?' + next\n            } else {\n              pp[i] = twoStar\n            }\n          } else if (next === undefined) {\n            pp[i - 1] = prev + '(?:\\\\/|' + twoStar + ')?'\n          } else if (next !== GLOBSTAR) {\n            pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + '\\\\/)' + next\n            pp[i + 1] = GLOBSTAR\n          }\n        })\n        return pp.filter(p => p !== GLOBSTAR).join('/')\n      })\n      .join('|')\n\n    // need to wrap in parens if we had more than one thing with |,\n    // otherwise only the first will be anchored to ^ and the last to $\n    const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', '']\n    // must match entire pattern\n    // ending in a * or ** will make it less strict.\n    re = '^' + open + re + close + '$'\n\n    // can match anything, as long as it's not this.\n    if (this.negate) re = '^(?!' + re + ').+$'\n\n    try {\n      this.regexp = new RegExp(re, [...flags].join(''))\n      /* c8 ignore start */\n    } catch (ex) {\n      // should be impossible\n      this.regexp = false\n    }\n    /* c8 ignore stop */\n    return this.regexp\n  }\n\n  slashSplit(p: string) {\n    // if p starts with // on windows, we preserve that\n    // so that UNC paths aren't broken.  Otherwise, any number of\n    // / characters are coalesced into one, unless\n    // preserveMultipleSlashes is set to true.\n    if (this.preserveMultipleSlashes) {\n      return p.split('/')\n    } else if (this.isWindows && /^\\/\\/[^\\/]+/.test(p)) {\n      // add an extra '' for the one we lose\n      return ['', ...p.split(/\\/+/)]\n    } else {\n      return p.split(/\\/+/)\n    }\n  }\n\n  match(f: string, partial = this.partial) {\n    this.debug('match', f, this.pattern)\n    // short-circuit in the case of busted things.\n    // comments, etc.\n    if (this.comment) {\n      return false\n    }\n    if (this.empty) {\n      return f === ''\n    }\n\n    if (f === '/' && partial) {\n      return true\n    }\n\n    const options = this.options\n\n    // windows: need to use /, not \\\n    if (this.isWindows) {\n      f = f.split('\\\\').join('/')\n    }\n\n    // treat the test path as a set of pathparts.\n    const ff = this.slashSplit(f)\n    this.debug(this.pattern, 'split', ff)\n\n    // just ONE of the pattern sets in this.set needs to match\n    // in order for it to be valid.  If negating, then just one\n    // match means that we have failed.\n    // Either way, return on the first hit.\n\n    const set = this.set\n    this.debug(this.pattern, 'set', set)\n\n    // Find the basename of the path by looking for the last non-empty segment\n    let filename: string = ff[ff.length - 1]\n    if (!filename) {\n      for (let i = ff.length - 2; !filename && i >= 0; i--) {\n        filename = ff[i]\n      }\n    }\n\n    for (let i = 0; i < set.length; i++) {\n      const pattern = set[i]\n      let file = ff\n      if (options.matchBase && pattern.length === 1) {\n        file = [filename]\n      }\n      const hit = this.matchOne(file, pattern, partial)\n      if (hit) {\n        if (options.flipNegate) {\n          return true\n        }\n        return !this.negate\n      }\n    }\n\n    // didn't get any hits.  this is success if it's a negative\n    // pattern, failure otherwise.\n    if (options.flipNegate) {\n      return false\n    }\n    return this.negate\n  }\n\n  static defaults(def: MinimatchOptions) {\n    return minimatch.defaults(def).Minimatch\n  }\n}\n/* c8 ignore start */\nexport { AST } from './ast.js'\nexport { escape } from './escape.js'\nexport { unescape } from './unescape.js'\n/* c8 ignore stop */\nminimatch.AST = AST\nminimatch.Minimatch = Minimatch\nminimatch.escape = escape\nminimatch.unescape = unescape\n"]}
\ No newline at end of file
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,6DAAgD;AAChD,uEAA8D;AAC9D,qCAA2C;AAC3C,2CAAoC;AACpC,+CAAwC;AAsCjC,MAAM,SAAS,GAAG,CACvB,CAAS,EACT,OAAe,EACf,UAA4B,EAAE,EAC9B,EAAE;IACF,IAAA,4CAAkB,EAAC,OAAO,CAAC,CAAA;IAE3B,oCAAoC;IACpC,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;QACpD,OAAO,KAAK,CAAA;IACd,CAAC;IAED,OAAO,IAAI,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACjD,CAAC,CAAA;AAbY,QAAA,SAAS,aAarB;AAED,wDAAwD;AACxD,MAAM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CAAwC;AAA/B,uGAAA,QAAQ,OAAA;AACjB,oBAAoB;AACpB,iBAAS,CAAC,GAAG,GAAG,YAAG,CAAA;AACnB,iBAAS,CAAC,SAAS,GAAG,SAAS,CAAA;AAC/B,iBAAS,CAAC,MAAM,GAAG,kBAAM,CAAA;AACzB,iBAAS,CAAC,QAAQ,GAAG,sBAAQ,CAAA","sourcesContent":["import { expand } from '@isaacs/brace-expansion'\nimport { assertValidPattern } from './assert-valid-pattern.js'\nimport { AST, ExtglobType } from './ast.js'\nimport { escape } from './escape.js'\nimport { unescape } from './unescape.js'\n\ntype Platform =\n  | 'aix'\n  | 'android'\n  | 'darwin'\n  | 'freebsd'\n  | 'haiku'\n  | 'linux'\n  | 'openbsd'\n  | 'sunos'\n  | 'win32'\n  | 'cygwin'\n  | 'netbsd'\n\nexport interface MinimatchOptions {\n  nobrace?: boolean\n  nocomment?: boolean\n  nonegate?: boolean\n  debug?: boolean\n  noglobstar?: boolean\n  noext?: boolean\n  nonull?: boolean\n  windowsPathsNoEscape?: boolean\n  allowWindowsEscape?: boolean\n  partial?: boolean\n  dot?: boolean\n  nocase?: boolean\n  nocaseMagicOnly?: boolean\n  magicalBraces?: boolean\n  matchBase?: boolean\n  flipNegate?: boolean\n  preserveMultipleSlashes?: boolean\n  optimizationLevel?: number\n  platform?: Platform\n  windowsNoMagicRoot?: boolean\n}\n\nexport const minimatch = (\n  p: string,\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  assertValidPattern(pattern)\n\n  // shortcut: comments match nothing.\n  if (!options.nocomment && pattern.charAt(0) === '#') {\n    return false\n  }\n\n  return new Minimatch(pattern, options).match(p)\n}\n\n// Optimized checking for the most common glob patterns.\nconst starDotExtRE = /^\\*+([^+@!?\\*\\[\\(]*)$/\nconst starDotExtTest = (ext: string) => (f: string) =>\n  !f.startsWith('.') && f.endsWith(ext)\nconst starDotExtTestDot = (ext: string) => (f: string) => f.endsWith(ext)\nconst starDotExtTestNocase = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => !f.startsWith('.') && f.toLowerCase().endsWith(ext)\n}\nconst starDotExtTestNocaseDot = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => f.toLowerCase().endsWith(ext)\n}\nconst starDotStarRE = /^\\*+\\.\\*+$/\nconst starDotStarTest = (f: string) => !f.startsWith('.') && f.includes('.')\nconst starDotStarTestDot = (f: string) =>\n  f !== '.' && f !== '..' && f.includes('.')\nconst dotStarRE = /^\\.\\*+$/\nconst dotStarTest = (f: string) => f !== '.' && f !== '..' && f.startsWith('.')\nconst starRE = /^\\*+$/\nconst starTest = (f: string) => f.length !== 0 && !f.startsWith('.')\nconst starTestDot = (f: string) => f.length !== 0 && f !== '.' && f !== '..'\nconst qmarksRE = /^\\?+([^+@!?\\*\\[\\(]*)?$/\nconst qmarksTestNocase = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestNocaseDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTest = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTestNoExt = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && !f.startsWith('.')\n}\nconst qmarksTestNoExtDot = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && f !== '.' && f !== '..'\n}\n\n/* c8 ignore start */\nconst defaultPlatform: Platform = (\n  typeof process === 'object' && process\n    ? (typeof process.env === 'object' &&\n        process.env &&\n        process.env.__MINIMATCH_TESTING_PLATFORM__) ||\n      process.platform\n    : 'posix'\n) as Platform\ntype Sep = '\\\\' | '/'\nconst path: { [k: string]: { sep: Sep } } = {\n  win32: { sep: '\\\\' },\n  posix: { sep: '/' },\n}\n/* c8 ignore stop */\n\nexport const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep\nminimatch.sep = sep\n\nexport const GLOBSTAR = Symbol('globstar **')\nminimatch.GLOBSTAR = GLOBSTAR\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n\n// ** when dots are allowed.  Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nconst twoStarDot = '(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nconst twoStarNoDot = '(?:(?!(?:\\\\/|^)\\\\.).)*?'\n\nexport const filter =\n  (pattern: string, options: MinimatchOptions = {}) =>\n  (p: string) =>\n    minimatch(p, pattern, options)\nminimatch.filter = filter\n\nconst ext = (a: MinimatchOptions, b: MinimatchOptions = {}) =>\n  Object.assign({}, a, b)\n\nexport const defaults = (def: MinimatchOptions): typeof minimatch => {\n  if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n    return minimatch\n  }\n\n  const orig = minimatch\n\n  const m = (p: string, pattern: string, options: MinimatchOptions = {}) =>\n    orig(p, pattern, ext(def, options))\n\n  return Object.assign(m, {\n    Minimatch: class Minimatch extends orig.Minimatch {\n      constructor(pattern: string, options: MinimatchOptions = {}) {\n        super(pattern, ext(def, options))\n      }\n      static defaults(options: MinimatchOptions) {\n        return orig.defaults(ext(def, options)).Minimatch\n      }\n    },\n\n    AST: class AST extends orig.AST {\n      /* c8 ignore start */\n      constructor(\n        type: ExtglobType | null,\n        parent?: AST,\n        options: MinimatchOptions = {}\n      ) {\n        super(type, parent, ext(def, options))\n      }\n      /* c8 ignore stop */\n\n      static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n        return orig.AST.fromGlob(pattern, ext(def, options))\n      }\n    },\n\n    unescape: (\n      s: string,\n      options: Pick = {}\n    ) => orig.unescape(s, ext(def, options)),\n\n    escape: (\n      s: string,\n      options: Pick = {}\n    ) => orig.escape(s, ext(def, options)),\n\n    filter: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.filter(pattern, ext(def, options)),\n\n    defaults: (options: MinimatchOptions) => orig.defaults(ext(def, options)),\n\n    makeRe: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.makeRe(pattern, ext(def, options)),\n\n    braceExpand: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.braceExpand(pattern, ext(def, options)),\n\n    match: (list: string[], pattern: string, options: MinimatchOptions = {}) =>\n      orig.match(list, pattern, ext(def, options)),\n\n    sep: orig.sep,\n    GLOBSTAR: GLOBSTAR as typeof GLOBSTAR,\n  })\n}\nminimatch.defaults = defaults\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nexport const braceExpand = (\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  assertValidPattern(pattern)\n\n  // Thanks to Yeting Li  for\n  // improving this regexp to avoid a ReDOS vulnerability.\n  if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n    // shortcut. no need to expand.\n    return [pattern]\n  }\n\n  return expand(pattern)\n}\nminimatch.braceExpand = braceExpand\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion.  Otherwise, any series\n// of * is equivalent to a single *.  Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\n\nexport const makeRe = (pattern: string, options: MinimatchOptions = {}) =>\n  new Minimatch(pattern, options).makeRe()\nminimatch.makeRe = makeRe\n\nexport const match = (\n  list: string[],\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  const mm = new Minimatch(pattern, options)\n  list = list.filter(f => mm.match(f))\n  if (mm.options.nonull && !list.length) {\n    list.push(pattern)\n  }\n  return list\n}\nminimatch.match = match\n\n// replace stuff like \\* with *\nconst globMagic = /[?*]|[+@!]\\(.*?\\)|\\[|\\]/\nconst regExpEscape = (s: string) =>\n  s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\nexport type MMRegExp = RegExp & {\n  _src?: string\n  _glob?: string\n}\n\nexport type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR\nexport type ParseReturn = ParseReturnFiltered | false\n\nexport class Minimatch {\n  options: MinimatchOptions\n  set: ParseReturnFiltered[][]\n  pattern: string\n\n  windowsPathsNoEscape: boolean\n  nonegate: boolean\n  negate: boolean\n  comment: boolean\n  empty: boolean\n  preserveMultipleSlashes: boolean\n  partial: boolean\n  globSet: string[]\n  globParts: string[][]\n  nocase: boolean\n\n  isWindows: boolean\n  platform: Platform\n  windowsNoMagicRoot: boolean\n\n  regexp: false | null | MMRegExp\n  constructor(pattern: string, options: MinimatchOptions = {}) {\n    assertValidPattern(pattern)\n\n    options = options || {}\n    this.options = options\n    this.pattern = pattern\n    this.platform = options.platform || defaultPlatform\n    this.isWindows = this.platform === 'win32'\n    this.windowsPathsNoEscape =\n      !!options.windowsPathsNoEscape || options.allowWindowsEscape === false\n    if (this.windowsPathsNoEscape) {\n      this.pattern = this.pattern.replace(/\\\\/g, '/')\n    }\n    this.preserveMultipleSlashes = !!options.preserveMultipleSlashes\n    this.regexp = null\n    this.negate = false\n    this.nonegate = !!options.nonegate\n    this.comment = false\n    this.empty = false\n    this.partial = !!options.partial\n    this.nocase = !!this.options.nocase\n    this.windowsNoMagicRoot =\n      options.windowsNoMagicRoot !== undefined\n        ? options.windowsNoMagicRoot\n        : !!(this.isWindows && this.nocase)\n\n    this.globSet = []\n    this.globParts = []\n    this.set = []\n\n    // make the set of regexps etc.\n    this.make()\n  }\n\n  hasMagic(): boolean {\n    if (this.options.magicalBraces && this.set.length > 1) {\n      return true\n    }\n    for (const pattern of this.set) {\n      for (const part of pattern) {\n        if (typeof part !== 'string') return true\n      }\n    }\n    return false\n  }\n\n  debug(..._: any[]) {}\n\n  make() {\n    const pattern = this.pattern\n    const options = this.options\n\n    // empty patterns and comments match nothing.\n    if (!options.nocomment && pattern.charAt(0) === '#') {\n      this.comment = true\n      return\n    }\n\n    if (!pattern) {\n      this.empty = true\n      return\n    }\n\n    // step 1: figure out negation, etc.\n    this.parseNegate()\n\n    // step 2: expand braces\n    this.globSet = [...new Set(this.braceExpand())]\n\n    if (options.debug) {\n      this.debug = (...args: any[]) => console.error(...args)\n    }\n\n    this.debug(this.pattern, this.globSet)\n\n    // step 3: now we have a set, so turn each one into a series of\n    // path-portion matching patterns.\n    // These will be regexps, except in the case of \"**\", which is\n    // set to the GLOBSTAR object for globstar behavior,\n    // and will not contain any / characters\n    //\n    // First, we preprocess to make the glob pattern sets a bit simpler\n    // and deduped.  There are some perf-killing patterns that can cause\n    // problems with a glob walk, but we can simplify them down a bit.\n    const rawGlobParts = this.globSet.map(s => this.slashSplit(s))\n    this.globParts = this.preprocess(rawGlobParts)\n    this.debug(this.pattern, this.globParts)\n\n    // glob --> regexps\n    let set = this.globParts.map((s, _, __) => {\n      if (this.isWindows && this.windowsNoMagicRoot) {\n        // check if it's a drive or unc path.\n        const isUNC =\n          s[0] === '' &&\n          s[1] === '' &&\n          (s[2] === '?' || !globMagic.test(s[2])) &&\n          !globMagic.test(s[3])\n        const isDrive = /^[a-z]:/i.test(s[0])\n        if (isUNC) {\n          return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]\n        } else if (isDrive) {\n          return [s[0], ...s.slice(1).map(ss => this.parse(ss))]\n        }\n      }\n      return s.map(ss => this.parse(ss))\n    })\n\n    this.debug(this.pattern, set)\n\n    // filter out everything that didn't compile properly.\n    this.set = set.filter(\n      s => s.indexOf(false) === -1\n    ) as ParseReturnFiltered[][]\n\n    // do not treat the ? in UNC paths as magic\n    if (this.isWindows) {\n      for (let i = 0; i < this.set.length; i++) {\n        const p = this.set[i]\n        if (\n          p[0] === '' &&\n          p[1] === '' &&\n          this.globParts[i][2] === '?' &&\n          typeof p[3] === 'string' &&\n          /^[a-z]:$/i.test(p[3])\n        ) {\n          p[2] = '?'\n        }\n      }\n    }\n\n    this.debug(this.pattern, this.set)\n  }\n\n  // various transforms to equivalent pattern sets that are\n  // faster to process in a filesystem walk.  The goal is to\n  // eliminate what we can, and push all ** patterns as far\n  // to the right as possible, even if it increases the number\n  // of patterns that we have to process.\n  preprocess(globParts: string[][]) {\n    // if we're not in globstar mode, then turn all ** into *\n    if (this.options.noglobstar) {\n      for (let i = 0; i < globParts.length; i++) {\n        for (let j = 0; j < globParts[i].length; j++) {\n          if (globParts[i][j] === '**') {\n            globParts[i][j] = '*'\n          }\n        }\n      }\n    }\n\n    const { optimizationLevel = 1 } = this.options\n\n    if (optimizationLevel >= 2) {\n      // aggressive optimization for the purpose of fs walking\n      globParts = this.firstPhasePreProcess(globParts)\n      globParts = this.secondPhasePreProcess(globParts)\n    } else if (optimizationLevel >= 1) {\n      // just basic optimizations to remove some .. parts\n      globParts = this.levelOneOptimize(globParts)\n    } else {\n      // just collapse multiple ** portions into one\n      globParts = this.adjascentGlobstarOptimize(globParts)\n    }\n\n    return globParts\n  }\n\n  // just get rid of adjascent ** portions\n  adjascentGlobstarOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      let gs: number = -1\n      while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n        let i = gs\n        while (parts[i + 1] === '**') {\n          i++\n        }\n        if (i !== gs) {\n          parts.splice(gs, i - gs)\n        }\n      }\n      return parts\n    })\n  }\n\n  // get rid of adjascent ** and resolve .. portions\n  levelOneOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      parts = parts.reduce((set: string[], part) => {\n        const prev = set[set.length - 1]\n        if (part === '**' && prev === '**') {\n          return set\n        }\n        if (part === '..') {\n          if (prev && prev !== '..' && prev !== '.' && prev !== '**') {\n            set.pop()\n            return set\n          }\n        }\n        set.push(part)\n        return set\n      }, [])\n      return parts.length === 0 ? [''] : parts\n    })\n  }\n\n  levelTwoFileOptimize(parts: string | string[]) {\n    if (!Array.isArray(parts)) {\n      parts = this.slashSplit(parts)\n    }\n    let didSomething: boolean = false\n    do {\n      didSomething = false\n      // 
// -> 
/\n      if (!this.preserveMultipleSlashes) {\n        for (let i = 1; i < parts.length - 1; i++) {\n          const p = parts[i]\n          // don't squeeze out UNC patterns\n          if (i === 1 && p === '' && parts[0] === '') continue\n          if (p === '.' || p === '') {\n            didSomething = true\n            parts.splice(i, 1)\n            i--\n          }\n        }\n        if (\n          parts[0] === '.' &&\n          parts.length === 2 &&\n          (parts[1] === '.' || parts[1] === '')\n        ) {\n          didSomething = true\n          parts.pop()\n        }\n      }\n\n      // 
/

/../ ->

/\n      let dd: number = 0\n      while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n        const p = parts[dd - 1]\n        if (p && p !== '.' && p !== '..' && p !== '**') {\n          didSomething = true\n          parts.splice(dd - 1, 2)\n          dd -= 2\n        }\n      }\n    } while (didSomething)\n    return parts.length === 0 ? [''] : parts\n  }\n\n  // First phase: single-pattern processing\n  // 
 is 1 or more portions\n  //  is 1 or more portions\n  // 

is any portion other than ., .., '', or **\n // is . or ''\n //\n // **/.. is *brutal* for filesystem walking performance, because\n // it effectively resets the recursive walk each time it occurs,\n // and ** cannot be reduced out by a .. pattern part like a regexp\n // or most strings (other than .., ., and '') can be.\n //\n //

/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n //

// -> 
/\n  // 
/

/../ ->

/\n  // **/**/ -> **/\n  //\n  // **/*/ -> */**/ <== not valid because ** doesn't follow\n  // this WOULD be allowed if ** did follow symlinks, or * didn't\n  firstPhasePreProcess(globParts: string[][]) {\n    let didSomething = false\n    do {\n      didSomething = false\n      // 
/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n for (let parts of globParts) {\n let gs: number = -1\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let gss: number = gs\n while (parts[gss + 1] === '**') {\n //

/**/**/ -> 
/**/\n            gss++\n          }\n          // eg, if gs is 2 and gss is 4, that means we have 3 **\n          // parts, and can remove 2 of them.\n          if (gss > gs) {\n            parts.splice(gs + 1, gss - gs)\n          }\n\n          let next = parts[gs + 1]\n          const p = parts[gs + 2]\n          const p2 = parts[gs + 3]\n          if (next !== '..') continue\n          if (\n            !p ||\n            p === '.' ||\n            p === '..' ||\n            !p2 ||\n            p2 === '.' ||\n            p2 === '..'\n          ) {\n            continue\n          }\n          didSomething = true\n          // edit parts in place, and push the new one\n          parts.splice(gs, 1)\n          const other = parts.slice(0)\n          other[gs] = '**'\n          globParts.push(other)\n          gs--\n        }\n\n        // 
// -> 
/\n        if (!this.preserveMultipleSlashes) {\n          for (let i = 1; i < parts.length - 1; i++) {\n            const p = parts[i]\n            // don't squeeze out UNC patterns\n            if (i === 1 && p === '' && parts[0] === '') continue\n            if (p === '.' || p === '') {\n              didSomething = true\n              parts.splice(i, 1)\n              i--\n            }\n          }\n          if (\n            parts[0] === '.' &&\n            parts.length === 2 &&\n            (parts[1] === '.' || parts[1] === '')\n          ) {\n            didSomething = true\n            parts.pop()\n          }\n        }\n\n        // 
/

/../ ->

/\n        let dd: number = 0\n        while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n          const p = parts[dd - 1]\n          if (p && p !== '.' && p !== '..' && p !== '**') {\n            didSomething = true\n            const needDot = dd === 1 && parts[dd + 1] === '**'\n            const splin = needDot ? ['.'] : []\n            parts.splice(dd - 1, 2, ...splin)\n            if (parts.length === 0) parts.push('')\n            dd -= 2\n          }\n        }\n      }\n    } while (didSomething)\n\n    return globParts\n  }\n\n  // second phase: multi-pattern dedupes\n  // {
/*/,
/

/} ->

/*/\n  // {
/,
/} -> 
/\n  // {
/**/,
/} -> 
/**/\n  //\n  // {
/**/,
/**/

/} ->

/**/\n  // ^-- not valid because ** doens't follow symlinks\n  secondPhasePreProcess(globParts: string[][]): string[][] {\n    for (let i = 0; i < globParts.length - 1; i++) {\n      for (let j = i + 1; j < globParts.length; j++) {\n        const matched = this.partsMatch(\n          globParts[i],\n          globParts[j],\n          !this.preserveMultipleSlashes\n        )\n        if (matched) {\n          globParts[i] = []\n          globParts[j] = matched\n          break\n        }\n      }\n    }\n    return globParts.filter(gs => gs.length)\n  }\n\n  partsMatch(\n    a: string[],\n    b: string[],\n    emptyGSMatch: boolean = false\n  ): false | string[] {\n    let ai = 0\n    let bi = 0\n    let result: string[] = []\n    let which: string = ''\n    while (ai < a.length && bi < b.length) {\n      if (a[ai] === b[bi]) {\n        result.push(which === 'b' ? b[bi] : a[ai])\n        ai++\n        bi++\n      } else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {\n        result.push(a[ai])\n        ai++\n      } else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {\n        result.push(b[bi])\n        bi++\n      } else if (\n        a[ai] === '*' &&\n        b[bi] &&\n        (this.options.dot || !b[bi].startsWith('.')) &&\n        b[bi] !== '**'\n      ) {\n        if (which === 'b') return false\n        which = 'a'\n        result.push(a[ai])\n        ai++\n        bi++\n      } else if (\n        b[bi] === '*' &&\n        a[ai] &&\n        (this.options.dot || !a[ai].startsWith('.')) &&\n        a[ai] !== '**'\n      ) {\n        if (which === 'a') return false\n        which = 'b'\n        result.push(b[bi])\n        ai++\n        bi++\n      } else {\n        return false\n      }\n    }\n    // if we fall out of the loop, it means they two are identical\n    // as long as their lengths match\n    return a.length === b.length && result\n  }\n\n  parseNegate() {\n    if (this.nonegate) return\n\n    const pattern = this.pattern\n    let negate = false\n    let negateOffset = 0\n\n    for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {\n      negate = !negate\n      negateOffset++\n    }\n\n    if (negateOffset) this.pattern = pattern.slice(negateOffset)\n    this.negate = negate\n  }\n\n  // set partial to true to test if, for example,\n  // \"/a/b\" matches the start of \"/*/b/*/d\"\n  // Partial means, if you run out of file before you run\n  // out of pattern, then that's fine, as long as all\n  // the parts match.\n  matchOne(file: string[], pattern: ParseReturn[], partial: boolean = false) {\n    const options = this.options\n\n    // UNC paths like //?/X:/... can match X:/... and vice versa\n    // Drive letters in absolute drive or unc paths are always compared\n    // case-insensitively.\n    if (this.isWindows) {\n      const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0])\n      const fileUNC =\n        !fileDrive &&\n        file[0] === '' &&\n        file[1] === '' &&\n        file[2] === '?' &&\n        /^[a-z]:$/i.test(file[3])\n\n      const patternDrive =\n        typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0])\n      const patternUNC =\n        !patternDrive &&\n        pattern[0] === '' &&\n        pattern[1] === '' &&\n        pattern[2] === '?' &&\n        typeof pattern[3] === 'string' &&\n        /^[a-z]:$/i.test(pattern[3])\n\n      const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined\n      const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined\n      if (typeof fdi === 'number' && typeof pdi === 'number') {\n        const [fd, pd]: [string, string] = [file[fdi], pattern[pdi] as string]\n        if (fd.toLowerCase() === pd.toLowerCase()) {\n          pattern[pdi] = fd\n          if (pdi > fdi) {\n            pattern = pattern.slice(pdi)\n          } else if (fdi > pdi) {\n            file = file.slice(fdi)\n          }\n        }\n      }\n    }\n\n    // resolve and reduce . and .. portions in the file as well.\n    // dont' need to do the second phase, because it's only one string[]\n    const { optimizationLevel = 1 } = this.options\n    if (optimizationLevel >= 2) {\n      file = this.levelTwoFileOptimize(file)\n    }\n\n    this.debug('matchOne', this, { file, pattern })\n    this.debug('matchOne', file.length, pattern.length)\n\n    for (\n      var fi = 0, pi = 0, fl = file.length, pl = pattern.length;\n      fi < fl && pi < pl;\n      fi++, pi++\n    ) {\n      this.debug('matchOne loop')\n      var p = pattern[pi]\n      var f = file[fi]\n\n      this.debug(pattern, p, f)\n\n      // should be impossible.\n      // some invalid regexp stuff in the set.\n      /* c8 ignore start */\n      if (p === false) {\n        return false\n      }\n      /* c8 ignore stop */\n\n      if (p === GLOBSTAR) {\n        this.debug('GLOBSTAR', [pattern, p, f])\n\n        // \"**\"\n        // a/**/b/**/c would match the following:\n        // a/b/x/y/z/c\n        // a/x/y/z/b/c\n        // a/b/x/b/x/c\n        // a/b/c\n        // To do this, take the rest of the pattern after\n        // the **, and see if it would match the file remainder.\n        // If so, return success.\n        // If not, the ** \"swallows\" a segment, and try again.\n        // This is recursively awful.\n        //\n        // a/**/b/**/c matching a/b/x/y/z/c\n        // - a matches a\n        // - doublestar\n        //   - matchOne(b/x/y/z/c, b/**/c)\n        //     - b matches b\n        //     - doublestar\n        //       - matchOne(x/y/z/c, c) -> no\n        //       - matchOne(y/z/c, c) -> no\n        //       - matchOne(z/c, c) -> no\n        //       - matchOne(c, c) yes, hit\n        var fr = fi\n        var pr = pi + 1\n        if (pr === pl) {\n          this.debug('** at the end')\n          // a ** at the end will just swallow the rest.\n          // We have found a match.\n          // however, it will not swallow /.x, unless\n          // options.dot is set.\n          // . and .. are *never* matched by **, for explosively\n          // exponential reasons.\n          for (; fi < fl; fi++) {\n            if (\n              file[fi] === '.' ||\n              file[fi] === '..' ||\n              (!options.dot && file[fi].charAt(0) === '.')\n            )\n              return false\n          }\n          return true\n        }\n\n        // ok, let's see if we can swallow whatever we can.\n        while (fr < fl) {\n          var swallowee = file[fr]\n\n          this.debug('\\nglobstar while', file, fr, pattern, pr, swallowee)\n\n          // XXX remove this slice.  Just pass the start index.\n          if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {\n            this.debug('globstar found match!', fr, fl, swallowee)\n            // found a match.\n            return true\n          } else {\n            // can't swallow \".\" or \"..\" ever.\n            // can only swallow \".foo\" when explicitly asked.\n            if (\n              swallowee === '.' ||\n              swallowee === '..' ||\n              (!options.dot && swallowee.charAt(0) === '.')\n            ) {\n              this.debug('dot detected!', file, fr, pattern, pr)\n              break\n            }\n\n            // ** swallows a segment, and continue.\n            this.debug('globstar swallow a segment, and continue')\n            fr++\n          }\n        }\n\n        // no match was found.\n        // However, in partial mode, we can't say this is necessarily over.\n        /* c8 ignore start */\n        if (partial) {\n          // ran out of file\n          this.debug('\\n>>> no match, partial?', file, fr, pattern, pr)\n          if (fr === fl) {\n            return true\n          }\n        }\n        /* c8 ignore stop */\n        return false\n      }\n\n      // something other than **\n      // non-magic patterns just have to match exactly\n      // patterns with magic have been turned into regexps.\n      let hit: boolean\n      if (typeof p === 'string') {\n        hit = f === p\n        this.debug('string match', p, f, hit)\n      } else {\n        hit = p.test(f)\n        this.debug('pattern match', p, f, hit)\n      }\n\n      if (!hit) return false\n    }\n\n    // Note: ending in / means that we'll get a final \"\"\n    // at the end of the pattern.  This can only match a\n    // corresponding \"\" at the end of the file.\n    // If the file ends in /, then it can only match a\n    // a pattern that ends in /, unless the pattern just\n    // doesn't have any more for it. But, a/b/ should *not*\n    // match \"a/b/*\", even though \"\" matches against the\n    // [^/]*? pattern, except in partial mode, where it might\n    // simply not be reached yet.\n    // However, a/b/ should still satisfy a/*\n\n    // now either we fell off the end of the pattern, or we're done.\n    if (fi === fl && pi === pl) {\n      // ran out of pattern and filename at the same time.\n      // an exact hit!\n      return true\n    } else if (fi === fl) {\n      // ran out of file, but still had pattern left.\n      // this is ok if we're doing the match as part of\n      // a glob fs traversal.\n      return partial\n    } else if (pi === pl) {\n      // ran out of pattern, still have file left.\n      // this is only acceptable if we're on the very last\n      // empty segment of a file with a trailing slash.\n      // a/* should match a/b/\n      return fi === fl - 1 && file[fi] === ''\n\n      /* c8 ignore start */\n    } else {\n      // should be unreachable.\n      throw new Error('wtf?')\n    }\n    /* c8 ignore stop */\n  }\n\n  braceExpand() {\n    return braceExpand(this.pattern, this.options)\n  }\n\n  parse(pattern: string): ParseReturn {\n    assertValidPattern(pattern)\n\n    const options = this.options\n\n    // shortcuts\n    if (pattern === '**') return GLOBSTAR\n    if (pattern === '') return ''\n\n    // far and away, the most common glob pattern parts are\n    // *, *.*, and *.  Add a fast check method for those.\n    let m: RegExpMatchArray | null\n    let fastTest: null | ((f: string) => boolean) = null\n    if ((m = pattern.match(starRE))) {\n      fastTest = options.dot ? starTestDot : starTest\n    } else if ((m = pattern.match(starDotExtRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? starDotExtTestNocaseDot\n            : starDotExtTestNocase\n          : options.dot\n          ? starDotExtTestDot\n          : starDotExtTest\n      )(m[1])\n    } else if ((m = pattern.match(qmarksRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? qmarksTestNocaseDot\n            : qmarksTestNocase\n          : options.dot\n          ? qmarksTestDot\n          : qmarksTest\n      )(m)\n    } else if ((m = pattern.match(starDotStarRE))) {\n      fastTest = options.dot ? starDotStarTestDot : starDotStarTest\n    } else if ((m = pattern.match(dotStarRE))) {\n      fastTest = dotStarTest\n    }\n\n    const re = AST.fromGlob(pattern, this.options).toMMPattern()\n    if (fastTest && typeof re === 'object') {\n      // Avoids overriding in frozen environments\n      Reflect.defineProperty(re, 'test', { value: fastTest })\n    }\n    return re\n  }\n\n  makeRe() {\n    if (this.regexp || this.regexp === false) return this.regexp\n\n    // at this point, this.set is a 2d array of partial\n    // pattern strings, or \"**\".\n    //\n    // It's better to use .match().  This function shouldn't\n    // be used, really, but it's pretty convenient sometimes,\n    // when you just want to work with a regex.\n    const set = this.set\n\n    if (!set.length) {\n      this.regexp = false\n      return this.regexp\n    }\n    const options = this.options\n\n    const twoStar = options.noglobstar\n      ? star\n      : options.dot\n      ? twoStarDot\n      : twoStarNoDot\n    const flags = new Set(options.nocase ? ['i'] : [])\n\n    // regexpify non-globstar patterns\n    // if ** is only item, then we just do one twoStar\n    // if ** is first, and there are more, prepend (\\/|twoStar\\/)? to next\n    // if ** is last, append (\\/twoStar|) to previous\n    // if ** is in the middle, append (\\/|\\/twoStar\\/) to previous\n    // then filter out GLOBSTAR symbols\n    let re = set\n      .map(pattern => {\n        const pp: (string | typeof GLOBSTAR)[] = pattern.map(p => {\n          if (p instanceof RegExp) {\n            for (const f of p.flags.split('')) flags.add(f)\n          }\n          return typeof p === 'string'\n            ? regExpEscape(p)\n            : p === GLOBSTAR\n            ? GLOBSTAR\n            : p._src\n        }) as (string | typeof GLOBSTAR)[]\n        pp.forEach((p, i) => {\n          const next = pp[i + 1]\n          const prev = pp[i - 1]\n          if (p !== GLOBSTAR || prev === GLOBSTAR) {\n            return\n          }\n          if (prev === undefined) {\n            if (next !== undefined && next !== GLOBSTAR) {\n              pp[i + 1] = '(?:\\\\/|' + twoStar + '\\\\/)?' + next\n            } else {\n              pp[i] = twoStar\n            }\n          } else if (next === undefined) {\n            pp[i - 1] = prev + '(?:\\\\/|' + twoStar + ')?'\n          } else if (next !== GLOBSTAR) {\n            pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + '\\\\/)' + next\n            pp[i + 1] = GLOBSTAR\n          }\n        })\n        return pp.filter(p => p !== GLOBSTAR).join('/')\n      })\n      .join('|')\n\n    // need to wrap in parens if we had more than one thing with |,\n    // otherwise only the first will be anchored to ^ and the last to $\n    const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', '']\n    // must match entire pattern\n    // ending in a * or ** will make it less strict.\n    re = '^' + open + re + close + '$'\n\n    // can match anything, as long as it's not this.\n    if (this.negate) re = '^(?!' + re + ').+$'\n\n    try {\n      this.regexp = new RegExp(re, [...flags].join(''))\n      /* c8 ignore start */\n    } catch (ex) {\n      // should be impossible\n      this.regexp = false\n    }\n    /* c8 ignore stop */\n    return this.regexp\n  }\n\n  slashSplit(p: string) {\n    // if p starts with // on windows, we preserve that\n    // so that UNC paths aren't broken.  Otherwise, any number of\n    // / characters are coalesced into one, unless\n    // preserveMultipleSlashes is set to true.\n    if (this.preserveMultipleSlashes) {\n      return p.split('/')\n    } else if (this.isWindows && /^\\/\\/[^\\/]+/.test(p)) {\n      // add an extra '' for the one we lose\n      return ['', ...p.split(/\\/+/)]\n    } else {\n      return p.split(/\\/+/)\n    }\n  }\n\n  match(f: string, partial = this.partial) {\n    this.debug('match', f, this.pattern)\n    // short-circuit in the case of busted things.\n    // comments, etc.\n    if (this.comment) {\n      return false\n    }\n    if (this.empty) {\n      return f === ''\n    }\n\n    if (f === '/' && partial) {\n      return true\n    }\n\n    const options = this.options\n\n    // windows: need to use /, not \\\n    if (this.isWindows) {\n      f = f.split('\\\\').join('/')\n    }\n\n    // treat the test path as a set of pathparts.\n    const ff = this.slashSplit(f)\n    this.debug(this.pattern, 'split', ff)\n\n    // just ONE of the pattern sets in this.set needs to match\n    // in order for it to be valid.  If negating, then just one\n    // match means that we have failed.\n    // Either way, return on the first hit.\n\n    const set = this.set\n    this.debug(this.pattern, 'set', set)\n\n    // Find the basename of the path by looking for the last non-empty segment\n    let filename: string = ff[ff.length - 1]\n    if (!filename) {\n      for (let i = ff.length - 2; !filename && i >= 0; i--) {\n        filename = ff[i]\n      }\n    }\n\n    for (let i = 0; i < set.length; i++) {\n      const pattern = set[i]\n      let file = ff\n      if (options.matchBase && pattern.length === 1) {\n        file = [filename]\n      }\n      const hit = this.matchOne(file, pattern, partial)\n      if (hit) {\n        if (options.flipNegate) {\n          return true\n        }\n        return !this.negate\n      }\n    }\n\n    // didn't get any hits.  this is success if it's a negative\n    // pattern, failure otherwise.\n    if (options.flipNegate) {\n      return false\n    }\n    return this.negate\n  }\n\n  static defaults(def: MinimatchOptions) {\n    return minimatch.defaults(def).Minimatch\n  }\n}\n/* c8 ignore start */\nexport { AST } from './ast.js'\nexport { escape } from './escape.js'\nexport { unescape } from './unescape.js'\n/* c8 ignore stop */\nminimatch.AST = AST\nminimatch.Minimatch = Minimatch\nminimatch.escape = escape\nminimatch.unescape = unescape\n"]}
\ No newline at end of file
diff --git a/deps/minimatch/dist/esm/index.js b/deps/minimatch/dist/esm/index.js
index 84b577b0472cb6..790d6c02a2f22e 100644
--- a/deps/minimatch/dist/esm/index.js
+++ b/deps/minimatch/dist/esm/index.js
@@ -1,4 +1,4 @@
-import expand from 'brace-expansion';
+import { expand } from '@isaacs/brace-expansion';
 import { assertValidPattern } from './assert-valid-pattern.js';
 import { AST } from './ast.js';
 import { escape } from './escape.js';
diff --git a/deps/minimatch/dist/esm/index.js.map b/deps/minimatch/dist/esm/index.js.map
index 2ba6134de89c10..42173930f3ef10 100644
--- a/deps/minimatch/dist/esm/index.js.map
+++ b/deps/minimatch/dist/esm/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAA;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,GAAG,EAAe,MAAM,UAAU,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAsCxC,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,CAAS,EACT,OAAe,EACf,UAA4B,EAAE,EAC9B,EAAE;IACF,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAE3B,oCAAoC;IACpC,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;QACpD,OAAO,KAAK,CAAA;IACd,CAAC;IAED,OAAO,IAAI,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC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oB;AACpB,SAAS,CAAC,GAAG,GAAG,GAAG,CAAA;AACnB,SAAS,CAAC,SAAS,GAAG,SAAS,CAAA;AAC/B,SAAS,CAAC,MAAM,GAAG,MAAM,CAAA;AACzB,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAA","sourcesContent":["import expand from 'brace-expansion'\nimport { assertValidPattern } from './assert-valid-pattern.js'\nimport { AST, ExtglobType } from './ast.js'\nimport { escape } from './escape.js'\nimport { unescape } from './unescape.js'\n\ntype Platform =\n  | 'aix'\n  | 'android'\n  | 'darwin'\n  | 'freebsd'\n  | 'haiku'\n  | 'linux'\n  | 'openbsd'\n  | 'sunos'\n  | 'win32'\n  | 'cygwin'\n  | 'netbsd'\n\nexport interface MinimatchOptions {\n  nobrace?: boolean\n  nocomment?: boolean\n  nonegate?: boolean\n  debug?: boolean\n  noglobstar?: boolean\n  noext?: boolean\n  nonull?: boolean\n  windowsPathsNoEscape?: boolean\n  allowWindowsEscape?: boolean\n  partial?: boolean\n  dot?: boolean\n  nocase?: boolean\n  nocaseMagicOnly?: boolean\n  magicalBraces?: boolean\n  matchBase?: boolean\n  flipNegate?: boolean\n  preserveMultipleSlashes?: boolean\n  optimizationLevel?: number\n  platform?: Platform\n  windowsNoMagicRoot?: boolean\n}\n\nexport const minimatch = (\n  p: string,\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  assertValidPattern(pattern)\n\n  // shortcut: comments match nothing.\n  if (!options.nocomment && pattern.charAt(0) === '#') {\n    return false\n  }\n\n  return new Minimatch(pattern, options).match(p)\n}\n\n// Optimized checking for the most common glob patterns.\nconst starDotExtRE = /^\\*+([^+@!?\\*\\[\\(]*)$/\nconst starDotExtTest = (ext: string) => (f: string) =>\n  !f.startsWith('.') && f.endsWith(ext)\nconst starDotExtTestDot = (ext: string) => (f: string) => f.endsWith(ext)\nconst starDotExtTestNocase = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => !f.startsWith('.') && f.toLowerCase().endsWith(ext)\n}\nconst starDotExtTestNocaseDot = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => f.toLowerCase().endsWith(ext)\n}\nconst starDotStarRE = /^\\*+\\.\\*+$/\nconst starDotStarTest = (f: string) => !f.startsWith('.') && f.includes('.')\nconst starDotStarTestDot = (f: string) =>\n  f !== '.' && f !== '..' && f.includes('.')\nconst dotStarRE = /^\\.\\*+$/\nconst dotStarTest = (f: string) => f !== '.' && f !== '..' && f.startsWith('.')\nconst starRE = /^\\*+$/\nconst starTest = (f: string) => f.length !== 0 && !f.startsWith('.')\nconst starTestDot = (f: string) => f.length !== 0 && f !== '.' && f !== '..'\nconst qmarksRE = /^\\?+([^+@!?\\*\\[\\(]*)?$/\nconst qmarksTestNocase = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestNocaseDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTest = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTestNoExt = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && !f.startsWith('.')\n}\nconst qmarksTestNoExtDot = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && f !== '.' && f !== '..'\n}\n\n/* c8 ignore start */\nconst defaultPlatform: Platform = (\n  typeof process === 'object' && process\n    ? (typeof process.env === 'object' &&\n        process.env &&\n        process.env.__MINIMATCH_TESTING_PLATFORM__) ||\n      process.platform\n    : 'posix'\n) as Platform\ntype Sep = '\\\\' | '/'\nconst path: { [k: string]: { sep: Sep } } = {\n  win32: { sep: '\\\\' },\n  posix: { sep: '/' },\n}\n/* c8 ignore stop */\n\nexport const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep\nminimatch.sep = sep\n\nexport const GLOBSTAR = Symbol('globstar **')\nminimatch.GLOBSTAR = GLOBSTAR\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n\n// ** when dots are allowed.  Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nconst twoStarDot = '(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nconst twoStarNoDot = '(?:(?!(?:\\\\/|^)\\\\.).)*?'\n\nexport const filter =\n  (pattern: string, options: MinimatchOptions = {}) =>\n  (p: string) =>\n    minimatch(p, pattern, options)\nminimatch.filter = filter\n\nconst ext = (a: MinimatchOptions, b: MinimatchOptions = {}) =>\n  Object.assign({}, a, b)\n\nexport const defaults = (def: MinimatchOptions): typeof minimatch => {\n  if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n    return minimatch\n  }\n\n  const orig = minimatch\n\n  const m = (p: string, pattern: string, options: MinimatchOptions = {}) =>\n    orig(p, pattern, ext(def, options))\n\n  return Object.assign(m, {\n    Minimatch: class Minimatch extends orig.Minimatch {\n      constructor(pattern: string, options: MinimatchOptions = {}) {\n        super(pattern, ext(def, options))\n      }\n      static defaults(options: MinimatchOptions) {\n        return orig.defaults(ext(def, options)).Minimatch\n      }\n    },\n\n    AST: class AST extends orig.AST {\n      /* c8 ignore start */\n      constructor(\n        type: ExtglobType | null,\n        parent?: AST,\n        options: MinimatchOptions = {}\n      ) {\n        super(type, parent, ext(def, options))\n      }\n      /* c8 ignore stop */\n\n      static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n        return orig.AST.fromGlob(pattern, ext(def, options))\n      }\n    },\n\n    unescape: (\n      s: string,\n      options: Pick = {}\n    ) => orig.unescape(s, ext(def, options)),\n\n    escape: (\n      s: string,\n      options: Pick = {}\n    ) => orig.escape(s, ext(def, options)),\n\n    filter: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.filter(pattern, ext(def, options)),\n\n    defaults: (options: MinimatchOptions) => orig.defaults(ext(def, options)),\n\n    makeRe: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.makeRe(pattern, ext(def, options)),\n\n    braceExpand: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.braceExpand(pattern, ext(def, options)),\n\n    match: (list: string[], pattern: string, options: MinimatchOptions = {}) =>\n      orig.match(list, pattern, ext(def, options)),\n\n    sep: orig.sep,\n    GLOBSTAR: GLOBSTAR as typeof GLOBSTAR,\n  })\n}\nminimatch.defaults = defaults\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nexport const braceExpand = (\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  assertValidPattern(pattern)\n\n  // Thanks to Yeting Li  for\n  // improving this regexp to avoid a ReDOS vulnerability.\n  if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n    // shortcut. no need to expand.\n    return [pattern]\n  }\n\n  return expand(pattern)\n}\nminimatch.braceExpand = braceExpand\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion.  Otherwise, any series\n// of * is equivalent to a single *.  Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\n\nexport const makeRe = (pattern: string, options: MinimatchOptions = {}) =>\n  new Minimatch(pattern, options).makeRe()\nminimatch.makeRe = makeRe\n\nexport const match = (\n  list: string[],\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  const mm = new Minimatch(pattern, options)\n  list = list.filter(f => mm.match(f))\n  if (mm.options.nonull && !list.length) {\n    list.push(pattern)\n  }\n  return list\n}\nminimatch.match = match\n\n// replace stuff like \\* with *\nconst globMagic = /[?*]|[+@!]\\(.*?\\)|\\[|\\]/\nconst regExpEscape = (s: string) =>\n  s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\nexport type MMRegExp = RegExp & {\n  _src?: string\n  _glob?: string\n}\n\nexport type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR\nexport type ParseReturn = ParseReturnFiltered | false\n\nexport class Minimatch {\n  options: MinimatchOptions\n  set: ParseReturnFiltered[][]\n  pattern: string\n\n  windowsPathsNoEscape: boolean\n  nonegate: boolean\n  negate: boolean\n  comment: boolean\n  empty: boolean\n  preserveMultipleSlashes: boolean\n  partial: boolean\n  globSet: string[]\n  globParts: string[][]\n  nocase: boolean\n\n  isWindows: boolean\n  platform: Platform\n  windowsNoMagicRoot: boolean\n\n  regexp: false | null | MMRegExp\n  constructor(pattern: string, options: MinimatchOptions = {}) {\n    assertValidPattern(pattern)\n\n    options = options || {}\n    this.options = options\n    this.pattern = pattern\n    this.platform = options.platform || defaultPlatform\n    this.isWindows = this.platform === 'win32'\n    this.windowsPathsNoEscape =\n      !!options.windowsPathsNoEscape || options.allowWindowsEscape === false\n    if (this.windowsPathsNoEscape) {\n      this.pattern = this.pattern.replace(/\\\\/g, '/')\n    }\n    this.preserveMultipleSlashes = !!options.preserveMultipleSlashes\n    this.regexp = null\n    this.negate = false\n    this.nonegate = !!options.nonegate\n    this.comment = false\n    this.empty = false\n    this.partial = !!options.partial\n    this.nocase = !!this.options.nocase\n    this.windowsNoMagicRoot =\n      options.windowsNoMagicRoot !== undefined\n        ? options.windowsNoMagicRoot\n        : !!(this.isWindows && this.nocase)\n\n    this.globSet = []\n    this.globParts = []\n    this.set = []\n\n    // make the set of regexps etc.\n    this.make()\n  }\n\n  hasMagic(): boolean {\n    if (this.options.magicalBraces && this.set.length > 1) {\n      return true\n    }\n    for (const pattern of this.set) {\n      for (const part of pattern) {\n        if (typeof part !== 'string') return true\n      }\n    }\n    return false\n  }\n\n  debug(..._: any[]) {}\n\n  make() {\n    const pattern = this.pattern\n    const options = this.options\n\n    // empty patterns and comments match nothing.\n    if (!options.nocomment && pattern.charAt(0) === '#') {\n      this.comment = true\n      return\n    }\n\n    if (!pattern) {\n      this.empty = true\n      return\n    }\n\n    // step 1: figure out negation, etc.\n    this.parseNegate()\n\n    // step 2: expand braces\n    this.globSet = [...new Set(this.braceExpand())]\n\n    if (options.debug) {\n      this.debug = (...args: any[]) => console.error(...args)\n    }\n\n    this.debug(this.pattern, this.globSet)\n\n    // step 3: now we have a set, so turn each one into a series of\n    // path-portion matching patterns.\n    // These will be regexps, except in the case of \"**\", which is\n    // set to the GLOBSTAR object for globstar behavior,\n    // and will not contain any / characters\n    //\n    // First, we preprocess to make the glob pattern sets a bit simpler\n    // and deduped.  There are some perf-killing patterns that can cause\n    // problems with a glob walk, but we can simplify them down a bit.\n    const rawGlobParts = this.globSet.map(s => this.slashSplit(s))\n    this.globParts = this.preprocess(rawGlobParts)\n    this.debug(this.pattern, this.globParts)\n\n    // glob --> regexps\n    let set = this.globParts.map((s, _, __) => {\n      if (this.isWindows && this.windowsNoMagicRoot) {\n        // check if it's a drive or unc path.\n        const isUNC =\n          s[0] === '' &&\n          s[1] === '' &&\n          (s[2] === '?' || !globMagic.test(s[2])) &&\n          !globMagic.test(s[3])\n        const isDrive = /^[a-z]:/i.test(s[0])\n        if (isUNC) {\n          return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]\n        } else if (isDrive) {\n          return [s[0], ...s.slice(1).map(ss => this.parse(ss))]\n        }\n      }\n      return s.map(ss => this.parse(ss))\n    })\n\n    this.debug(this.pattern, set)\n\n    // filter out everything that didn't compile properly.\n    this.set = set.filter(\n      s => s.indexOf(false) === -1\n    ) as ParseReturnFiltered[][]\n\n    // do not treat the ? in UNC paths as magic\n    if (this.isWindows) {\n      for (let i = 0; i < this.set.length; i++) {\n        const p = this.set[i]\n        if (\n          p[0] === '' &&\n          p[1] === '' &&\n          this.globParts[i][2] === '?' &&\n          typeof p[3] === 'string' &&\n          /^[a-z]:$/i.test(p[3])\n        ) {\n          p[2] = '?'\n        }\n      }\n    }\n\n    this.debug(this.pattern, this.set)\n  }\n\n  // various transforms to equivalent pattern sets that are\n  // faster to process in a filesystem walk.  The goal is to\n  // eliminate what we can, and push all ** patterns as far\n  // to the right as possible, even if it increases the number\n  // of patterns that we have to process.\n  preprocess(globParts: string[][]) {\n    // if we're not in globstar mode, then turn all ** into *\n    if (this.options.noglobstar) {\n      for (let i = 0; i < globParts.length; i++) {\n        for (let j = 0; j < globParts[i].length; j++) {\n          if (globParts[i][j] === '**') {\n            globParts[i][j] = '*'\n          }\n        }\n      }\n    }\n\n    const { optimizationLevel = 1 } = this.options\n\n    if (optimizationLevel >= 2) {\n      // aggressive optimization for the purpose of fs walking\n      globParts = this.firstPhasePreProcess(globParts)\n      globParts = this.secondPhasePreProcess(globParts)\n    } else if (optimizationLevel >= 1) {\n      // just basic optimizations to remove some .. parts\n      globParts = this.levelOneOptimize(globParts)\n    } else {\n      // just collapse multiple ** portions into one\n      globParts = this.adjascentGlobstarOptimize(globParts)\n    }\n\n    return globParts\n  }\n\n  // just get rid of adjascent ** portions\n  adjascentGlobstarOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      let gs: number = -1\n      while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n        let i = gs\n        while (parts[i + 1] === '**') {\n          i++\n        }\n        if (i !== gs) {\n          parts.splice(gs, i - gs)\n        }\n      }\n      return parts\n    })\n  }\n\n  // get rid of adjascent ** and resolve .. portions\n  levelOneOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      parts = parts.reduce((set: string[], part) => {\n        const prev = set[set.length - 1]\n        if (part === '**' && prev === '**') {\n          return set\n        }\n        if (part === '..') {\n          if (prev && prev !== '..' && prev !== '.' && prev !== '**') {\n            set.pop()\n            return set\n          }\n        }\n        set.push(part)\n        return set\n      }, [])\n      return parts.length === 0 ? [''] : parts\n    })\n  }\n\n  levelTwoFileOptimize(parts: string | string[]) {\n    if (!Array.isArray(parts)) {\n      parts = this.slashSplit(parts)\n    }\n    let didSomething: boolean = false\n    do {\n      didSomething = false\n      // 
// -> 
/\n      if (!this.preserveMultipleSlashes) {\n        for (let i = 1; i < parts.length - 1; i++) {\n          const p = parts[i]\n          // don't squeeze out UNC patterns\n          if (i === 1 && p === '' && parts[0] === '') continue\n          if (p === '.' || p === '') {\n            didSomething = true\n            parts.splice(i, 1)\n            i--\n          }\n        }\n        if (\n          parts[0] === '.' &&\n          parts.length === 2 &&\n          (parts[1] === '.' || parts[1] === '')\n        ) {\n          didSomething = true\n          parts.pop()\n        }\n      }\n\n      // 
/

/../ ->

/\n      let dd: number = 0\n      while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n        const p = parts[dd - 1]\n        if (p && p !== '.' && p !== '..' && p !== '**') {\n          didSomething = true\n          parts.splice(dd - 1, 2)\n          dd -= 2\n        }\n      }\n    } while (didSomething)\n    return parts.length === 0 ? [''] : parts\n  }\n\n  // First phase: single-pattern processing\n  // 
 is 1 or more portions\n  //  is 1 or more portions\n  // 

is any portion other than ., .., '', or **\n // is . or ''\n //\n // **/.. is *brutal* for filesystem walking performance, because\n // it effectively resets the recursive walk each time it occurs,\n // and ** cannot be reduced out by a .. pattern part like a regexp\n // or most strings (other than .., ., and '') can be.\n //\n //

/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n //

// -> 
/\n  // 
/

/../ ->

/\n  // **/**/ -> **/\n  //\n  // **/*/ -> */**/ <== not valid because ** doesn't follow\n  // this WOULD be allowed if ** did follow symlinks, or * didn't\n  firstPhasePreProcess(globParts: string[][]) {\n    let didSomething = false\n    do {\n      didSomething = false\n      // 
/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n for (let parts of globParts) {\n let gs: number = -1\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let gss: number = gs\n while (parts[gss + 1] === '**') {\n //

/**/**/ -> 
/**/\n            gss++\n          }\n          // eg, if gs is 2 and gss is 4, that means we have 3 **\n          // parts, and can remove 2 of them.\n          if (gss > gs) {\n            parts.splice(gs + 1, gss - gs)\n          }\n\n          let next = parts[gs + 1]\n          const p = parts[gs + 2]\n          const p2 = parts[gs + 3]\n          if (next !== '..') continue\n          if (\n            !p ||\n            p === '.' ||\n            p === '..' ||\n            !p2 ||\n            p2 === '.' ||\n            p2 === '..'\n          ) {\n            continue\n          }\n          didSomething = true\n          // edit parts in place, and push the new one\n          parts.splice(gs, 1)\n          const other = parts.slice(0)\n          other[gs] = '**'\n          globParts.push(other)\n          gs--\n        }\n\n        // 
// -> 
/\n        if (!this.preserveMultipleSlashes) {\n          for (let i = 1; i < parts.length - 1; i++) {\n            const p = parts[i]\n            // don't squeeze out UNC patterns\n            if (i === 1 && p === '' && parts[0] === '') continue\n            if (p === '.' || p === '') {\n              didSomething = true\n              parts.splice(i, 1)\n              i--\n            }\n          }\n          if (\n            parts[0] === '.' &&\n            parts.length === 2 &&\n            (parts[1] === '.' || parts[1] === '')\n          ) {\n            didSomething = true\n            parts.pop()\n          }\n        }\n\n        // 
/

/../ ->

/\n        let dd: number = 0\n        while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n          const p = parts[dd - 1]\n          if (p && p !== '.' && p !== '..' && p !== '**') {\n            didSomething = true\n            const needDot = dd === 1 && parts[dd + 1] === '**'\n            const splin = needDot ? ['.'] : []\n            parts.splice(dd - 1, 2, ...splin)\n            if (parts.length === 0) parts.push('')\n            dd -= 2\n          }\n        }\n      }\n    } while (didSomething)\n\n    return globParts\n  }\n\n  // second phase: multi-pattern dedupes\n  // {
/*/,
/

/} ->

/*/\n  // {
/,
/} -> 
/\n  // {
/**/,
/} -> 
/**/\n  //\n  // {
/**/,
/**/

/} ->

/**/\n  // ^-- not valid because ** doens't follow symlinks\n  secondPhasePreProcess(globParts: string[][]): string[][] {\n    for (let i = 0; i < globParts.length - 1; i++) {\n      for (let j = i + 1; j < globParts.length; j++) {\n        const matched = this.partsMatch(\n          globParts[i],\n          globParts[j],\n          !this.preserveMultipleSlashes\n        )\n        if (matched) {\n          globParts[i] = []\n          globParts[j] = matched\n          break\n        }\n      }\n    }\n    return globParts.filter(gs => gs.length)\n  }\n\n  partsMatch(\n    a: string[],\n    b: string[],\n    emptyGSMatch: boolean = false\n  ): false | string[] {\n    let ai = 0\n    let bi = 0\n    let result: string[] = []\n    let which: string = ''\n    while (ai < a.length && bi < b.length) {\n      if (a[ai] === b[bi]) {\n        result.push(which === 'b' ? b[bi] : a[ai])\n        ai++\n        bi++\n      } else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {\n        result.push(a[ai])\n        ai++\n      } else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {\n        result.push(b[bi])\n        bi++\n      } else if (\n        a[ai] === '*' &&\n        b[bi] &&\n        (this.options.dot || !b[bi].startsWith('.')) &&\n        b[bi] !== '**'\n      ) {\n        if (which === 'b') return false\n        which = 'a'\n        result.push(a[ai])\n        ai++\n        bi++\n      } else if (\n        b[bi] === '*' &&\n        a[ai] &&\n        (this.options.dot || !a[ai].startsWith('.')) &&\n        a[ai] !== '**'\n      ) {\n        if (which === 'a') return false\n        which = 'b'\n        result.push(b[bi])\n        ai++\n        bi++\n      } else {\n        return false\n      }\n    }\n    // if we fall out of the loop, it means they two are identical\n    // as long as their lengths match\n    return a.length === b.length && result\n  }\n\n  parseNegate() {\n    if (this.nonegate) return\n\n    const pattern = this.pattern\n    let negate = false\n    let negateOffset = 0\n\n    for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {\n      negate = !negate\n      negateOffset++\n    }\n\n    if (negateOffset) this.pattern = pattern.slice(negateOffset)\n    this.negate = negate\n  }\n\n  // set partial to true to test if, for example,\n  // \"/a/b\" matches the start of \"/*/b/*/d\"\n  // Partial means, if you run out of file before you run\n  // out of pattern, then that's fine, as long as all\n  // the parts match.\n  matchOne(file: string[], pattern: ParseReturn[], partial: boolean = false) {\n    const options = this.options\n\n    // UNC paths like //?/X:/... can match X:/... and vice versa\n    // Drive letters in absolute drive or unc paths are always compared\n    // case-insensitively.\n    if (this.isWindows) {\n      const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0])\n      const fileUNC =\n        !fileDrive &&\n        file[0] === '' &&\n        file[1] === '' &&\n        file[2] === '?' &&\n        /^[a-z]:$/i.test(file[3])\n\n      const patternDrive =\n        typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0])\n      const patternUNC =\n        !patternDrive &&\n        pattern[0] === '' &&\n        pattern[1] === '' &&\n        pattern[2] === '?' &&\n        typeof pattern[3] === 'string' &&\n        /^[a-z]:$/i.test(pattern[3])\n\n      const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined\n      const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined\n      if (typeof fdi === 'number' && typeof pdi === 'number') {\n        const [fd, pd]: [string, string] = [file[fdi], pattern[pdi] as string]\n        if (fd.toLowerCase() === pd.toLowerCase()) {\n          pattern[pdi] = fd\n          if (pdi > fdi) {\n            pattern = pattern.slice(pdi)\n          } else if (fdi > pdi) {\n            file = file.slice(fdi)\n          }\n        }\n      }\n    }\n\n    // resolve and reduce . and .. portions in the file as well.\n    // dont' need to do the second phase, because it's only one string[]\n    const { optimizationLevel = 1 } = this.options\n    if (optimizationLevel >= 2) {\n      file = this.levelTwoFileOptimize(file)\n    }\n\n    this.debug('matchOne', this, { file, pattern })\n    this.debug('matchOne', file.length, pattern.length)\n\n    for (\n      var fi = 0, pi = 0, fl = file.length, pl = pattern.length;\n      fi < fl && pi < pl;\n      fi++, pi++\n    ) {\n      this.debug('matchOne loop')\n      var p = pattern[pi]\n      var f = file[fi]\n\n      this.debug(pattern, p, f)\n\n      // should be impossible.\n      // some invalid regexp stuff in the set.\n      /* c8 ignore start */\n      if (p === false) {\n        return false\n      }\n      /* c8 ignore stop */\n\n      if (p === GLOBSTAR) {\n        this.debug('GLOBSTAR', [pattern, p, f])\n\n        // \"**\"\n        // a/**/b/**/c would match the following:\n        // a/b/x/y/z/c\n        // a/x/y/z/b/c\n        // a/b/x/b/x/c\n        // a/b/c\n        // To do this, take the rest of the pattern after\n        // the **, and see if it would match the file remainder.\n        // If so, return success.\n        // If not, the ** \"swallows\" a segment, and try again.\n        // This is recursively awful.\n        //\n        // a/**/b/**/c matching a/b/x/y/z/c\n        // - a matches a\n        // - doublestar\n        //   - matchOne(b/x/y/z/c, b/**/c)\n        //     - b matches b\n        //     - doublestar\n        //       - matchOne(x/y/z/c, c) -> no\n        //       - matchOne(y/z/c, c) -> no\n        //       - matchOne(z/c, c) -> no\n        //       - matchOne(c, c) yes, hit\n        var fr = fi\n        var pr = pi + 1\n        if (pr === pl) {\n          this.debug('** at the end')\n          // a ** at the end will just swallow the rest.\n          // We have found a match.\n          // however, it will not swallow /.x, unless\n          // options.dot is set.\n          // . and .. are *never* matched by **, for explosively\n          // exponential reasons.\n          for (; fi < fl; fi++) {\n            if (\n              file[fi] === '.' ||\n              file[fi] === '..' ||\n              (!options.dot && file[fi].charAt(0) === '.')\n            )\n              return false\n          }\n          return true\n        }\n\n        // ok, let's see if we can swallow whatever we can.\n        while (fr < fl) {\n          var swallowee = file[fr]\n\n          this.debug('\\nglobstar while', file, fr, pattern, pr, swallowee)\n\n          // XXX remove this slice.  Just pass the start index.\n          if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {\n            this.debug('globstar found match!', fr, fl, swallowee)\n            // found a match.\n            return true\n          } else {\n            // can't swallow \".\" or \"..\" ever.\n            // can only swallow \".foo\" when explicitly asked.\n            if (\n              swallowee === '.' ||\n              swallowee === '..' ||\n              (!options.dot && swallowee.charAt(0) === '.')\n            ) {\n              this.debug('dot detected!', file, fr, pattern, pr)\n              break\n            }\n\n            // ** swallows a segment, and continue.\n            this.debug('globstar swallow a segment, and continue')\n            fr++\n          }\n        }\n\n        // no match was found.\n        // However, in partial mode, we can't say this is necessarily over.\n        /* c8 ignore start */\n        if (partial) {\n          // ran out of file\n          this.debug('\\n>>> no match, partial?', file, fr, pattern, pr)\n          if (fr === fl) {\n            return true\n          }\n        }\n        /* c8 ignore stop */\n        return false\n      }\n\n      // something other than **\n      // non-magic patterns just have to match exactly\n      // patterns with magic have been turned into regexps.\n      let hit: boolean\n      if (typeof p === 'string') {\n        hit = f === p\n        this.debug('string match', p, f, hit)\n      } else {\n        hit = p.test(f)\n        this.debug('pattern match', p, f, hit)\n      }\n\n      if (!hit) return false\n    }\n\n    // Note: ending in / means that we'll get a final \"\"\n    // at the end of the pattern.  This can only match a\n    // corresponding \"\" at the end of the file.\n    // If the file ends in /, then it can only match a\n    // a pattern that ends in /, unless the pattern just\n    // doesn't have any more for it. But, a/b/ should *not*\n    // match \"a/b/*\", even though \"\" matches against the\n    // [^/]*? pattern, except in partial mode, where it might\n    // simply not be reached yet.\n    // However, a/b/ should still satisfy a/*\n\n    // now either we fell off the end of the pattern, or we're done.\n    if (fi === fl && pi === pl) {\n      // ran out of pattern and filename at the same time.\n      // an exact hit!\n      return true\n    } else if (fi === fl) {\n      // ran out of file, but still had pattern left.\n      // this is ok if we're doing the match as part of\n      // a glob fs traversal.\n      return partial\n    } else if (pi === pl) {\n      // ran out of pattern, still have file left.\n      // this is only acceptable if we're on the very last\n      // empty segment of a file with a trailing slash.\n      // a/* should match a/b/\n      return fi === fl - 1 && file[fi] === ''\n\n      /* c8 ignore start */\n    } else {\n      // should be unreachable.\n      throw new Error('wtf?')\n    }\n    /* c8 ignore stop */\n  }\n\n  braceExpand() {\n    return braceExpand(this.pattern, this.options)\n  }\n\n  parse(pattern: string): ParseReturn {\n    assertValidPattern(pattern)\n\n    const options = this.options\n\n    // shortcuts\n    if (pattern === '**') return GLOBSTAR\n    if (pattern === '') return ''\n\n    // far and away, the most common glob pattern parts are\n    // *, *.*, and *.  Add a fast check method for those.\n    let m: RegExpMatchArray | null\n    let fastTest: null | ((f: string) => boolean) = null\n    if ((m = pattern.match(starRE))) {\n      fastTest = options.dot ? starTestDot : starTest\n    } else if ((m = pattern.match(starDotExtRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? starDotExtTestNocaseDot\n            : starDotExtTestNocase\n          : options.dot\n          ? starDotExtTestDot\n          : starDotExtTest\n      )(m[1])\n    } else if ((m = pattern.match(qmarksRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? qmarksTestNocaseDot\n            : qmarksTestNocase\n          : options.dot\n          ? qmarksTestDot\n          : qmarksTest\n      )(m)\n    } else if ((m = pattern.match(starDotStarRE))) {\n      fastTest = options.dot ? starDotStarTestDot : starDotStarTest\n    } else if ((m = pattern.match(dotStarRE))) {\n      fastTest = dotStarTest\n    }\n\n    const re = AST.fromGlob(pattern, this.options).toMMPattern()\n    if (fastTest && typeof re === 'object') {\n      // Avoids overriding in frozen environments\n      Reflect.defineProperty(re, 'test', { value: fastTest })\n    }\n    return re\n  }\n\n  makeRe() {\n    if (this.regexp || this.regexp === false) return this.regexp\n\n    // at this point, this.set is a 2d array of partial\n    // pattern strings, or \"**\".\n    //\n    // It's better to use .match().  This function shouldn't\n    // be used, really, but it's pretty convenient sometimes,\n    // when you just want to work with a regex.\n    const set = this.set\n\n    if (!set.length) {\n      this.regexp = false\n      return this.regexp\n    }\n    const options = this.options\n\n    const twoStar = options.noglobstar\n      ? star\n      : options.dot\n      ? twoStarDot\n      : twoStarNoDot\n    const flags = new Set(options.nocase ? ['i'] : [])\n\n    // regexpify non-globstar patterns\n    // if ** is only item, then we just do one twoStar\n    // if ** is first, and there are more, prepend (\\/|twoStar\\/)? to next\n    // if ** is last, append (\\/twoStar|) to previous\n    // if ** is in the middle, append (\\/|\\/twoStar\\/) to previous\n    // then filter out GLOBSTAR symbols\n    let re = set\n      .map(pattern => {\n        const pp: (string | typeof GLOBSTAR)[] = pattern.map(p => {\n          if (p instanceof RegExp) {\n            for (const f of p.flags.split('')) flags.add(f)\n          }\n          return typeof p === 'string'\n            ? regExpEscape(p)\n            : p === GLOBSTAR\n            ? GLOBSTAR\n            : p._src\n        }) as (string | typeof GLOBSTAR)[]\n        pp.forEach((p, i) => {\n          const next = pp[i + 1]\n          const prev = pp[i - 1]\n          if (p !== GLOBSTAR || prev === GLOBSTAR) {\n            return\n          }\n          if (prev === undefined) {\n            if (next !== undefined && next !== GLOBSTAR) {\n              pp[i + 1] = '(?:\\\\/|' + twoStar + '\\\\/)?' + next\n            } else {\n              pp[i] = twoStar\n            }\n          } else if (next === undefined) {\n            pp[i - 1] = prev + '(?:\\\\/|' + twoStar + ')?'\n          } else if (next !== GLOBSTAR) {\n            pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + '\\\\/)' + next\n            pp[i + 1] = GLOBSTAR\n          }\n        })\n        return pp.filter(p => p !== GLOBSTAR).join('/')\n      })\n      .join('|')\n\n    // need to wrap in parens if we had more than one thing with |,\n    // otherwise only the first will be anchored to ^ and the last to $\n    const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', '']\n    // must match entire pattern\n    // ending in a * or ** will make it less strict.\n    re = '^' + open + re + close + '$'\n\n    // can match anything, as long as it's not this.\n    if (this.negate) re = '^(?!' + re + ').+$'\n\n    try {\n      this.regexp = new RegExp(re, [...flags].join(''))\n      /* c8 ignore start */\n    } catch (ex) {\n      // should be impossible\n      this.regexp = false\n    }\n    /* c8 ignore stop */\n    return this.regexp\n  }\n\n  slashSplit(p: string) {\n    // if p starts with // on windows, we preserve that\n    // so that UNC paths aren't broken.  Otherwise, any number of\n    // / characters are coalesced into one, unless\n    // preserveMultipleSlashes is set to true.\n    if (this.preserveMultipleSlashes) {\n      return p.split('/')\n    } else if (this.isWindows && /^\\/\\/[^\\/]+/.test(p)) {\n      // add an extra '' for the one we lose\n      return ['', ...p.split(/\\/+/)]\n    } else {\n      return p.split(/\\/+/)\n    }\n  }\n\n  match(f: string, partial = this.partial) {\n    this.debug('match', f, this.pattern)\n    // short-circuit in the case of busted things.\n    // comments, etc.\n    if (this.comment) {\n      return false\n    }\n    if (this.empty) {\n      return f === ''\n    }\n\n    if (f === '/' && partial) {\n      return true\n    }\n\n    const options = this.options\n\n    // windows: need to use /, not \\\n    if (this.isWindows) {\n      f = f.split('\\\\').join('/')\n    }\n\n    // treat the test path as a set of pathparts.\n    const ff = this.slashSplit(f)\n    this.debug(this.pattern, 'split', ff)\n\n    // just ONE of the pattern sets in this.set needs to match\n    // in order for it to be valid.  If negating, then just one\n    // match means that we have failed.\n    // Either way, return on the first hit.\n\n    const set = this.set\n    this.debug(this.pattern, 'set', set)\n\n    // Find the basename of the path by looking for the last non-empty segment\n    let filename: string = ff[ff.length - 1]\n    if (!filename) {\n      for (let i = ff.length - 2; !filename && i >= 0; i--) {\n        filename = ff[i]\n      }\n    }\n\n    for (let i = 0; i < set.length; i++) {\n      const pattern = set[i]\n      let file = ff\n      if (options.matchBase && pattern.length === 1) {\n        file = [filename]\n      }\n      const hit = this.matchOne(file, pattern, partial)\n      if (hit) {\n        if (options.flipNegate) {\n          return true\n        }\n        return !this.negate\n      }\n    }\n\n    // didn't get any hits.  this is success if it's a negative\n    // pattern, failure otherwise.\n    if (options.flipNegate) {\n      return false\n    }\n    return this.negate\n  }\n\n  static defaults(def: MinimatchOptions) {\n    return minimatch.defaults(def).Minimatch\n  }\n}\n/* c8 ignore start */\nexport { AST } from './ast.js'\nexport { escape } from './escape.js'\nexport { unescape } from './unescape.js'\n/* c8 ignore stop */\nminimatch.AST = AST\nminimatch.Minimatch = Minimatch\nminimatch.escape = escape\nminimatch.unescape = unescape\n"]}
\ No newline at end of file
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,GAAG,EAAe,MAAM,UAAU,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAsCxC,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,CAAS,EACT,OAAe,EACf,UAA4B,EAAE,EAC9B,EAAE;IACF,kBAAkB,CAAC,OAAO,CAAC,CAAA;IAE3B,oCAAoC;IACpC,IAAI,CAAC,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC;QACpD,OAAO,KAAK,CAAA;IACd,CAAC;IAED,OAAO,IAAI,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACjD,CAAC,CAAA;AAED,wDAAwD;AACxD,MAAM,YAAY,GAAG,uBAAuB,CAAA;AAC5C,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,CAAS,EAAE,EAAE,CACpD,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;AACvC,MAAM,iBAAiB,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;AACzE,MAAM,oBAAoB,GAAG,CAAC,GAAW,EAAE,EAAE;IAC3C,GAAG,GAAG,GAAG,CAAC,WAAW,EA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I,GAAG,CAAC,QAAQ,CAAC,CAAA;YACnB,CAAC;YACD,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;YACjD,IAAI,GAAG,EAAE,CAAC;gBACR,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;oBACvB,OAAO,IAAI,CAAA;gBACb,CAAC;gBACD,OAAO,CAAC,IAAI,CAAC,MAAM,CAAA;YACrB,CAAC;QACH,CAAC;QAED,2DAA2D;QAC3D,8BAA8B;QAC9B,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;YACvB,OAAO,KAAK,CAAA;QACd,CAAC;QACD,OAAO,IAAI,CAAC,MAAM,CAAA;IACpB,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,GAAqB;QACnC,OAAO,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,SAAS,CAAA;IAC1C,CAAC;CACF;AACD,qBAAqB;AACrB,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,oBAAoB;AACpB,SAAS,CAAC,GAAG,GAAG,GAAG,CAAA;AACnB,SAAS,CAAC,SAAS,GAAG,SAAS,CAAA;AAC/B,SAAS,CAAC,MAAM,GAAG,MAAM,CAAA;AACzB,SAAS,CAAC,QAAQ,GAAG,QAAQ,CAAA","sourcesContent":["import { expand } from '@isaacs/brace-expansion'\nimport { assertValidPattern } from './assert-valid-pattern.js'\nimport { AST, ExtglobType } from './ast.js'\nimport { escape } from './escape.js'\nimport { unescape } from './unescape.js'\n\ntype Platform =\n  | 'aix'\n  | 'android'\n  | 'darwin'\n  | 'freebsd'\n  | 'haiku'\n  | 'linux'\n  | 'openbsd'\n  | 'sunos'\n  | 'win32'\n  | 'cygwin'\n  | 'netbsd'\n\nexport interface MinimatchOptions {\n  nobrace?: boolean\n  nocomment?: boolean\n  nonegate?: boolean\n  debug?: boolean\n  noglobstar?: boolean\n  noext?: boolean\n  nonull?: boolean\n  windowsPathsNoEscape?: boolean\n  allowWindowsEscape?: boolean\n  partial?: boolean\n  dot?: boolean\n  nocase?: boolean\n  nocaseMagicOnly?: boolean\n  magicalBraces?: boolean\n  matchBase?: boolean\n  flipNegate?: boolean\n  preserveMultipleSlashes?: boolean\n  optimizationLevel?: number\n  platform?: Platform\n  windowsNoMagicRoot?: boolean\n}\n\nexport const minimatch = (\n  p: string,\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  assertValidPattern(pattern)\n\n  // shortcut: comments match nothing.\n  if (!options.nocomment && pattern.charAt(0) === '#') {\n    return false\n  }\n\n  return new Minimatch(pattern, options).match(p)\n}\n\n// Optimized checking for the most common glob patterns.\nconst starDotExtRE = /^\\*+([^+@!?\\*\\[\\(]*)$/\nconst starDotExtTest = (ext: string) => (f: string) =>\n  !f.startsWith('.') && f.endsWith(ext)\nconst starDotExtTestDot = (ext: string) => (f: string) => f.endsWith(ext)\nconst starDotExtTestNocase = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => !f.startsWith('.') && f.toLowerCase().endsWith(ext)\n}\nconst starDotExtTestNocaseDot = (ext: string) => {\n  ext = ext.toLowerCase()\n  return (f: string) => f.toLowerCase().endsWith(ext)\n}\nconst starDotStarRE = /^\\*+\\.\\*+$/\nconst starDotStarTest = (f: string) => !f.startsWith('.') && f.includes('.')\nconst starDotStarTestDot = (f: string) =>\n  f !== '.' && f !== '..' && f.includes('.')\nconst dotStarRE = /^\\.\\*+$/\nconst dotStarTest = (f: string) => f !== '.' && f !== '..' && f.startsWith('.')\nconst starRE = /^\\*+$/\nconst starTest = (f: string) => f.length !== 0 && !f.startsWith('.')\nconst starTestDot = (f: string) => f.length !== 0 && f !== '.' && f !== '..'\nconst qmarksRE = /^\\?+([^+@!?\\*\\[\\(]*)?$/\nconst qmarksTestNocase = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestNocaseDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  if (!ext) return noext\n  ext = ext.toLowerCase()\n  return (f: string) => noext(f) && f.toLowerCase().endsWith(ext)\n}\nconst qmarksTestDot = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExtDot([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTest = ([$0, ext = '']: RegExpMatchArray) => {\n  const noext = qmarksTestNoExt([$0])\n  return !ext ? noext : (f: string) => noext(f) && f.endsWith(ext)\n}\nconst qmarksTestNoExt = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && !f.startsWith('.')\n}\nconst qmarksTestNoExtDot = ([$0]: RegExpMatchArray) => {\n  const len = $0.length\n  return (f: string) => f.length === len && f !== '.' && f !== '..'\n}\n\n/* c8 ignore start */\nconst defaultPlatform: Platform = (\n  typeof process === 'object' && process\n    ? (typeof process.env === 'object' &&\n        process.env &&\n        process.env.__MINIMATCH_TESTING_PLATFORM__) ||\n      process.platform\n    : 'posix'\n) as Platform\ntype Sep = '\\\\' | '/'\nconst path: { [k: string]: { sep: Sep } } = {\n  win32: { sep: '\\\\' },\n  posix: { sep: '/' },\n}\n/* c8 ignore stop */\n\nexport const sep = defaultPlatform === 'win32' ? path.win32.sep : path.posix.sep\nminimatch.sep = sep\n\nexport const GLOBSTAR = Symbol('globstar **')\nminimatch.GLOBSTAR = GLOBSTAR\n\n// any single thing other than /\n// don't need to escape / when using new RegExp()\nconst qmark = '[^/]'\n\n// * => any number of characters\nconst star = qmark + '*?'\n\n// ** when dots are allowed.  Anything goes, except .. and .\n// not (^ or / followed by one or two dots followed by $ or /),\n// followed by anything, any number of times.\nconst twoStarDot = '(?:(?!(?:\\\\/|^)(?:\\\\.{1,2})($|\\\\/)).)*?'\n\n// not a ^ or / followed by a dot,\n// followed by anything, any number of times.\nconst twoStarNoDot = '(?:(?!(?:\\\\/|^)\\\\.).)*?'\n\nexport const filter =\n  (pattern: string, options: MinimatchOptions = {}) =>\n  (p: string) =>\n    minimatch(p, pattern, options)\nminimatch.filter = filter\n\nconst ext = (a: MinimatchOptions, b: MinimatchOptions = {}) =>\n  Object.assign({}, a, b)\n\nexport const defaults = (def: MinimatchOptions): typeof minimatch => {\n  if (!def || typeof def !== 'object' || !Object.keys(def).length) {\n    return minimatch\n  }\n\n  const orig = minimatch\n\n  const m = (p: string, pattern: string, options: MinimatchOptions = {}) =>\n    orig(p, pattern, ext(def, options))\n\n  return Object.assign(m, {\n    Minimatch: class Minimatch extends orig.Minimatch {\n      constructor(pattern: string, options: MinimatchOptions = {}) {\n        super(pattern, ext(def, options))\n      }\n      static defaults(options: MinimatchOptions) {\n        return orig.defaults(ext(def, options)).Minimatch\n      }\n    },\n\n    AST: class AST extends orig.AST {\n      /* c8 ignore start */\n      constructor(\n        type: ExtglobType | null,\n        parent?: AST,\n        options: MinimatchOptions = {}\n      ) {\n        super(type, parent, ext(def, options))\n      }\n      /* c8 ignore stop */\n\n      static fromGlob(pattern: string, options: MinimatchOptions = {}) {\n        return orig.AST.fromGlob(pattern, ext(def, options))\n      }\n    },\n\n    unescape: (\n      s: string,\n      options: Pick = {}\n    ) => orig.unescape(s, ext(def, options)),\n\n    escape: (\n      s: string,\n      options: Pick = {}\n    ) => orig.escape(s, ext(def, options)),\n\n    filter: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.filter(pattern, ext(def, options)),\n\n    defaults: (options: MinimatchOptions) => orig.defaults(ext(def, options)),\n\n    makeRe: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.makeRe(pattern, ext(def, options)),\n\n    braceExpand: (pattern: string, options: MinimatchOptions = {}) =>\n      orig.braceExpand(pattern, ext(def, options)),\n\n    match: (list: string[], pattern: string, options: MinimatchOptions = {}) =>\n      orig.match(list, pattern, ext(def, options)),\n\n    sep: orig.sep,\n    GLOBSTAR: GLOBSTAR as typeof GLOBSTAR,\n  })\n}\nminimatch.defaults = defaults\n\n// Brace expansion:\n// a{b,c}d -> abd acd\n// a{b,}c -> abc ac\n// a{0..3}d -> a0d a1d a2d a3d\n// a{b,c{d,e}f}g -> abg acdfg acefg\n// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg\n//\n// Invalid sets are not expanded.\n// a{2..}b -> a{2..}b\n// a{b}c -> a{b}c\nexport const braceExpand = (\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  assertValidPattern(pattern)\n\n  // Thanks to Yeting Li  for\n  // improving this regexp to avoid a ReDOS vulnerability.\n  if (options.nobrace || !/\\{(?:(?!\\{).)*\\}/.test(pattern)) {\n    // shortcut. no need to expand.\n    return [pattern]\n  }\n\n  return expand(pattern)\n}\nminimatch.braceExpand = braceExpand\n\n// parse a component of the expanded set.\n// At this point, no pattern may contain \"/\" in it\n// so we're going to return a 2d array, where each entry is the full\n// pattern, split on '/', and then turned into a regular expression.\n// A regexp is made at the end which joins each array with an\n// escaped /, and another full one which joins each regexp with |.\n//\n// Following the lead of Bash 4.1, note that \"**\" only has special meaning\n// when it is the *only* thing in a path portion.  Otherwise, any series\n// of * is equivalent to a single *.  Globstar behavior is enabled by\n// default, and can be disabled by setting options.noglobstar.\n\nexport const makeRe = (pattern: string, options: MinimatchOptions = {}) =>\n  new Minimatch(pattern, options).makeRe()\nminimatch.makeRe = makeRe\n\nexport const match = (\n  list: string[],\n  pattern: string,\n  options: MinimatchOptions = {}\n) => {\n  const mm = new Minimatch(pattern, options)\n  list = list.filter(f => mm.match(f))\n  if (mm.options.nonull && !list.length) {\n    list.push(pattern)\n  }\n  return list\n}\nminimatch.match = match\n\n// replace stuff like \\* with *\nconst globMagic = /[?*]|[+@!]\\(.*?\\)|\\[|\\]/\nconst regExpEscape = (s: string) =>\n  s.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n\nexport type MMRegExp = RegExp & {\n  _src?: string\n  _glob?: string\n}\n\nexport type ParseReturnFiltered = string | MMRegExp | typeof GLOBSTAR\nexport type ParseReturn = ParseReturnFiltered | false\n\nexport class Minimatch {\n  options: MinimatchOptions\n  set: ParseReturnFiltered[][]\n  pattern: string\n\n  windowsPathsNoEscape: boolean\n  nonegate: boolean\n  negate: boolean\n  comment: boolean\n  empty: boolean\n  preserveMultipleSlashes: boolean\n  partial: boolean\n  globSet: string[]\n  globParts: string[][]\n  nocase: boolean\n\n  isWindows: boolean\n  platform: Platform\n  windowsNoMagicRoot: boolean\n\n  regexp: false | null | MMRegExp\n  constructor(pattern: string, options: MinimatchOptions = {}) {\n    assertValidPattern(pattern)\n\n    options = options || {}\n    this.options = options\n    this.pattern = pattern\n    this.platform = options.platform || defaultPlatform\n    this.isWindows = this.platform === 'win32'\n    this.windowsPathsNoEscape =\n      !!options.windowsPathsNoEscape || options.allowWindowsEscape === false\n    if (this.windowsPathsNoEscape) {\n      this.pattern = this.pattern.replace(/\\\\/g, '/')\n    }\n    this.preserveMultipleSlashes = !!options.preserveMultipleSlashes\n    this.regexp = null\n    this.negate = false\n    this.nonegate = !!options.nonegate\n    this.comment = false\n    this.empty = false\n    this.partial = !!options.partial\n    this.nocase = !!this.options.nocase\n    this.windowsNoMagicRoot =\n      options.windowsNoMagicRoot !== undefined\n        ? options.windowsNoMagicRoot\n        : !!(this.isWindows && this.nocase)\n\n    this.globSet = []\n    this.globParts = []\n    this.set = []\n\n    // make the set of regexps etc.\n    this.make()\n  }\n\n  hasMagic(): boolean {\n    if (this.options.magicalBraces && this.set.length > 1) {\n      return true\n    }\n    for (const pattern of this.set) {\n      for (const part of pattern) {\n        if (typeof part !== 'string') return true\n      }\n    }\n    return false\n  }\n\n  debug(..._: any[]) {}\n\n  make() {\n    const pattern = this.pattern\n    const options = this.options\n\n    // empty patterns and comments match nothing.\n    if (!options.nocomment && pattern.charAt(0) === '#') {\n      this.comment = true\n      return\n    }\n\n    if (!pattern) {\n      this.empty = true\n      return\n    }\n\n    // step 1: figure out negation, etc.\n    this.parseNegate()\n\n    // step 2: expand braces\n    this.globSet = [...new Set(this.braceExpand())]\n\n    if (options.debug) {\n      this.debug = (...args: any[]) => console.error(...args)\n    }\n\n    this.debug(this.pattern, this.globSet)\n\n    // step 3: now we have a set, so turn each one into a series of\n    // path-portion matching patterns.\n    // These will be regexps, except in the case of \"**\", which is\n    // set to the GLOBSTAR object for globstar behavior,\n    // and will not contain any / characters\n    //\n    // First, we preprocess to make the glob pattern sets a bit simpler\n    // and deduped.  There are some perf-killing patterns that can cause\n    // problems with a glob walk, but we can simplify them down a bit.\n    const rawGlobParts = this.globSet.map(s => this.slashSplit(s))\n    this.globParts = this.preprocess(rawGlobParts)\n    this.debug(this.pattern, this.globParts)\n\n    // glob --> regexps\n    let set = this.globParts.map((s, _, __) => {\n      if (this.isWindows && this.windowsNoMagicRoot) {\n        // check if it's a drive or unc path.\n        const isUNC =\n          s[0] === '' &&\n          s[1] === '' &&\n          (s[2] === '?' || !globMagic.test(s[2])) &&\n          !globMagic.test(s[3])\n        const isDrive = /^[a-z]:/i.test(s[0])\n        if (isUNC) {\n          return [...s.slice(0, 4), ...s.slice(4).map(ss => this.parse(ss))]\n        } else if (isDrive) {\n          return [s[0], ...s.slice(1).map(ss => this.parse(ss))]\n        }\n      }\n      return s.map(ss => this.parse(ss))\n    })\n\n    this.debug(this.pattern, set)\n\n    // filter out everything that didn't compile properly.\n    this.set = set.filter(\n      s => s.indexOf(false) === -1\n    ) as ParseReturnFiltered[][]\n\n    // do not treat the ? in UNC paths as magic\n    if (this.isWindows) {\n      for (let i = 0; i < this.set.length; i++) {\n        const p = this.set[i]\n        if (\n          p[0] === '' &&\n          p[1] === '' &&\n          this.globParts[i][2] === '?' &&\n          typeof p[3] === 'string' &&\n          /^[a-z]:$/i.test(p[3])\n        ) {\n          p[2] = '?'\n        }\n      }\n    }\n\n    this.debug(this.pattern, this.set)\n  }\n\n  // various transforms to equivalent pattern sets that are\n  // faster to process in a filesystem walk.  The goal is to\n  // eliminate what we can, and push all ** patterns as far\n  // to the right as possible, even if it increases the number\n  // of patterns that we have to process.\n  preprocess(globParts: string[][]) {\n    // if we're not in globstar mode, then turn all ** into *\n    if (this.options.noglobstar) {\n      for (let i = 0; i < globParts.length; i++) {\n        for (let j = 0; j < globParts[i].length; j++) {\n          if (globParts[i][j] === '**') {\n            globParts[i][j] = '*'\n          }\n        }\n      }\n    }\n\n    const { optimizationLevel = 1 } = this.options\n\n    if (optimizationLevel >= 2) {\n      // aggressive optimization for the purpose of fs walking\n      globParts = this.firstPhasePreProcess(globParts)\n      globParts = this.secondPhasePreProcess(globParts)\n    } else if (optimizationLevel >= 1) {\n      // just basic optimizations to remove some .. parts\n      globParts = this.levelOneOptimize(globParts)\n    } else {\n      // just collapse multiple ** portions into one\n      globParts = this.adjascentGlobstarOptimize(globParts)\n    }\n\n    return globParts\n  }\n\n  // just get rid of adjascent ** portions\n  adjascentGlobstarOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      let gs: number = -1\n      while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n        let i = gs\n        while (parts[i + 1] === '**') {\n          i++\n        }\n        if (i !== gs) {\n          parts.splice(gs, i - gs)\n        }\n      }\n      return parts\n    })\n  }\n\n  // get rid of adjascent ** and resolve .. portions\n  levelOneOptimize(globParts: string[][]) {\n    return globParts.map(parts => {\n      parts = parts.reduce((set: string[], part) => {\n        const prev = set[set.length - 1]\n        if (part === '**' && prev === '**') {\n          return set\n        }\n        if (part === '..') {\n          if (prev && prev !== '..' && prev !== '.' && prev !== '**') {\n            set.pop()\n            return set\n          }\n        }\n        set.push(part)\n        return set\n      }, [])\n      return parts.length === 0 ? [''] : parts\n    })\n  }\n\n  levelTwoFileOptimize(parts: string | string[]) {\n    if (!Array.isArray(parts)) {\n      parts = this.slashSplit(parts)\n    }\n    let didSomething: boolean = false\n    do {\n      didSomething = false\n      // 
// -> 
/\n      if (!this.preserveMultipleSlashes) {\n        for (let i = 1; i < parts.length - 1; i++) {\n          const p = parts[i]\n          // don't squeeze out UNC patterns\n          if (i === 1 && p === '' && parts[0] === '') continue\n          if (p === '.' || p === '') {\n            didSomething = true\n            parts.splice(i, 1)\n            i--\n          }\n        }\n        if (\n          parts[0] === '.' &&\n          parts.length === 2 &&\n          (parts[1] === '.' || parts[1] === '')\n        ) {\n          didSomething = true\n          parts.pop()\n        }\n      }\n\n      // 
/

/../ ->

/\n      let dd: number = 0\n      while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n        const p = parts[dd - 1]\n        if (p && p !== '.' && p !== '..' && p !== '**') {\n          didSomething = true\n          parts.splice(dd - 1, 2)\n          dd -= 2\n        }\n      }\n    } while (didSomething)\n    return parts.length === 0 ? [''] : parts\n  }\n\n  // First phase: single-pattern processing\n  // 
 is 1 or more portions\n  //  is 1 or more portions\n  // 

is any portion other than ., .., '', or **\n // is . or ''\n //\n // **/.. is *brutal* for filesystem walking performance, because\n // it effectively resets the recursive walk each time it occurs,\n // and ** cannot be reduced out by a .. pattern part like a regexp\n // or most strings (other than .., ., and '') can be.\n //\n //

/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n //

// -> 
/\n  // 
/

/../ ->

/\n  // **/**/ -> **/\n  //\n  // **/*/ -> */**/ <== not valid because ** doesn't follow\n  // this WOULD be allowed if ** did follow symlinks, or * didn't\n  firstPhasePreProcess(globParts: string[][]) {\n    let didSomething = false\n    do {\n      didSomething = false\n      // 
/**/../

/

/ -> {

/../

/

/,

/**/

/

/}\n for (let parts of globParts) {\n let gs: number = -1\n while (-1 !== (gs = parts.indexOf('**', gs + 1))) {\n let gss: number = gs\n while (parts[gss + 1] === '**') {\n //

/**/**/ -> 
/**/\n            gss++\n          }\n          // eg, if gs is 2 and gss is 4, that means we have 3 **\n          // parts, and can remove 2 of them.\n          if (gss > gs) {\n            parts.splice(gs + 1, gss - gs)\n          }\n\n          let next = parts[gs + 1]\n          const p = parts[gs + 2]\n          const p2 = parts[gs + 3]\n          if (next !== '..') continue\n          if (\n            !p ||\n            p === '.' ||\n            p === '..' ||\n            !p2 ||\n            p2 === '.' ||\n            p2 === '..'\n          ) {\n            continue\n          }\n          didSomething = true\n          // edit parts in place, and push the new one\n          parts.splice(gs, 1)\n          const other = parts.slice(0)\n          other[gs] = '**'\n          globParts.push(other)\n          gs--\n        }\n\n        // 
// -> 
/\n        if (!this.preserveMultipleSlashes) {\n          for (let i = 1; i < parts.length - 1; i++) {\n            const p = parts[i]\n            // don't squeeze out UNC patterns\n            if (i === 1 && p === '' && parts[0] === '') continue\n            if (p === '.' || p === '') {\n              didSomething = true\n              parts.splice(i, 1)\n              i--\n            }\n          }\n          if (\n            parts[0] === '.' &&\n            parts.length === 2 &&\n            (parts[1] === '.' || parts[1] === '')\n          ) {\n            didSomething = true\n            parts.pop()\n          }\n        }\n\n        // 
/

/../ ->

/\n        let dd: number = 0\n        while (-1 !== (dd = parts.indexOf('..', dd + 1))) {\n          const p = parts[dd - 1]\n          if (p && p !== '.' && p !== '..' && p !== '**') {\n            didSomething = true\n            const needDot = dd === 1 && parts[dd + 1] === '**'\n            const splin = needDot ? ['.'] : []\n            parts.splice(dd - 1, 2, ...splin)\n            if (parts.length === 0) parts.push('')\n            dd -= 2\n          }\n        }\n      }\n    } while (didSomething)\n\n    return globParts\n  }\n\n  // second phase: multi-pattern dedupes\n  // {
/*/,
/

/} ->

/*/\n  // {
/,
/} -> 
/\n  // {
/**/,
/} -> 
/**/\n  //\n  // {
/**/,
/**/

/} ->

/**/\n  // ^-- not valid because ** doens't follow symlinks\n  secondPhasePreProcess(globParts: string[][]): string[][] {\n    for (let i = 0; i < globParts.length - 1; i++) {\n      for (let j = i + 1; j < globParts.length; j++) {\n        const matched = this.partsMatch(\n          globParts[i],\n          globParts[j],\n          !this.preserveMultipleSlashes\n        )\n        if (matched) {\n          globParts[i] = []\n          globParts[j] = matched\n          break\n        }\n      }\n    }\n    return globParts.filter(gs => gs.length)\n  }\n\n  partsMatch(\n    a: string[],\n    b: string[],\n    emptyGSMatch: boolean = false\n  ): false | string[] {\n    let ai = 0\n    let bi = 0\n    let result: string[] = []\n    let which: string = ''\n    while (ai < a.length && bi < b.length) {\n      if (a[ai] === b[bi]) {\n        result.push(which === 'b' ? b[bi] : a[ai])\n        ai++\n        bi++\n      } else if (emptyGSMatch && a[ai] === '**' && b[bi] === a[ai + 1]) {\n        result.push(a[ai])\n        ai++\n      } else if (emptyGSMatch && b[bi] === '**' && a[ai] === b[bi + 1]) {\n        result.push(b[bi])\n        bi++\n      } else if (\n        a[ai] === '*' &&\n        b[bi] &&\n        (this.options.dot || !b[bi].startsWith('.')) &&\n        b[bi] !== '**'\n      ) {\n        if (which === 'b') return false\n        which = 'a'\n        result.push(a[ai])\n        ai++\n        bi++\n      } else if (\n        b[bi] === '*' &&\n        a[ai] &&\n        (this.options.dot || !a[ai].startsWith('.')) &&\n        a[ai] !== '**'\n      ) {\n        if (which === 'a') return false\n        which = 'b'\n        result.push(b[bi])\n        ai++\n        bi++\n      } else {\n        return false\n      }\n    }\n    // if we fall out of the loop, it means they two are identical\n    // as long as their lengths match\n    return a.length === b.length && result\n  }\n\n  parseNegate() {\n    if (this.nonegate) return\n\n    const pattern = this.pattern\n    let negate = false\n    let negateOffset = 0\n\n    for (let i = 0; i < pattern.length && pattern.charAt(i) === '!'; i++) {\n      negate = !negate\n      negateOffset++\n    }\n\n    if (negateOffset) this.pattern = pattern.slice(negateOffset)\n    this.negate = negate\n  }\n\n  // set partial to true to test if, for example,\n  // \"/a/b\" matches the start of \"/*/b/*/d\"\n  // Partial means, if you run out of file before you run\n  // out of pattern, then that's fine, as long as all\n  // the parts match.\n  matchOne(file: string[], pattern: ParseReturn[], partial: boolean = false) {\n    const options = this.options\n\n    // UNC paths like //?/X:/... can match X:/... and vice versa\n    // Drive letters in absolute drive or unc paths are always compared\n    // case-insensitively.\n    if (this.isWindows) {\n      const fileDrive = typeof file[0] === 'string' && /^[a-z]:$/i.test(file[0])\n      const fileUNC =\n        !fileDrive &&\n        file[0] === '' &&\n        file[1] === '' &&\n        file[2] === '?' &&\n        /^[a-z]:$/i.test(file[3])\n\n      const patternDrive =\n        typeof pattern[0] === 'string' && /^[a-z]:$/i.test(pattern[0])\n      const patternUNC =\n        !patternDrive &&\n        pattern[0] === '' &&\n        pattern[1] === '' &&\n        pattern[2] === '?' &&\n        typeof pattern[3] === 'string' &&\n        /^[a-z]:$/i.test(pattern[3])\n\n      const fdi = fileUNC ? 3 : fileDrive ? 0 : undefined\n      const pdi = patternUNC ? 3 : patternDrive ? 0 : undefined\n      if (typeof fdi === 'number' && typeof pdi === 'number') {\n        const [fd, pd]: [string, string] = [file[fdi], pattern[pdi] as string]\n        if (fd.toLowerCase() === pd.toLowerCase()) {\n          pattern[pdi] = fd\n          if (pdi > fdi) {\n            pattern = pattern.slice(pdi)\n          } else if (fdi > pdi) {\n            file = file.slice(fdi)\n          }\n        }\n      }\n    }\n\n    // resolve and reduce . and .. portions in the file as well.\n    // dont' need to do the second phase, because it's only one string[]\n    const { optimizationLevel = 1 } = this.options\n    if (optimizationLevel >= 2) {\n      file = this.levelTwoFileOptimize(file)\n    }\n\n    this.debug('matchOne', this, { file, pattern })\n    this.debug('matchOne', file.length, pattern.length)\n\n    for (\n      var fi = 0, pi = 0, fl = file.length, pl = pattern.length;\n      fi < fl && pi < pl;\n      fi++, pi++\n    ) {\n      this.debug('matchOne loop')\n      var p = pattern[pi]\n      var f = file[fi]\n\n      this.debug(pattern, p, f)\n\n      // should be impossible.\n      // some invalid regexp stuff in the set.\n      /* c8 ignore start */\n      if (p === false) {\n        return false\n      }\n      /* c8 ignore stop */\n\n      if (p === GLOBSTAR) {\n        this.debug('GLOBSTAR', [pattern, p, f])\n\n        // \"**\"\n        // a/**/b/**/c would match the following:\n        // a/b/x/y/z/c\n        // a/x/y/z/b/c\n        // a/b/x/b/x/c\n        // a/b/c\n        // To do this, take the rest of the pattern after\n        // the **, and see if it would match the file remainder.\n        // If so, return success.\n        // If not, the ** \"swallows\" a segment, and try again.\n        // This is recursively awful.\n        //\n        // a/**/b/**/c matching a/b/x/y/z/c\n        // - a matches a\n        // - doublestar\n        //   - matchOne(b/x/y/z/c, b/**/c)\n        //     - b matches b\n        //     - doublestar\n        //       - matchOne(x/y/z/c, c) -> no\n        //       - matchOne(y/z/c, c) -> no\n        //       - matchOne(z/c, c) -> no\n        //       - matchOne(c, c) yes, hit\n        var fr = fi\n        var pr = pi + 1\n        if (pr === pl) {\n          this.debug('** at the end')\n          // a ** at the end will just swallow the rest.\n          // We have found a match.\n          // however, it will not swallow /.x, unless\n          // options.dot is set.\n          // . and .. are *never* matched by **, for explosively\n          // exponential reasons.\n          for (; fi < fl; fi++) {\n            if (\n              file[fi] === '.' ||\n              file[fi] === '..' ||\n              (!options.dot && file[fi].charAt(0) === '.')\n            )\n              return false\n          }\n          return true\n        }\n\n        // ok, let's see if we can swallow whatever we can.\n        while (fr < fl) {\n          var swallowee = file[fr]\n\n          this.debug('\\nglobstar while', file, fr, pattern, pr, swallowee)\n\n          // XXX remove this slice.  Just pass the start index.\n          if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {\n            this.debug('globstar found match!', fr, fl, swallowee)\n            // found a match.\n            return true\n          } else {\n            // can't swallow \".\" or \"..\" ever.\n            // can only swallow \".foo\" when explicitly asked.\n            if (\n              swallowee === '.' ||\n              swallowee === '..' ||\n              (!options.dot && swallowee.charAt(0) === '.')\n            ) {\n              this.debug('dot detected!', file, fr, pattern, pr)\n              break\n            }\n\n            // ** swallows a segment, and continue.\n            this.debug('globstar swallow a segment, and continue')\n            fr++\n          }\n        }\n\n        // no match was found.\n        // However, in partial mode, we can't say this is necessarily over.\n        /* c8 ignore start */\n        if (partial) {\n          // ran out of file\n          this.debug('\\n>>> no match, partial?', file, fr, pattern, pr)\n          if (fr === fl) {\n            return true\n          }\n        }\n        /* c8 ignore stop */\n        return false\n      }\n\n      // something other than **\n      // non-magic patterns just have to match exactly\n      // patterns with magic have been turned into regexps.\n      let hit: boolean\n      if (typeof p === 'string') {\n        hit = f === p\n        this.debug('string match', p, f, hit)\n      } else {\n        hit = p.test(f)\n        this.debug('pattern match', p, f, hit)\n      }\n\n      if (!hit) return false\n    }\n\n    // Note: ending in / means that we'll get a final \"\"\n    // at the end of the pattern.  This can only match a\n    // corresponding \"\" at the end of the file.\n    // If the file ends in /, then it can only match a\n    // a pattern that ends in /, unless the pattern just\n    // doesn't have any more for it. But, a/b/ should *not*\n    // match \"a/b/*\", even though \"\" matches against the\n    // [^/]*? pattern, except in partial mode, where it might\n    // simply not be reached yet.\n    // However, a/b/ should still satisfy a/*\n\n    // now either we fell off the end of the pattern, or we're done.\n    if (fi === fl && pi === pl) {\n      // ran out of pattern and filename at the same time.\n      // an exact hit!\n      return true\n    } else if (fi === fl) {\n      // ran out of file, but still had pattern left.\n      // this is ok if we're doing the match as part of\n      // a glob fs traversal.\n      return partial\n    } else if (pi === pl) {\n      // ran out of pattern, still have file left.\n      // this is only acceptable if we're on the very last\n      // empty segment of a file with a trailing slash.\n      // a/* should match a/b/\n      return fi === fl - 1 && file[fi] === ''\n\n      /* c8 ignore start */\n    } else {\n      // should be unreachable.\n      throw new Error('wtf?')\n    }\n    /* c8 ignore stop */\n  }\n\n  braceExpand() {\n    return braceExpand(this.pattern, this.options)\n  }\n\n  parse(pattern: string): ParseReturn {\n    assertValidPattern(pattern)\n\n    const options = this.options\n\n    // shortcuts\n    if (pattern === '**') return GLOBSTAR\n    if (pattern === '') return ''\n\n    // far and away, the most common glob pattern parts are\n    // *, *.*, and *.  Add a fast check method for those.\n    let m: RegExpMatchArray | null\n    let fastTest: null | ((f: string) => boolean) = null\n    if ((m = pattern.match(starRE))) {\n      fastTest = options.dot ? starTestDot : starTest\n    } else if ((m = pattern.match(starDotExtRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? starDotExtTestNocaseDot\n            : starDotExtTestNocase\n          : options.dot\n          ? starDotExtTestDot\n          : starDotExtTest\n      )(m[1])\n    } else if ((m = pattern.match(qmarksRE))) {\n      fastTest = (\n        options.nocase\n          ? options.dot\n            ? qmarksTestNocaseDot\n            : qmarksTestNocase\n          : options.dot\n          ? qmarksTestDot\n          : qmarksTest\n      )(m)\n    } else if ((m = pattern.match(starDotStarRE))) {\n      fastTest = options.dot ? starDotStarTestDot : starDotStarTest\n    } else if ((m = pattern.match(dotStarRE))) {\n      fastTest = dotStarTest\n    }\n\n    const re = AST.fromGlob(pattern, this.options).toMMPattern()\n    if (fastTest && typeof re === 'object') {\n      // Avoids overriding in frozen environments\n      Reflect.defineProperty(re, 'test', { value: fastTest })\n    }\n    return re\n  }\n\n  makeRe() {\n    if (this.regexp || this.regexp === false) return this.regexp\n\n    // at this point, this.set is a 2d array of partial\n    // pattern strings, or \"**\".\n    //\n    // It's better to use .match().  This function shouldn't\n    // be used, really, but it's pretty convenient sometimes,\n    // when you just want to work with a regex.\n    const set = this.set\n\n    if (!set.length) {\n      this.regexp = false\n      return this.regexp\n    }\n    const options = this.options\n\n    const twoStar = options.noglobstar\n      ? star\n      : options.dot\n      ? twoStarDot\n      : twoStarNoDot\n    const flags = new Set(options.nocase ? ['i'] : [])\n\n    // regexpify non-globstar patterns\n    // if ** is only item, then we just do one twoStar\n    // if ** is first, and there are more, prepend (\\/|twoStar\\/)? to next\n    // if ** is last, append (\\/twoStar|) to previous\n    // if ** is in the middle, append (\\/|\\/twoStar\\/) to previous\n    // then filter out GLOBSTAR symbols\n    let re = set\n      .map(pattern => {\n        const pp: (string | typeof GLOBSTAR)[] = pattern.map(p => {\n          if (p instanceof RegExp) {\n            for (const f of p.flags.split('')) flags.add(f)\n          }\n          return typeof p === 'string'\n            ? regExpEscape(p)\n            : p === GLOBSTAR\n            ? GLOBSTAR\n            : p._src\n        }) as (string | typeof GLOBSTAR)[]\n        pp.forEach((p, i) => {\n          const next = pp[i + 1]\n          const prev = pp[i - 1]\n          if (p !== GLOBSTAR || prev === GLOBSTAR) {\n            return\n          }\n          if (prev === undefined) {\n            if (next !== undefined && next !== GLOBSTAR) {\n              pp[i + 1] = '(?:\\\\/|' + twoStar + '\\\\/)?' + next\n            } else {\n              pp[i] = twoStar\n            }\n          } else if (next === undefined) {\n            pp[i - 1] = prev + '(?:\\\\/|' + twoStar + ')?'\n          } else if (next !== GLOBSTAR) {\n            pp[i - 1] = prev + '(?:\\\\/|\\\\/' + twoStar + '\\\\/)' + next\n            pp[i + 1] = GLOBSTAR\n          }\n        })\n        return pp.filter(p => p !== GLOBSTAR).join('/')\n      })\n      .join('|')\n\n    // need to wrap in parens if we had more than one thing with |,\n    // otherwise only the first will be anchored to ^ and the last to $\n    const [open, close] = set.length > 1 ? ['(?:', ')'] : ['', '']\n    // must match entire pattern\n    // ending in a * or ** will make it less strict.\n    re = '^' + open + re + close + '$'\n\n    // can match anything, as long as it's not this.\n    if (this.negate) re = '^(?!' + re + ').+$'\n\n    try {\n      this.regexp = new RegExp(re, [...flags].join(''))\n      /* c8 ignore start */\n    } catch (ex) {\n      // should be impossible\n      this.regexp = false\n    }\n    /* c8 ignore stop */\n    return this.regexp\n  }\n\n  slashSplit(p: string) {\n    // if p starts with // on windows, we preserve that\n    // so that UNC paths aren't broken.  Otherwise, any number of\n    // / characters are coalesced into one, unless\n    // preserveMultipleSlashes is set to true.\n    if (this.preserveMultipleSlashes) {\n      return p.split('/')\n    } else if (this.isWindows && /^\\/\\/[^\\/]+/.test(p)) {\n      // add an extra '' for the one we lose\n      return ['', ...p.split(/\\/+/)]\n    } else {\n      return p.split(/\\/+/)\n    }\n  }\n\n  match(f: string, partial = this.partial) {\n    this.debug('match', f, this.pattern)\n    // short-circuit in the case of busted things.\n    // comments, etc.\n    if (this.comment) {\n      return false\n    }\n    if (this.empty) {\n      return f === ''\n    }\n\n    if (f === '/' && partial) {\n      return true\n    }\n\n    const options = this.options\n\n    // windows: need to use /, not \\\n    if (this.isWindows) {\n      f = f.split('\\\\').join('/')\n    }\n\n    // treat the test path as a set of pathparts.\n    const ff = this.slashSplit(f)\n    this.debug(this.pattern, 'split', ff)\n\n    // just ONE of the pattern sets in this.set needs to match\n    // in order for it to be valid.  If negating, then just one\n    // match means that we have failed.\n    // Either way, return on the first hit.\n\n    const set = this.set\n    this.debug(this.pattern, 'set', set)\n\n    // Find the basename of the path by looking for the last non-empty segment\n    let filename: string = ff[ff.length - 1]\n    if (!filename) {\n      for (let i = ff.length - 2; !filename && i >= 0; i--) {\n        filename = ff[i]\n      }\n    }\n\n    for (let i = 0; i < set.length; i++) {\n      const pattern = set[i]\n      let file = ff\n      if (options.matchBase && pattern.length === 1) {\n        file = [filename]\n      }\n      const hit = this.matchOne(file, pattern, partial)\n      if (hit) {\n        if (options.flipNegate) {\n          return true\n        }\n        return !this.negate\n      }\n    }\n\n    // didn't get any hits.  this is success if it's a negative\n    // pattern, failure otherwise.\n    if (options.flipNegate) {\n      return false\n    }\n    return this.negate\n  }\n\n  static defaults(def: MinimatchOptions) {\n    return minimatch.defaults(def).Minimatch\n  }\n}\n/* c8 ignore start */\nexport { AST } from './ast.js'\nexport { escape } from './escape.js'\nexport { unescape } from './unescape.js'\n/* c8 ignore stop */\nminimatch.AST = AST\nminimatch.Minimatch = Minimatch\nminimatch.escape = escape\nminimatch.unescape = unescape\n"]}
\ No newline at end of file
diff --git a/deps/minimatch/index.js b/deps/minimatch/index.js
index f3fb6d21cccf8b..e222dc60e99d9c 100644
--- a/deps/minimatch/index.js
+++ b/deps/minimatch/index.js
@@ -4,33 +4,34 @@ var __commonJS = (cb, mod) => function __require() {
   return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
 };
 
-// node_modules/balanced-match/index.js
-var require_balanced_match = __commonJS({
-  "node_modules/balanced-match/index.js"(exports2, module2) {
+// node_modules/@isaacs/balanced-match/dist/commonjs/index.js
+var require_commonjs = __commonJS({
+  "node_modules/@isaacs/balanced-match/dist/commonjs/index.js"(exports2) {
     "use strict";
-    module2.exports = balanced;
-    function balanced(a, b, str) {
-      if (a instanceof RegExp) a = maybeMatch(a, str);
-      if (b instanceof RegExp) b = maybeMatch(b, str);
-      var r = range(a, b, str);
+    Object.defineProperty(exports2, "__esModule", { value: true });
+    exports2.range = exports2.balanced = void 0;
+    var balanced = (a, b, str) => {
+      const ma = a instanceof RegExp ? maybeMatch(a, str) : a;
+      const mb = b instanceof RegExp ? maybeMatch(b, str) : b;
+      const r = ma !== null && mb != null && (0, exports2.range)(ma, mb, str);
       return r && {
         start: r[0],
         end: r[1],
         pre: str.slice(0, r[0]),
-        body: str.slice(r[0] + a.length, r[1]),
-        post: str.slice(r[1] + b.length)
+        body: str.slice(r[0] + ma.length, r[1]),
+        post: str.slice(r[1] + mb.length)
       };
-    }
-    function maybeMatch(reg, str) {
-      var m = str.match(reg);
+    };
+    exports2.balanced = balanced;
+    var maybeMatch = (reg, str) => {
+      const m = str.match(reg);
       return m ? m[0] : null;
-    }
-    balanced.range = range;
-    function range(a, b, str) {
-      var begs, beg, left, right, result;
-      var ai = str.indexOf(a);
-      var bi = str.indexOf(b, ai + 1);
-      var i = ai;
+    };
+    var range = (a, b, str) => {
+      let begs, beg, left, right = void 0, result;
+      let ai = str.indexOf(a);
+      let bi = str.indexOf(b, ai + 1);
+      let i = ai;
       if (ai >= 0 && bi > 0) {
         if (a === b) {
           return [ai, bi];
@@ -38,14 +39,16 @@ var require_balanced_match = __commonJS({
         begs = [];
         left = str.length;
         while (i >= 0 && !result) {
-          if (i == ai) {
+          if (i === ai) {
             begs.push(i);
             ai = str.indexOf(a, i + 1);
-          } else if (begs.length == 1) {
-            result = [begs.pop(), bi];
+          } else if (begs.length === 1) {
+            const r = begs.pop();
+            if (r !== void 0)
+              result = [r, bi];
           } else {
             beg = begs.pop();
-            if (beg < left) {
+            if (beg !== void 0 && beg < left) {
               left = beg;
               right = bi;
             }
@@ -53,61 +56,76 @@ var require_balanced_match = __commonJS({
           }
           i = ai < bi && ai >= 0 ? ai : bi;
         }
-        if (begs.length) {
+        if (begs.length && right !== void 0) {
           result = [left, right];
         }
       }
       return result;
-    }
+    };
+    exports2.range = range;
   }
 });
 
-// node_modules/brace-expansion/index.js
-var require_brace_expansion = __commonJS({
-  "node_modules/brace-expansion/index.js"(exports2, module2) {
-    var balanced = require_balanced_match();
-    module2.exports = expandTop;
+// node_modules/@isaacs/brace-expansion/dist/commonjs/index.js
+var require_commonjs2 = __commonJS({
+  "node_modules/@isaacs/brace-expansion/dist/commonjs/index.js"(exports2) {
+    "use strict";
+    Object.defineProperty(exports2, "__esModule", { value: true });
+    exports2.expand = expand;
+    var balanced_match_1 = require_commonjs();
     var escSlash = "\0SLASH" + Math.random() + "\0";
     var escOpen = "\0OPEN" + Math.random() + "\0";
     var escClose = "\0CLOSE" + Math.random() + "\0";
     var escComma = "\0COMMA" + Math.random() + "\0";
     var escPeriod = "\0PERIOD" + Math.random() + "\0";
+    var escSlashPattern = new RegExp(escSlash, "g");
+    var escOpenPattern = new RegExp(escOpen, "g");
+    var escClosePattern = new RegExp(escClose, "g");
+    var escCommaPattern = new RegExp(escComma, "g");
+    var escPeriodPattern = new RegExp(escPeriod, "g");
+    var slashPattern = /\\\\/g;
+    var openPattern = /\\{/g;
+    var closePattern = /\\}/g;
+    var commaPattern = /\\,/g;
+    var periodPattern = /\\./g;
     function numeric(str) {
-      return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
+      return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
     }
     function escapeBraces(str) {
-      return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
+      return str.replace(slashPattern, escSlash).replace(openPattern, escOpen).replace(closePattern, escClose).replace(commaPattern, escComma).replace(periodPattern, escPeriod);
     }
     function unescapeBraces(str) {
-      return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
+      return str.replace(escSlashPattern, "\\").replace(escOpenPattern, "{").replace(escClosePattern, "}").replace(escCommaPattern, ",").replace(escPeriodPattern, ".");
     }
     function parseCommaParts(str) {
-      if (!str)
+      if (!str) {
         return [""];
-      var parts = [];
-      var m = balanced("{", "}", str);
-      if (!m)
+      }
+      const parts = [];
+      const m = (0, balanced_match_1.balanced)("{", "}", str);
+      if (!m) {
         return str.split(",");
-      var pre = m.pre;
-      var body = m.body;
-      var post = m.post;
-      var p = pre.split(",");
+      }
+      const { pre, body, post } = m;
+      const p = pre.split(",");
       p[p.length - 1] += "{" + body + "}";
-      var postParts = parseCommaParts(post);
+      const postParts = parseCommaParts(post);
       if (post.length) {
+        ;
         p[p.length - 1] += postParts.shift();
         p.push.apply(p, postParts);
       }
       parts.push.apply(parts, p);
       return parts;
     }
-    function expandTop(str) {
-      if (!str)
+    function expand(str) {
+      if (!str) {
         return [];
-      if (str.substr(0, 2) === "{}") {
-        str = "\\{\\}" + str.substr(2);
       }
-      return expand(escapeBraces(str), true).map(unescapeBraces);
+      if (str.slice(0, 2) === "{}") {
+        str = "\\{\\}" + str.slice(2);
+      }
+      return expand_(escapeBraces(str), true).map(unescapeBraces);
     }
     function embrace(str) {
       return "{" + str + "}";
@@ -121,73 +139,74 @@ var require_brace_expansion = __commonJS({
     function gte(i, y) {
       return i >= y;
     }
-    function expand(str, isTop) {
-      var expansions = [];
-      var m = balanced("{", "}", str);
-      if (!m) return [str];
-      var pre = m.pre;
-      var post = m.post.length ? expand(m.post, false) : [""];
+    function expand_(str, isTop) {
+      const expansions = [];
+      const m = (0, balanced_match_1.balanced)("{", "}", str);
+      if (!m)
+        return [str];
+      const pre = m.pre;
+      const post = m.post.length ? expand_(m.post, false) : [""];
       if (/\$$/.test(m.pre)) {
-        for (var k = 0; k < post.length; k++) {
-          var expansion = pre + "{" + m.body + "}" + post[k];
+        for (let k = 0; k < post.length; k++) {
+          const expansion = pre + "{" + m.body + "}" + post[k];
           expansions.push(expansion);
         }
       } else {
-        var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
-        var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
-        var isSequence = isNumericSequence || isAlphaSequence;
-        var isOptions = m.body.indexOf(",") >= 0;
+        const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
+        const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
+        const isSequence = isNumericSequence || isAlphaSequence;
+        const isOptions = m.body.indexOf(",") >= 0;
         if (!isSequence && !isOptions) {
-          if (m.post.match(/,.*\}/)) {
+          if (m.post.match(/,(?!,).*\}/)) {
             str = m.pre + "{" + m.body + escClose + m.post;
-            return expand(str);
+            return expand_(str);
           }
           return [str];
         }
-        var n;
+        let n;
         if (isSequence) {
           n = m.body.split(/\.\./);
         } else {
           n = parseCommaParts(m.body);
-          if (n.length === 1) {
-            n = expand(n[0], false).map(embrace);
+          if (n.length === 1 && n[0] !== void 0) {
+            n = expand_(n[0], false).map(embrace);
             if (n.length === 1) {
-              return post.map(function(p) {
-                return m.pre + n[0] + p;
-              });
+              return post.map((p) => m.pre + n[0] + p);
             }
           }
         }
-        var N;
-        if (isSequence) {
-          var x = numeric(n[0]);
-          var y = numeric(n[1]);
-          var width = Math.max(n[0].length, n[1].length);
-          var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
-          var test = lte;
-          var reverse = y < x;
+        let N;
+        if (isSequence && n[0] !== void 0 && n[1] !== void 0) {
+          const x = numeric(n[0]);
+          const y = numeric(n[1]);
+          const width = Math.max(n[0].length, n[1].length);
+          let incr = n.length === 3 && n[2] !== void 0 ? Math.abs(numeric(n[2])) : 1;
+          let test = lte;
+          const reverse = y < x;
           if (reverse) {
             incr *= -1;
             test = gte;
           }
-          var pad = n.some(isPadded);
+          const pad = n.some(isPadded);
           N = [];
-          for (var i = x; test(i, y); i += incr) {
-            var c;
+          for (let i = x; test(i, y); i += incr) {
+            let c;
             if (isAlphaSequence) {
               c = String.fromCharCode(i);
-              if (c === "\\")
+              if (c === "\\") {
                 c = "";
+              }
             } else {
               c = String(i);
               if (pad) {
-                var need = width - c.length;
+                const need = width - c.length;
                 if (need > 0) {
-                  var z = new Array(need + 1).join("0");
-                  if (i < 0)
+                  const z = new Array(need + 1).join("0");
+                  if (i < 0) {
                     c = "-" + z + c.slice(1);
-                  else
+                  } else {
                     c = z + c;
+                  }
                 }
               }
             }
@@ -195,15 +214,16 @@ var require_brace_expansion = __commonJS({
           }
         } else {
           N = [];
-          for (var j = 0; j < n.length; j++) {
-            N.push.apply(N, expand(n[j], false));
+          for (let j = 0; j < n.length; j++) {
+            N.push.apply(N, expand_(n[j], false));
           }
         }
-        for (var j = 0; j < N.length; j++) {
-          for (var k = 0; k < post.length; k++) {
-            var expansion = pre + N[j] + post[k];
-            if (!isTop || isSequence || expansion)
+        for (let j = 0; j < N.length; j++) {
+          for (let k = 0; k < post.length; k++) {
+            const expansion = pre + N[j] + post[k];
+            if (!isTop || isSequence || expansion) {
               expansions.push(expansion);
+            }
           }
         }
       }
@@ -864,12 +884,9 @@ var require_escape = __commonJS({
 });
 
 // dist/commonjs/index.js
-var __importDefault = exports && exports.__importDefault || function(mod) {
-  return mod && mod.__esModule ? mod : { "default": mod };
-};
 Object.defineProperty(exports, "__esModule", { value: true });
 exports.unescape = exports.escape = exports.AST = exports.Minimatch = exports.match = exports.makeRe = exports.braceExpand = exports.defaults = exports.filter = exports.GLOBSTAR = exports.sep = exports.minimatch = void 0;
-var brace_expansion_1 = __importDefault(require_brace_expansion());
+var brace_expansion_1 = require_commonjs2();
 var assert_valid_pattern_js_1 = require_assert_valid_pattern();
 var ast_js_1 = require_ast();
 var escape_js_1 = require_escape();
@@ -992,7 +1009,7 @@ var braceExpand = (pattern, options = {}) => {
   if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
     return [pattern];
   }
-  return (0, brace_expansion_1.default)(pattern);
+  return (0, brace_expansion_1.expand)(pattern);
 };
 exports.braceExpand = braceExpand;
 exports.minimatch.braceExpand = exports.braceExpand;
diff --git a/deps/minimatch/package-lock.json b/deps/minimatch/package-lock.json
index da7eda431aac2a..ef4e4457a1a3ed 100644
--- a/deps/minimatch/package-lock.json
+++ b/deps/minimatch/package-lock.json
@@ -1,26 +1,25 @@
 {
   "name": "minimatch",
-  "version": "10.0.1",
+  "version": "10.0.3",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "minimatch",
-      "version": "10.0.1",
+      "version": "10.0.3",
       "license": "ISC",
       "dependencies": {
-        "brace-expansion": "^2.0.1"
+        "@isaacs/brace-expansion": "^5.0.0"
       },
       "devDependencies": {
         "@types/brace-expansion": "^1.1.2",
-        "@types/node": "^20.14.10",
-        "esbuild": "^0.23.0",
+        "@types/node": "^24.0.0",
+        "esbuild": "^0.25.5",
         "mkdirp": "^3.0.1",
         "prettier": "^3.3.2",
-        "tap": "^20.0.3",
-        "tshy": "^2.0.1",
-        "typedoc": "^0.26.3",
-        "typescript": "^5.5.3"
+        "tap": "^21.1.0",
+        "tshy": "^3.0.2",
+        "typedoc": "^0.28.5"
       },
       "engines": {
         "node": "20 || >=22"
@@ -51,11 +50,14 @@
       "license": "BSD-2-Clause"
     },
     "node_modules/@bcoe/v8-coverage": {
-      "version": "0.2.3",
-      "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz",
-      "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==",
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-1.0.2.tgz",
+      "integrity": "sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==",
       "dev": true,
-      "license": "MIT"
+      "license": "MIT",
+      "engines": {
+        "node": ">=18"
+      }
     },
     "node_modules/@cspotcode/source-map-support": {
       "version": "0.8.1",
@@ -71,9 +73,9 @@
       }
     },
     "node_modules/@esbuild/aix-ppc64": {
-      "version": "0.23.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.0.tgz",
-      "integrity": "sha512-3sG8Zwa5fMcA9bgqB8AfWPQ+HFke6uD3h1s3RIwUNK8EG7a4buxvuFTs3j1IMs2NXAk9F30C/FF4vxRgQCcmoQ==",
+      "version": "0.25.5",
+      "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.5.tgz",
+      "integrity": "sha512-9o3TMmpmftaCMepOdA5k/yDw8SfInyzWWTjYTFCX3kPSDJMROQTb8jg+h9Cnwnmm1vOzvxN7gIfB5V2ewpjtGA==",
       "cpu": [
         "ppc64"
       ],
@@ -88,9 +90,9 @@
       }
     },
     "node_modules/@esbuild/android-arm": {
-      "version": "0.23.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.23.0.tgz",
-      "integrity": "sha512-+KuOHTKKyIKgEEqKbGTK8W7mPp+hKinbMBeEnNzjJGyFcWsfrXjSTNluJHCY1RqhxFurdD8uNXQDei7qDlR6+g==",
+      "version": "0.25.5",
+      "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.5.tgz",
+      "integrity": "sha512-AdJKSPeEHgi7/ZhuIPtcQKr5RQdo6OO2IL87JkianiMYMPbCtot9fxPbrMiBADOWWm3T2si9stAiVsGbTQFkbA==",
       "cpu": [
         "arm"
       ],
@@ -105,9 +107,9 @@
       }
     },
     "node_modules/@esbuild/android-arm64": {
-      "version": "0.23.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.23.0.tgz",
-      "integrity": "sha512-EuHFUYkAVfU4qBdyivULuu03FhJO4IJN9PGuABGrFy4vUuzk91P2d+npxHcFdpUnfYKy0PuV+n6bKIpHOB3prQ==",
+      "version": "0.25.5",
+      "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.5.tgz",
+      "integrity": "sha512-VGzGhj4lJO+TVGV1v8ntCZWJktV7SGCs3Pn1GRWI1SBFtRALoomm8k5E9Pmwg3HOAal2VDc2F9+PM/rEY6oIDg==",
       "cpu": [
         "arm64"
       ],
@@ -122,9 +124,9 @@
       }
     },
     "node_modules/@esbuild/android-x64": {
-      "version": "0.23.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.23.0.tgz",
-      "integrity": "sha512-WRrmKidLoKDl56LsbBMhzTTBxrsVwTKdNbKDalbEZr0tcsBgCLbEtoNthOW6PX942YiYq8HzEnb4yWQMLQuipQ==",
+      "version": "0.25.5",
+      "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.5.tgz",
+      "integrity": "sha512-D2GyJT1kjvO//drbRT3Hib9XPwQeWd9vZoBJn+bu/lVsOZ13cqNdDeqIF/xQ5/VmWvMduP6AmXvylO/PIc2isw==",
       "cpu": [
         "x64"
       ],
@@ -139,9 +141,9 @@
       }
     },
     "node_modules/@esbuild/darwin-arm64": {
-      "version": "0.23.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.0.tgz",
-      "integrity": "sha512-YLntie/IdS31H54Ogdn+v50NuoWF5BDkEUFpiOChVa9UnKpftgwzZRrI4J132ETIi+D8n6xh9IviFV3eXdxfow==",
+      "version": "0.25.5",
+      "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.5.tgz",
+      "integrity": "sha512-GtaBgammVvdF7aPIgH2jxMDdivezgFu6iKpmT+48+F8Hhg5J/sfnDieg0aeG/jfSvkYQU2/pceFPDKlqZzwnfQ==",
       "cpu": [
         "arm64"
       ],
@@ -156,9 +158,9 @@
       }
     },
     "node_modules/@esbuild/darwin-x64": {
-      "version": "0.23.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.23.0.tgz",
-      "integrity": "sha512-IMQ6eme4AfznElesHUPDZ+teuGwoRmVuuixu7sv92ZkdQcPbsNHzutd+rAfaBKo8YK3IrBEi9SLLKWJdEvJniQ==",
+      "version": "0.25.5",
+      "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.5.tgz",
+      "integrity": "sha512-1iT4FVL0dJ76/q1wd7XDsXrSW+oLoquptvh4CLR4kITDtqi2e/xwXwdCVH8hVHU43wgJdsq7Gxuzcs6Iq/7bxQ==",
       "cpu": [
         "x64"
       ],
@@ -173,9 +175,9 @@
       }
     },
     "node_modules/@esbuild/freebsd-arm64": {
-      "version": "0.23.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.0.tgz",
-      "integrity": "sha512-0muYWCng5vqaxobq6LB3YNtevDFSAZGlgtLoAc81PjUfiFz36n4KMpwhtAd4he8ToSI3TGyuhyx5xmiWNYZFyw==",
+      "version": "0.25.5",
+      "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.5.tgz",
+      "integrity": "sha512-nk4tGP3JThz4La38Uy/gzyXtpkPW8zSAmoUhK9xKKXdBCzKODMc2adkB2+8om9BDYugz+uGV7sLmpTYzvmz6Sw==",
       "cpu": [
         "arm64"
       ],
@@ -190,9 +192,9 @@
       }
     },
     "node_modules/@esbuild/freebsd-x64": {
-      "version": "0.23.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.23.0.tgz",
-      "integrity": "sha512-XKDVu8IsD0/q3foBzsXGt/KjD/yTKBCIwOHE1XwiXmrRwrX6Hbnd5Eqn/WvDekddK21tfszBSrE/WMaZh+1buQ==",
+      "version": "0.25.5",
+      "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.5.tgz",
+      "integrity": "sha512-PrikaNjiXdR2laW6OIjlbeuCPrPaAl0IwPIaRv+SMV8CiM8i2LqVUHFC1+8eORgWyY7yhQY+2U2fA55mBzReaw==",
       "cpu": [
         "x64"
       ],
@@ -207,9 +209,9 @@
       }
     },
     "node_modules/@esbuild/linux-arm": {
-      "version": "0.23.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.23.0.tgz",
-      "integrity": "sha512-SEELSTEtOFu5LPykzA395Mc+54RMg1EUgXP+iw2SJ72+ooMwVsgfuwXo5Fn0wXNgWZsTVHwY2cg4Vi/bOD88qw==",
+      "version": "0.25.5",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.5.tgz",
+      "integrity": "sha512-cPzojwW2okgh7ZlRpcBEtsX7WBuqbLrNXqLU89GxWbNt6uIg78ET82qifUy3W6OVww6ZWobWub5oqZOVtwolfw==",
       "cpu": [
         "arm"
       ],
@@ -224,9 +226,9 @@
       }
     },
     "node_modules/@esbuild/linux-arm64": {
-      "version": "0.23.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.23.0.tgz",
-      "integrity": "sha512-j1t5iG8jE7BhonbsEg5d9qOYcVZv/Rv6tghaXM/Ug9xahM0nX/H2gfu6X6z11QRTMT6+aywOMA8TDkhPo8aCGw==",
+      "version": "0.25.5",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.5.tgz",
+      "integrity": "sha512-Z9kfb1v6ZlGbWj8EJk9T6czVEjjq2ntSYLY2cw6pAZl4oKtfgQuS4HOq41M/BcoLPzrUbNd+R4BXFyH//nHxVg==",
       "cpu": [
         "arm64"
       ],
@@ -241,9 +243,9 @@
       }
     },
     "node_modules/@esbuild/linux-ia32": {
-      "version": "0.23.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.23.0.tgz",
-      "integrity": "sha512-P7O5Tkh2NbgIm2R6x1zGJJsnacDzTFcRWZyTTMgFdVit6E98LTxO+v8LCCLWRvPrjdzXHx9FEOA8oAZPyApWUA==",
+      "version": "0.25.5",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.5.tgz",
+      "integrity": "sha512-sQ7l00M8bSv36GLV95BVAdhJ2QsIbCuCjh/uYrWiMQSUuV+LpXwIqhgJDcvMTj+VsQmqAHL2yYaasENvJ7CDKA==",
       "cpu": [
         "ia32"
       ],
@@ -258,9 +260,9 @@
       }
     },
     "node_modules/@esbuild/linux-loong64": {
-      "version": "0.23.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.23.0.tgz",
-      "integrity": "sha512-InQwepswq6urikQiIC/kkx412fqUZudBO4SYKu0N+tGhXRWUqAx+Q+341tFV6QdBifpjYgUndV1hhMq3WeJi7A==",
+      "version": "0.25.5",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.5.tgz",
+      "integrity": "sha512-0ur7ae16hDUC4OL5iEnDb0tZHDxYmuQyhKhsPBV8f99f6Z9KQM02g33f93rNH5A30agMS46u2HP6qTdEt6Q1kg==",
       "cpu": [
         "loong64"
       ],
@@ -275,9 +277,9 @@
       }
     },
     "node_modules/@esbuild/linux-mips64el": {
-      "version": "0.23.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.23.0.tgz",
-      "integrity": "sha512-J9rflLtqdYrxHv2FqXE2i1ELgNjT+JFURt/uDMoPQLcjWQA5wDKgQA4t/dTqGa88ZVECKaD0TctwsUfHbVoi4w==",
+      "version": "0.25.5",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.5.tgz",
+      "integrity": "sha512-kB/66P1OsHO5zLz0i6X0RxlQ+3cu0mkxS3TKFvkb5lin6uwZ/ttOkP3Z8lfR9mJOBk14ZwZ9182SIIWFGNmqmg==",
       "cpu": [
         "mips64el"
       ],
@@ -292,9 +294,9 @@
       }
     },
     "node_modules/@esbuild/linux-ppc64": {
-      "version": "0.23.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.23.0.tgz",
-      "integrity": "sha512-cShCXtEOVc5GxU0fM+dsFD10qZ5UpcQ8AM22bYj0u/yaAykWnqXJDpd77ublcX6vdDsWLuweeuSNZk4yUxZwtw==",
+      "version": "0.25.5",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.5.tgz",
+      "integrity": "sha512-UZCmJ7r9X2fe2D6jBmkLBMQetXPXIsZjQJCjgwpVDz+YMcS6oFR27alkgGv3Oqkv07bxdvw7fyB71/olceJhkQ==",
       "cpu": [
         "ppc64"
       ],
@@ -309,9 +311,9 @@
       }
     },
     "node_modules/@esbuild/linux-riscv64": {
-      "version": "0.23.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.23.0.tgz",
-      "integrity": "sha512-HEtaN7Y5UB4tZPeQmgz/UhzoEyYftbMXrBCUjINGjh3uil+rB/QzzpMshz3cNUxqXN7Vr93zzVtpIDL99t9aRw==",
+      "version": "0.25.5",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.5.tgz",
+      "integrity": "sha512-kTxwu4mLyeOlsVIFPfQo+fQJAV9mh24xL+y+Bm6ej067sYANjyEw1dNHmvoqxJUCMnkBdKpvOn0Ahql6+4VyeA==",
       "cpu": [
         "riscv64"
       ],
@@ -326,9 +328,9 @@
       }
     },
     "node_modules/@esbuild/linux-s390x": {
-      "version": "0.23.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.23.0.tgz",
-      "integrity": "sha512-WDi3+NVAuyjg/Wxi+o5KPqRbZY0QhI9TjrEEm+8dmpY9Xir8+HE/HNx2JoLckhKbFopW0RdO2D72w8trZOV+Wg==",
+      "version": "0.25.5",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.5.tgz",
+      "integrity": "sha512-K2dSKTKfmdh78uJ3NcWFiqyRrimfdinS5ErLSn3vluHNeHVnBAFWC8a4X5N+7FgVE1EjXS1QDZbpqZBjfrqMTQ==",
       "cpu": [
         "s390x"
       ],
@@ -343,9 +345,9 @@
       }
     },
     "node_modules/@esbuild/linux-x64": {
-      "version": "0.23.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.23.0.tgz",
-      "integrity": "sha512-a3pMQhUEJkITgAw6e0bWA+F+vFtCciMjW/LPtoj99MhVt+Mfb6bbL9hu2wmTZgNd994qTAEw+U/r6k3qHWWaOQ==",
+      "version": "0.25.5",
+      "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.5.tgz",
+      "integrity": "sha512-uhj8N2obKTE6pSZ+aMUbqq+1nXxNjZIIjCjGLfsWvVpy7gKCOL6rsY1MhRh9zLtUtAI7vpgLMK6DxjO8Qm9lJw==",
       "cpu": [
         "x64"
       ],
@@ -359,10 +361,27 @@
         "node": ">=18"
       }
     },
+    "node_modules/@esbuild/netbsd-arm64": {
+      "version": "0.25.5",
+      "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.5.tgz",
+      "integrity": "sha512-pwHtMP9viAy1oHPvgxtOv+OkduK5ugofNTVDilIzBLpoWAM16r7b/mxBvfpuQDpRQFMfuVr5aLcn4yveGvBZvw==",
+      "cpu": [
+        "arm64"
+      ],
+      "dev": true,
+      "license": "MIT",
+      "optional": true,
+      "os": [
+        "netbsd"
+      ],
+      "engines": {
+        "node": ">=18"
+      }
+    },
     "node_modules/@esbuild/netbsd-x64": {
-      "version": "0.23.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.23.0.tgz",
-      "integrity": "sha512-cRK+YDem7lFTs2Q5nEv/HHc4LnrfBCbH5+JHu6wm2eP+d8OZNoSMYgPZJq78vqQ9g+9+nMuIsAO7skzphRXHyw==",
+      "version": "0.25.5",
+      "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.5.tgz",
+      "integrity": "sha512-WOb5fKrvVTRMfWFNCroYWWklbnXH0Q5rZppjq0vQIdlsQKuw6mdSihwSo4RV/YdQ5UCKKvBy7/0ZZYLBZKIbwQ==",
       "cpu": [
         "x64"
       ],
@@ -377,9 +396,9 @@
       }
     },
     "node_modules/@esbuild/openbsd-arm64": {
-      "version": "0.23.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.0.tgz",
-      "integrity": "sha512-suXjq53gERueVWu0OKxzWqk7NxiUWSUlrxoZK7usiF50C6ipColGR5qie2496iKGYNLhDZkPxBI3erbnYkU0rQ==",
+      "version": "0.25.5",
+      "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.5.tgz",
+      "integrity": "sha512-7A208+uQKgTxHd0G0uqZO8UjK2R0DDb4fDmERtARjSHWxqMTye4Erz4zZafx7Di9Cv+lNHYuncAkiGFySoD+Mw==",
       "cpu": [
         "arm64"
       ],
@@ -394,9 +413,9 @@
       }
     },
     "node_modules/@esbuild/openbsd-x64": {
-      "version": "0.23.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.23.0.tgz",
-      "integrity": "sha512-6p3nHpby0DM/v15IFKMjAaayFhqnXV52aEmv1whZHX56pdkK+MEaLoQWj+H42ssFarP1PcomVhbsR4pkz09qBg==",
+      "version": "0.25.5",
+      "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.5.tgz",
+      "integrity": "sha512-G4hE405ErTWraiZ8UiSoesH8DaCsMm0Cay4fsFWOOUcz8b8rC6uCvnagr+gnioEjWn0wC+o1/TAHt+It+MpIMg==",
       "cpu": [
         "x64"
       ],
@@ -411,9 +430,9 @@
       }
     },
     "node_modules/@esbuild/sunos-x64": {
-      "version": "0.23.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.23.0.tgz",
-      "integrity": "sha512-BFelBGfrBwk6LVrmFzCq1u1dZbG4zy/Kp93w2+y83Q5UGYF1d8sCzeLI9NXjKyujjBBniQa8R8PzLFAUrSM9OA==",
+      "version": "0.25.5",
+      "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.5.tgz",
+      "integrity": "sha512-l+azKShMy7FxzY0Rj4RCt5VD/q8mG/e+mDivgspo+yL8zW7qEwctQ6YqKX34DTEleFAvCIUviCFX1SDZRSyMQA==",
       "cpu": [
         "x64"
       ],
@@ -428,9 +447,9 @@
       }
     },
     "node_modules/@esbuild/win32-arm64": {
-      "version": "0.23.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.23.0.tgz",
-      "integrity": "sha512-lY6AC8p4Cnb7xYHuIxQ6iYPe6MfO2CC43XXKo9nBXDb35krYt7KGhQnOkRGar5psxYkircpCqfbNDB4uJbS2jQ==",
+      "version": "0.25.5",
+      "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.5.tgz",
+      "integrity": "sha512-O2S7SNZzdcFG7eFKgvwUEZ2VG9D/sn/eIiz8XRZ1Q/DO5a3s76Xv0mdBzVM5j5R639lXQmPmSo0iRpHqUUrsxw==",
       "cpu": [
         "arm64"
       ],
@@ -445,9 +464,9 @@
       }
     },
     "node_modules/@esbuild/win32-ia32": {
-      "version": "0.23.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.23.0.tgz",
-      "integrity": "sha512-7L1bHlOTcO4ByvI7OXVI5pNN6HSu6pUQq9yodga8izeuB1KcT2UkHaH6118QJwopExPn0rMHIseCTx1CRo/uNA==",
+      "version": "0.25.5",
+      "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.5.tgz",
+      "integrity": "sha512-onOJ02pqs9h1iMJ1PQphR+VZv8qBMQ77Klcsqv9CNW2w6yLqoURLcgERAIurY6QE63bbLuqgP9ATqajFLK5AMQ==",
       "cpu": [
         "ia32"
       ],
@@ -462,9 +481,9 @@
       }
     },
     "node_modules/@esbuild/win32-x64": {
-      "version": "0.23.0",
-      "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.23.0.tgz",
-      "integrity": "sha512-Arm+WgUFLUATuoxCJcahGuk6Yj9Pzxd6l11Zb/2aAuv5kWWvvfhLFo2fni4uSK5vzlUdCGZ/BdV5tH8klj8p8g==",
+      "version": "0.25.5",
+      "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.5.tgz",
+      "integrity": "sha512-TXv6YnJ8ZMVdX+SXWVBo/0p8LTcrUYngpWjvm91TMjjBQii7Oz11Lw5lbDV5Y0TzuhSJHwiH4hEtC1I42mMS0g==",
       "cpu": [
         "x64"
       ],
@@ -478,6 +497,41 @@
         "node": ">=18"
       }
     },
+    "node_modules/@gerrit0/mini-shiki": {
+      "version": "3.7.0",
+      "resolved": "https://registry.npmjs.org/@gerrit0/mini-shiki/-/mini-shiki-3.7.0.tgz",
+      "integrity": "sha512-7iY9wg4FWXmeoFJpUL2u+tsmh0d0jcEJHAIzVxl3TG4KL493JNnisdLAILZ77zcD+z3J0keEXZ+lFzUgzQzPDg==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@shikijs/engine-oniguruma": "^3.7.0",
+        "@shikijs/langs": "^3.7.0",
+        "@shikijs/themes": "^3.7.0",
+        "@shikijs/types": "^3.7.0",
+        "@shikijs/vscode-textmate": "^10.0.2"
+      }
+    },
+    "node_modules/@isaacs/balanced-match": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz",
+      "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==",
+      "license": "MIT",
+      "engines": {
+        "node": "20 || >=22"
+      }
+    },
+    "node_modules/@isaacs/brace-expansion": {
+      "version": "5.0.0",
+      "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz",
+      "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==",
+      "license": "MIT",
+      "dependencies": {
+        "@isaacs/balanced-match": "^4.0.1"
+      },
+      "engines": {
+        "node": "20 || >=22"
+      }
+    },
     "node_modules/@isaacs/cliui": {
       "version": "8.0.2",
       "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
@@ -707,9 +761,9 @@
       }
     },
     "node_modules/@npmcli/package-json": {
-      "version": "5.2.0",
-      "resolved": "https://registry.npmjs.org/@npmcli/package-json/-/package-json-5.2.0.tgz",
-      "integrity": "sha512-qe/kiqqkW0AGtvBjL8TJKZk/eBBSpnJkUWvHdQ9jM2lKHXRYYJuyNpJPlJw3c8QjC2ow6NZYiLExhUaeJelbxQ==",
+      "version": "5.2.1",
+      "resolved": "https://registry.npmjs.org/@npmcli/package-json/-/package-json-5.2.1.tgz",
+      "integrity": "sha512-f7zYC6kQautXHvNbLEWgD/uGu1+xCn9izgqBfgItWSx22U0ZDekxN08A1vM8cTxj/cRVe0Q94Ode+tdoYmIOOQ==",
       "dev": true,
       "license": "ISC",
       "dependencies": {
@@ -725,6 +779,76 @@
         "node": "^16.14.0 || >=18.0.0"
       }
     },
+    "node_modules/@npmcli/package-json/node_modules/glob": {
+      "version": "10.4.5",
+      "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz",
+      "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "foreground-child": "^3.1.0",
+        "jackspeak": "^3.1.2",
+        "minimatch": "^9.0.4",
+        "minipass": "^7.1.2",
+        "package-json-from-dist": "^1.0.0",
+        "path-scurry": "^1.11.1"
+      },
+      "bin": {
+        "glob": "dist/esm/bin.mjs"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      }
+    },
+    "node_modules/@npmcli/package-json/node_modules/jackspeak": {
+      "version": "3.4.3",
+      "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz",
+      "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==",
+      "dev": true,
+      "license": "BlueOak-1.0.0",
+      "dependencies": {
+        "@isaacs/cliui": "^8.0.2"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      },
+      "optionalDependencies": {
+        "@pkgjs/parseargs": "^0.11.0"
+      }
+    },
+    "node_modules/@npmcli/package-json/node_modules/minimatch": {
+      "version": "9.0.5",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
+      "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "brace-expansion": "^2.0.1"
+      },
+      "engines": {
+        "node": ">=16 || 14 >=14.17"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      }
+    },
+    "node_modules/@npmcli/package-json/node_modules/path-scurry": {
+      "version": "1.11.1",
+      "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz",
+      "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==",
+      "dev": true,
+      "license": "BlueOak-1.0.0",
+      "dependencies": {
+        "lru-cache": "^10.2.0",
+        "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
+      },
+      "engines": {
+        "node": ">=16 || 14 >=14.18"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      }
+    },
     "node_modules/@npmcli/promise-spawn": {
       "version": "7.0.2",
       "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-7.0.2.tgz",
@@ -777,16 +901,55 @@
         "node": ">=14"
       }
     },
-    "node_modules/@shikijs/core": {
-      "version": "1.10.3",
-      "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.10.3.tgz",
-      "integrity": "sha512-D45PMaBaeDHxww+EkcDQtDAtzv00Gcsp72ukBtaLSmqRvh0WgGMq3Al0rl1QQBZfuneO75NXMIzEZGFitThWbg==",
+    "node_modules/@shikijs/engine-oniguruma": {
+      "version": "3.7.0",
+      "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-3.7.0.tgz",
+      "integrity": "sha512-5BxcD6LjVWsGu4xyaBC5bu8LdNgPCVBnAkWTtOCs/CZxcB22L8rcoWfv7Hh/3WooVjBZmFtyxhgvkQFedPGnFw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
+        "@shikijs/types": "3.7.0",
+        "@shikijs/vscode-textmate": "^10.0.2"
+      }
+    },
+    "node_modules/@shikijs/langs": {
+      "version": "3.7.0",
+      "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-3.7.0.tgz",
+      "integrity": "sha512-1zYtdfXLr9xDKLTGy5kb7O0zDQsxXiIsw1iIBcNOO8Yi5/Y1qDbJ+0VsFoqTlzdmneO8Ij35g7QKF8kcLyznCQ==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@shikijs/types": "3.7.0"
+      }
+    },
+    "node_modules/@shikijs/themes": {
+      "version": "3.7.0",
+      "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-3.7.0.tgz",
+      "integrity": "sha512-VJx8497iZPy5zLiiCTSIaOChIcKQwR0FebwE9S3rcN0+J/GTWwQ1v/bqhTbpbY3zybPKeO8wdammqkpXc4NVjQ==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@shikijs/types": "3.7.0"
+      }
+    },
+    "node_modules/@shikijs/types": {
+      "version": "3.7.0",
+      "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-3.7.0.tgz",
+      "integrity": "sha512-MGaLeaRlSWpnP0XSAum3kP3a8vtcTsITqoEPYdt3lQG3YCdQH4DnEhodkYcNMcU0uW0RffhoD1O3e0vG5eSBBg==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@shikijs/vscode-textmate": "^10.0.2",
         "@types/hast": "^3.0.4"
       }
     },
+    "node_modules/@shikijs/vscode-textmate": {
+      "version": "10.0.2",
+      "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-10.0.2.tgz",
+      "integrity": "sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==",
+      "dev": true,
+      "license": "MIT"
+    },
     "node_modules/@sigstore/bundle": {
       "version": "2.3.2",
       "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-2.3.2.tgz",
@@ -811,13 +974,13 @@
       }
     },
     "node_modules/@sigstore/protobuf-specs": {
-      "version": "0.3.2",
-      "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.3.2.tgz",
-      "integrity": "sha512-c6B0ehIWxMI8wiS/bj6rHMPqeFvngFV7cDU/MY+B16P9Z3Mp9k8L93eYZ7BYzSickzuqAQqAq0V956b3Ju6mLw==",
+      "version": "0.3.3",
+      "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.3.3.tgz",
+      "integrity": "sha512-RpacQhBlwpBWd7KEJsRKcBQalbV28fvkxwTOJIqhIuDysMMaJW47V4OqW30iJB9uRpqOSxxEAQFdr8tTattReQ==",
       "dev": true,
       "license": "Apache-2.0",
       "engines": {
-        "node": "^16.14.0 || >=18.0.0"
+        "node": "^18.17.0 || >=20.5.0"
       }
     },
     "node_modules/@sigstore/sign": {
@@ -868,264 +1031,264 @@
       }
     },
     "node_modules/@tapjs/after": {
-      "version": "2.0.3",
-      "resolved": "https://registry.npmjs.org/@tapjs/after/-/after-2.0.3.tgz",
-      "integrity": "sha512-I5H3lFvevFF2hDykvNKGXyUNrzg9qL001an1AzUKxe/LtL9m6qcxa1tCm9LLjvJcacZHPsQZHPX2QyVqFkoeLQ==",
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/@tapjs/after/-/after-3.0.1.tgz",
+      "integrity": "sha512-EMvLpjqKwmz3mVkilTpcMa/C9H/g+S7lBrPk4CxPJ3i+Lrid0UH80CHqL5OaEeAbyCev9Nio/JkeXuwBKRu2Mg==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
         "is-actual-promise": "^1.0.1"
       },
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       },
       "peerDependencies": {
-        "@tapjs/core": "3.0.3"
+        "@tapjs/core": "4.0.1"
       }
     },
     "node_modules/@tapjs/after-each": {
-      "version": "3.0.3",
-      "resolved": "https://registry.npmjs.org/@tapjs/after-each/-/after-each-3.0.3.tgz",
-      "integrity": "sha512-gg+TwlnnNhXkyWMLW9iF7O2U01RYLBwzvsLM2ZwP8f8yS/sH6rjTxYxik6v+mQFvvsoawWrZ5X594pVJUQp80A==",
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/@tapjs/after-each/-/after-each-4.0.1.tgz",
+      "integrity": "sha512-YkVvfszKTLm57Bju8ET4hKCPXVsd9OCkWUBD8h8g0ZrX61r99Cf6jw/D4eTppPcWryOwE7WO/7aj/toBTp2W/Q==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
         "function-loop": "^4.0.0"
       },
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       },
       "peerDependencies": {
-        "@tapjs/core": "3.0.3"
+        "@tapjs/core": "4.0.1"
       }
     },
     "node_modules/@tapjs/asserts": {
-      "version": "3.0.3",
-      "resolved": "https://registry.npmjs.org/@tapjs/asserts/-/asserts-3.0.3.tgz",
-      "integrity": "sha512-Jfb+Fdq6nIbBDi4qPDPrptG3kkPd1C3ia+6Uw3foIbHvWARfJek+HkmZAy72Hv9QPlkMDjl37i7w2p64Xr0Fyg==",
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/@tapjs/asserts/-/asserts-4.0.1.tgz",
+      "integrity": "sha512-MG4Gt2/RctnqTsPxFBzHP9pu8M8uBJrytOnggiMRtLQPHpR1MwuMLGTlk0qOehF8zrpu8J9k1GFbl7MiN/L6+A==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
-        "@tapjs/stack": "3.0.0",
+        "@tapjs/stack": "4.0.0",
         "is-actual-promise": "^1.0.1",
-        "tcompare": "8.0.0",
+        "tcompare": "9.0.0",
         "trivial-deferred": "^2.0.0"
       },
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
       },
       "peerDependencies": {
-        "@tapjs/core": "3.0.3"
+        "@tapjs/core": "4.0.1"
       }
     },
     "node_modules/@tapjs/before": {
-      "version": "3.0.3",
-      "resolved": "https://registry.npmjs.org/@tapjs/before/-/before-3.0.3.tgz",
-      "integrity": "sha512-F8tKS3hezg/t0C/sz92/a+Hil5YbOpDSrVTBAv4jyxX4e1Bni7gsniwJ/MwI5BMhZI6UWl8/xReFYBrfGHRXpg==",
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/@tapjs/before/-/before-4.0.1.tgz",
+      "integrity": "sha512-20mjT6KUqtA+OX6rAIZ/f9flDVOSnVMg4HyEjuIonn0Kk2EWqRJuSxd+ystllNbIY+/uNpFkq58/f6APi3p/Bg==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
         "is-actual-promise": "^1.0.1"
       },
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       },
       "peerDependencies": {
-        "@tapjs/core": "3.0.3"
+        "@tapjs/core": "4.0.1"
       }
     },
     "node_modules/@tapjs/before-each": {
-      "version": "3.0.3",
-      "resolved": "https://registry.npmjs.org/@tapjs/before-each/-/before-each-3.0.3.tgz",
-      "integrity": "sha512-da1l+rh29x/E+HS6lJBSaHtiuwatFHaHgIBE4/8osU7yTFTZRaA2MjDEfb6gT3/bVZEAae1sVzDkyFhGoMCBkg==",
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/@tapjs/before-each/-/before-each-4.0.1.tgz",
+      "integrity": "sha512-7eO98gxd0H7aI1K2whVJyBFrMXNUewPbBJgCPPdzYgY06CcI+cyZE136d8ZZcbAHmOWfEmzzcQtTzCNx3IuawQ==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
         "function-loop": "^4.0.0"
       },
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       },
       "peerDependencies": {
-        "@tapjs/core": "3.0.3"
+        "@tapjs/core": "4.0.1"
       }
     },
     "node_modules/@tapjs/chdir": {
-      "version": "2.0.3",
-      "resolved": "https://registry.npmjs.org/@tapjs/chdir/-/chdir-2.0.3.tgz",
-      "integrity": "sha512-WromiRwubX4K941tGWK0WBOPSu5tRd6JLSUo73ZPDPT48HIypjFG+TBKEiDAjsCcPQ/DUE0fefqVIeJPy+RVIQ==",
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/@tapjs/chdir/-/chdir-3.0.1.tgz",
+      "integrity": "sha512-TnmMC96E4CW6OhntAouc4HxQym0zpu7KT5/b7rUn49eCdlnYIZmGUPTigWFzxIWfgD22008QUelgjp+ifYpLlA==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       },
       "peerDependencies": {
-        "@tapjs/core": "3.0.3"
+        "@tapjs/core": "4.0.1"
       }
     },
     "node_modules/@tapjs/config": {
-      "version": "4.0.3",
-      "resolved": "https://registry.npmjs.org/@tapjs/config/-/config-4.0.3.tgz",
-      "integrity": "sha512-9az/JQ3pqcutanbUPcBNdV0UAZJtajA7r+m6YQ66IPriUM9TUa68+p3iwK5OP0wkEVaY3dS811DiVtkZ4m63bg==",
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/@tapjs/config/-/config-5.0.1.tgz",
+      "integrity": "sha512-P4rv1gJGEUUTC1FiazUXZGggij3kxzCTQVVx+uULBBR+Oz3irELOM5EbkMVKpW7vEkQXt+hQaLeHRNQceawuEw==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
-        "@tapjs/core": "3.0.3",
-        "@tapjs/test": "3.0.3",
+        "@tapjs/core": "4.0.1",
+        "@tapjs/test": "4.0.1",
         "chalk": "^5.2.0",
-        "jackspeak": "^3.4.0",
+        "jackspeak": "^4.0.1",
         "polite-json": "^5.0.0",
-        "tap-yaml": "3.0.0",
-        "walk-up-path": "^3.0.1"
+        "tap-yaml": "4.0.0",
+        "walk-up-path": "^4.0.0"
       },
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
       },
       "peerDependencies": {
-        "@tapjs/core": "3.0.3",
-        "@tapjs/test": "3.0.3"
+        "@tapjs/core": "4.0.1",
+        "@tapjs/test": "4.0.1"
       }
     },
     "node_modules/@tapjs/core": {
-      "version": "3.0.3",
-      "resolved": "https://registry.npmjs.org/@tapjs/core/-/core-3.0.3.tgz",
-      "integrity": "sha512-Vgg1UpE+pNTylXKoxK7k+LOYVLGis14wxzH7+vTMT5H57aF9NAyGJN1kenHyOFA/ML45TofgKsQY2e6EM8whzA==",
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/@tapjs/core/-/core-4.0.1.tgz",
+      "integrity": "sha512-gJq1Y/4kqnb7+FDl1RbaiEQ1/g9MrnUUwGnqGo2CNJturb+q9AhgYKjlEXFCnsdy1nXQgqeKSToEPU66LepZJw==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
         "@tapjs/processinfo": "^3.1.8",
-        "@tapjs/stack": "3.0.0",
-        "@tapjs/test": "3.0.3",
+        "@tapjs/stack": "4.0.0",
+        "@tapjs/test": "4.0.1",
         "async-hook-domain": "^4.0.1",
         "diff": "^5.2.0",
         "is-actual-promise": "^1.0.1",
         "minipass": "^7.0.4",
         "signal-exit": "4.1",
-        "tap-parser": "17.0.0",
-        "tap-yaml": "3.0.0",
-        "tcompare": "8.0.0",
+        "tap-parser": "18.0.0",
+        "tap-yaml": "4.0.0",
+        "tcompare": "9.0.0",
         "trivial-deferred": "^2.0.0"
       },
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       }
     },
     "node_modules/@tapjs/error-serdes": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/@tapjs/error-serdes/-/error-serdes-3.0.0.tgz",
-      "integrity": "sha512-+dVgpnD412aKGhu0w6ND2nSRHytClNR68jdeO7ww2NXv0bCroqEF+1uGLsiqnocwlAL2yheaF04zY+bthTfOgA==",
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/@tapjs/error-serdes/-/error-serdes-4.0.0.tgz",
+      "integrity": "sha512-jO0CvhL7lyGcDzyPeumyXirBv/vxRuhg8SdyLwjNqO7aelckxZzY/dCchtov7PfKK7wc/iB55W2++PE9waFaWw==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
         "minipass": "^7.0.4"
       },
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
       }
     },
     "node_modules/@tapjs/filter": {
-      "version": "3.0.3",
-      "resolved": "https://registry.npmjs.org/@tapjs/filter/-/filter-3.0.3.tgz",
-      "integrity": "sha512-7qcFmsR906AgC71APjpOXnwVCqWsaACCnkTClaprP1owrVmoeCOIRqSH6qkfp5sE1cbNwr5tamaPUBFwqH6xWw==",
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/@tapjs/filter/-/filter-4.0.1.tgz",
+      "integrity": "sha512-XDIi60GGljwxec/fHaC3agiHW/K4u1JV9b2xwkA0FreVYncIgWOMugnQ87tMLnfrSO9clNcBcJ4e4VDcBnPzFg==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
       },
       "peerDependencies": {
-        "@tapjs/core": "3.0.3"
+        "@tapjs/core": "4.0.1"
       }
     },
     "node_modules/@tapjs/fixture": {
-      "version": "3.0.3",
-      "resolved": "https://registry.npmjs.org/@tapjs/fixture/-/fixture-3.0.3.tgz",
-      "integrity": "sha512-wnVqaduQiERRQS7bqKEvBEwhAITOfj8rKjYuEsuNFCRpgTFwXopp8u3c7YONSmJljXCU6lMSXBV3+4zjBlXlJA==",
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/@tapjs/fixture/-/fixture-4.0.1.tgz",
+      "integrity": "sha512-ToCBArTQJ08DJrIUDTSGmzVmBtgTY6ppVhWrGdT/r0hC3dYsl8vLYKX1qJTGJmE88kNkwpjeDXh3QB0A/x03PQ==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
         "mkdirp": "^3.0.0",
-        "rimraf": "^5.0.5"
+        "rimraf": "^6.0.0"
       },
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
       },
       "peerDependencies": {
-        "@tapjs/core": "3.0.3"
+        "@tapjs/core": "4.0.1"
       }
     },
     "node_modules/@tapjs/intercept": {
-      "version": "3.0.3",
-      "resolved": "https://registry.npmjs.org/@tapjs/intercept/-/intercept-3.0.3.tgz",
-      "integrity": "sha512-axAkkf3Cc5dsC5cGVvlU5gjV63uSEjUv3WpctDeqPDof1Ryx50sXMWazu7s58kevAvtu3CBQXmbBR6hqpls74g==",
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/@tapjs/intercept/-/intercept-4.0.1.tgz",
+      "integrity": "sha512-nIkYtYAQU/OPbYnT5E0iXSMaDaEVayHhDozA8yje/OTyXZP5GPPsbrrKrdvFojYQ4CsXw0sqYyJim5zzxucdpA==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
-        "@tapjs/after": "2.0.3",
-        "@tapjs/stack": "3.0.0"
+        "@tapjs/after": "3.0.1",
+        "@tapjs/stack": "4.0.0"
       },
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       },
       "peerDependencies": {
-        "@tapjs/core": "3.0.3"
+        "@tapjs/core": "4.0.1"
       }
     },
     "node_modules/@tapjs/mock": {
-      "version": "3.0.3",
-      "resolved": "https://registry.npmjs.org/@tapjs/mock/-/mock-3.0.3.tgz",
-      "integrity": "sha512-Uyopi0mWivBvPvKlrH1n6GxCtJrq38wwuGH78EaHPOocsC/hmMlJYqzvtjXE3R/cJXSrgAxHjaD4JshsmEPN6Q==",
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/@tapjs/mock/-/mock-4.0.1.tgz",
+      "integrity": "sha512-OjuLr1+0CUMZiFCmxTAy3iSefurrI7vyAqB9lm+XHOJ8Qway10SjeCQTl1kiljXSswZRSheI+dh7EkL7J5LOgQ==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
-        "@tapjs/after": "2.0.3",
-        "@tapjs/stack": "3.0.0",
-        "resolve-import": "^1.4.5",
-        "walk-up-path": "^3.0.1"
+        "@tapjs/after": "3.0.1",
+        "@tapjs/stack": "4.0.0",
+        "resolve-import": "^2.0.0",
+        "walk-up-path": "^4.0.0"
       },
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
       },
       "peerDependencies": {
-        "@tapjs/core": "3.0.3"
+        "@tapjs/core": "4.0.1"
       }
     },
     "node_modules/@tapjs/node-serialize": {
-      "version": "3.0.3",
-      "resolved": "https://registry.npmjs.org/@tapjs/node-serialize/-/node-serialize-3.0.3.tgz",
-      "integrity": "sha512-pOKGzdly9fe4PT5ztrouuLLliB5RPOdrmsIJi7OwE0jlBXigkGxqv4PgTX4nAv7QbcDlyCX6AKKLRoqEQVyPXA==",
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/@tapjs/node-serialize/-/node-serialize-4.0.1.tgz",
+      "integrity": "sha512-XsyRkCZGyugENnI67kRy50h+H7Om94VEyCSCIYLtCH7R514tkmdjw/otFewUE7y+wgndZ3yE7RfJp9zzk5ubiA==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
-        "@tapjs/error-serdes": "3.0.0",
-        "@tapjs/stack": "3.0.0",
-        "tap-parser": "17.0.0"
+        "@tapjs/error-serdes": "4.0.0",
+        "@tapjs/stack": "4.0.0",
+        "tap-parser": "18.0.0"
       },
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
       },
       "peerDependencies": {
-        "@tapjs/core": "3.0.3"
+        "@tapjs/core": "4.0.1"
       }
     },
     "node_modules/@tapjs/processinfo": {
@@ -1145,14 +1308,14 @@
       }
     },
     "node_modules/@tapjs/reporter": {
-      "version": "3.0.3",
-      "resolved": "https://registry.npmjs.org/@tapjs/reporter/-/reporter-3.0.3.tgz",
-      "integrity": "sha512-7Hy7KOzFodcVstMbh7IdaRbeukMSFJsimlTIisdv/Fm+N3ljWhi1OvOZgZVtspO506rw+ZCPZ0/Y8ynYZUo7QA==",
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/@tapjs/reporter/-/reporter-4.0.2.tgz",
+      "integrity": "sha512-0o3Slf7OBL+to6aIB//gH8V0DEtn/Dw9KiroMJkEkWUTVgJ1v5YbrQH7HSc/57BZw10n5ov0kPba1sLLScuQ2Q==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
-        "@tapjs/config": "4.0.3",
-        "@tapjs/stack": "3.0.0",
+        "@tapjs/config": "5.0.1",
+        "@tapjs/stack": "4.0.0",
         "chalk": "^5.2.0",
         "ink": "^5.0.1",
         "minipass": "^7.0.4",
@@ -1161,51 +1324,52 @@
         "prismjs-terminal": "^1.2.3",
         "react": "^18.2.0",
         "string-length": "^6.0.0",
-        "tap-parser": "17.0.0",
-        "tap-yaml": "3.0.0",
-        "tcompare": "8.0.0"
+        "tap-parser": "18.0.0",
+        "tap-yaml": "4.0.0",
+        "tcompare": "9.0.0"
       },
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
       },
       "peerDependencies": {
-        "@tapjs/core": "3.0.3"
+        "@tapjs/core": "4.0.1"
       }
     },
     "node_modules/@tapjs/run": {
-      "version": "3.0.3",
-      "resolved": "https://registry.npmjs.org/@tapjs/run/-/run-3.0.3.tgz",
-      "integrity": "sha512-Xcci3PNf8mmRc+3ULglduB2utJ+tGeKRXOze0FkzSYVj7ZX5Kv2nSTqIXzy/de3BeCtDY09g/H0qeGvcgHPb4w==",
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/@tapjs/run/-/run-4.0.2.tgz",
+      "integrity": "sha512-rq77+jyHmwsQsFv6N1FmG0SL/Z9mhJ5DgYoiPMDMA4GzCblxl18f1gGDd+HzWk+p05+6VB80E8lr2sblLhyg4g==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
-        "@tapjs/after": "2.0.3",
-        "@tapjs/before": "3.0.3",
-        "@tapjs/config": "4.0.3",
+        "@tapjs/after": "3.0.1",
+        "@tapjs/before": "4.0.1",
+        "@tapjs/config": "5.0.1",
         "@tapjs/processinfo": "^3.1.8",
-        "@tapjs/reporter": "3.0.3",
-        "@tapjs/spawn": "3.0.3",
-        "@tapjs/stdin": "3.0.3",
-        "@tapjs/test": "3.0.3",
+        "@tapjs/reporter": "4.0.2",
+        "@tapjs/spawn": "4.0.1",
+        "@tapjs/stdin": "4.0.1",
+        "@tapjs/test": "4.0.1",
         "c8": "^10.1.2",
         "chalk": "^5.3.0",
         "chokidar": "^3.6.0",
         "foreground-child": "^3.1.1",
-        "glob": "^10.3.16",
+        "glob": "^11.0.0",
         "minipass": "^7.0.4",
         "mkdirp": "^3.0.1",
         "opener": "^1.5.2",
         "pacote": "^18.0.6",
-        "resolve-import": "^1.4.5",
-        "rimraf": "^5.0.5",
+        "path-scurry": "^2.0.0",
+        "resolve-import": "^2.0.0",
+        "rimraf": "^6.0.0",
         "semver": "^7.6.0",
         "signal-exit": "^4.1.0",
-        "tap-parser": "17.0.0",
-        "tap-yaml": "3.0.0",
-        "tcompare": "8.0.0",
+        "tap-parser": "18.0.0",
+        "tap-yaml": "4.0.0",
+        "tcompare": "9.0.0",
         "trivial-deferred": "^2.0.0",
         "which": "^4.0.0"
       },
@@ -1213,187 +1377,175 @@
         "tap-run": "dist/esm/index.js"
       },
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
       },
       "peerDependencies": {
-        "@tapjs/core": "3.0.3"
+        "@tapjs/core": "4.0.1"
       }
     },
     "node_modules/@tapjs/snapshot": {
-      "version": "3.0.3",
-      "resolved": "https://registry.npmjs.org/@tapjs/snapshot/-/snapshot-3.0.3.tgz",
-      "integrity": "sha512-3Z5sgNnb2kX+evjHwlcOew8r+Z9yJfN4kxs0N6EQpW6FxpD6/sE9oVgHMEIFAw4HzezL3DlBjlJF1VLpZmuogg==",
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/@tapjs/snapshot/-/snapshot-4.0.1.tgz",
+      "integrity": "sha512-Py7JTRdu6mjtDGMu3BjamGxgnNFRzDVHb9c2Bp0po403GmEGHOgdj17PxWhqa61uHmdzr3XH0BUWANYYp0JRrg==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
         "is-actual-promise": "^1.0.1",
-        "tcompare": "8.0.0",
+        "tcompare": "9.0.0",
         "trivial-deferred": "^2.0.0"
       },
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
       },
       "peerDependencies": {
-        "@tapjs/core": "3.0.3"
+        "@tapjs/core": "4.0.1"
       }
     },
     "node_modules/@tapjs/spawn": {
-      "version": "3.0.3",
-      "resolved": "https://registry.npmjs.org/@tapjs/spawn/-/spawn-3.0.3.tgz",
-      "integrity": "sha512-PbOzjxqSP/H9SY5HmM2NN0s8YxcG3xTXUBIpCN31LxVvVGj/B/R1R8ard8AUxwJVb8kS1nqKEwEotvNIm4CGVA==",
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/@tapjs/spawn/-/spawn-4.0.1.tgz",
+      "integrity": "sha512-ztF1Klv3pSK1YCslYaPBQtrydBiBntQe8BaKbFmVipWc7Dlogpnh7aCF16yjNOe7jL6kz5/2xvhY2XOUuAaymg==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       },
       "peerDependencies": {
-        "@tapjs/core": "3.0.3"
+        "@tapjs/core": "4.0.1"
       }
     },
     "node_modules/@tapjs/stack": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/@tapjs/stack/-/stack-3.0.0.tgz",
-      "integrity": "sha512-TrwR50bVb5Q6Vzc2XSoGwpkTchqcL3RU146jyEIG6GMfcg0WVNCtZaNu4e6wGFBnXvbRXbQ994bSpcBBSy3OBw==",
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/@tapjs/stack/-/stack-4.0.0.tgz",
+      "integrity": "sha512-uj6BvHXvLf1qILvcpYit9D6JX7pg4eSbaxm1MhWpi8wdhSQyUAOe4gxCMTfJpW0ekB48N4QN3S3vaq7rWtFctw==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
       }
     },
     "node_modules/@tapjs/stdin": {
-      "version": "3.0.3",
-      "resolved": "https://registry.npmjs.org/@tapjs/stdin/-/stdin-3.0.3.tgz",
-      "integrity": "sha512-ETyKj7twhxIdJky0SDpjA2niy1LIvPU/tr3tgw30IV+9LXC7pinCwbLLIoNDHSODfKSDQ0+QwRQLmlgugL3fUg==",
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/@tapjs/stdin/-/stdin-4.0.1.tgz",
+      "integrity": "sha512-25ZZgFaKkDtEPpAO1QkwWpAY1+7TXPn7JvlN4BeLNlymekFu7zSO8H+bpr/sKRKbKKrvRjdijYZrHc0J8dLkyw==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       },
       "peerDependencies": {
-        "@tapjs/core": "3.0.3"
+        "@tapjs/core": "4.0.1"
       }
     },
     "node_modules/@tapjs/test": {
-      "version": "3.0.3",
-      "resolved": "https://registry.npmjs.org/@tapjs/test/-/test-3.0.3.tgz",
-      "integrity": "sha512-RB0Ca6MG4PEUUkGofYz0HWAaGoqgTFsfpRd15g/ax3+GaA2umZL3iHjhcpTt2TM1uUdN8bzUyOUlk6r1k/P3fQ==",
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/@tapjs/test/-/test-4.0.1.tgz",
+      "integrity": "sha512-Nl/tG7ZYWb3y7GvGp3qWHqgdGYTyTuV8CDCvMufj8g+DwSG0Lkek2KrRr6V8lBhhxyq1jZ5DEKBeOip1sxas7g==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
         "@isaacs/ts-node-temp-fork-for-pr-2009": "^10.9.7",
-        "@tapjs/after": "2.0.3",
-        "@tapjs/after-each": "3.0.3",
-        "@tapjs/asserts": "3.0.3",
-        "@tapjs/before": "3.0.3",
-        "@tapjs/before-each": "3.0.3",
-        "@tapjs/chdir": "2.0.3",
-        "@tapjs/filter": "3.0.3",
-        "@tapjs/fixture": "3.0.3",
-        "@tapjs/intercept": "3.0.3",
-        "@tapjs/mock": "3.0.3",
-        "@tapjs/node-serialize": "3.0.3",
-        "@tapjs/snapshot": "3.0.3",
-        "@tapjs/spawn": "3.0.3",
-        "@tapjs/stdin": "3.0.3",
-        "@tapjs/typescript": "2.0.3",
-        "@tapjs/worker": "3.0.3",
-        "glob": "^10.3.16",
-        "jackspeak": "^3.4.0",
+        "@tapjs/after": "3.0.1",
+        "@tapjs/after-each": "4.0.1",
+        "@tapjs/asserts": "4.0.1",
+        "@tapjs/before": "4.0.1",
+        "@tapjs/before-each": "4.0.1",
+        "@tapjs/chdir": "3.0.1",
+        "@tapjs/filter": "4.0.1",
+        "@tapjs/fixture": "4.0.1",
+        "@tapjs/intercept": "4.0.1",
+        "@tapjs/mock": "4.0.1",
+        "@tapjs/node-serialize": "4.0.1",
+        "@tapjs/snapshot": "4.0.1",
+        "@tapjs/spawn": "4.0.1",
+        "@tapjs/stdin": "4.0.1",
+        "@tapjs/typescript": "3.1.0",
+        "@tapjs/worker": "4.0.1",
+        "glob": "11",
+        "jackspeak": "^4.0.1",
         "mkdirp": "^3.0.0",
         "package-json-from-dist": "^1.0.0",
-        "resolve-import": "^1.4.5",
-        "rimraf": "^5.0.5",
-        "sync-content": "^1.0.1",
-        "tap-parser": "17.0.0",
-        "tshy": "^1.16.1",
+        "resolve-import": "^2.0.0",
+        "rimraf": "^6.0.0",
+        "sync-content": "^2.0.1",
+        "tap-parser": "18.0.0",
+        "tshy": "^3.0.2",
         "typescript": "5.5",
-        "walk-up-path": "^3.0.1"
+        "walk-up-path": "^4.0.0"
       },
       "bin": {
         "generate-tap-test-class": "dist/esm/build.mjs"
       },
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       },
       "peerDependencies": {
-        "@tapjs/core": "3.0.3"
+        "@tapjs/core": "4.0.1"
       }
     },
-    "node_modules/@tapjs/test/node_modules/tshy": {
-      "version": "1.18.0",
-      "resolved": "https://registry.npmjs.org/tshy/-/tshy-1.18.0.tgz",
-      "integrity": "sha512-FQudIujBazHRu7CVPHKQE9/Xq1Wc7lezxD/FCnTXx2PTcnoSN32DVpb/ZXvzV2NJBTDB3XKjqX8Cdm+2UK1DlQ==",
+    "node_modules/@tapjs/test/node_modules/typescript": {
+      "version": "5.5.4",
+      "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz",
+      "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==",
       "dev": true,
-      "license": "BlueOak-1.0.0",
-      "dependencies": {
-        "chalk": "^5.3.0",
-        "chokidar": "^3.6.0",
-        "foreground-child": "^3.1.1",
-        "minimatch": "^9.0.4",
-        "mkdirp": "^3.0.1",
-        "polite-json": "^5.0.0",
-        "resolve-import": "^1.4.5",
-        "rimraf": "^5.0.1",
-        "sync-content": "^1.0.2",
-        "typescript": "5",
-        "walk-up-path": "^3.0.1"
-      },
+      "license": "Apache-2.0",
       "bin": {
-        "tshy": "dist/esm/index.js"
+        "tsc": "bin/tsc",
+        "tsserver": "bin/tsserver"
       },
       "engines": {
-        "node": "16 >=16.17 || 18 >=18.15.0 || >=20.6.1"
+        "node": ">=14.17"
       }
     },
     "node_modules/@tapjs/typescript": {
-      "version": "2.0.3",
-      "resolved": "https://registry.npmjs.org/@tapjs/typescript/-/typescript-2.0.3.tgz",
-      "integrity": "sha512-rakQwZtAcfOIrRxLV4H2ugseKLTHbjJfVwkMXQbhgmAHiwRazJwVyZTdAdL+IX9+SN1vimtWw/JImufMdgBTPg==",
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/@tapjs/typescript/-/typescript-3.1.0.tgz",
+      "integrity": "sha512-rucUjdT0bNyKneyzX0pwHD0QeKRKyGSf7ctYr/qfxpiXG50/BX9heksTj62CWFS9mc6bGGD/KahdRUarEL5yTw==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
         "@isaacs/ts-node-temp-fork-for-pr-2009": "^10.9.7"
       },
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       },
       "peerDependencies": {
-        "@tapjs/core": "3.0.3"
+        "@tapjs/core": "4.0.1"
       }
     },
     "node_modules/@tapjs/worker": {
-      "version": "3.0.3",
-      "resolved": "https://registry.npmjs.org/@tapjs/worker/-/worker-3.0.3.tgz",
-      "integrity": "sha512-Or8B0yyMRd8A6cvckTXitc9Dvw6um15sGCv2ICR4QZzTdahjlL2uiG+FUfIOd1oSSOM0E3aCVk53sGVVViEjuQ==",
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/@tapjs/worker/-/worker-4.0.1.tgz",
+      "integrity": "sha512-/vt26VFrrsKRqRzqFzdXtZkVnT3JT+xImRSgIwFXZ/0Gr8x88tmstPbDfPujSI1zXdaW1OLu2iib8UY3Uls9Cw==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       },
       "peerDependencies": {
-        "@tapjs/core": "3.0.3"
+        "@tapjs/core": "4.0.1"
       }
     },
     "node_modules/@tsconfig/node14": {
-      "version": "14.1.2",
-      "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-14.1.2.tgz",
-      "integrity": "sha512-1vncsbfCZ3TBLPxesRYz02Rn7SNJfbLoDVkcZ7F/ixOV6nwxwgdhD1mdPcc5YQ413qBJ8CvMxXMFfJ7oawjo7Q==",
+      "version": "14.1.4",
+      "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-14.1.4.tgz",
+      "integrity": "sha512-S5G+j19uQt/7wiXFqGapQ1cSYHlAoxYreObGkOmawAknegyUjx8EXngqy6vAitLHqCFu3rzluPlk77pWMD4n1Q==",
       "dev": true,
       "license": "MIT"
     },
     "node_modules/@tsconfig/node16": {
-      "version": "16.1.3",
-      "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-16.1.3.tgz",
-      "integrity": "sha512-9nTOUBn+EMKO6rtSZJk+DcqsfgtlERGT9XPJ5PRj/HNENPCBY1yu/JEj5wT6GLtbCLBO2k46SeXDaY0pjMqypw==",
+      "version": "16.1.4",
+      "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-16.1.4.tgz",
+      "integrity": "sha512-tkWPDtk18K2qJK/DhU010f03iDlw+C8qjXvhwZ4KKpJQC4QFOG3r8tIf2q6aWD0mz9N7RcZcaD9SPlrVLKiDoQ==",
       "dev": true,
       "license": "MIT"
     },
@@ -1405,9 +1557,9 @@
       "license": "MIT"
     },
     "node_modules/@tsconfig/node20": {
-      "version": "20.1.4",
-      "resolved": "https://registry.npmjs.org/@tsconfig/node20/-/node20-20.1.4.tgz",
-      "integrity": "sha512-sqgsT69YFeLWf5NtJ4Xq/xAF8p4ZQHlmGW74Nu2tD4+g5fAsposc4ZfaaPixVu4y01BEiDCWLRDCvDM5JOsRxg==",
+      "version": "20.1.6",
+      "resolved": "https://registry.npmjs.org/@tsconfig/node20/-/node20-20.1.6.tgz",
+      "integrity": "sha512-sz+Hqx9zwZDpZIV871WSbUzSqNIsXzghZydypnfgzPKLltVJfkINfUeTct31n/tTSa9ZE1ZOfKdRre1uHHquYQ==",
       "dev": true,
       "license": "MIT"
     },
@@ -1435,6 +1587,22 @@
         "node": "^16.14.0 || >=18.0.0"
       }
     },
+    "node_modules/@tufjs/models/node_modules/minimatch": {
+      "version": "9.0.5",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
+      "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "brace-expansion": "^2.0.1"
+      },
+      "engines": {
+        "node": ">=16 || 14 >=14.17"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      }
+    },
     "node_modules/@types/brace-expansion": {
       "version": "1.1.2",
       "resolved": "https://registry.npmjs.org/@types/brace-expansion/-/brace-expansion-1.1.2.tgz",
@@ -1460,19 +1628,19 @@
       "license": "MIT"
     },
     "node_modules/@types/node": {
-      "version": "20.14.10",
-      "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.10.tgz",
-      "integrity": "sha512-MdiXf+nDuMvY0gJKxyfZ7/6UFsETO7mGKF54MVD/ekJS6HdFtpZFBgrh6Pseu64XTb2MLyFPlbW6hj8HYRQNOQ==",
+      "version": "24.0.3",
+      "resolved": "https://registry.npmjs.org/@types/node/-/node-24.0.3.tgz",
+      "integrity": "sha512-R4I/kzCYAdRLzfiCabn9hxWfbuHS573x+r0dJMkkzThEa7pbrcDWK+9zu3e7aBOouf+rQAciqPFMnxwr0aWgKg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "undici-types": "~5.26.4"
+        "undici-types": "~7.8.0"
       }
     },
     "node_modules/@types/unist": {
-      "version": "3.0.2",
-      "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.2.tgz",
-      "integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==",
+      "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz",
+      "integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==",
       "dev": true,
       "license": "MIT"
     },
@@ -1487,9 +1655,9 @@
       }
     },
     "node_modules/acorn": {
-      "version": "8.12.1",
-      "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz",
-      "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==",
+      "version": "8.15.0",
+      "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
+      "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
       "dev": true,
       "license": "MIT",
       "bin": {
@@ -1500,9 +1668,9 @@
       }
     },
     "node_modules/acorn-walk": {
-      "version": "8.3.3",
-      "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz",
-      "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==",
+      "version": "8.3.4",
+      "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz",
+      "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
@@ -1513,14 +1681,11 @@
       }
     },
     "node_modules/agent-base": {
-      "version": "7.1.1",
-      "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz",
-      "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==",
+      "version": "7.1.3",
+      "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz",
+      "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==",
       "dev": true,
       "license": "MIT",
-      "dependencies": {
-        "debug": "^4.3.4"
-      },
       "engines": {
         "node": ">= 14"
       }
@@ -1566,9 +1731,9 @@
       }
     },
     "node_modules/ansi-regex": {
-      "version": "6.0.1",
-      "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
-      "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
+      "version": "6.1.0",
+      "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz",
+      "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==",
       "dev": true,
       "license": "MIT",
       "engines": {
@@ -1646,6 +1811,7 @@
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
       "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+      "dev": true,
       "license": "MIT"
     },
     "node_modules/binary-extensions": {
@@ -1662,9 +1828,10 @@
       }
     },
     "node_modules/brace-expansion": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
-      "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
+      "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
+      "dev": true,
       "license": "MIT",
       "dependencies": {
         "balanced-match": "^1.0.0"
@@ -1684,13 +1851,13 @@
       }
     },
     "node_modules/c8": {
-      "version": "10.1.2",
-      "resolved": "https://registry.npmjs.org/c8/-/c8-10.1.2.tgz",
-      "integrity": "sha512-Qr6rj76eSshu5CgRYvktW0uM0CFY0yi4Fd5D0duDXO6sYinyopmftUiJVuzBQxQcwQLor7JWDVRP+dUfCmzgJw==",
+      "version": "10.1.3",
+      "resolved": "https://registry.npmjs.org/c8/-/c8-10.1.3.tgz",
+      "integrity": "sha512-LvcyrOAaOnrrlMpW22n690PUvxiq4Uf9WMhQwNJ9vgagkL/ph1+D4uvjvDA5XCbykrc0sx+ay6pVi9YZ1GnhyA==",
       "dev": true,
       "license": "ISC",
       "dependencies": {
-        "@bcoe/v8-coverage": "^0.2.3",
+        "@bcoe/v8-coverage": "^1.0.1",
         "@istanbuljs/schema": "^0.1.3",
         "find-up": "^5.0.0",
         "foreground-child": "^3.1.1",
@@ -1741,10 +1908,80 @@
         "node": "^16.14.0 || >=18.0.0"
       }
     },
+    "node_modules/cacache/node_modules/glob": {
+      "version": "10.4.5",
+      "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz",
+      "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "foreground-child": "^3.1.0",
+        "jackspeak": "^3.1.2",
+        "minimatch": "^9.0.4",
+        "minipass": "^7.1.2",
+        "package-json-from-dist": "^1.0.0",
+        "path-scurry": "^1.11.1"
+      },
+      "bin": {
+        "glob": "dist/esm/bin.mjs"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      }
+    },
+    "node_modules/cacache/node_modules/jackspeak": {
+      "version": "3.4.3",
+      "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz",
+      "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==",
+      "dev": true,
+      "license": "BlueOak-1.0.0",
+      "dependencies": {
+        "@isaacs/cliui": "^8.0.2"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      },
+      "optionalDependencies": {
+        "@pkgjs/parseargs": "^0.11.0"
+      }
+    },
+    "node_modules/cacache/node_modules/minimatch": {
+      "version": "9.0.5",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
+      "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "brace-expansion": "^2.0.1"
+      },
+      "engines": {
+        "node": ">=16 || 14 >=14.17"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      }
+    },
+    "node_modules/cacache/node_modules/path-scurry": {
+      "version": "1.11.1",
+      "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz",
+      "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==",
+      "dev": true,
+      "license": "BlueOak-1.0.0",
+      "dependencies": {
+        "lru-cache": "^10.2.0",
+        "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
+      },
+      "engines": {
+        "node": ">=16 || 14 >=14.18"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      }
+    },
     "node_modules/chalk": {
-      "version": "5.3.0",
-      "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz",
-      "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==",
+      "version": "5.4.1",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz",
+      "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==",
       "dev": true,
       "license": "MIT",
       "engines": {
@@ -2017,9 +2254,9 @@
       }
     },
     "node_modules/cross-spawn": {
-      "version": "7.0.3",
-      "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
-      "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
+      "version": "7.0.6",
+      "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
+      "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
@@ -2055,13 +2292,13 @@
       }
     },
     "node_modules/debug": {
-      "version": "4.3.5",
-      "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz",
-      "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==",
+      "version": "4.4.1",
+      "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz",
+      "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "ms": "2.1.2"
+        "ms": "^2.1.3"
       },
       "engines": {
         "node": ">=6.0"
@@ -2072,13 +2309,6 @@
         }
       }
     },
-    "node_modules/debug/node_modules/ms": {
-      "version": "2.1.2",
-      "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
-      "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
-      "dev": true,
-      "license": "MIT"
-    },
     "node_modules/diff": {
       "version": "5.2.0",
       "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz",
@@ -2097,9 +2327,9 @@
       "license": "MIT"
     },
     "node_modules/emoji-regex": {
-      "version": "10.3.0",
-      "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz",
-      "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==",
+      "version": "10.4.0",
+      "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz",
+      "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==",
       "dev": true,
       "license": "MIT"
     },
@@ -2157,10 +2387,21 @@
       "dev": true,
       "license": "MIT"
     },
+    "node_modules/es-toolkit": {
+      "version": "1.39.4",
+      "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.39.4.tgz",
+      "integrity": "sha512-hHqQ0yJERMNrJUyYHnf02qDuIxjRnnJlx1CFdR9Ia6tw6jPA7kXmb+tWzc7trJDHwMsc393hZ/m2XMxYXGAfqQ==",
+      "dev": true,
+      "license": "MIT",
+      "workspaces": [
+        "docs",
+        "benchmarks"
+      ]
+    },
     "node_modules/esbuild": {
-      "version": "0.23.0",
-      "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.0.tgz",
-      "integrity": "sha512-1lvV17H2bMYda/WaFb2jLPeHU3zml2k4/yagNMG8Q/YtfMjCwEUZa2eXXMgZTVSL5q1n4H7sQ0X6CdJDqqeCFA==",
+      "version": "0.25.5",
+      "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.5.tgz",
+      "integrity": "sha512-P8OtKZRv/5J5hhz0cUAdu/cLuPIKXpQl1R9pZtvmHWQvrAUVd0UNIPT4IB4W3rNOqVO0rlqHmCIbSwxh/c9yUQ==",
       "dev": true,
       "hasInstallScript": true,
       "license": "MIT",
@@ -2171,36 +2412,37 @@
         "node": ">=18"
       },
       "optionalDependencies": {
-        "@esbuild/aix-ppc64": "0.23.0",
-        "@esbuild/android-arm": "0.23.0",
-        "@esbuild/android-arm64": "0.23.0",
-        "@esbuild/android-x64": "0.23.0",
-        "@esbuild/darwin-arm64": "0.23.0",
-        "@esbuild/darwin-x64": "0.23.0",
-        "@esbuild/freebsd-arm64": "0.23.0",
-        "@esbuild/freebsd-x64": "0.23.0",
-        "@esbuild/linux-arm": "0.23.0",
-        "@esbuild/linux-arm64": "0.23.0",
-        "@esbuild/linux-ia32": "0.23.0",
-        "@esbuild/linux-loong64": "0.23.0",
-        "@esbuild/linux-mips64el": "0.23.0",
-        "@esbuild/linux-ppc64": "0.23.0",
-        "@esbuild/linux-riscv64": "0.23.0",
-        "@esbuild/linux-s390x": "0.23.0",
-        "@esbuild/linux-x64": "0.23.0",
-        "@esbuild/netbsd-x64": "0.23.0",
-        "@esbuild/openbsd-arm64": "0.23.0",
-        "@esbuild/openbsd-x64": "0.23.0",
-        "@esbuild/sunos-x64": "0.23.0",
-        "@esbuild/win32-arm64": "0.23.0",
-        "@esbuild/win32-ia32": "0.23.0",
-        "@esbuild/win32-x64": "0.23.0"
+        "@esbuild/aix-ppc64": "0.25.5",
+        "@esbuild/android-arm": "0.25.5",
+        "@esbuild/android-arm64": "0.25.5",
+        "@esbuild/android-x64": "0.25.5",
+        "@esbuild/darwin-arm64": "0.25.5",
+        "@esbuild/darwin-x64": "0.25.5",
+        "@esbuild/freebsd-arm64": "0.25.5",
+        "@esbuild/freebsd-x64": "0.25.5",
+        "@esbuild/linux-arm": "0.25.5",
+        "@esbuild/linux-arm64": "0.25.5",
+        "@esbuild/linux-ia32": "0.25.5",
+        "@esbuild/linux-loong64": "0.25.5",
+        "@esbuild/linux-mips64el": "0.25.5",
+        "@esbuild/linux-ppc64": "0.25.5",
+        "@esbuild/linux-riscv64": "0.25.5",
+        "@esbuild/linux-s390x": "0.25.5",
+        "@esbuild/linux-x64": "0.25.5",
+        "@esbuild/netbsd-arm64": "0.25.5",
+        "@esbuild/netbsd-x64": "0.25.5",
+        "@esbuild/openbsd-arm64": "0.25.5",
+        "@esbuild/openbsd-x64": "0.25.5",
+        "@esbuild/sunos-x64": "0.25.5",
+        "@esbuild/win32-arm64": "0.25.5",
+        "@esbuild/win32-ia32": "0.25.5",
+        "@esbuild/win32-x64": "0.25.5"
       }
     },
     "node_modules/escalade": {
-      "version": "3.1.2",
-      "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz",
-      "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==",
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
+      "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",
       "dev": true,
       "license": "MIT",
       "engines": {
@@ -2228,9 +2470,9 @@
       }
     },
     "node_modules/exponential-backoff": {
-      "version": "3.1.1",
-      "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz",
-      "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==",
+      "version": "3.1.2",
+      "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.2.tgz",
+      "integrity": "sha512-8QxYTVXUkuy7fIIoitQkPwGonB8F3Zj8eEO8Sqg9Zv/bkI7RJAzowee4gr81Hak/dUTpA2Z7VfQgoijjPNlUZA==",
       "dev": true,
       "license": "Apache-2.0"
     },
@@ -2265,13 +2507,13 @@
       }
     },
     "node_modules/foreground-child": {
-      "version": "3.2.1",
-      "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz",
-      "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==",
+      "version": "3.3.1",
+      "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz",
+      "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==",
       "dev": true,
       "license": "ISC",
       "dependencies": {
-        "cross-spawn": "^7.0.0",
+        "cross-spawn": "^7.0.6",
         "signal-exit": "^4.0.1"
       },
       "engines": {
@@ -2348,9 +2590,9 @@
       }
     },
     "node_modules/get-east-asian-width": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz",
-      "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==",
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz",
+      "integrity": "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==",
       "dev": true,
       "license": "MIT",
       "engines": {
@@ -2361,22 +2603,25 @@
       }
     },
     "node_modules/glob": {
-      "version": "10.4.5",
-      "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz",
-      "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==",
+      "version": "11.0.3",
+      "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.3.tgz",
+      "integrity": "sha512-2Nim7dha1KVkaiF4q6Dj+ngPPMdfvLJEOpZk/jKiUAkqKebpGAWQXAq9z1xu9HKu5lWfqw/FASuccEjyznjPaA==",
       "dev": true,
       "license": "ISC",
       "dependencies": {
-        "foreground-child": "^3.1.0",
-        "jackspeak": "^3.1.2",
-        "minimatch": "^9.0.4",
+        "foreground-child": "^3.3.1",
+        "jackspeak": "^4.1.1",
+        "minimatch": "^10.0.3",
         "minipass": "^7.1.2",
         "package-json-from-dist": "^1.0.0",
-        "path-scurry": "^1.11.1"
+        "path-scurry": "^2.0.0"
       },
       "bin": {
         "glob": "dist/esm/bin.mjs"
       },
+      "engines": {
+        "node": "20 || >=22"
+      },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
       }
@@ -2432,9 +2677,9 @@
       "license": "MIT"
     },
     "node_modules/http-cache-semantics": {
-      "version": "4.1.1",
-      "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz",
-      "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==",
+      "version": "4.2.0",
+      "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz",
+      "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==",
       "dev": true,
       "license": "BSD-2-Clause"
     },
@@ -2453,13 +2698,13 @@
       }
     },
     "node_modules/https-proxy-agent": {
-      "version": "7.0.5",
-      "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz",
-      "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==",
+      "version": "7.0.6",
+      "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz",
+      "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "agent-base": "^7.0.2",
+        "agent-base": "^7.1.2",
         "debug": "4"
       },
       "engines": {
@@ -2493,6 +2738,22 @@
         "node": "^14.17.0 || ^16.13.0 || >=18.0.0"
       }
     },
+    "node_modules/ignore-walk/node_modules/minimatch": {
+      "version": "9.0.5",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
+      "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "brace-expansion": "^2.0.1"
+      },
+      "engines": {
+        "node": ">=16 || 14 >=14.17"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      }
+    },
     "node_modules/imurmurhash": {
       "version": "0.1.4",
       "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
@@ -2527,9 +2788,9 @@
       }
     },
     "node_modules/ink": {
-      "version": "5.0.1",
-      "resolved": "https://registry.npmjs.org/ink/-/ink-5.0.1.tgz",
-      "integrity": "sha512-ae4AW/t8jlkj/6Ou21H2av0wxTk8vrGzXv+v2v7j4in+bl1M5XRMVbfNghzhBokV++FjF8RBDJvYo+ttR9YVRg==",
+      "version": "5.2.1",
+      "resolved": "https://registry.npmjs.org/ink/-/ink-5.2.1.tgz",
+      "integrity": "sha512-BqcUyWrG9zq5HIwW6JcfFHsIYebJkWWb4fczNah1goUO0vv5vneIlfwuS85twyJ5hYR/y18FlAYUxrO9ChIWVg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
@@ -2542,21 +2803,21 @@
         "cli-cursor": "^4.0.0",
         "cli-truncate": "^4.0.0",
         "code-excerpt": "^4.0.0",
+        "es-toolkit": "^1.22.0",
         "indent-string": "^5.0.0",
-        "is-in-ci": "^0.1.0",
-        "lodash": "^4.17.21",
+        "is-in-ci": "^1.0.0",
         "patch-console": "^2.0.0",
         "react-reconciler": "^0.29.0",
         "scheduler": "^0.23.0",
         "signal-exit": "^3.0.7",
         "slice-ansi": "^7.1.0",
         "stack-utils": "^2.0.6",
-        "string-width": "^7.0.0",
-        "type-fest": "^4.8.3",
+        "string-width": "^7.2.0",
+        "type-fest": "^4.27.0",
         "widest-line": "^5.0.0",
         "wrap-ansi": "^9.0.0",
-        "ws": "^8.15.0",
-        "yoga-wasm-web": "~0.3.3"
+        "ws": "^8.18.0",
+        "yoga-layout": "~3.2.1"
       },
       "engines": {
         "node": ">=18"
@@ -2653,9 +2914,9 @@
       }
     },
     "node_modules/is-in-ci": {
-      "version": "0.1.0",
-      "resolved": "https://registry.npmjs.org/is-in-ci/-/is-in-ci-0.1.0.tgz",
-      "integrity": "sha512-d9PXLEY0v1iJ64xLiQMJ51J128EYHAaOR4yZqQi8aHGfw6KgifM3/Viw1oZZ1GCVmb3gBuyhLyHj0HgR2DhSXQ==",
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-in-ci/-/is-in-ci-1.0.0.tgz",
+      "integrity": "sha512-eUuAjybVTHMYWm/U+vBO1sY/JOCgoPCXRxzdju0K+K0BiGW0SChEL1MLC0PoCIR1OlPo5YAp8HuQoUlsWEICwg==",
       "dev": true,
       "license": "MIT",
       "bin": {
@@ -2745,19 +3006,19 @@
       }
     },
     "node_modules/jackspeak": {
-      "version": "3.4.3",
-      "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz",
-      "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==",
+      "version": "4.1.1",
+      "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.1.1.tgz",
+      "integrity": "sha512-zptv57P3GpL+O0I7VdMJNBZCu+BPHVQUk55Ft8/QCJjTVxrnJHuVuX/0Bl2A6/+2oyR/ZMEuFKwmzqqZ/U5nPQ==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
         "@isaacs/cliui": "^8.0.2"
       },
+      "engines": {
+        "node": "20 || >=22"
+      },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
-      },
-      "optionalDependencies": {
-        "@pkgjs/parseargs": "^0.11.0"
       }
     },
     "node_modules/js-tokens": {
@@ -2820,13 +3081,6 @@
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/lodash": {
-      "version": "4.17.21",
-      "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
-      "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
-      "dev": true,
-      "license": "MIT"
-    },
     "node_modules/loose-envify": {
       "version": "1.4.0",
       "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
@@ -2937,16 +3191,16 @@
       }
     },
     "node_modules/minimatch": {
-      "version": "9.0.5",
-      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
-      "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
+      "version": "10.0.3",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.3.tgz",
+      "integrity": "sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw==",
       "dev": true,
       "license": "ISC",
       "dependencies": {
-        "brace-expansion": "^2.0.1"
+        "@isaacs/brace-expansion": "^5.0.0"
       },
       "engines": {
-        "node": ">=16 || 14 >=14.17"
+        "node": "20 || >=22"
       },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
@@ -3122,9 +3376,9 @@
       "license": "MIT"
     },
     "node_modules/negotiator": {
-      "version": "0.6.3",
-      "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
-      "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
+      "version": "0.6.4",
+      "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz",
+      "integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==",
       "dev": true,
       "license": "MIT",
       "engines": {
@@ -3132,9 +3386,9 @@
       }
     },
     "node_modules/node-gyp": {
-      "version": "10.2.0",
-      "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-10.2.0.tgz",
-      "integrity": "sha512-sp3FonBAaFe4aYTcFdZUn2NYkbP7xroPGYvQmP4Nl5PxamznItBnNCgjrVTKrEfQynInMsJvZrdmqUnysCJ8rw==",
+      "version": "10.3.1",
+      "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-10.3.1.tgz",
+      "integrity": "sha512-Pp3nFHBThHzVtNY7U6JfPjvT/DTE8+o/4xKsLQtBoU+j2HLsGlhcfzflAoUreaJbNmYnX+LlLi0qjV8kpyO6xQ==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
@@ -3156,6 +3410,76 @@
         "node": "^16.14.0 || >=18.0.0"
       }
     },
+    "node_modules/node-gyp/node_modules/glob": {
+      "version": "10.4.5",
+      "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz",
+      "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "foreground-child": "^3.1.0",
+        "jackspeak": "^3.1.2",
+        "minimatch": "^9.0.4",
+        "minipass": "^7.1.2",
+        "package-json-from-dist": "^1.0.0",
+        "path-scurry": "^1.11.1"
+      },
+      "bin": {
+        "glob": "dist/esm/bin.mjs"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      }
+    },
+    "node_modules/node-gyp/node_modules/jackspeak": {
+      "version": "3.4.3",
+      "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz",
+      "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==",
+      "dev": true,
+      "license": "BlueOak-1.0.0",
+      "dependencies": {
+        "@isaacs/cliui": "^8.0.2"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      },
+      "optionalDependencies": {
+        "@pkgjs/parseargs": "^0.11.0"
+      }
+    },
+    "node_modules/node-gyp/node_modules/minimatch": {
+      "version": "9.0.5",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
+      "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "brace-expansion": "^2.0.1"
+      },
+      "engines": {
+        "node": ">=16 || 14 >=14.17"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      }
+    },
+    "node_modules/node-gyp/node_modules/path-scurry": {
+      "version": "1.11.1",
+      "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz",
+      "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==",
+      "dev": true,
+      "license": "BlueOak-1.0.0",
+      "dependencies": {
+        "lru-cache": "^10.2.0",
+        "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
+      },
+      "engines": {
+        "node": ">=16 || 14 >=14.18"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      }
+    },
     "node_modules/nopt": {
       "version": "7.2.1",
       "resolved": "https://registry.npmjs.org/nopt/-/nopt-7.2.1.tgz",
@@ -3234,9 +3558,9 @@
       }
     },
     "node_modules/npm-package-arg": {
-      "version": "11.0.2",
-      "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-11.0.2.tgz",
-      "integrity": "sha512-IGN0IAwmhDJwy13Wc8k+4PEbTPhpJnMtfR53ZbOyjkvmEcLS4nCwp6mvMWjS5sUjeiW3mpx6cHmuhKEu9XmcQw==",
+      "version": "11.0.3",
+      "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-11.0.3.tgz",
+      "integrity": "sha512-sHGJy8sOC1YraBywpzQlIKBE4pBbGbiF95U6Auspzyem956E0+FtDtsx1ZxlOJkQCZ1AFXAY/yuvtFYrOxF+Bw==",
       "dev": true,
       "license": "ISC",
       "dependencies": {
@@ -3373,9 +3697,9 @@
       }
     },
     "node_modules/package-json-from-dist": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz",
-      "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==",
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz",
+      "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",
       "dev": true,
       "license": "BlueOak-1.0.0"
     },
@@ -3442,22 +3766,32 @@
       }
     },
     "node_modules/path-scurry": {
-      "version": "1.11.1",
-      "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz",
-      "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==",
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz",
+      "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
-        "lru-cache": "^10.2.0",
-        "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
+        "lru-cache": "^11.0.0",
+        "minipass": "^7.1.2"
       },
       "engines": {
-        "node": ">=16 || 14 >=14.18"
+        "node": "20 || >=22"
       },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
       }
     },
+    "node_modules/path-scurry/node_modules/lru-cache": {
+      "version": "11.1.0",
+      "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.1.0.tgz",
+      "integrity": "sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A==",
+      "dev": true,
+      "license": "ISC",
+      "engines": {
+        "node": "20 || >=22"
+      }
+    },
     "node_modules/picomatch": {
       "version": "2.3.1",
       "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
@@ -3472,9 +3806,9 @@
       }
     },
     "node_modules/pirates": {
-      "version": "4.0.6",
-      "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz",
-      "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==",
+      "version": "4.0.7",
+      "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz",
+      "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==",
       "dev": true,
       "license": "MIT",
       "engines": {
@@ -3495,9 +3829,9 @@
       }
     },
     "node_modules/prettier": {
-      "version": "3.3.3",
-      "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz",
-      "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==",
+      "version": "3.5.3",
+      "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz",
+      "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==",
       "dev": true,
       "license": "MIT",
       "bin": {
@@ -3511,9 +3845,9 @@
       }
     },
     "node_modules/prismjs": {
-      "version": "1.29.0",
-      "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.29.0.tgz",
-      "integrity": "sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==",
+      "version": "1.30.0",
+      "resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.30.0.tgz",
+      "integrity": "sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==",
       "dev": true,
       "license": "MIT",
       "engines": {
@@ -3549,9 +3883,9 @@
       }
     },
     "node_modules/process-on-spawn": {
-      "version": "1.0.0",
-      "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz",
-      "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==",
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.1.0.tgz",
+      "integrity": "sha512-JOnOPQ/8TZgjs1JIH/m9ni7FfimjNa/PRx7y/Wb5qdItsnhO0jE4AT7fC0HjC28DUQWDr50dwSYZLdRMlqDq3Q==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
@@ -3684,17 +4018,17 @@
       }
     },
     "node_modules/resolve-import": {
-      "version": "1.4.6",
-      "resolved": "https://registry.npmjs.org/resolve-import/-/resolve-import-1.4.6.tgz",
-      "integrity": "sha512-CIw9e64QcKcCFUj9+KxUCJPy8hYofv6eVfo3U9wdhCm2E4IjvFnZ6G4/yIC4yP3f11+h6uU5b3LdS7O64LgqrA==",
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/resolve-import/-/resolve-import-2.0.0.tgz",
+      "integrity": "sha512-jpKjLibLuc8D1XEV2+7zb0aqN7I8d12u89g/v6IsgCzdVlccMQJq4TKkPw5fbhHdxhm7nbVtN+KvOTnjFf+nEA==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
-        "glob": "^10.3.3",
-        "walk-up-path": "^3.0.1"
+        "glob": "^11.0.0",
+        "walk-up-path": "^4.0.0"
       },
       "engines": {
-        "node": "16 >=16.17.0 || 18 >= 18.6.0 || >=20"
+        "node": "20 || >=22"
       },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
@@ -3735,19 +4069,20 @@
       }
     },
     "node_modules/rimraf": {
-      "version": "5.0.9",
-      "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.9.tgz",
-      "integrity": "sha512-3i7b8OcswU6CpU8Ej89quJD4O98id7TtVM5U4Mybh84zQXdrFmDLouWBEEaD/QfO3gDDfH+AGFCGsR7kngzQnA==",
+      "version": "6.0.1",
+      "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.0.1.tgz",
+      "integrity": "sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==",
       "dev": true,
       "license": "ISC",
       "dependencies": {
-        "glob": "^10.3.7"
+        "glob": "^11.0.0",
+        "package-json-from-dist": "^1.0.0"
       },
       "bin": {
         "rimraf": "dist/esm/bin.mjs"
       },
       "engines": {
-        "node": "14 >=14.20 || 16 >=16.20 || >=18"
+        "node": "20 || >=22"
       },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
@@ -3772,9 +4107,9 @@
       }
     },
     "node_modules/semver": {
-      "version": "7.6.2",
-      "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz",
-      "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==",
+      "version": "7.7.2",
+      "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz",
+      "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==",
       "dev": true,
       "license": "ISC",
       "bin": {
@@ -3807,17 +4142,6 @@
         "node": ">=8"
       }
     },
-    "node_modules/shiki": {
-      "version": "1.10.3",
-      "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.10.3.tgz",
-      "integrity": "sha512-eneCLncGuvPdTutJuLyUGS8QNPAVFO5Trvld2wgEq1e002mwctAhJKeMGWtWVXOIEzmlcLRqcgPSorR6AVzOmQ==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "@shikijs/core": "1.10.3",
-        "@types/hast": "^3.0.4"
-      }
-    },
     "node_modules/signal-exit": {
       "version": "4.1.0",
       "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz",
@@ -3894,9 +4218,9 @@
       }
     },
     "node_modules/socks": {
-      "version": "2.8.3",
-      "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz",
-      "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==",
+      "version": "2.8.5",
+      "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.5.tgz",
+      "integrity": "sha512-iF+tNDQla22geJdTyJB1wM/qrX9DMRwWrciEPwWLPRWAUEM8sQiyxgckLxWT1f7+9VabJS0jTGGr4QgBuvi6Ww==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
@@ -3909,13 +4233,13 @@
       }
     },
     "node_modules/socks-proxy-agent": {
-      "version": "8.0.4",
-      "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.4.tgz",
-      "integrity": "sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==",
+      "version": "8.0.5",
+      "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.5.tgz",
+      "integrity": "sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "agent-base": "^7.1.1",
+        "agent-base": "^7.1.2",
         "debug": "^4.3.4",
         "socks": "^2.8.3"
       },
@@ -3953,9 +4277,9 @@
       }
     },
     "node_modules/spdx-license-ids": {
-      "version": "3.0.18",
-      "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz",
-      "integrity": "sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==",
+      "version": "3.0.21",
+      "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.21.tgz",
+      "integrity": "sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==",
       "dev": true,
       "license": "CC0-1.0"
     },
@@ -4136,94 +4460,95 @@
       }
     },
     "node_modules/sync-content": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/sync-content/-/sync-content-1.0.2.tgz",
-      "integrity": "sha512-znd3rYiiSxU3WteWyS9a6FXkTA/Wjk8WQsOyzHbineeL837dLn3DA4MRhsIX3qGcxDMH6+uuFV4axztssk7wEQ==",
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/sync-content/-/sync-content-2.0.1.tgz",
+      "integrity": "sha512-NI1mo514yFhr8pV/5Etvgh+pSBUIpoAKoiBIUwALVlQQNAwb40bTw8hhPFaip/dvv0GhpHVOq0vq8iY02ppLTg==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
-        "glob": "^10.2.6",
+        "glob": "^11.0.0",
         "mkdirp": "^3.0.1",
-        "path-scurry": "^1.9.2",
-        "rimraf": "^5.0.1"
+        "path-scurry": "^2.0.0",
+        "rimraf": "^6.0.0",
+        "tshy": "^3.0.0"
       },
       "bin": {
-        "sync-content": "dist/mjs/bin.mjs"
+        "sync-content": "dist/esm/bin.mjs"
       },
       "engines": {
-        "node": ">=14"
+        "node": "20 || >=22"
       },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
       }
     },
     "node_modules/tap": {
-      "version": "20.0.3",
-      "resolved": "https://registry.npmjs.org/tap/-/tap-20.0.3.tgz",
-      "integrity": "sha512-1D9pFte9MvmBsDxtCMYaWF7qtJj848lyFkhtLef945c1MEK8i8o/pwaU1cZzhK5DCfQihhDaCPahyBwnCAEMJQ==",
+      "version": "21.1.0",
+      "resolved": "https://registry.npmjs.org/tap/-/tap-21.1.0.tgz",
+      "integrity": "sha512-O01H/+6SOB8Fai2eehPjOLpQamG/lCkBe+eTq7aNQbIxF8BzZMTc77iyaWM+q5PP/rU2pQ+nc5jyySybwbv6ZA==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
-        "@tapjs/after": "2.0.3",
-        "@tapjs/after-each": "3.0.3",
-        "@tapjs/asserts": "3.0.3",
-        "@tapjs/before": "3.0.3",
-        "@tapjs/before-each": "3.0.3",
-        "@tapjs/chdir": "2.0.3",
-        "@tapjs/core": "3.0.3",
-        "@tapjs/filter": "3.0.3",
-        "@tapjs/fixture": "3.0.3",
-        "@tapjs/intercept": "3.0.3",
-        "@tapjs/mock": "3.0.3",
-        "@tapjs/node-serialize": "3.0.3",
-        "@tapjs/run": "3.0.3",
-        "@tapjs/snapshot": "3.0.3",
-        "@tapjs/spawn": "3.0.3",
-        "@tapjs/stdin": "3.0.3",
-        "@tapjs/test": "3.0.3",
-        "@tapjs/typescript": "2.0.3",
-        "@tapjs/worker": "3.0.3",
-        "resolve-import": "^1.4.5"
+        "@tapjs/after": "3.0.1",
+        "@tapjs/after-each": "4.0.1",
+        "@tapjs/asserts": "4.0.1",
+        "@tapjs/before": "4.0.1",
+        "@tapjs/before-each": "4.0.1",
+        "@tapjs/chdir": "3.0.1",
+        "@tapjs/core": "4.0.1",
+        "@tapjs/filter": "4.0.1",
+        "@tapjs/fixture": "4.0.1",
+        "@tapjs/intercept": "4.0.1",
+        "@tapjs/mock": "4.0.1",
+        "@tapjs/node-serialize": "4.0.1",
+        "@tapjs/run": "4.0.2",
+        "@tapjs/snapshot": "4.0.1",
+        "@tapjs/spawn": "4.0.1",
+        "@tapjs/stdin": "4.0.1",
+        "@tapjs/test": "4.0.1",
+        "@tapjs/typescript": "3.1.0",
+        "@tapjs/worker": "4.0.1",
+        "resolve-import": "2"
       },
       "bin": {
         "tap": "dist/esm/run.mjs"
       },
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
       }
     },
     "node_modules/tap-parser": {
-      "version": "17.0.0",
-      "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-17.0.0.tgz",
-      "integrity": "sha512-Na7kB4ML7T77abJtYIlXh/aJcz54Azv0iAtOaDnLqsL4uWjU40uNFIFnZ5IvnGTuCIk5M6vjx7ZsceNGc1mcag==",
+      "version": "18.0.0",
+      "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-18.0.0.tgz",
+      "integrity": "sha512-RM3Lp5LNCYcepRqPMuDFg8S3uYV8MDmgxUOjx2Q7f2z5QuB88u92ViBwyp3MuQ/DVMR7v48HrJfV2scXRQYf5A==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
         "events-to-array": "^2.0.3",
-        "tap-yaml": "3.0.0"
+        "tap-yaml": "4.0.0"
       },
       "bin": {
         "tap-parser": "bin/cmd.cjs"
       },
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       }
     },
     "node_modules/tap-yaml": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/tap-yaml/-/tap-yaml-3.0.0.tgz",
-      "integrity": "sha512-qtbgXJqE9xdWqlE520y+vG4c1lgqWrDHN7Y2YcrV1XudLuc2Y5aMXhAyPBGl57h8MNoprvL/mAJiISUIadvS9w==",
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/tap-yaml/-/tap-yaml-4.0.0.tgz",
+      "integrity": "sha512-CjMbq8hhT5TvzyvHRnzbGp00wmb4TZjSscCRCCJCdCzRb+Pb56HaMlBHNBn1/GZ6UqwUgDKdF18+9VAFnQ4F0g==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
         "yaml": "^2.4.1",
-        "yaml-types": "^0.3.0"
+        "yaml-types": "^0.4.0"
       },
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       }
     },
     "node_modules/tar": {
@@ -4294,9 +4619,9 @@
       }
     },
     "node_modules/tcompare": {
-      "version": "8.0.0",
-      "resolved": "https://registry.npmjs.org/tcompare/-/tcompare-8.0.0.tgz",
-      "integrity": "sha512-sKu3LKg6WM6/pVmhPL/kTlXZKksQkKAhoqQ6JEtJ3FNY0BJ0H37M5zPcU5QcMkRUm4im9vppda0PyWzSCfgCig==",
+      "version": "9.0.0",
+      "resolved": "https://registry.npmjs.org/tcompare/-/tcompare-9.0.0.tgz",
+      "integrity": "sha512-qOliew2xDAqIUbIamIFZ+pz80s9T+8IywzQPIt7YX30ojsBqk86jcD6ouygqt5lHURTxFxWjzbUmIe7Cts4bsA==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
@@ -4304,7 +4629,7 @@
         "react-element-to-jsx-string": "^15.0.0"
       },
       "engines": {
-        "node": ">= 18.6.0"
+        "node": "20 || >=22"
       }
     },
     "node_modules/test-exclude": {
@@ -4322,6 +4647,76 @@
         "node": ">=18"
       }
     },
+    "node_modules/test-exclude/node_modules/glob": {
+      "version": "10.4.5",
+      "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz",
+      "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "foreground-child": "^3.1.0",
+        "jackspeak": "^3.1.2",
+        "minimatch": "^9.0.4",
+        "minipass": "^7.1.2",
+        "package-json-from-dist": "^1.0.0",
+        "path-scurry": "^1.11.1"
+      },
+      "bin": {
+        "glob": "dist/esm/bin.mjs"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      }
+    },
+    "node_modules/test-exclude/node_modules/jackspeak": {
+      "version": "3.4.3",
+      "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz",
+      "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==",
+      "dev": true,
+      "license": "BlueOak-1.0.0",
+      "dependencies": {
+        "@isaacs/cliui": "^8.0.2"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      },
+      "optionalDependencies": {
+        "@pkgjs/parseargs": "^0.11.0"
+      }
+    },
+    "node_modules/test-exclude/node_modules/minimatch": {
+      "version": "9.0.5",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
+      "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "brace-expansion": "^2.0.1"
+      },
+      "engines": {
+        "node": ">=16 || 14 >=14.17"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      }
+    },
+    "node_modules/test-exclude/node_modules/path-scurry": {
+      "version": "1.11.1",
+      "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz",
+      "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==",
+      "dev": true,
+      "license": "BlueOak-1.0.0",
+      "dependencies": {
+        "lru-cache": "^10.2.0",
+        "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
+      },
+      "engines": {
+        "node": ">=16 || 14 >=14.18"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
+      }
+    },
     "node_modules/to-regex-range": {
       "version": "5.0.1",
       "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
@@ -4346,29 +4741,29 @@
       }
     },
     "node_modules/tshy": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/tshy/-/tshy-2.0.1.tgz",
-      "integrity": "sha512-U5fC+3pMaGfmULhPTVpxKMd62AcX13yfsFrjhAP/daTLG6LFRLIuxqYOmkejJ4MT/s5bEa29+1Jy/9mXkMiMfA==",
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/tshy/-/tshy-3.0.2.tgz",
+      "integrity": "sha512-8GkWnAfmNXxl8iDTZ1o2H4jdaj9H7HeDKkr5qd0ZhQBCNA41D3xqTyg2Ycs51VCfmjJ5e+0v9AUmD6ylAI9Bgw==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
         "chalk": "^5.3.0",
         "chokidar": "^3.6.0",
         "foreground-child": "^3.1.1",
-        "minimatch": "^9.0.4",
+        "minimatch": "^10.0.0",
         "mkdirp": "^3.0.1",
         "polite-json": "^5.0.0",
-        "resolve-import": "^1.4.5",
-        "rimraf": "^5.0.1",
-        "sync-content": "^1.0.2",
-        "typescript": "5",
-        "walk-up-path": "^3.0.1"
+        "resolve-import": "^2.0.0",
+        "rimraf": "^6.0.0",
+        "sync-content": "^2.0.1",
+        "typescript": "^5.5.3",
+        "walk-up-path": "^4.0.0"
       },
       "bin": {
         "tshy": "dist/esm/index.js"
       },
       "engines": {
-        "node": "16 >=16.17 || 18 >=18.15.0 || >=20.6.1"
+        "node": "20 || >=22"
       }
     },
     "node_modules/tuf-js": {
@@ -4387,9 +4782,9 @@
       }
     },
     "node_modules/type-fest": {
-      "version": "4.21.0",
-      "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.21.0.tgz",
-      "integrity": "sha512-ADn2w7hVPcK6w1I0uWnM//y1rLXZhzB9mr0a3OirzclKF1Wp6VzevUmzz/NRAWunOT6E8HrnpGY7xOfc6K57fA==",
+      "version": "4.41.0",
+      "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.41.0.tgz",
+      "integrity": "sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==",
       "dev": true,
       "license": "(MIT OR CC0-1.0)",
       "engines": {
@@ -4400,32 +4795,49 @@
       }
     },
     "node_modules/typedoc": {
-      "version": "0.26.4",
-      "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.26.4.tgz",
-      "integrity": "sha512-FlW6HpvULDKgc3rK04V+nbFyXogPV88hurarDPOjuuB5HAwuAlrCMQ5NeH7Zt68a/ikOKu6Z/0hFXAeC9xPccQ==",
+      "version": "0.28.5",
+      "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.28.5.tgz",
+      "integrity": "sha512-5PzUddaA9FbaarUzIsEc4wNXCiO4Ot3bJNeMF2qKpYlTmM9TTaSHQ7162w756ERCkXER/+o2purRG6YOAv6EMA==",
       "dev": true,
       "license": "Apache-2.0",
       "dependencies": {
+        "@gerrit0/mini-shiki": "^3.2.2",
         "lunr": "^2.3.9",
         "markdown-it": "^14.1.0",
         "minimatch": "^9.0.5",
-        "shiki": "^1.9.1",
-        "yaml": "^2.4.5"
+        "yaml": "^2.7.1"
       },
       "bin": {
         "typedoc": "bin/typedoc"
       },
       "engines": {
-        "node": ">= 18"
+        "node": ">= 18",
+        "pnpm": ">= 10"
       },
       "peerDependencies": {
-        "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x"
+        "typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x"
+      }
+    },
+    "node_modules/typedoc/node_modules/minimatch": {
+      "version": "9.0.5",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz",
+      "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
+      "dev": true,
+      "license": "ISC",
+      "dependencies": {
+        "brace-expansion": "^2.0.1"
+      },
+      "engines": {
+        "node": ">=16 || 14 >=14.17"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/isaacs"
       }
     },
     "node_modules/typescript": {
-      "version": "5.5.3",
-      "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz",
-      "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==",
+      "version": "5.8.3",
+      "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",
+      "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
       "dev": true,
       "license": "Apache-2.0",
       "bin": {
@@ -4444,9 +4856,9 @@
       "license": "MIT"
     },
     "node_modules/undici-types": {
-      "version": "5.26.5",
-      "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
-      "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
+      "version": "7.8.0",
+      "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz",
+      "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==",
       "dev": true,
       "license": "MIT"
     },
@@ -4541,11 +4953,14 @@
       }
     },
     "node_modules/walk-up-path": {
-      "version": "3.0.1",
-      "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-3.0.1.tgz",
-      "integrity": "sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA==",
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-4.0.0.tgz",
+      "integrity": "sha512-3hu+tD8YzSLGuFYtPRb48vdhKMi0KQV5sn+uWr8+7dMEq/2G/dtLrdDinkLjqq5TIbIBjYJ4Ax/n3YiaW7QM8A==",
       "dev": true,
-      "license": "ISC"
+      "license": "ISC",
+      "engines": {
+        "node": "20 || >=22"
+      }
     },
     "node_modules/which": {
       "version": "4.0.0",
@@ -4688,9 +5103,9 @@
       }
     },
     "node_modules/ws": {
-      "version": "8.18.0",
-      "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz",
-      "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==",
+      "version": "8.18.2",
+      "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.2.tgz",
+      "integrity": "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==",
       "dev": true,
       "license": "MIT",
       "engines": {
@@ -4727,22 +5142,22 @@
       "license": "ISC"
     },
     "node_modules/yaml": {
-      "version": "2.4.5",
-      "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.5.tgz",
-      "integrity": "sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==",
+      "version": "2.8.0",
+      "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.0.tgz",
+      "integrity": "sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==",
       "dev": true,
       "license": "ISC",
       "bin": {
         "yaml": "bin.mjs"
       },
       "engines": {
-        "node": ">= 14"
+        "node": ">= 14.6"
       }
     },
     "node_modules/yaml-types": {
-      "version": "0.3.0",
-      "resolved": "https://registry.npmjs.org/yaml-types/-/yaml-types-0.3.0.tgz",
-      "integrity": "sha512-i9RxAO/LZBiE0NJUy9pbN5jFz5EasYDImzRkj8Y81kkInTi1laia3P3K/wlMKzOxFQutZip8TejvQP/DwgbU7A==",
+      "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/yaml-types/-/yaml-types-0.4.0.tgz",
+      "integrity": "sha512-XfbA30NUg4/LWUiplMbiufUiwYhgB9jvBhTWel7XQqjV+GaB79c2tROu/8/Tu7jO0HvDvnKWtBk5ksWRrhQ/0g==",
       "dev": true,
       "license": "ISC",
       "engines": {
@@ -4850,10 +5265,10 @@
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/yoga-wasm-web": {
-      "version": "0.3.3",
-      "resolved": "https://registry.npmjs.org/yoga-wasm-web/-/yoga-wasm-web-0.3.3.tgz",
-      "integrity": "sha512-N+d4UJSJbt/R3wqY7Coqs5pcV0aUj2j9IaQ3rNj9bVCLld8tTGKRa2USARjnvZJWVx1NDmQev8EknoczaOQDOA==",
+    "node_modules/yoga-layout": {
+      "version": "3.2.1",
+      "resolved": "https://registry.npmjs.org/yoga-layout/-/yoga-layout-3.2.1.tgz",
+      "integrity": "sha512-0LPOt3AxKqMdFBZA3HBAt/t/8vIKq7VaQYbuA8WxCgung+p9TVyKRYdpvCb80HcdTN2NkbIKbhNwKUfm3tQywQ==",
       "dev": true,
       "license": "MIT"
     }
diff --git a/deps/minimatch/package.json b/deps/minimatch/package.json
index 74b49fdc36c4ee..0bbf2363ef5153 100644
--- a/deps/minimatch/package.json
+++ b/deps/minimatch/package.json
@@ -2,7 +2,7 @@
   "author": "Isaac Z. Schlueter  (http://blog.izs.me)",
   "name": "minimatch",
   "description": "a glob matcher in javascript",
-  "version": "10.0.1",
+  "version": "10.0.3",
   "repository": {
     "type": "git",
     "url": "git://github.com/isaacs/minimatch.git"
@@ -53,19 +53,15 @@
   "engines": {
     "node": "20 || >=22"
   },
-  "dependencies": {
-    "brace-expansion": "^2.0.1"
-  },
   "devDependencies": {
     "@types/brace-expansion": "^1.1.2",
-    "@types/node": "^20.14.10",
-    "esbuild": "^0.23.0",
+    "@types/node": "^24.0.0",
+    "esbuild": "^0.25.5",
     "mkdirp": "^3.0.1",
     "prettier": "^3.3.2",
-    "tap": "^20.0.3",
-    "tshy": "^2.0.1",
-    "typedoc": "^0.26.3",
-    "typescript": "^5.5.3"
+    "tap": "^21.1.0",
+    "tshy": "^3.0.2",
+    "typedoc": "^0.28.5"
   },
   "funding": {
     "url": "https://github.com/sponsors/isaacs"
@@ -78,5 +74,8 @@
     }
   },
   "type": "module",
-  "module": "./dist/esm/index.js"
+  "module": "./dist/esm/index.js",
+  "dependencies": {
+    "@isaacs/brace-expansion": "^5.0.0"
+  }
 }
diff --git a/deps/ncrypto/ncrypto.cc b/deps/ncrypto/ncrypto.cc
index 7aa91497663c4c..cb6b6ab4a6137b 100644
--- a/deps/ncrypto/ncrypto.cc
+++ b/deps/ncrypto/ncrypto.cc
@@ -4191,6 +4191,22 @@ DataPointer hashDigest(const Buffer& buf,
   return data.resize(result_size);
 }
 
+DataPointer xofHashDigest(const Buffer& buf,
+                          const EVP_MD* md,
+                          size_t output_length) {
+  if (md == nullptr) return {};
+
+  EVPMDCtxPointer ctx = EVPMDCtxPointer::New();
+  if (!ctx) return {};
+  if (ctx.digestInit(md) != 1) {
+    return {};
+  }
+  if (ctx.digestUpdate(reinterpret_cast&>(buf)) != 1) {
+    return {};
+  }
+  return ctx.digestFinal(output_length);
+}
+
 // ============================================================================
 
 X509Name::X509Name() : name_(nullptr), total_(0) {}
diff --git a/deps/ncrypto/ncrypto.h b/deps/ncrypto/ncrypto.h
index db13a1b95d4c34..28e836f0bdb989 100644
--- a/deps/ncrypto/ncrypto.h
+++ b/deps/ncrypto/ncrypto.h
@@ -278,8 +278,13 @@ class Digest final {
   const EVP_MD* md_ = nullptr;
 };
 
+// Computes a fixed-length digest.
 DataPointer hashDigest(const Buffer& data,
                        const EVP_MD* md);
+// Computes a variable-length digest for XOF algorithms (e.g. SHAKE128).
+DataPointer xofHashDigest(const Buffer& data,
+                          const EVP_MD* md,
+                          size_t length);
 
 class Cipher final {
  public:
diff --git a/deps/sqlite/sqlite3.c b/deps/sqlite/sqlite3.c
index 49a4256b0c054c..0b071b2b6cc259 100644
--- a/deps/sqlite/sqlite3.c
+++ b/deps/sqlite/sqlite3.c
@@ -1,6 +1,6 @@
 /******************************************************************************
 ** This file is an amalgamation of many separate C source files from SQLite
-** version 3.50.1.  By combining all the individual C code files into this
+** version 3.50.2.  By combining all the individual C code files into this
 ** single large file, the entire code can be compiled as a single translation
 ** unit.  This allows many compilers to do optimizations that would not be
 ** possible if the files were compiled separately.  Performance improvements
@@ -18,7 +18,7 @@
 ** separate file. This file contains only code for the core SQLite library.
 **
 ** The content in this amalgamation comes from Fossil check-in
-** b77dc5e0f596d2140d9ac682b2893ff65d3a with changes in files:
+** 2af157d77fb1304a74176eaee7fbc7c7e932 with changes in files:
 **
 **    
 */
@@ -465,9 +465,9 @@ extern "C" {
 ** [sqlite3_libversion_number()], [sqlite3_sourceid()],
 ** [sqlite_version()] and [sqlite_source_id()].
 */
-#define SQLITE_VERSION        "3.50.1"
-#define SQLITE_VERSION_NUMBER 3050001
-#define SQLITE_SOURCE_ID      "2025-06-06 14:52:32 b77dc5e0f596d2140d9ac682b2893ff65d3a4140aa86067a3efebe29dc914c95"
+#define SQLITE_VERSION        "3.50.2"
+#define SQLITE_VERSION_NUMBER 3050002
+#define SQLITE_SOURCE_ID      "2025-06-28 14:00:48 2af157d77fb1304a74176eaee7fbc7c7e932d946bf25325e9c26c91db19e3079"
 
 /*
 ** CAPI3REF: Run-Time Library Version Numbers
@@ -4398,7 +4398,7 @@ SQLITE_API sqlite3_file *sqlite3_database_file_object(const char*);
 **
 ** The sqlite3_create_filename(D,J,W,N,P) allocates memory to hold a version of
 ** database filename D with corresponding journal file J and WAL file W and
-** with N URI parameters key/values pairs in the array P.  The result from
+** an array P of N URI Key/Value pairs.  The result from
 ** sqlite3_create_filename(D,J,W,N,P) is a pointer to a database filename that
 ** is safe to pass to routines like:
 ** 
    @@ -5079,7 +5079,7 @@ typedef struct sqlite3_context sqlite3_context; ** METHOD: sqlite3_stmt ** ** ^(In the SQL statement text input to [sqlite3_prepare_v2()] and its variants, -** literals may be replaced by a [parameter] that matches one of following +** literals may be replaced by a [parameter] that matches one of the following ** templates: ** **
      @@ -5124,7 +5124,7 @@ typedef struct sqlite3_context sqlite3_context; ** ** [[byte-order determination rules]] ^The byte-order of ** UTF16 input text is determined by the byte-order mark (BOM, U+FEFF) -** found in first character, which is removed, or in the absence of a BOM +** found in the first character, which is removed, or in the absence of a BOM ** the byte order is the native byte order of the host ** machine for sqlite3_bind_text16() or the byte order specified in ** the 6th parameter for sqlite3_bind_text64().)^ @@ -5144,7 +5144,7 @@ typedef struct sqlite3_context sqlite3_context; ** or sqlite3_bind_text16() or sqlite3_bind_text64() then ** that parameter must be the byte offset ** where the NUL terminator would occur assuming the string were NUL -** terminated. If any NUL characters occurs at byte offsets less than +** terminated. If any NUL characters occur at byte offsets less than ** the value of the fourth parameter then the resulting string value will ** contain embedded NULs. The result of expressions involving strings ** with embedded NULs is undefined. @@ -5356,7 +5356,7 @@ SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N); ** METHOD: sqlite3_stmt ** ** ^These routines provide a means to determine the database, table, and -** table column that is the origin of a particular result column in +** table column that is the origin of a particular result column in a ** [SELECT] statement. ** ^The name of the database or table or column can be returned as ** either a UTF-8 or UTF-16 string. ^The _database_ routines return @@ -5925,8 +5925,8 @@ SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt); ** ** For best security, the [SQLITE_DIRECTONLY] flag is recommended for ** all application-defined SQL functions that do not need to be -** used inside of triggers, view, CHECK constraints, or other elements of -** the database schema. This flags is especially recommended for SQL +** used inside of triggers, views, CHECK constraints, or other elements of +** the database schema. This flag is especially recommended for SQL ** functions that have side effects or reveal internal application state. ** Without this flag, an attacker might be able to modify the schema of ** a database file to include invocations of the function with parameters @@ -5957,7 +5957,7 @@ SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt); ** [user-defined window functions|available here]. ** ** ^(If the final parameter to sqlite3_create_function_v2() or -** sqlite3_create_window_function() is not NULL, then it is destructor for +** sqlite3_create_window_function() is not NULL, then it is the destructor for ** the application data pointer. The destructor is invoked when the function ** is deleted, either by being overloaded or when the database connection ** closes.)^ ^The destructor is also invoked if the call to @@ -6357,7 +6357,7 @@ SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*); ** METHOD: sqlite3_value ** ** ^The sqlite3_value_dup(V) interface makes a copy of the [sqlite3_value] -** object D and returns a pointer to that copy. ^The [sqlite3_value] returned +** object V and returns a pointer to that copy. ^The [sqlite3_value] returned ** is a [protected sqlite3_value] object even if the input is not. ** ^The sqlite3_value_dup(V) interface returns NULL if V is NULL or if a ** memory allocation fails. ^If V is a [pointer value], then the result @@ -6395,7 +6395,7 @@ SQLITE_API void sqlite3_value_free(sqlite3_value*); ** allocation error occurs. ** ** ^(The amount of space allocated by sqlite3_aggregate_context(C,N) is -** determined by the N parameter on first successful call. Changing the +** determined by the N parameter on the first successful call. Changing the ** value of N in any subsequent call to sqlite3_aggregate_context() within ** the same aggregate function instance will not resize the memory ** allocation.)^ Within the xFinal callback, it is customary to set @@ -6557,7 +6557,7 @@ SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(voi ** ** Security Warning: These interfaces should not be exposed in scripting ** languages or in other circumstances where it might be possible for an -** an attacker to invoke them. Any agent that can invoke these interfaces +** attacker to invoke them. Any agent that can invoke these interfaces ** can probably also take control of the process. ** ** Database connection client data is only available for SQLite @@ -6671,7 +6671,7 @@ typedef void (*sqlite3_destructor_type)(void*); ** pointed to by the 2nd parameter are taken as the application-defined ** function result. If the 3rd parameter is non-negative, then it ** must be the byte offset into the string where the NUL terminator would -** appear if the string where NUL terminated. If any NUL characters occur +** appear if the string were NUL terminated. If any NUL characters occur ** in the string at a byte offset that is less than the value of the 3rd ** parameter, then the resulting string will contain embedded NULs and the ** result of expressions operating on strings with embedded NULs is undefined. @@ -6729,7 +6729,7 @@ typedef void (*sqlite3_destructor_type)(void*); ** string and preferably a string literal. The sqlite3_result_pointer() ** routine is part of the [pointer passing interface] added for SQLite 3.20.0. ** -** If these routines are called from within the different thread +** If these routines are called from within a different thread ** than the one containing the application-defined function that received ** the [sqlite3_context] pointer, the results are undefined. */ @@ -7135,7 +7135,7 @@ SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*); ** METHOD: sqlite3 ** ** ^The sqlite3_db_name(D,N) interface returns a pointer to the schema name -** for the N-th database on database connection D, or a NULL pointer of N is +** for the N-th database on database connection D, or a NULL pointer if N is ** out of range. An N value of 0 means the main database file. An N of 1 is ** the "temp" schema. Larger values of N correspond to various ATTACH-ed ** databases. @@ -7230,7 +7230,7 @@ SQLITE_API int sqlite3_txn_state(sqlite3*,const char *zSchema); **
      The SQLITE_TXN_READ state means that the database is currently ** in a read transaction. Content has been read from the database file ** but nothing in the database file has changed. The transaction state -** will advanced to SQLITE_TXN_WRITE if any changes occur and there are +** will be advanced to SQLITE_TXN_WRITE if any changes occur and there are ** no other conflicting concurrent write transactions. The transaction ** state will revert to SQLITE_TXN_NONE following a [ROLLBACK] or ** [COMMIT].
      @@ -7239,7 +7239,7 @@ SQLITE_API int sqlite3_txn_state(sqlite3*,const char *zSchema); **
      The SQLITE_TXN_WRITE state means that the database is currently ** in a write transaction. Content has been written to the database file ** but has not yet committed. The transaction state will change to -** to SQLITE_TXN_NONE at the next [ROLLBACK] or [COMMIT].
      +** SQLITE_TXN_NONE at the next [ROLLBACK] or [COMMIT]. */ #define SQLITE_TXN_NONE 0 #define SQLITE_TXN_READ 1 @@ -7520,7 +7520,7 @@ SQLITE_API int sqlite3_db_release_memory(sqlite3*); ** CAPI3REF: Impose A Limit On Heap Size ** ** These interfaces impose limits on the amount of heap memory that will be -** by all database connections within a single process. +** used by all database connections within a single process. ** ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the ** soft limit on the amount of heap memory that may be allocated by SQLite. @@ -7578,7 +7578,7 @@ SQLITE_API int sqlite3_db_release_memory(sqlite3*); **
    )^ ** ** The circumstances under which SQLite will enforce the heap limits may -** changes in future releases of SQLite. +** change in future releases of SQLite. */ SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N); SQLITE_API sqlite3_int64 sqlite3_hard_heap_limit64(sqlite3_int64 N); @@ -7693,8 +7693,8 @@ SQLITE_API int sqlite3_table_column_metadata( ** ^The entry point is zProc. ** ^(zProc may be 0, in which case SQLite will try to come up with an ** entry point name on its own. It first tries "sqlite3_extension_init". -** If that does not work, it constructs a name "sqlite3_X_init" where the -** X is consists of the lower-case equivalent of all ASCII alphabetic +** If that does not work, it constructs a name "sqlite3_X_init" where +** X consists of the lower-case equivalent of all ASCII alphabetic ** characters in the filename from the last "/" to the first following ** "." and omitting any initial "lib".)^ ** ^The sqlite3_load_extension() interface returns @@ -7765,7 +7765,7 @@ SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff); ** ^(Even though the function prototype shows that xEntryPoint() takes ** no arguments and returns void, SQLite invokes xEntryPoint() with three ** arguments and expects an integer result as if the signature of the -** entry point where as follows: +** entry point were as follows: ** **
     **    int xEntryPoint(
    @@ -7929,7 +7929,7 @@ struct sqlite3_module {
     ** virtual table and might not be checked again by the byte code.)^ ^(The
     ** aConstraintUsage[].omit flag is an optimization hint. When the omit flag
     ** is left in its default setting of false, the constraint will always be
    -** checked separately in byte code.  If the omit flag is change to true, then
    +** checked separately in byte code.  If the omit flag is changed to true, then
     ** the constraint may or may not be checked in byte code.  In other words,
     ** when the omit flag is true there is no guarantee that the constraint will
     ** not be checked again using byte code.)^
    @@ -7955,7 +7955,7 @@ struct sqlite3_module {
     ** The xBestIndex method may optionally populate the idxFlags field with a
     ** mask of SQLITE_INDEX_SCAN_* flags. One such flag is
     ** [SQLITE_INDEX_SCAN_HEX], which if set causes the [EXPLAIN QUERY PLAN]
    -** output to show the idxNum has hex instead of as decimal.  Another flag is
    +** output to show the idxNum as hex instead of as decimal.  Another flag is
     ** SQLITE_INDEX_SCAN_UNIQUE, which if set indicates that the query plan will
     ** return at most one row.
     **
    @@ -8096,7 +8096,7 @@ struct sqlite3_index_info {
     ** the implementation of the [virtual table module].   ^The fourth
     ** parameter is an arbitrary client data pointer that is passed through
     ** into the [xCreate] and [xConnect] methods of the virtual table module
    -** when a new virtual table is be being created or reinitialized.
    +** when a new virtual table is being created or reinitialized.
     **
     ** ^The sqlite3_create_module_v2() interface has a fifth parameter which
     ** is a pointer to a destructor for the pClientData.  ^SQLite will
    @@ -8261,7 +8261,7 @@ typedef struct sqlite3_blob sqlite3_blob;
     ** in *ppBlob. Otherwise an [error code] is returned and, unless the error
     ** code is SQLITE_MISUSE, *ppBlob is set to NULL.)^ ^This means that, provided
     ** the API is not misused, it is always safe to call [sqlite3_blob_close()]
    -** on *ppBlob after this function it returns.
    +** on *ppBlob after this function returns.
     **
     ** This function fails with SQLITE_ERROR if any of the following are true:
     ** 
      @@ -8381,7 +8381,7 @@ SQLITE_API int sqlite3_blob_close(sqlite3_blob *); ** ** ^Returns the size in bytes of the BLOB accessible via the ** successfully opened [BLOB handle] in its only argument. ^The -** incremental blob I/O routines can only read or overwriting existing +** incremental blob I/O routines can only read or overwrite existing ** blob content; they cannot change the size of a blob. ** ** This routine only works on a [BLOB handle] which has been created @@ -8531,7 +8531,7 @@ SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*); ** ^The sqlite3_mutex_alloc() routine allocates a new ** mutex and returns a pointer to it. ^The sqlite3_mutex_alloc() ** routine returns NULL if it is unable to allocate the requested -** mutex. The argument to sqlite3_mutex_alloc() must one of these +** mutex. The argument to sqlite3_mutex_alloc() must be one of these ** integer constants: ** **
        @@ -8764,7 +8764,7 @@ SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*); ** CAPI3REF: Retrieve the mutex for a database connection ** METHOD: sqlite3 ** -** ^This interface returns a pointer the [sqlite3_mutex] object that +** ^This interface returns a pointer to the [sqlite3_mutex] object that ** serializes access to the [database connection] given in the argument ** when the [threading mode] is Serialized. ** ^If the [threading mode] is Single-thread or Multi-thread then this @@ -8887,7 +8887,7 @@ SQLITE_API int sqlite3_test_control(int op, ...); ** CAPI3REF: SQL Keyword Checking ** ** These routines provide access to the set of SQL language keywords -** recognized by SQLite. Applications can uses these routines to determine +** recognized by SQLite. Applications can use these routines to determine ** whether or not a specific identifier needs to be escaped (for example, ** by enclosing in double-quotes) so as not to confuse the parser. ** @@ -9055,7 +9055,7 @@ SQLITE_API void sqlite3_str_reset(sqlite3_str*); ** content of the dynamic string under construction in X. The value ** returned by [sqlite3_str_value(X)] is managed by the sqlite3_str object X ** and might be freed or altered by any subsequent method on the same -** [sqlite3_str] object. Applications must not used the pointer returned +** [sqlite3_str] object. Applications must not use the pointer returned by ** [sqlite3_str_value(X)] after any subsequent method call on the same ** object. ^Applications may change the content of the string returned ** by [sqlite3_str_value(X)] as long as they do not write into any bytes @@ -9141,7 +9141,7 @@ SQLITE_API int sqlite3_status64( ** allocation which could not be satisfied by the [SQLITE_CONFIG_PAGECACHE] ** buffer and where forced to overflow to [sqlite3_malloc()]. The ** returned value includes allocations that overflowed because they -** where too large (they were larger than the "sz" parameter to +** were too large (they were larger than the "sz" parameter to ** [SQLITE_CONFIG_PAGECACHE]) and allocations that overflowed because ** no space was left in the page cache.)^ ** @@ -9225,28 +9225,29 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r ** [[SQLITE_DBSTATUS_LOOKASIDE_HIT]] ^(
        SQLITE_DBSTATUS_LOOKASIDE_HIT
        **
        This parameter returns the number of malloc attempts that were ** satisfied using lookaside memory. Only the high-water value is meaningful; -** the current value is always zero.)^ +** the current value is always zero.
        )^ ** ** [[SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE]] ** ^(
        SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE
        -**
        This parameter returns the number malloc attempts that might have +**
        This parameter returns the number of malloc attempts that might have ** been satisfied using lookaside memory but failed due to the amount of ** memory requested being larger than the lookaside slot size. ** Only the high-water value is meaningful; -** the current value is always zero.)^ +** the current value is always zero.
        )^ ** ** [[SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL]] ** ^(
        SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL
        -**
        This parameter returns the number malloc attempts that might have +**
        This parameter returns the number of malloc attempts that might have ** been satisfied using lookaside memory but failed due to all lookaside ** memory already being in use. ** Only the high-water value is meaningful; -** the current value is always zero.)^ +** the current value is always zero.
        )^ ** ** [[SQLITE_DBSTATUS_CACHE_USED]] ^(
        SQLITE_DBSTATUS_CACHE_USED
        **
        This parameter returns the approximate number of bytes of heap ** memory used by all pager caches associated with the database connection.)^ ** ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_USED is always 0. +**
        ** ** [[SQLITE_DBSTATUS_CACHE_USED_SHARED]] ** ^(
        SQLITE_DBSTATUS_CACHE_USED_SHARED
        @@ -9255,10 +9256,10 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r ** memory used by that pager cache is divided evenly between the attached ** connections.)^ In other words, if none of the pager caches associated ** with the database connection are shared, this request returns the same -** value as DBSTATUS_CACHE_USED. Or, if one or more or the pager caches are +** value as DBSTATUS_CACHE_USED. Or, if one or more of the pager caches are ** shared, the value returned by this call will be smaller than that returned ** by DBSTATUS_CACHE_USED. ^The highwater mark associated with -** SQLITE_DBSTATUS_CACHE_USED_SHARED is always 0. +** SQLITE_DBSTATUS_CACHE_USED_SHARED is always 0. ** ** [[SQLITE_DBSTATUS_SCHEMA_USED]] ^(
        SQLITE_DBSTATUS_SCHEMA_USED
        **
        This parameter returns the approximate number of bytes of heap @@ -9268,6 +9269,7 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r ** schema memory is shared with other database connections due to ** [shared cache mode] being enabled. ** ^The highwater mark associated with SQLITE_DBSTATUS_SCHEMA_USED is always 0. +**
        ** ** [[SQLITE_DBSTATUS_STMT_USED]] ^(
        SQLITE_DBSTATUS_STMT_USED
        **
        This parameter returns the approximate number of bytes of heap @@ -9304,7 +9306,7 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r ** been written to disk in the middle of a transaction due to the page ** cache overflowing. Transactions are more efficient if they are written ** to disk all at once. When pages spill mid-transaction, that introduces -** additional overhead. This parameter can be used help identify +** additional overhead. This parameter can be used to help identify ** inefficiencies that can be resolved by increasing the cache size. **
        ** @@ -9784,7 +9786,7 @@ typedef struct sqlite3_backup sqlite3_backup; ** external process or via a database connection other than the one being ** used by the backup operation, then the backup will be automatically ** restarted by the next call to sqlite3_backup_step(). ^If the source -** database is modified by the using the same database connection as is used +** database is modified by using the same database connection as is used ** by the backup operation, then the backup database is automatically ** updated at the same time. ** @@ -9801,7 +9803,7 @@ typedef struct sqlite3_backup sqlite3_backup; ** and may not be used following a call to sqlite3_backup_finish(). ** ** ^The value returned by sqlite3_backup_finish is [SQLITE_OK] if no -** sqlite3_backup_step() errors occurred, regardless or whether or not +** sqlite3_backup_step() errors occurred, regardless of whether or not ** sqlite3_backup_step() completed. ** ^If an out-of-memory condition or IO error occurred during any prior ** sqlite3_backup_step() call on the same [sqlite3_backup] object, then @@ -10871,7 +10873,7 @@ SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); ** METHOD: sqlite3 ** ** ^If a write-transaction is open on [database connection] D when the -** [sqlite3_db_cacheflush(D)] interface invoked, any dirty +** [sqlite3_db_cacheflush(D)] interface is invoked, any dirty ** pages in the pager-cache that are not currently in use are written out ** to disk. A dirty page may be in use if a database cursor created by an ** active SQL statement is reading from it, or if it is page 1 of a database @@ -15442,8 +15444,8 @@ typedef INT16_TYPE LogEst; ** assuming n is a signed integer type. UMXV(n) is similar for unsigned ** integer types. */ -#define SMXV(n) ((((i64)1)<<(sizeof(n)-1))-1) -#define UMXV(n) ((((i64)1)<<(sizeof(n)))-1) +#define SMXV(n) ((((i64)1)<<(sizeof(n)*8-1))-1) +#define UMXV(n) ((((i64)1)<<(sizeof(n)*8))-1) /* ** Round up a number to the next larger multiple of 8. This is used @@ -19254,7 +19256,7 @@ struct AggInfo { ** from source tables rather than from accumulators */ u8 useSortingIdx; /* In direct mode, reference the sorting index rather ** than the source table */ - u16 nSortingColumn; /* Number of columns in the sorting index */ + u32 nSortingColumn; /* Number of columns in the sorting index */ int sortingIdx; /* Cursor number of the sorting index */ int sortingIdxPTab; /* Cursor number of pseudo-table */ int iFirstReg; /* First register in range for aCol[] and aFunc[] */ @@ -19263,8 +19265,8 @@ struct AggInfo { Table *pTab; /* Source table */ Expr *pCExpr; /* The original expression */ int iTable; /* Cursor number of the source table */ - i16 iColumn; /* Column number within the source table */ - i16 iSorterColumn; /* Column number in the sorting index */ + int iColumn; /* Column number within the source table */ + int iSorterColumn; /* Column number in the sorting index */ } *aCol; int nColumn; /* Number of used entries in aCol[] */ int nAccumulator; /* Number of columns that show through to the output. @@ -54966,7 +54968,9 @@ SQLITE_PRIVATE int sqlite3BitvecSet(Bitvec *p, u32 i){ }else{ memcpy(aiValues, p->u.aHash, sizeof(p->u.aHash)); memset(p->u.apSub, 0, sizeof(p->u.apSub)); - p->iDivisor = (p->iSize + BITVEC_NPTR - 1)/BITVEC_NPTR; + p->iDivisor = p->iSize/BITVEC_NPTR; + if( (p->iSize%BITVEC_NPTR)!=0 ) p->iDivisor++; + if( p->iDivisoriDivisor = BITVEC_NBIT; rc = sqlite3BitvecSet(p, i); for(j=0; jhdr.mxFrame ) walCleanupHash(pWal); } SEH_EXCEPT( rc = SQLITE_IOERR_IN_PAGE; ) + pWal->iReCksum = 0; } return rc; } @@ -69701,6 +69706,9 @@ SQLITE_PRIVATE int sqlite3WalSavepointUndo(Wal *pWal, u32 *aWalData){ walCleanupHash(pWal); } SEH_EXCEPT( rc = SQLITE_IOERR_IN_PAGE; ) + if( pWal->iReCksum>pWal->hdr.mxFrame ){ + pWal->iReCksum = 0; + } } return rc; @@ -117346,7 +117354,9 @@ static void findOrCreateAggInfoColumn( ){ struct AggInfo_col *pCol; int k; + int mxTerm = pParse->db->aLimit[SQLITE_LIMIT_COLUMN]; + assert( mxTerm <= SMXV(i16) ); assert( pAggInfo->iFirstReg==0 ); pCol = pAggInfo->aCol; for(k=0; knColumn; k++, pCol++){ @@ -117364,6 +117374,10 @@ static void findOrCreateAggInfoColumn( assert( pParse->db->mallocFailed ); return; } + if( k>mxTerm ){ + sqlite3ErrorMsg(pParse, "more than %d aggregate terms", mxTerm); + k = mxTerm; + } pCol = &pAggInfo->aCol[k]; assert( ExprUseYTab(pExpr) ); pCol->pTab = pExpr->y.pTab; @@ -117397,6 +117411,7 @@ static void findOrCreateAggInfoColumn( if( pExpr->op==TK_COLUMN ){ pExpr->op = TK_AGG_COLUMN; } + assert( k <= SMXV(pExpr->iAgg) ); pExpr->iAgg = (i16)k; } @@ -117481,13 +117496,19 @@ static int analyzeAggregate(Walker *pWalker, Expr *pExpr){ ** function that is already in the pAggInfo structure */ struct AggInfo_func *pItem = pAggInfo->aFunc; + int mxTerm = pParse->db->aLimit[SQLITE_LIMIT_COLUMN]; + assert( mxTerm <= SMXV(i16) ); for(i=0; inFunc; i++, pItem++){ if( NEVER(pItem->pFExpr==pExpr) ) break; if( sqlite3ExprCompare(0, pItem->pFExpr, pExpr, -1)==0 ){ break; } } - if( i>=pAggInfo->nFunc ){ + if( i>mxTerm ){ + sqlite3ErrorMsg(pParse, "more than %d aggregate terms", mxTerm); + i = mxTerm; + assert( inFunc ); + }else if( i>=pAggInfo->nFunc ){ /* pExpr is original. Make a new entry in pAggInfo->aFunc[] */ u8 enc = ENC(pParse->db); @@ -117541,6 +117562,7 @@ static int analyzeAggregate(Walker *pWalker, Expr *pExpr){ */ assert( !ExprHasProperty(pExpr, EP_TokenOnly|EP_Reduced) ); ExprSetVVAProperty(pExpr, EP_NoReduce); + assert( i <= SMXV(pExpr->iAgg) ); pExpr->iAgg = (i16)i; pExpr->pAggInfo = pAggInfo; return WRC_Prune; @@ -131999,7 +132021,7 @@ static void concatFuncCore( int nSep, const char *zSep ){ - i64 j, k, n = 0; + i64 j, n = 0; int i; char *z; for(i=0; i0 ){ + if( sqlite3_value_type(argv[i])!=SQLITE_NULL ){ + int k = sqlite3_value_bytes(argv[i]); const char *v = (const char*)sqlite3_value_text(argv[i]); if( v!=0 ){ if( j>0 && nSep>0 ){ @@ -163433,30 +163455,42 @@ static void exprAnalyzeOrTerm( ** 1. The SQLITE_Transitive optimization must be enabled ** 2. Must be either an == or an IS operator ** 3. Not originating in the ON clause of an OUTER JOIN -** 4. The affinities of A and B must be compatible -** 5a. Both operands use the same collating sequence OR -** 5b. The overall collating sequence is BINARY +** 4. The operator is not IS or else the query does not contain RIGHT JOIN +** 5. The affinities of A and B must be compatible +** 6a. Both operands use the same collating sequence OR +** 6b. The overall collating sequence is BINARY ** If this routine returns TRUE, that means that the RHS can be substituted ** for the LHS anyplace else in the WHERE clause where the LHS column occurs. ** This is an optimization. No harm comes from returning 0. But if 1 is ** returned when it should not be, then incorrect answers might result. */ -static int termIsEquivalence(Parse *pParse, Expr *pExpr){ +static int termIsEquivalence(Parse *pParse, Expr *pExpr, SrcList *pSrc){ char aff1, aff2; CollSeq *pColl; - if( !OptimizationEnabled(pParse->db, SQLITE_Transitive) ) return 0; - if( pExpr->op!=TK_EQ && pExpr->op!=TK_IS ) return 0; - if( ExprHasProperty(pExpr, EP_OuterON) ) return 0; + if( !OptimizationEnabled(pParse->db, SQLITE_Transitive) ) return 0; /* (1) */ + if( pExpr->op!=TK_EQ && pExpr->op!=TK_IS ) return 0; /* (2) */ + if( ExprHasProperty(pExpr, EP_OuterON) ) return 0; /* (3) */ + assert( pSrc!=0 ); + if( pExpr->op==TK_IS + && pSrc->nSrc + && (pSrc->a[0].fg.jointype & JT_LTORJ)!=0 + ){ + return 0; /* (4) */ + } aff1 = sqlite3ExprAffinity(pExpr->pLeft); aff2 = sqlite3ExprAffinity(pExpr->pRight); if( aff1!=aff2 && (!sqlite3IsNumericAffinity(aff1) || !sqlite3IsNumericAffinity(aff2)) ){ - return 0; + return 0; /* (5) */ } pColl = sqlite3ExprCompareCollSeq(pParse, pExpr); - if( sqlite3IsBinary(pColl) ) return 1; - return sqlite3ExprCollSeqMatch(pParse, pExpr->pLeft, pExpr->pRight); + if( !sqlite3IsBinary(pColl) + && !sqlite3ExprCollSeqMatch(pParse, pExpr->pLeft, pExpr->pRight) + ){ + return 0; /* (6) */ + } + return 1; } /* @@ -163721,8 +163755,8 @@ static void exprAnalyze( if( op==TK_IS ) pNew->wtFlags |= TERM_IS; pTerm = &pWC->a[idxTerm]; pTerm->wtFlags |= TERM_COPIED; - - if( termIsEquivalence(pParse, pDup) ){ + assert( pWInfo->pTabList!=0 ); + if( termIsEquivalence(pParse, pDup, pWInfo->pTabList) ){ pTerm->eOperator |= WO_EQUIV; eExtraOp = WO_EQUIV; } @@ -184424,6 +184458,7 @@ SQLITE_API int sqlite3_setlk_timeout(sqlite3 *db, int ms, int flags){ #endif if( ms<-1 ) return SQLITE_RANGE; #ifdef SQLITE_ENABLE_SETLK_TIMEOUT + sqlite3_mutex_enter(db->mutex); db->setlkTimeout = ms; db->setlkFlags = flags; sqlite3BtreeEnterAll(db); @@ -184435,6 +184470,7 @@ SQLITE_API int sqlite3_setlk_timeout(sqlite3 *db, int ms, int flags){ } } sqlite3BtreeLeaveAll(db); + sqlite3_mutex_leave(db->mutex); #endif #if !defined(SQLITE_ENABLE_API_ARMOR) && !defined(SQLITE_ENABLE_SETLK_TIMEOUT) UNUSED_PARAMETER(db); @@ -257230,7 +257266,7 @@ static void fts5SourceIdFunc( ){ assert( nArg==0 ); UNUSED_PARAM2(nArg, apUnused); - sqlite3_result_text(pCtx, "fts5: 2025-06-06 14:52:32 b77dc5e0f596d2140d9ac682b2893ff65d3a4140aa86067a3efebe29dc914c95", -1, SQLITE_TRANSIENT); + sqlite3_result_text(pCtx, "fts5: 2025-06-28 14:00:48 2af157d77fb1304a74176eaee7fbc7c7e932d946bf25325e9c26c91db19e3079", -1, SQLITE_TRANSIENT); } /* @@ -258045,6 +258081,7 @@ static int fts5StorageDeleteFromIndex( for(iCol=1; rc==SQLITE_OK && iCol<=pConfig->nCol; iCol++){ if( pConfig->abUnindexed[iCol-1]==0 ){ sqlite3_value *pVal = 0; + sqlite3_value *pFree = 0; const char *pText = 0; int nText = 0; const char *pLoc = 0; @@ -258061,11 +258098,22 @@ static int fts5StorageDeleteFromIndex( if( pConfig->bLocale && sqlite3Fts5IsLocaleValue(pConfig, pVal) ){ rc = sqlite3Fts5DecodeLocaleValue(pVal, &pText, &nText, &pLoc, &nLoc); }else{ - pText = (const char*)sqlite3_value_text(pVal); - nText = sqlite3_value_bytes(pVal); - if( pConfig->bLocale && pSeek ){ - pLoc = (const char*)sqlite3_column_text(pSeek, iCol + pConfig->nCol); - nLoc = sqlite3_column_bytes(pSeek, iCol + pConfig->nCol); + if( sqlite3_value_type(pVal)!=SQLITE_TEXT ){ + /* Make a copy of the value to work with. This is because the call + ** to sqlite3_value_text() below forces the type of the value to + ** SQLITE_TEXT, and we may need to use it again later. */ + pFree = pVal = sqlite3_value_dup(pVal); + if( pVal==0 ){ + rc = SQLITE_NOMEM; + } + } + if( rc==SQLITE_OK ){ + pText = (const char*)sqlite3_value_text(pVal); + nText = sqlite3_value_bytes(pVal); + if( pConfig->bLocale && pSeek ){ + pLoc = (const char*)sqlite3_column_text(pSeek, iCol+pConfig->nCol); + nLoc = sqlite3_column_bytes(pSeek, iCol + pConfig->nCol); + } } } @@ -258081,6 +258129,7 @@ static int fts5StorageDeleteFromIndex( } sqlite3Fts5ClearLocale(pConfig); } + sqlite3_value_free(pFree); } } if( rc==SQLITE_OK && p->nTotalRow<1 ){ diff --git a/deps/sqlite/sqlite3.h b/deps/sqlite/sqlite3.h index dae02e66c2050c..f56dd8d86a2dda 100644 --- a/deps/sqlite/sqlite3.h +++ b/deps/sqlite/sqlite3.h @@ -146,9 +146,9 @@ extern "C" { ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ -#define SQLITE_VERSION "3.50.1" -#define SQLITE_VERSION_NUMBER 3050001 -#define SQLITE_SOURCE_ID "2025-06-06 14:52:32 b77dc5e0f596d2140d9ac682b2893ff65d3a4140aa86067a3efebe29dc914c95" +#define SQLITE_VERSION "3.50.2" +#define SQLITE_VERSION_NUMBER 3050002 +#define SQLITE_SOURCE_ID "2025-06-28 14:00:48 2af157d77fb1304a74176eaee7fbc7c7e932d946bf25325e9c26c91db19e3079" /* ** CAPI3REF: Run-Time Library Version Numbers @@ -4079,7 +4079,7 @@ SQLITE_API sqlite3_file *sqlite3_database_file_object(const char*); ** ** The sqlite3_create_filename(D,J,W,N,P) allocates memory to hold a version of ** database filename D with corresponding journal file J and WAL file W and -** with N URI parameters key/values pairs in the array P. The result from +** an array P of N URI Key/Value pairs. The result from ** sqlite3_create_filename(D,J,W,N,P) is a pointer to a database filename that ** is safe to pass to routines like: **
          @@ -4760,7 +4760,7 @@ typedef struct sqlite3_context sqlite3_context; ** METHOD: sqlite3_stmt ** ** ^(In the SQL statement text input to [sqlite3_prepare_v2()] and its variants, -** literals may be replaced by a [parameter] that matches one of following +** literals may be replaced by a [parameter] that matches one of the following ** templates: ** **
            @@ -4805,7 +4805,7 @@ typedef struct sqlite3_context sqlite3_context; ** ** [[byte-order determination rules]] ^The byte-order of ** UTF16 input text is determined by the byte-order mark (BOM, U+FEFF) -** found in first character, which is removed, or in the absence of a BOM +** found in the first character, which is removed, or in the absence of a BOM ** the byte order is the native byte order of the host ** machine for sqlite3_bind_text16() or the byte order specified in ** the 6th parameter for sqlite3_bind_text64().)^ @@ -4825,7 +4825,7 @@ typedef struct sqlite3_context sqlite3_context; ** or sqlite3_bind_text16() or sqlite3_bind_text64() then ** that parameter must be the byte offset ** where the NUL terminator would occur assuming the string were NUL -** terminated. If any NUL characters occurs at byte offsets less than +** terminated. If any NUL characters occur at byte offsets less than ** the value of the fourth parameter then the resulting string value will ** contain embedded NULs. The result of expressions involving strings ** with embedded NULs is undefined. @@ -5037,7 +5037,7 @@ SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N); ** METHOD: sqlite3_stmt ** ** ^These routines provide a means to determine the database, table, and -** table column that is the origin of a particular result column in +** table column that is the origin of a particular result column in a ** [SELECT] statement. ** ^The name of the database or table or column can be returned as ** either a UTF-8 or UTF-16 string. ^The _database_ routines return @@ -5606,8 +5606,8 @@ SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt); ** ** For best security, the [SQLITE_DIRECTONLY] flag is recommended for ** all application-defined SQL functions that do not need to be -** used inside of triggers, view, CHECK constraints, or other elements of -** the database schema. This flags is especially recommended for SQL +** used inside of triggers, views, CHECK constraints, or other elements of +** the database schema. This flag is especially recommended for SQL ** functions that have side effects or reveal internal application state. ** Without this flag, an attacker might be able to modify the schema of ** a database file to include invocations of the function with parameters @@ -5638,7 +5638,7 @@ SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt); ** [user-defined window functions|available here]. ** ** ^(If the final parameter to sqlite3_create_function_v2() or -** sqlite3_create_window_function() is not NULL, then it is destructor for +** sqlite3_create_window_function() is not NULL, then it is the destructor for ** the application data pointer. The destructor is invoked when the function ** is deleted, either by being overloaded or when the database connection ** closes.)^ ^The destructor is also invoked if the call to @@ -6038,7 +6038,7 @@ SQLITE_API unsigned int sqlite3_value_subtype(sqlite3_value*); ** METHOD: sqlite3_value ** ** ^The sqlite3_value_dup(V) interface makes a copy of the [sqlite3_value] -** object D and returns a pointer to that copy. ^The [sqlite3_value] returned +** object V and returns a pointer to that copy. ^The [sqlite3_value] returned ** is a [protected sqlite3_value] object even if the input is not. ** ^The sqlite3_value_dup(V) interface returns NULL if V is NULL or if a ** memory allocation fails. ^If V is a [pointer value], then the result @@ -6076,7 +6076,7 @@ SQLITE_API void sqlite3_value_free(sqlite3_value*); ** allocation error occurs. ** ** ^(The amount of space allocated by sqlite3_aggregate_context(C,N) is -** determined by the N parameter on first successful call. Changing the +** determined by the N parameter on the first successful call. Changing the ** value of N in any subsequent call to sqlite3_aggregate_context() within ** the same aggregate function instance will not resize the memory ** allocation.)^ Within the xFinal callback, it is customary to set @@ -6238,7 +6238,7 @@ SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(voi ** ** Security Warning: These interfaces should not be exposed in scripting ** languages or in other circumstances where it might be possible for an -** an attacker to invoke them. Any agent that can invoke these interfaces +** attacker to invoke them. Any agent that can invoke these interfaces ** can probably also take control of the process. ** ** Database connection client data is only available for SQLite @@ -6352,7 +6352,7 @@ typedef void (*sqlite3_destructor_type)(void*); ** pointed to by the 2nd parameter are taken as the application-defined ** function result. If the 3rd parameter is non-negative, then it ** must be the byte offset into the string where the NUL terminator would -** appear if the string where NUL terminated. If any NUL characters occur +** appear if the string were NUL terminated. If any NUL characters occur ** in the string at a byte offset that is less than the value of the 3rd ** parameter, then the resulting string will contain embedded NULs and the ** result of expressions operating on strings with embedded NULs is undefined. @@ -6410,7 +6410,7 @@ typedef void (*sqlite3_destructor_type)(void*); ** string and preferably a string literal. The sqlite3_result_pointer() ** routine is part of the [pointer passing interface] added for SQLite 3.20.0. ** -** If these routines are called from within the different thread +** If these routines are called from within a different thread ** than the one containing the application-defined function that received ** the [sqlite3_context] pointer, the results are undefined. */ @@ -6816,7 +6816,7 @@ SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*); ** METHOD: sqlite3 ** ** ^The sqlite3_db_name(D,N) interface returns a pointer to the schema name -** for the N-th database on database connection D, or a NULL pointer of N is +** for the N-th database on database connection D, or a NULL pointer if N is ** out of range. An N value of 0 means the main database file. An N of 1 is ** the "temp" schema. Larger values of N correspond to various ATTACH-ed ** databases. @@ -6911,7 +6911,7 @@ SQLITE_API int sqlite3_txn_state(sqlite3*,const char *zSchema); **
            The SQLITE_TXN_READ state means that the database is currently ** in a read transaction. Content has been read from the database file ** but nothing in the database file has changed. The transaction state -** will advanced to SQLITE_TXN_WRITE if any changes occur and there are +** will be advanced to SQLITE_TXN_WRITE if any changes occur and there are ** no other conflicting concurrent write transactions. The transaction ** state will revert to SQLITE_TXN_NONE following a [ROLLBACK] or ** [COMMIT].
            @@ -6920,7 +6920,7 @@ SQLITE_API int sqlite3_txn_state(sqlite3*,const char *zSchema); **
            The SQLITE_TXN_WRITE state means that the database is currently ** in a write transaction. Content has been written to the database file ** but has not yet committed. The transaction state will change to -** to SQLITE_TXN_NONE at the next [ROLLBACK] or [COMMIT].
            +** SQLITE_TXN_NONE at the next [ROLLBACK] or [COMMIT]. */ #define SQLITE_TXN_NONE 0 #define SQLITE_TXN_READ 1 @@ -7201,7 +7201,7 @@ SQLITE_API int sqlite3_db_release_memory(sqlite3*); ** CAPI3REF: Impose A Limit On Heap Size ** ** These interfaces impose limits on the amount of heap memory that will be -** by all database connections within a single process. +** used by all database connections within a single process. ** ** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the ** soft limit on the amount of heap memory that may be allocated by SQLite. @@ -7259,7 +7259,7 @@ SQLITE_API int sqlite3_db_release_memory(sqlite3*); **
          )^ ** ** The circumstances under which SQLite will enforce the heap limits may -** changes in future releases of SQLite. +** change in future releases of SQLite. */ SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N); SQLITE_API sqlite3_int64 sqlite3_hard_heap_limit64(sqlite3_int64 N); @@ -7374,8 +7374,8 @@ SQLITE_API int sqlite3_table_column_metadata( ** ^The entry point is zProc. ** ^(zProc may be 0, in which case SQLite will try to come up with an ** entry point name on its own. It first tries "sqlite3_extension_init". -** If that does not work, it constructs a name "sqlite3_X_init" where the -** X is consists of the lower-case equivalent of all ASCII alphabetic +** If that does not work, it constructs a name "sqlite3_X_init" where +** X consists of the lower-case equivalent of all ASCII alphabetic ** characters in the filename from the last "/" to the first following ** "." and omitting any initial "lib".)^ ** ^The sqlite3_load_extension() interface returns @@ -7446,7 +7446,7 @@ SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff); ** ^(Even though the function prototype shows that xEntryPoint() takes ** no arguments and returns void, SQLite invokes xEntryPoint() with three ** arguments and expects an integer result as if the signature of the -** entry point where as follows: +** entry point were as follows: ** **
           **    int xEntryPoint(
          @@ -7610,7 +7610,7 @@ struct sqlite3_module {
           ** virtual table and might not be checked again by the byte code.)^ ^(The
           ** aConstraintUsage[].omit flag is an optimization hint. When the omit flag
           ** is left in its default setting of false, the constraint will always be
          -** checked separately in byte code.  If the omit flag is change to true, then
          +** checked separately in byte code.  If the omit flag is changed to true, then
           ** the constraint may or may not be checked in byte code.  In other words,
           ** when the omit flag is true there is no guarantee that the constraint will
           ** not be checked again using byte code.)^
          @@ -7636,7 +7636,7 @@ struct sqlite3_module {
           ** The xBestIndex method may optionally populate the idxFlags field with a
           ** mask of SQLITE_INDEX_SCAN_* flags. One such flag is
           ** [SQLITE_INDEX_SCAN_HEX], which if set causes the [EXPLAIN QUERY PLAN]
          -** output to show the idxNum has hex instead of as decimal.  Another flag is
          +** output to show the idxNum as hex instead of as decimal.  Another flag is
           ** SQLITE_INDEX_SCAN_UNIQUE, which if set indicates that the query plan will
           ** return at most one row.
           **
          @@ -7777,7 +7777,7 @@ struct sqlite3_index_info {
           ** the implementation of the [virtual table module].   ^The fourth
           ** parameter is an arbitrary client data pointer that is passed through
           ** into the [xCreate] and [xConnect] methods of the virtual table module
          -** when a new virtual table is be being created or reinitialized.
          +** when a new virtual table is being created or reinitialized.
           **
           ** ^The sqlite3_create_module_v2() interface has a fifth parameter which
           ** is a pointer to a destructor for the pClientData.  ^SQLite will
          @@ -7942,7 +7942,7 @@ typedef struct sqlite3_blob sqlite3_blob;
           ** in *ppBlob. Otherwise an [error code] is returned and, unless the error
           ** code is SQLITE_MISUSE, *ppBlob is set to NULL.)^ ^This means that, provided
           ** the API is not misused, it is always safe to call [sqlite3_blob_close()]
          -** on *ppBlob after this function it returns.
          +** on *ppBlob after this function returns.
           **
           ** This function fails with SQLITE_ERROR if any of the following are true:
           ** 
            @@ -8062,7 +8062,7 @@ SQLITE_API int sqlite3_blob_close(sqlite3_blob *); ** ** ^Returns the size in bytes of the BLOB accessible via the ** successfully opened [BLOB handle] in its only argument. ^The -** incremental blob I/O routines can only read or overwriting existing +** incremental blob I/O routines can only read or overwrite existing ** blob content; they cannot change the size of a blob. ** ** This routine only works on a [BLOB handle] which has been created @@ -8212,7 +8212,7 @@ SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*); ** ^The sqlite3_mutex_alloc() routine allocates a new ** mutex and returns a pointer to it. ^The sqlite3_mutex_alloc() ** routine returns NULL if it is unable to allocate the requested -** mutex. The argument to sqlite3_mutex_alloc() must one of these +** mutex. The argument to sqlite3_mutex_alloc() must be one of these ** integer constants: ** **
              @@ -8445,7 +8445,7 @@ SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*); ** CAPI3REF: Retrieve the mutex for a database connection ** METHOD: sqlite3 ** -** ^This interface returns a pointer the [sqlite3_mutex] object that +** ^This interface returns a pointer to the [sqlite3_mutex] object that ** serializes access to the [database connection] given in the argument ** when the [threading mode] is Serialized. ** ^If the [threading mode] is Single-thread or Multi-thread then this @@ -8568,7 +8568,7 @@ SQLITE_API int sqlite3_test_control(int op, ...); ** CAPI3REF: SQL Keyword Checking ** ** These routines provide access to the set of SQL language keywords -** recognized by SQLite. Applications can uses these routines to determine +** recognized by SQLite. Applications can use these routines to determine ** whether or not a specific identifier needs to be escaped (for example, ** by enclosing in double-quotes) so as not to confuse the parser. ** @@ -8736,7 +8736,7 @@ SQLITE_API void sqlite3_str_reset(sqlite3_str*); ** content of the dynamic string under construction in X. The value ** returned by [sqlite3_str_value(X)] is managed by the sqlite3_str object X ** and might be freed or altered by any subsequent method on the same -** [sqlite3_str] object. Applications must not used the pointer returned +** [sqlite3_str] object. Applications must not use the pointer returned by ** [sqlite3_str_value(X)] after any subsequent method call on the same ** object. ^Applications may change the content of the string returned ** by [sqlite3_str_value(X)] as long as they do not write into any bytes @@ -8822,7 +8822,7 @@ SQLITE_API int sqlite3_status64( ** allocation which could not be satisfied by the [SQLITE_CONFIG_PAGECACHE] ** buffer and where forced to overflow to [sqlite3_malloc()]. The ** returned value includes allocations that overflowed because they -** where too large (they were larger than the "sz" parameter to +** were too large (they were larger than the "sz" parameter to ** [SQLITE_CONFIG_PAGECACHE]) and allocations that overflowed because ** no space was left in the page cache.)^ ** @@ -8906,28 +8906,29 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r ** [[SQLITE_DBSTATUS_LOOKASIDE_HIT]] ^(
              SQLITE_DBSTATUS_LOOKASIDE_HIT
              **
              This parameter returns the number of malloc attempts that were ** satisfied using lookaside memory. Only the high-water value is meaningful; -** the current value is always zero.)^ +** the current value is always zero.
              )^ ** ** [[SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE]] ** ^(
              SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE
              -**
              This parameter returns the number malloc attempts that might have +**
              This parameter returns the number of malloc attempts that might have ** been satisfied using lookaside memory but failed due to the amount of ** memory requested being larger than the lookaside slot size. ** Only the high-water value is meaningful; -** the current value is always zero.)^ +** the current value is always zero.
              )^ ** ** [[SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL]] ** ^(
              SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL
              -**
              This parameter returns the number malloc attempts that might have +**
              This parameter returns the number of malloc attempts that might have ** been satisfied using lookaside memory but failed due to all lookaside ** memory already being in use. ** Only the high-water value is meaningful; -** the current value is always zero.)^ +** the current value is always zero.
              )^ ** ** [[SQLITE_DBSTATUS_CACHE_USED]] ^(
              SQLITE_DBSTATUS_CACHE_USED
              **
              This parameter returns the approximate number of bytes of heap ** memory used by all pager caches associated with the database connection.)^ ** ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_USED is always 0. +**
              ** ** [[SQLITE_DBSTATUS_CACHE_USED_SHARED]] ** ^(
              SQLITE_DBSTATUS_CACHE_USED_SHARED
              @@ -8936,10 +8937,10 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r ** memory used by that pager cache is divided evenly between the attached ** connections.)^ In other words, if none of the pager caches associated ** with the database connection are shared, this request returns the same -** value as DBSTATUS_CACHE_USED. Or, if one or more or the pager caches are +** value as DBSTATUS_CACHE_USED. Or, if one or more of the pager caches are ** shared, the value returned by this call will be smaller than that returned ** by DBSTATUS_CACHE_USED. ^The highwater mark associated with -** SQLITE_DBSTATUS_CACHE_USED_SHARED is always 0. +** SQLITE_DBSTATUS_CACHE_USED_SHARED is always 0. ** ** [[SQLITE_DBSTATUS_SCHEMA_USED]] ^(
              SQLITE_DBSTATUS_SCHEMA_USED
              **
              This parameter returns the approximate number of bytes of heap @@ -8949,6 +8950,7 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r ** schema memory is shared with other database connections due to ** [shared cache mode] being enabled. ** ^The highwater mark associated with SQLITE_DBSTATUS_SCHEMA_USED is always 0. +**
              ** ** [[SQLITE_DBSTATUS_STMT_USED]] ^(
              SQLITE_DBSTATUS_STMT_USED
              **
              This parameter returns the approximate number of bytes of heap @@ -8985,7 +8987,7 @@ SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int r ** been written to disk in the middle of a transaction due to the page ** cache overflowing. Transactions are more efficient if they are written ** to disk all at once. When pages spill mid-transaction, that introduces -** additional overhead. This parameter can be used help identify +** additional overhead. This parameter can be used to help identify ** inefficiencies that can be resolved by increasing the cache size. **
              ** @@ -9465,7 +9467,7 @@ typedef struct sqlite3_backup sqlite3_backup; ** external process or via a database connection other than the one being ** used by the backup operation, then the backup will be automatically ** restarted by the next call to sqlite3_backup_step(). ^If the source -** database is modified by the using the same database connection as is used +** database is modified by using the same database connection as is used ** by the backup operation, then the backup database is automatically ** updated at the same time. ** @@ -9482,7 +9484,7 @@ typedef struct sqlite3_backup sqlite3_backup; ** and may not be used following a call to sqlite3_backup_finish(). ** ** ^The value returned by sqlite3_backup_finish is [SQLITE_OK] if no -** sqlite3_backup_step() errors occurred, regardless or whether or not +** sqlite3_backup_step() errors occurred, regardless of whether or not ** sqlite3_backup_step() completed. ** ^If an out-of-memory condition or IO error occurred during any prior ** sqlite3_backup_step() call on the same [sqlite3_backup] object, then @@ -10552,7 +10554,7 @@ SQLITE_API void sqlite3_stmt_scanstatus_reset(sqlite3_stmt*); ** METHOD: sqlite3 ** ** ^If a write-transaction is open on [database connection] D when the -** [sqlite3_db_cacheflush(D)] interface invoked, any dirty +** [sqlite3_db_cacheflush(D)] interface is invoked, any dirty ** pages in the pager-cache that are not currently in use are written out ** to disk. A dirty page may be in use if a database cursor created by an ** active SQL statement is reading from it, or if it is page 1 of a database diff --git a/deps/undici/src/README.md b/deps/undici/src/README.md index 23f253c45e3b9a..966f2be95ec2d8 100644 --- a/deps/undici/src/README.md +++ b/deps/undici/src/README.md @@ -43,6 +43,125 @@ The benchmark is a simple getting data [example](https://github.com/nodejs/undic └────────────────────────┴─────────┴────────────────────┴────────────┴─────────────────────────┘ ``` +## Undici vs. Fetch + +### Overview + +Node.js includes a built-in `fetch()` implementation powered by undici starting from Node.js v18. However, there are important differences between using the built-in fetch and installing undici as a separate module. + +### Built-in Fetch (Node.js v18+) + +Node.js's built-in fetch is powered by a bundled version of undici: + +```js +// Available globally in Node.js v18+ +const response = await fetch('https://api.example.com/data'); +const data = await response.json(); + +// Check the bundled undici version +console.log(process.versions.undici); // e.g., "5.28.4" +``` + +**Pros:** +- No additional dependencies required +- Works across different JavaScript runtimes +- Automatic compression handling (gzip, deflate, br) +- Built-in caching support (in development) + +**Cons:** +- Limited to the undici version bundled with your Node.js version +- Less control over connection pooling and advanced features +- Error handling follows Web API standards (errors wrapped in `TypeError`) +- Performance overhead due to Web Streams implementation + +### Undici Module + +Installing undici as a separate module gives you access to the latest features and APIs: + +```bash +npm install undici +``` + +```js +import { request, fetch, Agent, setGlobalDispatcher } from 'undici'; + +// Use undici.request for maximum performance +const { statusCode, headers, body } = await request('https://api.example.com/data'); +const data = await body.json(); + +// Or use undici.fetch with custom configuration +const agent = new Agent({ keepAliveTimeout: 10000 }); +setGlobalDispatcher(agent); +const response = await fetch('https://api.example.com/data'); +``` + +**Pros:** +- Latest undici features and bug fixes +- Access to advanced APIs (`request`, `stream`, `pipeline`) +- Fine-grained control over connection pooling +- Better error handling with clearer error messages +- Superior performance, especially with `undici.request` +- HTTP/1.1 pipelining support +- Custom interceptors and middleware +- Advanced features like `ProxyAgent`, `MockAgent` + +**Cons:** +- Additional dependency to manage +- Larger bundle size + +### When to Use Each + +#### Use Built-in Fetch When: +- You want zero dependencies +- Building isomorphic code that runs in browsers and Node.js +- Simple HTTP requests without advanced configuration +- You're okay with the undici version bundled in your Node.js version + +#### Use Undici Module When: +- You need the latest undici features and performance improvements +- You require advanced connection pooling configuration +- You need APIs not available in the built-in fetch (`ProxyAgent`, `MockAgent`, etc.) +- Performance is critical (use `undici.request` for maximum speed) +- You want better error handling and debugging capabilities +- You need HTTP/1.1 pipelining or advanced interceptors +- You prefer decoupled protocol and API interfaces + +### Performance Comparison + +Based on benchmarks, here's the typical performance hierarchy: + +1. **`undici.request()`** - Fastest, most efficient +2. **`undici.fetch()`** - Good performance, standard compliance +3. **Node.js `http`/`https`** - Baseline performance + +### Migration Guide + +If you're currently using built-in fetch and want to migrate to undici: + +```js +// Before: Built-in fetch +const response = await fetch('https://api.example.com/data'); + +// After: Undici fetch (drop-in replacement) +import { fetch } from 'undici'; +const response = await fetch('https://api.example.com/data'); + +// Or: Undici request (better performance) +import { request } from 'undici'; +const { statusCode, body } = await request('https://api.example.com/data'); +const data = await body.json(); +``` + +### Version Compatibility + +You can check which version of undici is bundled with your Node.js version: + +```js +console.log(process.versions.undici); +``` + +Installing undici as a module allows you to use a newer version than what's bundled with Node.js, giving you access to the latest features and performance improvements. + ## Quick Start ```js @@ -63,6 +182,44 @@ for await (const data of body) { console.log('data', data) } console.log('trailers', trailers) ``` +## Global Installation + +Undici provides an `install()` function to add all WHATWG fetch classes to `globalThis`, making them available globally: + +```js +import { install } from 'undici' + +// Install all WHATWG fetch classes globally +install() + +// Now you can use fetch classes globally without importing +const response = await fetch('https://api.example.com/data') +const data = await response.json() + +// All classes are available globally: +const headers = new Headers([['content-type', 'application/json']]) +const request = new Request('https://example.com') +const formData = new FormData() +const ws = new WebSocket('wss://example.com') +const eventSource = new EventSource('https://example.com/events') +``` + +The `install()` function adds the following classes to `globalThis`: + +- `fetch` - The fetch function +- `Headers` - HTTP headers management +- `Response` - HTTP response representation +- `Request` - HTTP request representation +- `FormData` - Form data handling +- `WebSocket` - WebSocket client +- `CloseEvent`, `ErrorEvent`, `MessageEvent` - WebSocket events +- `EventSource` - Server-sent events client + +This is useful for: +- Polyfilling environments that don't have fetch +- Ensuring consistent fetch behavior across different Node.js versions +- Making undici's implementations available globally for libraries that expect them + ## Body Mixins The `body` mixins are the most common way to format the request/response body. Mixins include: diff --git a/deps/undici/src/docs/docs/api/CacheStore.md b/deps/undici/src/docs/docs/api/CacheStore.md index 0f3b3eebc7f06f..00ceb960641889 100644 --- a/deps/undici/src/docs/docs/api/CacheStore.md +++ b/deps/undici/src/docs/docs/api/CacheStore.md @@ -13,9 +13,9 @@ The `MemoryCacheStore` stores the responses in-memory. **Options** -- `maxSize` - The maximum total size in bytes of all stored responses. Default `Infinity`. -- `maxCount` - The maximum amount of responses to store. Default `Infinity`. -- `maxEntrySize` - The maximum size in bytes that a response's body can be. If a response's body is greater than or equal to this, the response will not be cached. Default `Infinity`. +- `maxSize` - The maximum total size in bytes of all stored responses. Default `104857600` (100MB). +- `maxCount` - The maximum amount of responses to store. Default `1024`. +- `maxEntrySize` - The maximum size in bytes that a response's body can be. If a response's body is greater than or equal to this, the response will not be cached. Default `5242880` (5MB). ### Getters diff --git a/deps/undici/src/docs/docs/api/Debug.md b/deps/undici/src/docs/docs/api/Debug.md index f7a8864b099aa3..69c7d7b4fee5c8 100644 --- a/deps/undici/src/docs/docs/api/Debug.md +++ b/deps/undici/src/docs/docs/api/Debug.md @@ -14,14 +14,14 @@ NODE_DEBUG=undici node script.js UNDICI 16241: connecting to nodejs.org using https:h1 UNDICI 16241: connecting to nodejs.org using https:h1 UNDICI 16241: connected to nodejs.org using https:h1 -UNDICI 16241: sending request to GET https://nodejs.org// -UNDICI 16241: received response to GET https://nodejs.org// - HTTP 307 +UNDICI 16241: sending request to GET https://nodejs.org/ +UNDICI 16241: received response to GET https://nodejs.org/ - HTTP 307 UNDICI 16241: connecting to nodejs.org using https:h1 -UNDICI 16241: trailers received from GET https://nodejs.org// +UNDICI 16241: trailers received from GET https://nodejs.org/ UNDICI 16241: connected to nodejs.org using https:h1 -UNDICI 16241: sending request to GET https://nodejs.org//en -UNDICI 16241: received response to GET https://nodejs.org//en - HTTP 200 -UNDICI 16241: trailers received from GET https://nodejs.org//en +UNDICI 16241: sending request to GET https://nodejs.org/en +UNDICI 16241: received response to GET https://nodejs.org/en - HTTP 200 +UNDICI 16241: trailers received from GET https://nodejs.org/en ``` ## `fetch` @@ -36,14 +36,14 @@ NODE_DEBUG=fetch node script.js FETCH 16241: connecting to nodejs.org using https:h1 FETCH 16241: connecting to nodejs.org using https:h1 FETCH 16241: connected to nodejs.org using https:h1 -FETCH 16241: sending request to GET https://nodejs.org// -FETCH 16241: received response to GET https://nodejs.org// - HTTP 307 +FETCH 16241: sending request to GET https://nodejs.org/ +FETCH 16241: received response to GET https://nodejs.org/ - HTTP 307 FETCH 16241: connecting to nodejs.org using https:h1 -FETCH 16241: trailers received from GET https://nodejs.org// +FETCH 16241: trailers received from GET https://nodejs.org/ FETCH 16241: connected to nodejs.org using https:h1 -FETCH 16241: sending request to GET https://nodejs.org//en -FETCH 16241: received response to GET https://nodejs.org//en - HTTP 200 -FETCH 16241: trailers received from GET https://nodejs.org//en +FETCH 16241: sending request to GET https://nodejs.org/en +FETCH 16241: received response to GET https://nodejs.org/en - HTTP 200 +FETCH 16241: trailers received from GET https://nodejs.org/en ``` ## `websocket` @@ -57,6 +57,6 @@ NODE_DEBUG=websocket node script.js WEBSOCKET 18309: connecting to echo.websocket.org using https:h1 WEBSOCKET 18309: connected to echo.websocket.org using https:h1 -WEBSOCKET 18309: sending request to GET https://echo.websocket.org// +WEBSOCKET 18309: sending request to GET https://echo.websocket.org/ WEBSOCKET 18309: connection opened ``` diff --git a/deps/undici/src/docs/docs/api/DiagnosticsChannel.md b/deps/undici/src/docs/docs/api/DiagnosticsChannel.md index 4038e0e7801143..9a21c7433cc520 100644 --- a/deps/undici/src/docs/docs/api/DiagnosticsChannel.md +++ b/deps/undici/src/docs/docs/api/DiagnosticsChannel.md @@ -27,9 +27,22 @@ diagnosticsChannel.channel('undici:request:create').subscribe(({ request }) => { Note: a request is only loosely completed to a given socket. +## `undici:request:bodyChunkSent` + +This message is published when a chunk of the request body is being sent. + +```js +import diagnosticsChannel from 'diagnostics_channel' + +diagnosticsChannel.channel('undici:request:bodyChunkSent').subscribe(({ request, chunk }) => { + // request is the same object undici:request:create +}) +``` ## `undici:request:bodySent` +This message is published after the request body has been fully sent. + ```js import diagnosticsChannel from 'diagnostics_channel' @@ -54,6 +67,18 @@ diagnosticsChannel.channel('undici:request:headers').subscribe(({ request, respo }) ``` +## `undici:request:bodyChunkReceived` + +This message is published after a chunk of the response body has been received. + +```js +import diagnosticsChannel from 'diagnostics_channel' + +diagnosticsChannel.channel('undici:request:bodyChunkReceived').subscribe(({ request, chunk }) => { + // request is the same object undici:request:create +}) +``` + ## `undici:request:trailers` This message is published after the response body and trailers have been received, i.e. the response has been completed. diff --git a/deps/undici/src/docs/docs/api/Dispatcher.md b/deps/undici/src/docs/docs/api/Dispatcher.md index e574a6bfb2e853..6def7872dbfea7 100644 --- a/deps/undici/src/docs/docs/api/Dispatcher.md +++ b/deps/undici/src/docs/docs/api/Dispatcher.md @@ -841,9 +841,28 @@ try { Compose a new dispatcher from the current dispatcher and the given interceptors. > _Notes_: -> - The order of the interceptors matters. The first interceptor will be the first to be called. +> - The order of the interceptors matters. The last interceptor will be the first to be called. > - It is important to note that the `interceptor` function should return a function that follows the `Dispatcher.dispatch` signature. > - Any fork of the chain of `interceptors` can lead to unexpected results. +> +> **Interceptor Stack Visualization:** +> ``` +> compose([interceptor1, interceptor2, interceptor3]) +> +> Request Flow: +> ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ +> │ Request │───▶│interceptor3 │───▶│interceptor2 │───▶│interceptor1 │───▶│ dispatcher │ +> └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘ │ .dispatch │ +> ▲ ▲ ▲ └─────────────┘ +> │ │ │ ▲ +> (called first) (called second) (called last) │ +> │ +> ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ +> │ Response │◀───│interceptor3 │◀───│interceptor2 │◀───│interceptor1 │◀─────────┘ +> └─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘ +> +> The interceptors are composed in reverse order due to function composition. +> ``` Arguments: diff --git a/deps/undici/src/docs/docs/api/GlobalInstallation.md b/deps/undici/src/docs/docs/api/GlobalInstallation.md new file mode 100644 index 00000000000000..7e4529d8f1967b --- /dev/null +++ b/deps/undici/src/docs/docs/api/GlobalInstallation.md @@ -0,0 +1,91 @@ +# Global Installation + +Undici provides an `install()` function to add all WHATWG fetch classes to `globalThis`, making them available globally without requiring imports. + +## `install()` + +Install all WHATWG fetch classes globally on `globalThis`. + +**Example:** + +```js +import { install } from 'undici' + +// Install all WHATWG fetch classes globally +install() + +// Now you can use fetch classes globally without importing +const response = await fetch('https://api.example.com/data') +const data = await response.json() + +// All classes are available globally: +const headers = new Headers([['content-type', 'application/json']]) +const request = new Request('https://example.com') +const formData = new FormData() +const ws = new WebSocket('wss://example.com') +const eventSource = new EventSource('https://example.com/events') +``` + +## Installed Classes + +The `install()` function adds the following classes to `globalThis`: + +| Class | Description | +|-------|-------------| +| `fetch` | The fetch function for making HTTP requests | +| `Headers` | HTTP headers management | +| `Response` | HTTP response representation | +| `Request` | HTTP request representation | +| `FormData` | Form data handling | +| `WebSocket` | WebSocket client | +| `CloseEvent` | WebSocket close event | +| `ErrorEvent` | WebSocket error event | +| `MessageEvent` | WebSocket message event | +| `EventSource` | Server-sent events client | + +## Use Cases + +Global installation is useful for: + +- **Polyfilling environments** that don't have native fetch support +- **Ensuring consistent behavior** across different Node.js versions +- **Library compatibility** when third-party libraries expect global fetch +- **Migration scenarios** where you want to replace built-in implementations +- **Testing environments** where you need predictable fetch behavior + +## Example: Polyfilling an Environment + +```js +import { install } from 'undici' + +// Check if fetch is available and install if needed +if (typeof globalThis.fetch === 'undefined') { + install() + console.log('Undici fetch installed globally') +} + +// Now fetch is guaranteed to be available +const response = await fetch('https://api.example.com') +``` + +## Example: Testing Environment + +```js +import { install } from 'undici' + +// In test setup, ensure consistent fetch behavior +install() + +// Now all tests use undici's implementations +test('fetch API test', async () => { + const response = await fetch('https://example.com') + expect(response).toBeInstanceOf(Response) +}) +``` + +## Notes + +- The `install()` function overwrites any existing global implementations +- Classes installed are undici's implementations, not Node.js built-ins +- This provides access to undici's latest features and performance improvements +- The global installation persists for the lifetime of the process \ No newline at end of file diff --git a/deps/undici/src/docs/docs/api/MockClient.md b/deps/undici/src/docs/docs/api/MockClient.md index 52ee3e33bdf9b8..0e6c57a1a84c43 100644 --- a/deps/undici/src/docs/docs/api/MockClient.md +++ b/deps/undici/src/docs/docs/api/MockClient.md @@ -38,6 +38,10 @@ const mockClient = mockAgent.get('http://localhost:3000') Implements: [`MockPool.intercept(options)`](/docs/docs/api/MockPool.md#mockpoolinterceptoptions) +### `MockClient.cleanMocks()` + +Implements: [`MockPool.cleanMocks()`](/docs/docs/api/MockPool.md#mockpoolcleanmocks) + ### `MockClient.close()` Implements: [`MockPool.close()`](/docs/docs/api/MockPool.md#mockpoolclose) diff --git a/deps/undici/src/docs/docs/api/MockPool.md b/deps/undici/src/docs/docs/api/MockPool.md index ff01b9a35ab945..6656b95d834c05 100644 --- a/deps/undici/src/docs/docs/api/MockPool.md +++ b/deps/undici/src/docs/docs/api/MockPool.md @@ -546,3 +546,9 @@ for await (const data of body) { console.log('data', data.toString('utf8')) // data foo } ``` + +### `MockPool.cleanMocks()` + +This method cleans up all the prepared mocks. + +Returns: `void` diff --git a/deps/undici/src/docs/docs/api/ProxyAgent.md b/deps/undici/src/docs/docs/api/ProxyAgent.md index e0581a4de5164c..0fced821cd8b8b 100644 --- a/deps/undici/src/docs/docs/api/ProxyAgent.md +++ b/deps/undici/src/docs/docs/api/ProxyAgent.md @@ -17,6 +17,8 @@ Returns: `ProxyAgent` Extends: [`AgentOptions`](/docs/docs/api/Agent.md#parameter-agentoptions) > It ommits `AgentOptions#connect`. +> **Note:** When `AgentOptions#connections` is set, and different from `0`, the non-standard [`proxy-connection` header](https://udger.com/resources/http-request-headers-detail?header=Proxy-Connection) will be set to `keep-alive` in the request. + * **uri** `string | URL` (required) - The URI of the proxy server. This can be provided as a string, as an instance of the URL class, or as an object with a `uri` property of type string. If the `uri` is provided as a string or `uri` is an object with an `uri` property of type string, then it will be parsed into a `URL` object according to the [WHATWG URL Specification](https://url.spec.whatwg.org). For detailed information on the parsing process and potential validation errors, please refer to the ["Writing" section](https://url.spec.whatwg.org/#writing) of the WHATWG URL Specification. diff --git a/deps/undici/src/docs/docs/api/RetryAgent.md b/deps/undici/src/docs/docs/api/RetryAgent.md index 2d9200fd30f594..9b423d9f0fff56 100644 --- a/deps/undici/src/docs/docs/api/RetryAgent.md +++ b/deps/undici/src/docs/docs/api/RetryAgent.md @@ -16,6 +16,7 @@ Returns: `ProxyAgent` ### Parameter: `RetryHandlerOptions` +- **throwOnError** `boolean` (optional) - Disable to prevent throwing error on last retry attept, useful if you need the body on errors from server or if you have custom error handler. Default: `true` - **retry** `(err: Error, context: RetryContext, callback: (err?: Error | null) => void) => void` (optional) - Function to be called after every retry. It should pass error if no more retries should be performed. - **maxRetries** `number` (optional) - Maximum number of retries. Default: `5` - **maxTimeout** `number` (optional) - Maximum number of milliseconds to wait before retrying. Default: `30000` (30 seconds) @@ -39,7 +40,11 @@ import { Agent, RetryAgent } from 'undici' const agent = new RetryAgent(new Agent()) -const res = await agent.request('http://example.com') +const res = await agent.request({ + method: 'GET', + origin: 'http://example.com', + path: '/', +}) console.log(res.statusCode) console.log(await res.body.text()) ``` diff --git a/deps/undici/src/docs/docs/api/RetryHandler.md b/deps/undici/src/docs/docs/api/RetryHandler.md index 04a621de33c17b..d7b3e88d0f717e 100644 --- a/deps/undici/src/docs/docs/api/RetryHandler.md +++ b/deps/undici/src/docs/docs/api/RetryHandler.md @@ -19,6 +19,7 @@ Extends: [`Dispatch.DispatchOptions`](/docs/docs/api/Dispatcher.md#parameter-dis #### `RetryOptions` +- **throwOnError** `boolean` (optional) - Disable to prevent throwing error on last retry attept, useful if you need the body on errors from server or if you have custom error handler. - **retry** `(err: Error, context: RetryContext, callback: (err?: Error | null) => void) => number | null` (optional) - Function to be called after every retry. It should pass error if no more retries should be performed. - **maxRetries** `number` (optional) - Maximum number of retries. Default: `5` - **maxTimeout** `number` (optional) - Maximum number of milliseconds to wait before retrying. Default: `30000` (30 seconds) diff --git a/deps/undici/src/index.js b/deps/undici/src/index.js index 625ec98f0ef5df..8f2ed39c14e17b 100644 --- a/deps/undici/src/index.js +++ b/deps/undici/src/index.js @@ -181,3 +181,18 @@ module.exports.mockErrors = mockErrors const { EventSource } = require('./lib/web/eventsource/eventsource') module.exports.EventSource = EventSource + +function install () { + globalThis.fetch = module.exports.fetch + globalThis.Headers = module.exports.Headers + globalThis.Response = module.exports.Response + globalThis.Request = module.exports.Request + globalThis.FormData = module.exports.FormData + globalThis.WebSocket = module.exports.WebSocket + globalThis.CloseEvent = module.exports.CloseEvent + globalThis.ErrorEvent = module.exports.ErrorEvent + globalThis.MessageEvent = module.exports.MessageEvent + globalThis.EventSource = module.exports.EventSource +} + +module.exports.install = install diff --git a/deps/undici/src/lib/api/api-stream.js b/deps/undici/src/lib/api/api-stream.js index eb927336a3fb48..5d0b3fbe633271 100644 --- a/deps/undici/src/lib/api/api-stream.js +++ b/deps/undici/src/lib/api/api-stream.js @@ -117,7 +117,7 @@ class StreamHandler extends AsyncResource { const { callback, res, opaque, trailers, abort } = this this.res = null - if (err || !res.readable) { + if (err || !res?.readable) { util.destroy(res, err) } diff --git a/deps/undici/src/lib/cache/memory-cache-store.js b/deps/undici/src/lib/cache/memory-cache-store.js index 2fb3dfabd19eb8..dba29ae4de9d82 100644 --- a/deps/undici/src/lib/cache/memory-cache-store.js +++ b/deps/undici/src/lib/cache/memory-cache-store.js @@ -16,9 +16,9 @@ const { assertCacheKey, assertCacheValue } = require('../util/cache.js') * @extends {EventEmitter} */ class MemoryCacheStore extends EventEmitter { - #maxCount = Infinity - #maxSize = Infinity - #maxEntrySize = Infinity + #maxCount = 1024 + #maxSize = 104857600 // 100MB + #maxEntrySize = 5242880 // 5MB #size = 0 #count = 0 diff --git a/deps/undici/src/lib/cache/sqlite-cache-store.js b/deps/undici/src/lib/cache/sqlite-cache-store.js index e2fbc6718ab009..7cb4aa7e2466e3 100644 --- a/deps/undici/src/lib/cache/sqlite-cache-store.js +++ b/deps/undici/src/lib/cache/sqlite-cache-store.js @@ -1,6 +1,6 @@ 'use strict' -const { Writable } = require('stream') +const { Writable } = require('node:stream') const { assertCacheKey, assertCacheValue } = require('../util/cache.js') let DatabaseSync diff --git a/deps/undici/src/lib/core/connect.js b/deps/undici/src/lib/core/connect.js index 9bb49010b037f3..4e11deee37feae 100644 --- a/deps/undici/src/lib/core/connect.js +++ b/deps/undici/src/lib/core/connect.js @@ -12,64 +12,34 @@ let tls // include tls conditionally since it is not always available // resolve the same servername multiple times even when // re-use is enabled. -let SessionCache -// FIXME: remove workaround when the Node bug is fixed -// https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 -if (global.FinalizationRegistry && !(process.env.NODE_V8_COVERAGE || process.env.UNDICI_NO_FG)) { - SessionCache = class WeakSessionCache { - constructor (maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions - this._sessionCache = new Map() - this._sessionRegistry = new global.FinalizationRegistry((key) => { - if (this._sessionCache.size < this._maxCachedSessions) { - return - } - - const ref = this._sessionCache.get(key) - if (ref !== undefined && ref.deref() === undefined) { - this._sessionCache.delete(key) - } - }) - } - - get (sessionKey) { - const ref = this._sessionCache.get(sessionKey) - return ref ? ref.deref() : null - } - - set (sessionKey, session) { - if (this._maxCachedSessions === 0) { +const SessionCache = class WeakSessionCache { + constructor (maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions + this._sessionCache = new Map() + this._sessionRegistry = new FinalizationRegistry((key) => { + if (this._sessionCache.size < this._maxCachedSessions) { return } - this._sessionCache.set(sessionKey, new WeakRef(session)) - this._sessionRegistry.register(session, sessionKey) - } - } -} else { - SessionCache = class SimpleSessionCache { - constructor (maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions - this._sessionCache = new Map() - } - - get (sessionKey) { - return this._sessionCache.get(sessionKey) - } - - set (sessionKey, session) { - if (this._maxCachedSessions === 0) { - return + const ref = this._sessionCache.get(key) + if (ref !== undefined && ref.deref() === undefined) { + this._sessionCache.delete(key) } + }) + } - if (this._sessionCache.size >= this._maxCachedSessions) { - // remove the oldest session - const { value: oldestKey } = this._sessionCache.keys().next() - this._sessionCache.delete(oldestKey) - } + get (sessionKey) { + const ref = this._sessionCache.get(sessionKey) + return ref ? ref.deref() : null + } - this._sessionCache.set(sessionKey, session) + set (sessionKey, session) { + if (this._maxCachedSessions === 0) { + return } + + this._sessionCache.set(sessionKey, new WeakRef(session)) + this._sessionRegistry.register(session, sessionKey) } } diff --git a/deps/undici/src/lib/core/diagnostics.js b/deps/undici/src/lib/core/diagnostics.js index 44c168e6e794e7..224a5c49f5da2c 100644 --- a/deps/undici/src/lib/core/diagnostics.js +++ b/deps/undici/src/lib/core/diagnostics.js @@ -16,6 +16,8 @@ const channels = { // Request create: diagnosticsChannel.channel('undici:request:create'), bodySent: diagnosticsChannel.channel('undici:request:bodySent'), + bodyChunkSent: diagnosticsChannel.channel('undici:request:bodyChunkSent'), + bodyChunkReceived: diagnosticsChannel.channel('undici:request:bodyChunkReceived'), headers: diagnosticsChannel.channel('undici:request:headers'), trailers: diagnosticsChannel.channel('undici:request:trailers'), error: diagnosticsChannel.channel('undici:request:error'), @@ -85,7 +87,7 @@ function trackClientEvents (debugLog = undiciDebugLog) { const { request: { method, path, origin } } = evt - debugLog('sending request to %s %s/%s', method, origin, path) + debugLog('sending request to %s %s%s', method, origin, path) }) } @@ -105,7 +107,7 @@ function trackRequestEvents (debugLog = undiciDebugLog) { response: { statusCode } } = evt debugLog( - 'received response to %s %s/%s - HTTP %d', + 'received response to %s %s%s - HTTP %d', method, origin, path, @@ -118,7 +120,7 @@ function trackRequestEvents (debugLog = undiciDebugLog) { const { request: { method, path, origin } } = evt - debugLog('trailers received from %s %s/%s', method, origin, path) + debugLog('trailers received from %s %s%s', method, origin, path) }) diagnosticsChannel.subscribe('undici:request:error', @@ -128,7 +130,7 @@ function trackRequestEvents (debugLog = undiciDebugLog) { error } = evt debugLog( - 'request to %s %s/%s errored - %s', + 'request to %s %s%s errored - %s', method, origin, path, diff --git a/deps/undici/src/lib/core/request.js b/deps/undici/src/lib/core/request.js index a8680b5057f23c..ef216af595259d 100644 --- a/deps/undici/src/lib/core/request.js +++ b/deps/undici/src/lib/core/request.js @@ -194,6 +194,9 @@ class Request { } onBodySent (chunk) { + if (channels.bodyChunkSent.hasSubscribers) { + channels.bodyChunkSent.publish({ request: this, chunk }) + } if (this[kHandler].onBodySent) { try { return this[kHandler].onBodySent(chunk) @@ -252,6 +255,9 @@ class Request { assert(!this.aborted) assert(!this.completed) + if (channels.bodyChunkReceived.hasSubscribers) { + channels.bodyChunkReceived.publish({ request: this, chunk }) + } try { return this[kHandler].onData(chunk) } catch (err) { diff --git a/deps/undici/src/lib/core/util.js b/deps/undici/src/lib/core/util.js index df72fa8d272f56..aa44edfa97f18a 100644 --- a/deps/undici/src/lib/core/util.js +++ b/deps/undici/src/lib/core/util.js @@ -6,7 +6,6 @@ const { IncomingMessage } = require('node:http') const stream = require('node:stream') const net = require('node:net') const { Blob } = require('node:buffer') -const nodeUtil = require('node:util') const { stringify } = require('node:querystring') const { EventEmitter: EE } = require('node:events') const timers = require('../util/timers') @@ -660,48 +659,6 @@ function addAbortListener (signal, listener) { return () => signal.removeListener('abort', listener) } -/** - * @function - * @param {string} value - * @returns {string} - */ -const toUSVString = (() => { - if (typeof String.prototype.toWellFormed === 'function') { - /** - * @param {string} value - * @returns {string} - */ - return (value) => `${value}`.toWellFormed() - } else { - /** - * @param {string} value - * @returns {string} - */ - return nodeUtil.toUSVString - } -})() - -/** - * @param {*} value - * @returns {boolean} - */ -// TODO: move this to webidl -const isUSVString = (() => { - if (typeof String.prototype.isWellFormed === 'function') { - /** - * @param {*} value - * @returns {boolean} - */ - return (value) => `${value}`.isWellFormed() - } else { - /** - * @param {*} value - * @returns {boolean} - */ - return (value) => toUSVString(value) === `${value}` - } -})() - /** * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 * @param {number} c @@ -943,8 +900,6 @@ Object.setPrototypeOf(normalizedMethodRecords, null) module.exports = { kEnumerableProperty, isDisturbed, - toUSVString, - isUSVString, isBlobLike, parseOrigin, parseURL, diff --git a/deps/undici/src/lib/dispatcher/client-h1.js b/deps/undici/src/lib/dispatcher/client-h1.js index 37fe94e2c4fc49..63aee63760d2e7 100644 --- a/deps/undici/src/lib/dispatcher/client-h1.js +++ b/deps/undici/src/lib/dispatcher/client-h1.js @@ -249,7 +249,7 @@ class Parser { this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this)) } else { this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this)) - this.timeout.unref() + this.timeout?.unref() } } diff --git a/deps/undici/src/lib/dispatcher/proxy-agent.js b/deps/undici/src/lib/dispatcher/proxy-agent.js index 3f656f7eb564fb..cd9bc45ffad5c7 100644 --- a/deps/undici/src/lib/dispatcher/proxy-agent.js +++ b/deps/undici/src/lib/dispatcher/proxy-agent.js @@ -144,7 +144,8 @@ class ProxyAgent extends DispatcherBase { signal: opts.signal, headers: { ...this[kProxyHeaders], - host: opts.host + host: opts.host, + ...(opts.connections == null || opts.connections > 0 ? { 'proxy-connection': 'keep-alive' } : {}) }, servername: this[kProxyTls]?.servername || proxyHostname }) diff --git a/deps/undici/src/lib/handler/retry-handler.js b/deps/undici/src/lib/handler/retry-handler.js index 00f582e570f591..0d4b2affdcaba4 100644 --- a/deps/undici/src/lib/handler/retry-handler.js +++ b/deps/undici/src/lib/handler/retry-handler.js @@ -29,13 +29,16 @@ class RetryHandler { methods, errorCodes, retryAfter, - statusCodes + statusCodes, + throwOnError } = retryOptions ?? {} + this.error = null this.dispatch = dispatch this.handler = WrapHandler.wrap(handler) this.opts = { ...dispatchOpts, body: wrapRequestBody(opts.body) } this.retryOpts = { + throwOnError: throwOnError ?? true, retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry], retryAfter: retryAfter ?? true, maxTimeout: maxTimeout ?? 30 * 1000, // 30s, @@ -68,6 +71,50 @@ class RetryHandler { this.etag = null } + onResponseStartWithRetry (controller, statusCode, headers, statusMessage, err) { + if (this.retryOpts.throwOnError) { + // Preserve old behavior for status codes that are not eligible for retry + if (this.retryOpts.statusCodes.includes(statusCode) === false) { + this.headersSent = true + this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage) + } else { + this.error = err + } + + return + } + + if (isDisturbed(this.opts.body)) { + this.headersSent = true + this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage) + return + } + + function shouldRetry (passedErr) { + if (passedErr) { + this.headersSent = true + + this.headersSent = true + this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage) + controller.resume() + return + } + + this.error = err + controller.resume() + } + + controller.pause() + this.retryOpts.retry( + err, + { + state: { counter: this.retryCount }, + opts: { retryOptions: this.retryOpts, ...this.opts } + }, + shouldRetry.bind(this) + ) + } + onRequestStart (controller, context) { if (!this.headersSent) { this.handler.onRequestStart?.(controller, context) @@ -137,26 +184,19 @@ class RetryHandler { } onResponseStart (controller, statusCode, headers, statusMessage) { + this.error = null this.retryCount += 1 if (statusCode >= 300) { - if (this.retryOpts.statusCodes.includes(statusCode) === false) { - this.headersSent = true - this.handler.onResponseStart?.( - controller, - statusCode, - headers, - statusMessage - ) - return - } else { - throw new RequestRetryError('Request failed', statusCode, { - headers, - data: { - count: this.retryCount - } - }) - } + const err = new RequestRetryError('Request failed', statusCode, { + headers, + data: { + count: this.retryCount + } + }) + + this.onResponseStartWithRetry(controller, statusCode, headers, statusMessage, err) + return } // Checkpoint for resume from where we left it @@ -175,6 +215,7 @@ class RetryHandler { const contentRange = parseRangeHeader(headers['content-range']) // If no content range if (!contentRange) { + // We always throw here as we want to indicate that we entred unexpected path throw new RequestRetryError('Content-Range mismatch', statusCode, { headers, data: { count: this.retryCount } @@ -183,6 +224,7 @@ class RetryHandler { // Let's start with a weak etag check if (this.etag != null && this.etag !== headers.etag) { + // We always throw here as we want to indicate that we entred unexpected path throw new RequestRetryError('ETag mismatch', statusCode, { headers, data: { count: this.retryCount } @@ -266,14 +308,52 @@ class RetryHandler { } onResponseData (controller, chunk) { + if (this.error) { + return + } + this.start += chunk.length this.handler.onResponseData?.(controller, chunk) } onResponseEnd (controller, trailers) { - this.retryCount = 0 - return this.handler.onResponseEnd?.(controller, trailers) + if (this.error && this.retryOpts.throwOnError) { + throw this.error + } + + if (!this.error) { + this.retryCount = 0 + return this.handler.onResponseEnd?.(controller, trailers) + } + + this.retry(controller) + } + + retry (controller) { + if (this.start !== 0) { + const headers = { range: `bytes=${this.start}-${this.end ?? ''}` } + + // Weak etag check - weak etags will make comparison algorithms never match + if (this.etag != null) { + headers['if-match'] = this.etag + } + + this.opts = { + ...this.opts, + headers: { + ...this.opts.headers, + ...headers + } + } + } + + try { + this.retryCountCheckpoint = this.retryCount + this.dispatch(this.opts, this) + } catch (err) { + this.handler.onResponseError?.(controller, err) + } } onResponseError (controller, err) { @@ -282,6 +362,15 @@ class RetryHandler { return } + function shouldRetry (returnedErr) { + if (!returnedErr) { + this.retry(controller) + return + } + + this.handler?.onResponseError?.(controller, returnedErr) + } + // We reconcile in case of a mix between network errors // and server error response if (this.retryCount - this.retryCountCheckpoint > 0) { @@ -299,43 +388,8 @@ class RetryHandler { state: { counter: this.retryCount }, opts: { retryOptions: this.retryOpts, ...this.opts } }, - onRetry.bind(this) + shouldRetry.bind(this) ) - - /** - * @this {RetryHandler} - * @param {Error} [err] - * @returns - */ - function onRetry (err) { - if (err != null || controller?.aborted || isDisturbed(this.opts.body)) { - return this.handler.onResponseError?.(controller, err) - } - - if (this.start !== 0) { - const headers = { range: `bytes=${this.start}-${this.end ?? ''}` } - - // Weak etag check - weak etags will make comparison algorithms never match - if (this.etag != null) { - headers['if-match'] = this.etag - } - - this.opts = { - ...this.opts, - headers: { - ...this.opts.headers, - ...headers - } - } - } - - try { - this.retryCountCheckpoint = this.retryCount - this.dispatch(this.opts, this) - } catch (err) { - this.handler.onResponseError?.(controller, err) - } - } } } diff --git a/deps/undici/src/lib/llhttp/wasm_build_env.txt b/deps/undici/src/lib/llhttp/wasm_build_env.txt index 1b4a3a6f8bd0fa..4350da5124fa65 100644 --- a/deps/undici/src/lib/llhttp/wasm_build_env.txt +++ b/deps/undici/src/lib/llhttp/wasm_build_env.txt @@ -1,5 +1,5 @@ -> undici@7.10.0 build:wasm +> undici@7.11.0 build:wasm > node build/wasm.js --docker > docker run --rm --platform=linux/x86_64 --user 1001:118 --mount type=bind,source=/home/runner/work/node/node/deps/undici/src/lib/llhttp,target=/home/node/build/lib/llhttp --mount type=bind,source=/home/runner/work/node/node/deps/undici/src/build,target=/home/node/build/build --mount type=bind,source=/home/runner/work/node/node/deps/undici/src/deps,target=/home/node/build/deps -t ghcr.io/nodejs/wasm-builder@sha256:975f391d907e42a75b8c72eb77c782181e941608687d4d8694c3e9df415a0970 node build/wasm.js diff --git a/deps/undici/src/lib/mock/mock-client.js b/deps/undici/src/lib/mock/mock-client.js index f8a786ced8bb83..b3be7ab3b917c5 100644 --- a/deps/undici/src/lib/mock/mock-client.js +++ b/deps/undici/src/lib/mock/mock-client.js @@ -54,6 +54,10 @@ class MockClient extends Client { ) } + cleanMocks () { + this[kDispatches] = [] + } + async [kClose] () { await promisify(this[kOriginalClose])() this[kConnected] = 0 diff --git a/deps/undici/src/lib/mock/mock-pool.js b/deps/undici/src/lib/mock/mock-pool.js index a266211ac70489..2121e3c99a308f 100644 --- a/deps/undici/src/lib/mock/mock-pool.js +++ b/deps/undici/src/lib/mock/mock-pool.js @@ -54,6 +54,10 @@ class MockPool extends Pool { ) } + cleanMocks () { + this[kDispatches] = [] + } + async [kClose] () { await promisify(this[kOriginalClose])() this[kConnected] = 0 diff --git a/deps/undici/src/lib/util/cache.js b/deps/undici/src/lib/util/cache.js index 6f34793694159f..10b0d8afcbc845 100644 --- a/deps/undici/src/lib/util/cache.js +++ b/deps/undici/src/lib/util/cache.js @@ -4,6 +4,8 @@ const { safeHTTPMethods } = require('../core/util') +const { serializePathWithQuery } = require('../core/util') + /** * @param {import('../../types/dispatcher.d.ts').default.DispatchOptions} opts */ @@ -12,10 +14,18 @@ function makeCacheKey (opts) { throw new Error('opts.origin is undefined') } + let fullPath + try { + fullPath = serializePathWithQuery(opts.path || '/', opts.query) + } catch (error) { + // If fails (path already has query params), use as-is + fullPath = opts.path || '/' + } + return { origin: opts.origin.toString(), method: opts.method, - path: opts.path, + path: fullPath, headers: opts.headers } } diff --git a/deps/undici/src/lib/util/timers.js b/deps/undici/src/lib/util/timers.js index c15bbc37aa158c..14984d42ef2901 100644 --- a/deps/undici/src/lib/util/timers.js +++ b/deps/undici/src/lib/util/timers.js @@ -188,19 +188,21 @@ function onTick () { } function refreshTimeout () { - // If the fastNowTimeout is already set, refresh it. - if (fastNowTimeout) { + // If the fastNowTimeout is already set and the Timer has the refresh()- + // method available, call it to refresh the timer. + // Some timer objects returned by setTimeout may not have a .refresh() + // method (e.g. mocked timers in tests). + if (fastNowTimeout?.refresh) { fastNowTimeout.refresh() - // fastNowTimeout is not instantiated yet, create a new Timer. + // fastNowTimeout is not instantiated yet or refresh is not availabe, + // create a new Timer. } else { clearTimeout(fastNowTimeout) fastNowTimeout = setTimeout(onTick, TICK_MS) - - // If the Timer has an unref method, call it to allow the process to exit if - // there are no other active handles. - if (fastNowTimeout.unref) { - fastNowTimeout.unref() - } + // If the Timer has an unref method, call it to allow the process to exit, + // if there are no other active handles. When using fake timers or mocked + // environments (like Jest), .unref() may not be defined, + fastNowTimeout?.unref() } } diff --git a/deps/undici/src/lib/web/cache/cache.js b/deps/undici/src/lib/web/cache/cache.js index 435891dba8f509..afc82f639e46e9 100644 --- a/deps/undici/src/lib/web/cache/cache.js +++ b/deps/undici/src/lib/web/cache/cache.js @@ -3,7 +3,7 @@ const { kConstruct } = require('../../core/symbols') const { urlEquals, getFieldValues } = require('./util') const { kEnumerableProperty, isDisturbed } = require('../../core/util') -const { webidl } = require('../fetch/webidl') +const { webidl } = require('../webidl') const { cloneResponse, fromInnerResponse, getResponseState } = require('../fetch/response') const { Request, fromInnerRequest, getRequestState } = require('../fetch/request') const { fetching } = require('../fetch/index') diff --git a/deps/undici/src/lib/web/cache/cachestorage.js b/deps/undici/src/lib/web/cache/cachestorage.js index 3b1604c872d521..c49b1e82ec1fff 100644 --- a/deps/undici/src/lib/web/cache/cachestorage.js +++ b/deps/undici/src/lib/web/cache/cachestorage.js @@ -1,7 +1,7 @@ 'use strict' const { Cache } = require('./cache') -const { webidl } = require('../fetch/webidl') +const { webidl } = require('../webidl') const { kEnumerableProperty } = require('../../core/util') const { kConstruct } = require('../../core/symbols') diff --git a/deps/undici/src/lib/web/cookies/index.js b/deps/undici/src/lib/web/cookies/index.js index 8bcb4e24a729a9..1d891f1d692ea2 100644 --- a/deps/undici/src/lib/web/cookies/index.js +++ b/deps/undici/src/lib/web/cookies/index.js @@ -2,7 +2,7 @@ const { parseSetCookie } = require('./parse') const { stringify } = require('./util') -const { webidl } = require('../fetch/webidl') +const { webidl } = require('../webidl') const { Headers } = require('../fetch/headers') const brandChecks = webidl.brandCheckMultiple([Headers, globalThis.Headers].filter(Boolean)) diff --git a/deps/undici/src/lib/web/eventsource/eventsource.js b/deps/undici/src/lib/web/eventsource/eventsource.js index 02f4d47d006ec5..746400b8ea97a5 100644 --- a/deps/undici/src/lib/web/eventsource/eventsource.js +++ b/deps/undici/src/lib/web/eventsource/eventsource.js @@ -3,7 +3,7 @@ const { pipeline } = require('node:stream') const { fetching } = require('../fetch') const { makeRequest } = require('../fetch/request') -const { webidl } = require('../fetch/webidl') +const { webidl } = require('../webidl') const { EventSourceStream } = require('./eventsource-stream') const { parseMIMEType } = require('../fetch/data-url') const { createFastMessageEvent } = require('../websocket/events') @@ -231,12 +231,9 @@ class EventSource extends EventTarget { // 14. Let processEventSourceEndOfBody given response res be the following step: if res is not a network error, then reestablish the connection. const processEventSourceEndOfBody = (response) => { - if (isNetworkError(response)) { - this.dispatchEvent(new Event('error')) - this.close() + if (!isNetworkError(response)) { + return this.#reconnect() } - - this.#reconnect() } // 15. Fetch request, with processResponseEndOfBody set to processEventSourceEndOfBody... diff --git a/deps/undici/src/lib/web/eventsource/util.js b/deps/undici/src/lib/web/eventsource/util.js index 727d8660e5f1e7..ee0b4d36df03c0 100644 --- a/deps/undici/src/lib/web/eventsource/util.js +++ b/deps/undici/src/lib/web/eventsource/util.js @@ -26,7 +26,7 @@ function isASCIINumber (value) { // https://github.com/nodejs/undici/issues/2664 function delay (ms) { return new Promise((resolve) => { - setTimeout(resolve, ms).unref() + setTimeout(resolve, ms) }) } diff --git a/deps/undici/src/lib/web/fetch/body.js b/deps/undici/src/lib/web/fetch/body.js index 81d9b6d0e67a11..65b07b92452f54 100644 --- a/deps/undici/src/lib/web/fetch/body.js +++ b/deps/undici/src/lib/web/fetch/body.js @@ -10,7 +10,7 @@ const { utf8DecodeBytes } = require('./util') const { FormData, setFormDataState } = require('./formdata') -const { webidl } = require('./webidl') +const { webidl } = require('../webidl') const { Blob } = require('node:buffer') const assert = require('node:assert') const { isErrored, isDisturbed } = require('node:stream') @@ -29,7 +29,7 @@ try { const textEncoder = new TextEncoder() function noop () {} -const hasFinalizationRegistry = globalThis.FinalizationRegistry && process.version.indexOf('v18') !== 0 +const hasFinalizationRegistry = globalThis.FinalizationRegistry let streamRegistry if (hasFinalizationRegistry) { diff --git a/deps/undici/src/lib/web/fetch/dispatcher-weakref.js b/deps/undici/src/lib/web/fetch/dispatcher-weakref.js index 6ac5f37499257f..59c2c31e005367 100644 --- a/deps/undici/src/lib/web/fetch/dispatcher-weakref.js +++ b/deps/undici/src/lib/web/fetch/dispatcher-weakref.js @@ -1,46 +1,5 @@ 'use strict' -const { kConnected, kSize } = require('../../core/symbols') - -class CompatWeakRef { - constructor (value) { - this.value = value - } - - deref () { - return this.value[kConnected] === 0 && this.value[kSize] === 0 - ? undefined - : this.value - } -} - -class CompatFinalizer { - constructor (finalizer) { - this.finalizer = finalizer - } - - register (dispatcher, key) { - if (dispatcher.on) { - dispatcher.on('disconnect', () => { - if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) { - this.finalizer(key) - } - }) - } - } - - unregister (key) {} -} - module.exports = function () { - // FIXME: remove workaround when the Node bug is backported to v18 - // https://github.com/nodejs/node/issues/49344#issuecomment-1741776308 - if (process.env.NODE_V8_COVERAGE && process.version.startsWith('v18')) { - process._rawDebug('Using compatibility WeakRef and FinalizationRegistry') - return { - WeakRef: CompatWeakRef, - FinalizationRegistry: CompatFinalizer - } - } return { WeakRef, FinalizationRegistry } } diff --git a/deps/undici/src/lib/web/fetch/formdata-parser.js b/deps/undici/src/lib/web/fetch/formdata-parser.js index f43b5fd98e5b5c..0691622e605a1a 100644 --- a/deps/undici/src/lib/web/fetch/formdata-parser.js +++ b/deps/undici/src/lib/web/fetch/formdata-parser.js @@ -1,10 +1,10 @@ 'use strict' -const { isUSVString, bufferToLowerCasedHeaderName } = require('../../core/util') +const { bufferToLowerCasedHeaderName } = require('../../core/util') const { utf8DecodeBytes } = require('./util') const { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = require('./data-url') const { makeEntry } = require('./formdata') -const { webidl } = require('./webidl') +const { webidl } = require('../webidl') const assert = require('node:assert') const { File: NodeFile } = require('node:buffer') @@ -200,8 +200,8 @@ function multipartFormDataParser (input, mimeType) { } // 5.12. Assert: name is a scalar value string and value is either a scalar value string or a File object. - assert(isUSVString(name)) - assert((typeof value === 'string' && isUSVString(value)) || webidl.is.File(value)) + assert(webidl.is.USVString(name)) + assert((typeof value === 'string' && webidl.is.USVString(value)) || webidl.is.File(value)) // 5.13. Create an entry with name and value, and append it to entry list. entryList.push(makeEntry(name, value, filename)) diff --git a/deps/undici/src/lib/web/fetch/formdata.js b/deps/undici/src/lib/web/fetch/formdata.js index 8020a26e1163c0..c34b7772997b37 100644 --- a/deps/undici/src/lib/web/fetch/formdata.js +++ b/deps/undici/src/lib/web/fetch/formdata.js @@ -2,7 +2,7 @@ const { iteratorMixin } = require('./util') const { kEnumerableProperty } = require('../../core/util') -const { webidl } = require('./webidl') +const { webidl } = require('../webidl') const { File: NativeFile } = require('node:buffer') const nodeUtil = require('node:util') diff --git a/deps/undici/src/lib/web/fetch/headers.js b/deps/undici/src/lib/web/fetch/headers.js index d782d2a2793773..024d19895880a7 100644 --- a/deps/undici/src/lib/web/fetch/headers.js +++ b/deps/undici/src/lib/web/fetch/headers.js @@ -9,7 +9,7 @@ const { isValidHeaderName, isValidHeaderValue } = require('./util') -const { webidl } = require('./webidl') +const { webidl } = require('../webidl') const assert = require('node:assert') const util = require('node:util') diff --git a/deps/undici/src/lib/web/fetch/index.js b/deps/undici/src/lib/web/fetch/index.js index 645fa197d735d5..96e9afeb2abad7 100644 --- a/deps/undici/src/lib/web/fetch/index.js +++ b/deps/undici/src/lib/web/fetch/index.js @@ -61,7 +61,7 @@ const { Readable, pipeline, finished, isErrored, isReadable } = require('node:st const { addAbortListener, bufferToLowerCasedHeaderName } = require('../../core/util') const { dataURLProcessor, serializeAMimeType, minimizeSupportedMimeType } = require('./data-url') const { getGlobalDispatcher } = require('../../global') -const { webidl } = require('./webidl') +const { webidl } = require('../webidl') const { STATUS_CODES } = require('node:http') const GET_OR_HEAD = ['GET', 'HEAD'] @@ -2155,6 +2155,12 @@ async function httpNetworkFetch ( flush: zlib.constants.BROTLI_OPERATION_FLUSH, finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH })) + } else if (coding === 'zstd' && typeof zlib.createZstdDecompress === 'function') { + // Node.js v23.8.0+ and v22.15.0+ supports Zstandard + decoders.push(zlib.createZstdDecompress({ + flush: zlib.constants.ZSTD_e_continue, + finishFlush: zlib.constants.ZSTD_e_end + })) } else { decoders.length = 0 break diff --git a/deps/undici/src/lib/web/fetch/request.js b/deps/undici/src/lib/web/fetch/request.js index 82a419162fa1e4..e2191b12dc5ec0 100644 --- a/deps/undici/src/lib/web/fetch/request.js +++ b/deps/undici/src/lib/web/fetch/request.js @@ -23,7 +23,7 @@ const { requestDuplex } = require('./constants') const { kEnumerableProperty, normalizedMethodRecordsBase, normalizedMethodRecords } = util -const { webidl } = require('./webidl') +const { webidl } = require('../webidl') const { URLSerializer } = require('./data-url') const { kConstruct } = require('../../core/symbols') const assert = require('node:assert') diff --git a/deps/undici/src/lib/web/fetch/response.js b/deps/undici/src/lib/web/fetch/response.js index be82c25c4c5a2a..9f2eec401b8f3c 100644 --- a/deps/undici/src/lib/web/fetch/response.js +++ b/deps/undici/src/lib/web/fetch/response.js @@ -18,7 +18,7 @@ const { redirectStatusSet, nullBodyStatus } = require('./constants') -const { webidl } = require('./webidl') +const { webidl } = require('../webidl') const { URLSerializer } = require('./data-url') const { kConstruct } = require('../../core/symbols') const assert = require('node:assert') diff --git a/deps/undici/src/lib/web/fetch/util.js b/deps/undici/src/lib/web/fetch/util.js index be6060058a3f37..f229a5540da523 100644 --- a/deps/undici/src/lib/web/fetch/util.js +++ b/deps/undici/src/lib/web/fetch/util.js @@ -9,7 +9,7 @@ const { performance } = require('node:perf_hooks') const { ReadableStreamFrom, isValidHTTPToken, normalizedMethodRecordsBase } = require('../../core/util') const assert = require('node:assert') const { isUint8Array } = require('node:util/types') -const { webidl } = require('./webidl') +const { webidl } = require('../webidl') let supportedHashes = [] @@ -1262,7 +1262,7 @@ async function readAllBytes (reader, successSteps, failureSteps) { // 1. If chunk is not a Uint8Array object, call failureSteps // with a TypeError and abort these steps. if (!isUint8Array(chunk)) { - failureSteps(TypeError('Received non-Uint8Array chunk')) + failureSteps(new TypeError('Received non-Uint8Array chunk')) return } diff --git a/deps/undici/src/lib/web/fetch/webidl.js b/deps/undici/src/lib/web/webidl/index.js similarity index 93% rename from deps/undici/src/lib/web/fetch/webidl.js rename to deps/undici/src/lib/web/webidl/index.js index 46850e16f05559..fc82e3cc1f3239 100644 --- a/deps/undici/src/lib/web/fetch/webidl.js +++ b/deps/undici/src/lib/web/webidl/index.js @@ -2,7 +2,6 @@ const { types, inspect } = require('node:util') const { markAsUncloneable } = require('node:worker_threads') -const { toUSVString } = require('../../core/util') const UNDEFINED = 1 const BOOLEAN = 2 @@ -23,22 +22,48 @@ const webidl = { is: {} } +/** + * @description Instantiate an error. + * + * @param {Object} opts + * @param {string} opts.header + * @param {string} opts.message + * @returns {TypeError} + */ webidl.errors.exception = function (message) { return new TypeError(`${message.header}: ${message.message}`) } -webidl.errors.conversionFailed = function (context) { - const plural = context.types.length === 1 ? '' : ' one of' +/** + * @description Instantiate an error when conversion from one type to another has failed. + * + * @param {Object} opts + * @param {string} opts.prefix + * @param {string} opts.argument + * @param {string[]} opts.types + * @returns {TypeError} + */ +webidl.errors.conversionFailed = function (opts) { + const plural = opts.types.length === 1 ? '' : ' one of' const message = - `${context.argument} could not be converted to` + - `${plural}: ${context.types.join(', ')}.` + `${opts.argument} could not be converted to` + + `${plural}: ${opts.types.join(', ')}.` return webidl.errors.exception({ - header: context.prefix, + header: opts.prefix, message }) } +/** + * @description Instantiate an error when an invalid argument is provided + * + * @param {Object} context + * @param {string} context.prefix + * @param {string} context.value + * @param {string} context.type + * @returns {TypeError} + */ webidl.errors.invalidArgument = function (context) { return webidl.errors.exception({ header: context.prefix, @@ -278,6 +303,8 @@ webidl.util.Stringify = function (V) { return inspect(V) case STRING: return `"${V}"` + case BIGINT: + return `${V}n` default: return `${V}` } @@ -468,6 +495,17 @@ webidl.nullableConverter = function (converter) { } } +/** + * @param {*} value + * @returns {boolean} + */ +webidl.is.USVString = function (value) { + return ( + typeof value === 'string' && + value.isWellFormed() + ) +} + webidl.is.ReadableStream = webidl.util.MakeTypeAssertion(ReadableStream) webidl.is.Blob = webidl.util.MakeTypeAssertion(Blob) webidl.is.URLSearchParams = webidl.util.MakeTypeAssertion(URLSearchParams) @@ -529,13 +567,23 @@ webidl.converters.ByteString = function (V, prefix, argument) { return x } -// https://webidl.spec.whatwg.org/#es-USVString -// TODO: rewrite this so we can control the errors thrown -webidl.converters.USVString = toUSVString +/** + * @param {unknown} value + * @returns {string} + * @see https://webidl.spec.whatwg.org/#es-USVString + */ +webidl.converters.USVString = function (value) { + // TODO: rewrite this so we can control the errors thrown + if (typeof value === 'string') { + return value.toWellFormed() + } + return `${value}`.toWellFormed() +} // https://webidl.spec.whatwg.org/#es-boolean webidl.converters.boolean = function (V) { // 1. Let x be the result of computing ToBoolean(V). + // https://262.ecma-international.org/10.0/index.html#table-10 const x = Boolean(V) // 2. Return the IDL boolean value that is the one that represents diff --git a/deps/undici/src/lib/web/websocket/connection.js b/deps/undici/src/lib/web/websocket/connection.js index 0d0c5801a3ed61..2e34bea1e04035 100644 --- a/deps/undici/src/lib/web/websocket/connection.js +++ b/deps/undici/src/lib/web/websocket/connection.js @@ -105,7 +105,7 @@ function establishWebSocketConnection (url, protocols, client, handler, options) // 1. If response is a network error or its status is not 101, // fail the WebSocket connection. if (response.type === 'error' || response.status !== 101) { - failWebsocketConnection(handler, 1002, 'Received network error or non-101 status code.') + failWebsocketConnection(handler, 1002, 'Received network error or non-101 status code.', response.error) return } @@ -298,9 +298,10 @@ function closeWebSocketConnection (object, code, reason, validate = false) { * @param {import('./websocket').Handler} handler * @param {number} code * @param {string|undefined} reason + * @param {unknown} cause * @returns {void} */ -function failWebsocketConnection (handler, code, reason) { +function failWebsocketConnection (handler, code, reason, cause) { // If _The WebSocket Connection is Established_ prior to the point where // the endpoint is required to _Fail the WebSocket Connection_, the // endpoint SHOULD send a Close frame with an appropriate status code @@ -315,7 +316,7 @@ function failWebsocketConnection (handler, code, reason) { handler.socket.destroy() } - handler.onFail(code, reason) + handler.onFail(code, reason, cause) } module.exports = { diff --git a/deps/undici/src/lib/web/websocket/events.js b/deps/undici/src/lib/web/websocket/events.js index 343227997e8cbf..3f2cf61ada9e84 100644 --- a/deps/undici/src/lib/web/websocket/events.js +++ b/deps/undici/src/lib/web/websocket/events.js @@ -1,6 +1,6 @@ 'use strict' -const { webidl } = require('../fetch/webidl') +const { webidl } = require('../webidl') const { kEnumerableProperty } = require('../../core/util') const { kConstruct } = require('../../core/symbols') diff --git a/deps/undici/src/lib/web/websocket/frame.js b/deps/undici/src/lib/web/websocket/frame.js index e773b33e1a61c2..68f31ebab9fa79 100644 --- a/deps/undici/src/lib/web/websocket/frame.js +++ b/deps/undici/src/lib/web/websocket/frame.js @@ -134,5 +134,6 @@ class WebsocketFrameSend { } module.exports = { - WebsocketFrameSend + WebsocketFrameSend, + generateMask // for benchmark } diff --git a/deps/undici/src/lib/web/websocket/stream/websocketerror.js b/deps/undici/src/lib/web/websocket/stream/websocketerror.js index 888af9871865c3..e57b0697d60e0b 100644 --- a/deps/undici/src/lib/web/websocket/stream/websocketerror.js +++ b/deps/undici/src/lib/web/websocket/stream/websocketerror.js @@ -1,6 +1,6 @@ 'use strict' -const { webidl } = require('../../fetch/webidl') +const { webidl } = require('../../webidl') const { validateCloseCodeAndReason } = require('../util') const { kConstruct } = require('../../../core/symbols') const { kEnumerableProperty } = require('../../../core/util') diff --git a/deps/undici/src/lib/web/websocket/stream/websocketstream.js b/deps/undici/src/lib/web/websocket/stream/websocketstream.js index c44183dd8b55aa..6b4e8285cfbc1d 100644 --- a/deps/undici/src/lib/web/websocket/stream/websocketstream.js +++ b/deps/undici/src/lib/web/websocket/stream/websocketstream.js @@ -2,7 +2,7 @@ const { createDeferredPromise, environmentSettingsObject } = require('../../fetch/util') const { states, opcodes, sentCloseFrameState } = require('../constants') -const { webidl } = require('../../fetch/webidl') +const { webidl } = require('../../webidl') const { getURLRecord, isValidSubprotocol, isEstablished, utf8Decode } = require('../util') const { establishWebSocketConnection, failWebsocketConnection, closeWebSocketConnection } = require('../connection') const { types } = require('node:util') diff --git a/deps/undici/src/lib/web/websocket/websocket.js b/deps/undici/src/lib/web/websocket/websocket.js index 651eadd32f9125..c2915933408cde 100644 --- a/deps/undici/src/lib/web/websocket/websocket.js +++ b/deps/undici/src/lib/web/websocket/websocket.js @@ -1,6 +1,6 @@ 'use strict' -const { webidl } = require('../fetch/webidl') +const { webidl } = require('../webidl') const { URLSerializer } = require('../fetch/data-url') const { environmentSettingsObject } = require('../fetch/util') const { staticPropertyDescriptors, states, sentCloseFrameState, sendHints, opcodes } = require('./constants') @@ -60,7 +60,7 @@ class WebSocket extends EventTarget { /** @type {Handler} */ #handler = { onConnectionEstablished: (response, extensions) => this.#onConnectionEstablished(response, extensions), - onFail: (code, reason) => this.#onFail(code, reason), + onFail: (code, reason, cause) => this.#onFail(code, reason, cause), onMessage: (opcode, data) => this.#onMessage(opcode, data), onParserError: (err) => failWebsocketConnection(this.#handler, null, err.message), onParserDrain: () => this.#onParserDrain(), @@ -462,11 +462,11 @@ class WebSocket extends EventTarget { fireEvent('open', this) } - #onFail (code, reason) { + #onFail (code, reason, cause) { if (reason) { // TODO: process.nextTick fireEvent('error', this, (type, init) => new ErrorEvent(type, init), { - error: new Error(reason), + error: new Error(reason, cause ? { cause } : undefined), message: reason }) } diff --git a/deps/undici/src/package-lock.json b/deps/undici/src/package-lock.json index 5b2f2ef8a1cee7..f5f05bdf95f826 100644 --- a/deps/undici/src/package-lock.json +++ b/deps/undici/src/package-lock.json @@ -1,12 +1,12 @@ { "name": "undici", - "version": "7.10.0", + "version": "7.11.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "undici", - "version": "7.10.0", + "version": "7.11.0", "license": "MIT", "devDependencies": { "@fastify/busboy": "3.1.1", @@ -14,20 +14,20 @@ "@sinonjs/fake-timers": "^12.0.0", "@types/node": "^18.19.50", "abort-controller": "^3.0.0", - "borp": "^0.19.0", + "borp": "^0.20.0", "c8": "^10.0.0", "cross-env": "^7.0.3", "dns-packet": "^5.4.0", "esbuild": "^0.25.2", "eslint": "^9.9.0", - "fast-check": "^3.17.1", + "fast-check": "^4.1.1", "https-pem": "^3.0.0", "husky": "^9.0.7", "jest": "^29.0.2", "neostandard": "^0.12.0", "node-forge": "^1.3.1", "proxy": "^2.1.1", - "tsd": "^0.31.2", + "tsd": "^0.32.0", "typescript": "^5.6.2", "ws": "^8.11.0" }, @@ -104,9 +104,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.2.tgz", - "integrity": "sha512-TUtMJYRPyUb/9aU8f3K0mjmjf6M9N5Woshn2CS6nqJSeJtTtQcpLUXjGt9vbF8ZGff0El99sWkLgzwW3VXnxZQ==", + "version": "7.27.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.27.7.tgz", + "integrity": "sha512-xgu/ySj2mTiUFmdE9yCMfBxLp4DHd5DwmbbD05YAuICfodYT3VvRxbrh81LGQ/8UpSdtMdfKMn3KouYDX59DGQ==", "dev": true, "license": "MIT", "engines": { @@ -114,22 +114,22 @@ } }, "node_modules/@babel/core": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.27.1.tgz", - "integrity": "sha512-IaaGWsQqfsQWVLqMn9OB92MNN7zukfVA4s7KKAI0KfrrDsZ0yhi5uV4baBuLuN7n3vsZpwP8asPPcVwApxvjBQ==", + "version": "7.27.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.27.7.tgz", + "integrity": "sha512-BU2f9tlKQ5CAthiMIgpzAh4eDTLWo1mqi9jqE2OxMG0E/OM199VJt2q8BztTxpnSW0i1ymdwLXRJnYzvDM5r2w==", "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.27.1", - "@babel/helper-compilation-targets": "^7.27.1", - "@babel/helper-module-transforms": "^7.27.1", - "@babel/helpers": "^7.27.1", - "@babel/parser": "^7.27.1", - "@babel/template": "^7.27.1", - "@babel/traverse": "^7.27.1", - "@babel/types": "^7.27.1", + "@babel/generator": "^7.27.5", + "@babel/helper-compilation-targets": "^7.27.2", + "@babel/helper-module-transforms": "^7.27.3", + "@babel/helpers": "^7.27.6", + "@babel/parser": "^7.27.7", + "@babel/template": "^7.27.2", + "@babel/traverse": "^7.27.7", + "@babel/types": "^7.27.7", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -145,14 +145,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.1.tgz", - "integrity": "sha512-UnJfnIpc/+JO0/+KRVQNGU+y5taA5vCbwN8+azkX6beii/ZF+enZJSOKo11ZSzGJjlNfJHfQtmQT8H+9TXPG2w==", + "version": "7.27.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.5.tgz", + "integrity": "sha512-ZGhA37l0e/g2s1Cnzdix0O3aLYm66eF8aufiVteOgnwxgnRP8GoyMj7VWsgWnQbVKXyge7hqrFh2K2TQM6t1Hw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.27.1", - "@babel/types": "^7.27.1", + "@babel/parser": "^7.27.5", + "@babel/types": "^7.27.3", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^3.0.2" @@ -193,15 +193,15 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.1.tgz", - "integrity": "sha512-9yHn519/8KvTU5BjTVEEeIM3w9/2yXNKoD82JifINImhpKkARMJKPP59kLo+BafpdN5zgNeIcS4jsGDmd3l58g==", + "version": "7.27.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.27.3.tgz", + "integrity": "sha512-dSOvYwvyLsWBeIRyOeHXp5vPj5l1I011r52FM1+r1jCERv+aFXYk4whgQccYEGYxK2H3ZAIA8nuPkQ0HaUo3qg==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-module-imports": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1", - "@babel/traverse": "^7.27.1" + "@babel/traverse": "^7.27.3" }, "engines": { "node": ">=6.9.0" @@ -251,27 +251,27 @@ } }, "node_modules/@babel/helpers": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.1.tgz", - "integrity": "sha512-FCvFTm0sWV8Fxhpp2McP5/W53GPllQ9QeQ7SiqGWjMf/LVG07lFa5+pgK05IRhVwtvafT22KF+ZSnM9I545CvQ==", + "version": "7.27.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.6.tgz", + "integrity": "sha512-muE8Tt8M22638HU31A3CgfSUciwz1fhATfoVai05aPXGor//CdWDCbnlY1yvBPo07njuVOCNGCSp/GTt12lIug==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.27.1", - "@babel/types": "^7.27.1" + "@babel/template": "^7.27.2", + "@babel/types": "^7.27.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.27.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.2.tgz", - "integrity": "sha512-QYLs8299NA7WM/bZAdp+CviYYkVoYXlDW2rzliy3chxd1PQjej7JORuMJDJXJUb9g0TT+B99EwaVLKmX+sPXWw==", + "version": "7.27.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.7.tgz", + "integrity": "sha512-qnzXzDXdr/po3bOTbTIQZ7+TxNKxpkN5IifVLXS+r7qwynkZfPyjZfE7hCXbo7IoO9TNcSyibgONsf2HauUd3Q==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.27.1" + "@babel/types": "^7.27.7" }, "bin": { "parser": "bin/babel-parser.js" @@ -535,17 +535,17 @@ } }, "node_modules/@babel/traverse": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.1.tgz", - "integrity": "sha512-ZCYtZciz1IWJB4U61UPu4KEaqyfj+r5T1Q5mqPo+IBpcG9kHv30Z0aD8LXPgC1trYa6rK0orRyAhqUgk4MjmEg==", + "version": "7.27.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.7.tgz", + "integrity": "sha512-X6ZlfR/O/s5EQ/SnUSLzr+6kGnkg8HXGMzpgsMsrJVcfDtH1vIp6ctCN4eZ1LS5c0+te5Cb6Y514fASjMRJ1nw==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.27.1", - "@babel/parser": "^7.27.1", - "@babel/template": "^7.27.1", - "@babel/types": "^7.27.1", + "@babel/generator": "^7.27.5", + "@babel/parser": "^7.27.7", + "@babel/template": "^7.27.2", + "@babel/types": "^7.27.7", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -564,9 +564,9 @@ } }, "node_modules/@babel/types": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.1.tgz", - "integrity": "sha512-+EzkxvLNfiUeKMgy/3luqfsCWFRXLb7U6wNQTk60tovuckwB15B191tJWvpp4HjiQWdJkCxO3Wbvc6jlk3Xb2Q==", + "version": "7.27.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.7.tgz", + "integrity": "sha512-8OLQgDScAOHXnAz2cV+RfzzNMipuLVBz2biuAJFMV9bfkNf393je3VM8CLkjQodW5+iWsSJdSgSWT6rsZoXHPw==", "dev": true, "license": "MIT", "dependencies": { @@ -622,9 +622,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.4.tgz", - "integrity": "sha512-1VCICWypeQKhVbE9oW/sJaAmjLxhVqacdkvPLEjwlttjfwENRSClS8EjBz0KzRyFSCPDIkuXW34Je/vk7zdB7Q==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.5.tgz", + "integrity": "sha512-9o3TMmpmftaCMepOdA5k/yDw8SfInyzWWTjYTFCX3kPSDJMROQTb8jg+h9Cnwnmm1vOzvxN7gIfB5V2ewpjtGA==", "cpu": [ "ppc64" ], @@ -639,9 +639,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.4.tgz", - "integrity": "sha512-QNdQEps7DfFwE3hXiU4BZeOV68HHzYwGd0Nthhd3uCkkEKK7/R6MTgM0P7H7FAs5pU/DIWsviMmEGxEoxIZ+ZQ==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.5.tgz", + "integrity": "sha512-AdJKSPeEHgi7/ZhuIPtcQKr5RQdo6OO2IL87JkianiMYMPbCtot9fxPbrMiBADOWWm3T2si9stAiVsGbTQFkbA==", "cpu": [ "arm" ], @@ -656,9 +656,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.4.tgz", - "integrity": "sha512-bBy69pgfhMGtCnwpC/x5QhfxAz/cBgQ9enbtwjf6V9lnPI/hMyT9iWpR1arm0l3kttTr4L0KSLpKmLp/ilKS9A==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.5.tgz", + "integrity": "sha512-VGzGhj4lJO+TVGV1v8ntCZWJktV7SGCs3Pn1GRWI1SBFtRALoomm8k5E9Pmwg3HOAal2VDc2F9+PM/rEY6oIDg==", "cpu": [ "arm64" ], @@ -673,9 +673,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.4.tgz", - "integrity": "sha512-TVhdVtQIFuVpIIR282btcGC2oGQoSfZfmBdTip2anCaVYcqWlZXGcdcKIUklfX2wj0JklNYgz39OBqh2cqXvcQ==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.5.tgz", + "integrity": "sha512-D2GyJT1kjvO//drbRT3Hib9XPwQeWd9vZoBJn+bu/lVsOZ13cqNdDeqIF/xQ5/VmWvMduP6AmXvylO/PIc2isw==", "cpu": [ "x64" ], @@ -690,9 +690,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.4.tgz", - "integrity": "sha512-Y1giCfM4nlHDWEfSckMzeWNdQS31BQGs9/rouw6Ub91tkK79aIMTH3q9xHvzH8d0wDru5Ci0kWB8b3up/nl16g==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.5.tgz", + "integrity": "sha512-GtaBgammVvdF7aPIgH2jxMDdivezgFu6iKpmT+48+F8Hhg5J/sfnDieg0aeG/jfSvkYQU2/pceFPDKlqZzwnfQ==", "cpu": [ "arm64" ], @@ -707,9 +707,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.4.tgz", - "integrity": "sha512-CJsry8ZGM5VFVeyUYB3cdKpd/H69PYez4eJh1W/t38vzutdjEjtP7hB6eLKBoOdxcAlCtEYHzQ/PJ/oU9I4u0A==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.5.tgz", + "integrity": "sha512-1iT4FVL0dJ76/q1wd7XDsXrSW+oLoquptvh4CLR4kITDtqi2e/xwXwdCVH8hVHU43wgJdsq7Gxuzcs6Iq/7bxQ==", "cpu": [ "x64" ], @@ -724,9 +724,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.4.tgz", - "integrity": "sha512-yYq+39NlTRzU2XmoPW4l5Ifpl9fqSk0nAJYM/V/WUGPEFfek1epLHJIkTQM6bBs1swApjO5nWgvr843g6TjxuQ==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.5.tgz", + "integrity": "sha512-nk4tGP3JThz4La38Uy/gzyXtpkPW8zSAmoUhK9xKKXdBCzKODMc2adkB2+8om9BDYugz+uGV7sLmpTYzvmz6Sw==", "cpu": [ "arm64" ], @@ -741,9 +741,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.4.tgz", - "integrity": "sha512-0FgvOJ6UUMflsHSPLzdfDnnBBVoCDtBTVyn/MrWloUNvq/5SFmh13l3dvgRPkDihRxb77Y17MbqbCAa2strMQQ==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.5.tgz", + "integrity": "sha512-PrikaNjiXdR2laW6OIjlbeuCPrPaAl0IwPIaRv+SMV8CiM8i2LqVUHFC1+8eORgWyY7yhQY+2U2fA55mBzReaw==", "cpu": [ "x64" ], @@ -758,9 +758,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.4.tgz", - "integrity": "sha512-kro4c0P85GMfFYqW4TWOpvmF8rFShbWGnrLqlzp4X1TNWjRY3JMYUfDCtOxPKOIY8B0WC8HN51hGP4I4hz4AaQ==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.5.tgz", + "integrity": "sha512-cPzojwW2okgh7ZlRpcBEtsX7WBuqbLrNXqLU89GxWbNt6uIg78ET82qifUy3W6OVww6ZWobWub5oqZOVtwolfw==", "cpu": [ "arm" ], @@ -775,9 +775,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.4.tgz", - "integrity": "sha512-+89UsQTfXdmjIvZS6nUnOOLoXnkUTB9hR5QAeLrQdzOSWZvNSAXAtcRDHWtqAUtAmv7ZM1WPOOeSxDzzzMogiQ==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.5.tgz", + "integrity": "sha512-Z9kfb1v6ZlGbWj8EJk9T6czVEjjq2ntSYLY2cw6pAZl4oKtfgQuS4HOq41M/BcoLPzrUbNd+R4BXFyH//nHxVg==", "cpu": [ "arm64" ], @@ -792,9 +792,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.4.tgz", - "integrity": "sha512-yTEjoapy8UP3rv8dB0ip3AfMpRbyhSN3+hY8mo/i4QXFeDxmiYbEKp3ZRjBKcOP862Ua4b1PDfwlvbuwY7hIGQ==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.5.tgz", + "integrity": "sha512-sQ7l00M8bSv36GLV95BVAdhJ2QsIbCuCjh/uYrWiMQSUuV+LpXwIqhgJDcvMTj+VsQmqAHL2yYaasENvJ7CDKA==", "cpu": [ "ia32" ], @@ -809,9 +809,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.4.tgz", - "integrity": "sha512-NeqqYkrcGzFwi6CGRGNMOjWGGSYOpqwCjS9fvaUlX5s3zwOtn1qwg1s2iE2svBe4Q/YOG1q6875lcAoQK/F4VA==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.5.tgz", + "integrity": "sha512-0ur7ae16hDUC4OL5iEnDb0tZHDxYmuQyhKhsPBV8f99f6Z9KQM02g33f93rNH5A30agMS46u2HP6qTdEt6Q1kg==", "cpu": [ "loong64" ], @@ -826,9 +826,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.4.tgz", - "integrity": "sha512-IcvTlF9dtLrfL/M8WgNI/qJYBENP3ekgsHbYUIzEzq5XJzzVEV/fXY9WFPfEEXmu3ck2qJP8LG/p3Q8f7Zc2Xg==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.5.tgz", + "integrity": "sha512-kB/66P1OsHO5zLz0i6X0RxlQ+3cu0mkxS3TKFvkb5lin6uwZ/ttOkP3Z8lfR9mJOBk14ZwZ9182SIIWFGNmqmg==", "cpu": [ "mips64el" ], @@ -843,9 +843,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.4.tgz", - "integrity": "sha512-HOy0aLTJTVtoTeGZh4HSXaO6M95qu4k5lJcH4gxv56iaycfz1S8GO/5Jh6X4Y1YiI0h7cRyLi+HixMR+88swag==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.5.tgz", + "integrity": "sha512-UZCmJ7r9X2fe2D6jBmkLBMQetXPXIsZjQJCjgwpVDz+YMcS6oFR27alkgGv3Oqkv07bxdvw7fyB71/olceJhkQ==", "cpu": [ "ppc64" ], @@ -860,9 +860,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.4.tgz", - "integrity": "sha512-i8JUDAufpz9jOzo4yIShCTcXzS07vEgWzyX3NH2G7LEFVgrLEhjwL3ajFE4fZI3I4ZgiM7JH3GQ7ReObROvSUA==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.5.tgz", + "integrity": "sha512-kTxwu4mLyeOlsVIFPfQo+fQJAV9mh24xL+y+Bm6ej067sYANjyEw1dNHmvoqxJUCMnkBdKpvOn0Ahql6+4VyeA==", "cpu": [ "riscv64" ], @@ -877,9 +877,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.4.tgz", - "integrity": "sha512-jFnu+6UbLlzIjPQpWCNh5QtrcNfMLjgIavnwPQAfoGx4q17ocOU9MsQ2QVvFxwQoWpZT8DvTLooTvmOQXkO51g==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.5.tgz", + "integrity": "sha512-K2dSKTKfmdh78uJ3NcWFiqyRrimfdinS5ErLSn3vluHNeHVnBAFWC8a4X5N+7FgVE1EjXS1QDZbpqZBjfrqMTQ==", "cpu": [ "s390x" ], @@ -894,9 +894,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.4.tgz", - "integrity": "sha512-6e0cvXwzOnVWJHq+mskP8DNSrKBr1bULBvnFLpc1KY+d+irZSgZ02TGse5FsafKS5jg2e4pbvK6TPXaF/A6+CA==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.5.tgz", + "integrity": "sha512-uhj8N2obKTE6pSZ+aMUbqq+1nXxNjZIIjCjGLfsWvVpy7gKCOL6rsY1MhRh9zLtUtAI7vpgLMK6DxjO8Qm9lJw==", "cpu": [ "x64" ], @@ -911,9 +911,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.4.tgz", - "integrity": "sha512-vUnkBYxZW4hL/ie91hSqaSNjulOnYXE1VSLusnvHg2u3jewJBz3YzB9+oCw8DABeVqZGg94t9tyZFoHma8gWZQ==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.5.tgz", + "integrity": "sha512-pwHtMP9viAy1oHPvgxtOv+OkduK5ugofNTVDilIzBLpoWAM16r7b/mxBvfpuQDpRQFMfuVr5aLcn4yveGvBZvw==", "cpu": [ "arm64" ], @@ -928,9 +928,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.4.tgz", - "integrity": "sha512-XAg8pIQn5CzhOB8odIcAm42QsOfa98SBeKUdo4xa8OvX8LbMZqEtgeWE9P/Wxt7MlG2QqvjGths+nq48TrUiKw==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.5.tgz", + "integrity": "sha512-WOb5fKrvVTRMfWFNCroYWWklbnXH0Q5rZppjq0vQIdlsQKuw6mdSihwSo4RV/YdQ5UCKKvBy7/0ZZYLBZKIbwQ==", "cpu": [ "x64" ], @@ -945,9 +945,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.4.tgz", - "integrity": "sha512-Ct2WcFEANlFDtp1nVAXSNBPDxyU+j7+tId//iHXU2f/lN5AmO4zLyhDcpR5Cz1r08mVxzt3Jpyt4PmXQ1O6+7A==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.5.tgz", + "integrity": "sha512-7A208+uQKgTxHd0G0uqZO8UjK2R0DDb4fDmERtARjSHWxqMTye4Erz4zZafx7Di9Cv+lNHYuncAkiGFySoD+Mw==", "cpu": [ "arm64" ], @@ -962,9 +962,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.4.tgz", - "integrity": "sha512-xAGGhyOQ9Otm1Xu8NT1ifGLnA6M3sJxZ6ixylb+vIUVzvvd6GOALpwQrYrtlPouMqd/vSbgehz6HaVk4+7Afhw==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.5.tgz", + "integrity": "sha512-G4hE405ErTWraiZ8UiSoesH8DaCsMm0Cay4fsFWOOUcz8b8rC6uCvnagr+gnioEjWn0wC+o1/TAHt+It+MpIMg==", "cpu": [ "x64" ], @@ -979,9 +979,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.4.tgz", - "integrity": "sha512-Mw+tzy4pp6wZEK0+Lwr76pWLjrtjmJyUB23tHKqEDP74R3q95luY/bXqXZeYl4NYlvwOqoRKlInQialgCKy67Q==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.5.tgz", + "integrity": "sha512-l+azKShMy7FxzY0Rj4RCt5VD/q8mG/e+mDivgspo+yL8zW7qEwctQ6YqKX34DTEleFAvCIUviCFX1SDZRSyMQA==", "cpu": [ "x64" ], @@ -996,9 +996,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.4.tgz", - "integrity": "sha512-AVUP428VQTSddguz9dO9ngb+E5aScyg7nOeJDrF1HPYu555gmza3bDGMPhmVXL8svDSoqPCsCPjb265yG/kLKQ==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.5.tgz", + "integrity": "sha512-O2S7SNZzdcFG7eFKgvwUEZ2VG9D/sn/eIiz8XRZ1Q/DO5a3s76Xv0mdBzVM5j5R639lXQmPmSo0iRpHqUUrsxw==", "cpu": [ "arm64" ], @@ -1013,9 +1013,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.4.tgz", - "integrity": "sha512-i1sW+1i+oWvQzSgfRcxxG2k4I9n3O9NRqy8U+uugaT2Dy7kLO9Y7wI72haOahxceMX8hZAzgGou1FhndRldxRg==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.5.tgz", + "integrity": "sha512-onOJ02pqs9h1iMJ1PQphR+VZv8qBMQ77Klcsqv9CNW2w6yLqoURLcgERAIurY6QE63bbLuqgP9ATqajFLK5AMQ==", "cpu": [ "ia32" ], @@ -1030,9 +1030,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.4.tgz", - "integrity": "sha512-nOT2vZNw6hJ+z43oP1SPea/G/6AbN6X+bGNhNuq8NtRHy4wsMhw765IKLNmnjek7GvjWBYQ8Q5VBoYTFg9y1UQ==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.5.tgz", + "integrity": "sha512-TXv6YnJ8ZMVdX+SXWVBo/0p8LTcrUYngpWjvm91TMjjBQii7Oz11Lw5lbDV5Y0TzuhSJHwiH4hEtC1I42mMS0g==", "cpu": [ "x64" ], @@ -1089,9 +1089,9 @@ } }, "node_modules/@eslint/config-array": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.20.0.tgz", - "integrity": "sha512-fxlS1kkIjx8+vy2SjuCB94q3htSNrufYTXubwiBFeaQHbH6Ipi43gFJq2zCMt6PHhImH3Xmr0NksKDvchWlpQQ==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.20.1.tgz", + "integrity": "sha512-OL0RJzC/CBzli0DrrR31qzj6d6i6Mm3HByuhflhl4LOBiWxN+3i6/t/ZQQNii4tjksXi8r2CRW1wMpWA2ULUEw==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -1104,9 +1104,9 @@ } }, "node_modules/@eslint/config-helpers": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.2.tgz", - "integrity": "sha512-+GPzk8PlG0sPpzdU5ZvIRMPidzAnZDl/s9L+y13iodqvb8leL53bTannOrQ/Im7UkpsmFU5Ily5U60LWixnmLg==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.3.tgz", + "integrity": "sha512-u180qk2Um1le4yf0ruXH3PYFeEZeYC3p/4wCTKrr2U1CmGdzGi3KtY0nuPDH48UJxlKCC5RDzbcbh4X0XlqgHg==", "dev": true, "license": "Apache-2.0", "engines": { @@ -1151,9 +1151,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.27.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.27.0.tgz", - "integrity": "sha512-G5JD9Tu5HJEu4z2Uo4aHY2sLV64B7CDMXxFzqzjl3NKd6RVzSXNoE80jk7Y0lJkTTkjiIhBAqmlYwjuBY3tvpA==", + "version": "9.29.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.29.0.tgz", + "integrity": "sha512-3PIF4cBw/y+1u2EazflInpV+lYsSG0aByVIQzAgb1m1MhHFSbqTyNqtBKHgWf/9Ykud+DhILS9EGkmekVhbKoQ==", "dev": true, "license": "MIT", "engines": { @@ -1174,19 +1174,32 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.1.tgz", - "integrity": "sha512-0J+zgWxHN+xXONWIyPWKFMgVuJoZuGiIFu8yxk7RJjxkzpGmyja5wRFqZIVtjDVOQpV+Rw0iOAjYPE2eQyjr0w==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.3.tgz", + "integrity": "sha512-1+WqvgNMhmlAambTvT3KPtCl/Ibr68VldY2XY40SL1CE0ZXiakFR/cbTspaF5HsnpDMvcYYoJHfl4980NBjGag==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@eslint/core": "^0.14.0", + "@eslint/core": "^0.15.1", "levn": "^0.4.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, + "node_modules/@eslint/plugin-kit/node_modules/@eslint/core": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.1.tgz", + "integrity": "sha512-bkOp+iumZCCbt1K1CmWf0R9pM5yKpDv+ZXtvSyQpudrI9kuFLp+bM2WOPXImuD/ceQuaa8f5pj93Y7zyECIGNA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, "node_modules/@fastify/busboy": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-3.1.1.tgz", @@ -1271,6 +1284,29 @@ "url": "https://github.com/sponsors/nzakas" } }, + "node_modules/@isaacs/balanced-match": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz", + "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@isaacs/brace-expansion": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz", + "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@isaacs/balanced-match": "^4.0.1" + }, + "engines": { + "node": "20 || >=22" + } + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -1861,9 +1897,9 @@ "license": "MIT" }, "node_modules/@napi-rs/wasm-runtime": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.10.tgz", - "integrity": "sha512-bCsCyeZEwVErsGmyPNSzwfwFn4OdxBj0mmv6hOFucB/k81Ojdu68RbZdxYsRQUPc9l6SU5F/cG+bXgWs3oUgsQ==", + "version": "0.2.11", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.11.tgz", + "integrity": "sha512-9DPkXtvHydrcOsopiYpUgPHpmj0HWZKMUnL2dZqpvC42lsratuBG06V5ipyno0fUek5VlFsNQ+AcFATSrJXgMA==", "dev": true, "license": "MIT", "optional": true, @@ -2024,9 +2060,9 @@ } }, "node_modules/@tsd/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/@tsd/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-saiCxzHRhUrRxQV2JhH580aQUZiKQUXI38FcAcikcfOomAil4G4lxT0RfrrKywoAYP/rqAdYXYmNRLppcd+hQQ==", + "version": "5.8.3", + "resolved": "https://registry.npmjs.org/@tsd/typescript/-/typescript-5.8.3.tgz", + "integrity": "sha512-oKarNCN1QUhG148M88mtZdOlBZWWGcInquef+U8QL7gwJkRuNo5WS45Fjsd+3hM9cDJWGpqSZ4Oo097KDx4IWA==", "dev": true, "license": "MIT", "engines": { @@ -2101,9 +2137,9 @@ } }, "node_modules/@types/estree": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", - "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", "dev": true, "license": "MIT" }, @@ -2159,9 +2195,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "18.19.103", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.103.tgz", - "integrity": "sha512-hHTHp+sEz6SxFsp+SA+Tqrua3AbmlAw+Y//aEwdHrdZkYVRWdvWD3y5uPZ0flYOkgskaFWqZ/YGFm3FaFQ0pRw==", + "version": "18.19.112", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.112.tgz", + "integrity": "sha512-i+Vukt9POdS/MBI7YrrkkI5fMfwFtOjphSmt4WXYLfwqsfr6z/HdCx7LqT9M7JktGob8WNgj8nFB4TbGNE4Cog==", "dev": true, "license": "MIT", "dependencies": { @@ -2210,17 +2246,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.32.1.tgz", - "integrity": "sha512-6u6Plg9nP/J1GRpe/vcjjabo6Uc5YQPAMxsgQyGC/I0RuukiG1wIe3+Vtg3IrSCVJDmqK3j8adrtzXSENRtFgg==", + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.35.0.tgz", + "integrity": "sha512-ijItUYaiWuce0N1SoSMrEd0b6b6lYkYt99pqCPfybd+HKVXtEvYhICfLdwp42MhiI5mp0oq7PKEL+g1cNiz/Eg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.32.1", - "@typescript-eslint/type-utils": "8.32.1", - "@typescript-eslint/utils": "8.32.1", - "@typescript-eslint/visitor-keys": "8.32.1", + "@typescript-eslint/scope-manager": "8.35.0", + "@typescript-eslint/type-utils": "8.35.0", + "@typescript-eslint/utils": "8.35.0", + "@typescript-eslint/visitor-keys": "8.35.0", "graphemer": "^1.4.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", @@ -2234,15 +2270,15 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.0.0 || ^8.0.0-alpha.0", + "@typescript-eslint/parser": "^8.35.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.4.tgz", - "integrity": "sha512-gJzzk+PQNznz8ysRrC0aOkBNVRBDtE1n53IqyqEf3PXrYwomFs5q4pGMizBMJF+ykh03insJ27hB8gSrD2Hn8A==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", "dev": true, "license": "MIT", "engines": { @@ -2250,16 +2286,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.32.1.tgz", - "integrity": "sha512-LKMrmwCPoLhM45Z00O1ulb6jwyVr2kr3XJp+G+tSEZcbauNnScewcQwtJqXDhXeYPDEjZ8C1SjXm015CirEmGg==", + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.35.0.tgz", + "integrity": "sha512-6sMvZePQrnZH2/cJkwRpkT7DxoAWh+g6+GFRK6bV3YQo7ogi3SX5rgF6099r5Q53Ma5qeT7LGmOmuIutF4t3lA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.32.1", - "@typescript-eslint/types": "8.32.1", - "@typescript-eslint/typescript-estree": "8.32.1", - "@typescript-eslint/visitor-keys": "8.32.1", + "@typescript-eslint/scope-manager": "8.35.0", + "@typescript-eslint/types": "8.35.0", + "@typescript-eslint/typescript-estree": "8.35.0", + "@typescript-eslint/visitor-keys": "8.35.0", "debug": "^4.3.4" }, "engines": { @@ -2274,33 +2310,72 @@ "typescript": ">=4.8.4 <5.9.0" } }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.35.0.tgz", + "integrity": "sha512-41xatqRwWZuhUMF/aZm2fcUsOFKNcG28xqRSS6ZVr9BVJtGExosLAm5A1OxTjRMagx8nJqva+P5zNIGt8RIgbQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.35.0", + "@typescript-eslint/types": "^8.35.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.9.0" + } + }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.32.1.tgz", - "integrity": "sha512-7IsIaIDeZn7kffk7qXC3o6Z4UblZJKV3UBpkvRNpr5NSyLji7tvTcvmnMNYuYLyh26mN8W723xpo3i4MlD33vA==", + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.35.0.tgz", + "integrity": "sha512-+AgL5+mcoLxl1vGjwNfiWq5fLDZM1TmTPYs2UkyHfFhgERxBbqHlNjRzhThJqz+ktBqTChRYY6zwbMwy0591AA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.32.1", - "@typescript-eslint/visitor-keys": "8.32.1" + "@typescript-eslint/types": "8.35.0", + "@typescript-eslint/visitor-keys": "8.35.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.35.0.tgz", + "integrity": "sha512-04k/7247kZzFraweuEirmvUj+W3bJLI9fX6fbo1Qm2YykuBvEhRTPl8tcxlYO8kZZW+HIXfkZNoasVb8EV4jpA==", + "dev": true, + "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <5.9.0" } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.32.1.tgz", - "integrity": "sha512-mv9YpQGA8iIsl5KyUPi+FGLm7+bA4fgXaeRcFKRDRwDMu4iwrSHeDPipwueNXhdIIZltwCJv+NkxftECbIZWfA==", + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.35.0.tgz", + "integrity": "sha512-ceNNttjfmSEoM9PW87bWLDEIaLAyR+E6BoYJQ5PfaDau37UGca9Nyq3lBk8Bw2ad0AKvYabz6wxc7DMTO2jnNA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.32.1", - "@typescript-eslint/utils": "8.32.1", + "@typescript-eslint/typescript-estree": "8.35.0", + "@typescript-eslint/utils": "8.35.0", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -2317,9 +2392,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.32.1.tgz", - "integrity": "sha512-YmybwXUJcgGqgAp6bEsgpPXEg6dcCyPyCSr0CAAueacR/CCBi25G3V8gGQ2kRzQRBNol7VQknxMs9HvVa9Rvfg==", + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.35.0.tgz", + "integrity": "sha512-0mYH3emanku0vHw2aRLNGqe7EXh9WHEhi7kZzscrMDf6IIRUQ5Jk4wp1QrledE/36KtdZrVfKnE32eZCf/vaVQ==", "dev": true, "license": "MIT", "engines": { @@ -2331,14 +2406,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.32.1.tgz", - "integrity": "sha512-Y3AP9EIfYwBb4kWGb+simvPaqQoT5oJuzzj9m0i6FCY6SPvlomY2Ei4UEMm7+FXtlNJbor80ximyslzaQF6xhg==", + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.35.0.tgz", + "integrity": "sha512-F+BhnaBemgu1Qf8oHrxyw14wq6vbL8xwWKKMwTMwYIRmFFY/1n/9T/jpbobZL8vp7QyEUcC6xGrnAO4ua8Kp7w==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.32.1", - "@typescript-eslint/visitor-keys": "8.32.1", + "@typescript-eslint/project-service": "8.35.0", + "@typescript-eslint/tsconfig-utils": "8.35.0", + "@typescript-eslint/types": "8.35.0", + "@typescript-eslint/visitor-keys": "8.35.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -2358,9 +2435,9 @@ } }, "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2397,16 +2474,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.32.1.tgz", - "integrity": "sha512-DsSFNIgLSrc89gpq1LJB7Hm1YpuhK086DRDJSNrewcGvYloWW1vZLHBTIvarKZDcAORIy/uWNx8Gad+4oMpkSA==", + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.35.0.tgz", + "integrity": "sha512-nqoMu7WWM7ki5tPgLVsmPM8CkqtoPUG6xXGeefM5t4x3XumOEKMoUZPdi+7F+/EotukN4R9OWdmDxN80fqoZeg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.32.1", - "@typescript-eslint/types": "8.32.1", - "@typescript-eslint/typescript-estree": "8.32.1" + "@typescript-eslint/scope-manager": "8.35.0", + "@typescript-eslint/types": "8.35.0", + "@typescript-eslint/typescript-estree": "8.35.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2421,14 +2498,14 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.32.1.tgz", - "integrity": "sha512-ar0tjQfObzhSaW3C3QNmTc5ofj0hDoNQ5XWrCy6zDyabdr0TWhCkClp+rywGNj/odAFBVzzJrK4tEq5M4Hmu4w==", + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.35.0.tgz", + "integrity": "sha512-zTh2+1Y8ZpmeQaQVIc/ZZxsx8UzgKJyNg1PTvjzC7WMhPSVS8bfDX34k1SrwOf016qd5RU3az2UxUNue3IfQ5g==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.32.1", - "eslint-visitor-keys": "^4.2.0" + "@typescript-eslint/types": "8.35.0", + "eslint-visitor-keys": "^4.2.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2438,10 +2515,38 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@unrs/resolver-binding-android-arm-eabi": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.9.2.tgz", + "integrity": "sha512-tS+lqTU3N0kkthU+rYp0spAYq15DU8ld9kXkaKg9sbQqJNF+WPMuNHZQGCgdxrUOEO0j22RKMwRVhF1HTl+X8A==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@unrs/resolver-binding-android-arm64": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.9.2.tgz", + "integrity": "sha512-MffGiZULa/KmkNjHeuuflLVqfhqLv1vZLm8lWIyeADvlElJ/GLSOkoUX+5jf4/EGtfwrNFcEaB8BRas03KT0/Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, "node_modules/@unrs/resolver-binding-darwin-arm64": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.7.2.tgz", - "integrity": "sha512-vxtBno4xvowwNmO/ASL0Y45TpHqmNkAaDtz4Jqb+clmcVSSl8XCG/PNFFkGsXXXS6AMjP+ja/TtNCFFa1QwLRg==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.9.2.tgz", + "integrity": "sha512-dzJYK5rohS1sYl1DHdJ3mwfwClJj5BClQnQSyAgEfggbUwA9RlROQSSbKBLqrGfsiC/VyrDPtbO8hh56fnkbsQ==", "cpu": [ "arm64" ], @@ -2453,9 +2558,9 @@ ] }, "node_modules/@unrs/resolver-binding-darwin-x64": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.7.2.tgz", - "integrity": "sha512-qhVa8ozu92C23Hsmv0BF4+5Dyyd5STT1FolV4whNgbY6mj3kA0qsrGPe35zNR3wAN7eFict3s4Rc2dDTPBTuFQ==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.9.2.tgz", + "integrity": "sha512-gaIMWK+CWtXcg9gUyznkdV54LzQ90S3X3dn8zlh+QR5Xy7Y+Efqw4Rs4im61K1juy4YNb67vmJsCDAGOnIeffQ==", "cpu": [ "x64" ], @@ -2467,9 +2572,9 @@ ] }, "node_modules/@unrs/resolver-binding-freebsd-x64": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.7.2.tgz", - "integrity": "sha512-zKKdm2uMXqLFX6Ac7K5ElnnG5VIXbDlFWzg4WJ8CGUedJryM5A3cTgHuGMw1+P5ziV8CRhnSEgOnurTI4vpHpg==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.9.2.tgz", + "integrity": "sha512-S7QpkMbVoVJb0xwHFwujnwCAEDe/596xqY603rpi/ioTn9VDgBHnCCxh+UFrr5yxuMH+dliHfjwCZJXOPJGPnw==", "cpu": [ "x64" ], @@ -2481,9 +2586,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.7.2.tgz", - "integrity": "sha512-8N1z1TbPnHH+iDS/42GJ0bMPLiGK+cUqOhNbMKtWJ4oFGzqSJk/zoXFzcQkgtI63qMcUI7wW1tq2usZQSb2jxw==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.9.2.tgz", + "integrity": "sha512-+XPUMCuCCI80I46nCDFbGum0ZODP5NWGiwS3Pj8fOgsG5/ctz+/zzuBlq/WmGa+EjWZdue6CF0aWWNv84sE1uw==", "cpu": [ "arm" ], @@ -2495,9 +2600,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-arm-musleabihf": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.7.2.tgz", - "integrity": "sha512-tjYzI9LcAXR9MYd9rO45m1s0B/6bJNuZ6jeOxo1pq1K6OBuRMMmfyvJYval3s9FPPGmrldYA3mi4gWDlWuTFGA==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.9.2.tgz", + "integrity": "sha512-sqvUyAd1JUpwbz33Ce2tuTLJKM+ucSsYpPGl2vuFwZnEIg0CmdxiZ01MHQ3j6ExuRqEDUCy8yvkDKvjYFPb8Zg==", "cpu": [ "arm" ], @@ -2509,9 +2614,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-arm64-gnu": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.7.2.tgz", - "integrity": "sha512-jon9M7DKRLGZ9VYSkFMflvNqu9hDtOCEnO2QAryFWgT6o6AXU8du56V7YqnaLKr6rAbZBWYsYpikF226v423QA==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.9.2.tgz", + "integrity": "sha512-UYA0MA8ajkEDCFRQdng/FVx3F6szBvk3EPnkTTQuuO9lV1kPGuTB+V9TmbDxy5ikaEgyWKxa4CI3ySjklZ9lFA==", "cpu": [ "arm64" ], @@ -2523,9 +2628,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-arm64-musl": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.7.2.tgz", - "integrity": "sha512-c8Cg4/h+kQ63pL43wBNaVMmOjXI/X62wQmru51qjfTvI7kmCy5uHTJvK/9LrF0G8Jdx8r34d019P1DVJmhXQpA==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.9.2.tgz", + "integrity": "sha512-P/CO3ODU9YJIHFqAkHbquKtFst0COxdphc8TKGL5yCX75GOiVpGqd1d15ahpqu8xXVsqP4MGFP2C3LRZnnL5MA==", "cpu": [ "arm64" ], @@ -2537,9 +2642,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-ppc64-gnu": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.7.2.tgz", - "integrity": "sha512-A+lcwRFyrjeJmv3JJvhz5NbcCkLQL6Mk16kHTNm6/aGNc4FwPHPE4DR9DwuCvCnVHvF5IAd9U4VIs/VvVir5lg==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.9.2.tgz", + "integrity": "sha512-uKStFlOELBxBum2s1hODPtgJhY4NxYJE9pAeyBgNEzHgTqTiVBPjfTlPFJkfxyTjQEuxZbbJlJnMCrRgD7ubzw==", "cpu": [ "ppc64" ], @@ -2551,9 +2656,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-riscv64-gnu": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.7.2.tgz", - "integrity": "sha512-hQQ4TJQrSQW8JlPm7tRpXN8OCNP9ez7PajJNjRD1ZTHQAy685OYqPrKjfaMw/8LiHCt8AZ74rfUVHP9vn0N69Q==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.9.2.tgz", + "integrity": "sha512-LkbNnZlhINfY9gK30AHs26IIVEZ9PEl9qOScYdmY2o81imJYI4IMnJiW0vJVtXaDHvBvxeAgEy5CflwJFIl3tQ==", "cpu": [ "riscv64" ], @@ -2565,9 +2670,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-riscv64-musl": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.7.2.tgz", - "integrity": "sha512-NoAGbiqrxtY8kVooZ24i70CjLDlUFI7nDj3I9y54U94p+3kPxwd2L692YsdLa+cqQ0VoqMWoehDFp21PKRUoIQ==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.9.2.tgz", + "integrity": "sha512-vI+e6FzLyZHSLFNomPi+nT+qUWN4YSj8pFtQZSFTtmgFoxqB6NyjxSjAxEC1m93qn6hUXhIsh8WMp+fGgxCoRg==", "cpu": [ "riscv64" ], @@ -2579,9 +2684,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-s390x-gnu": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.7.2.tgz", - "integrity": "sha512-KaZByo8xuQZbUhhreBTW+yUnOIHUsv04P8lKjQ5otiGoSJ17ISGYArc+4vKdLEpGaLbemGzr4ZeUbYQQsLWFjA==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.9.2.tgz", + "integrity": "sha512-sSO4AlAYhSM2RAzBsRpahcJB1msc6uYLAtP6pesPbZtptF8OU/CbCPhSRW6cnYOGuVmEmWVW5xVboAqCnWTeHQ==", "cpu": [ "s390x" ], @@ -2593,9 +2698,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-x64-gnu": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.7.2.tgz", - "integrity": "sha512-dEidzJDubxxhUCBJ/SHSMJD/9q7JkyfBMT77Px1npl4xpg9t0POLvnWywSk66BgZS/b2Hy9Y1yFaoMTFJUe9yg==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.9.2.tgz", + "integrity": "sha512-jkSkwch0uPFva20Mdu8orbQjv2A3G88NExTN2oPTI1AJ+7mZfYW3cDCTyoH6OnctBKbBVeJCEqh0U02lTkqD5w==", "cpu": [ "x64" ], @@ -2607,9 +2712,9 @@ ] }, "node_modules/@unrs/resolver-binding-linux-x64-musl": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.7.2.tgz", - "integrity": "sha512-RvP+Ux3wDjmnZDT4XWFfNBRVG0fMsc+yVzNFUqOflnDfZ9OYujv6nkh+GOr+watwrW4wdp6ASfG/e7bkDradsw==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.9.2.tgz", + "integrity": "sha512-Uk64NoiTpQbkpl+bXsbeyOPRpUoMdcUqa+hDC1KhMW7aN1lfW8PBlBH4mJ3n3Y47dYE8qi0XTxy1mBACruYBaw==", "cpu": [ "x64" ], @@ -2621,9 +2726,9 @@ ] }, "node_modules/@unrs/resolver-binding-wasm32-wasi": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.7.2.tgz", - "integrity": "sha512-y797JBmO9IsvXVRCKDXOxjyAE4+CcZpla2GSoBQ33TVb3ILXuFnMrbR/QQZoauBYeOFuu4w3ifWLw52sdHGz6g==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-wasm32-wasi/-/resolver-binding-wasm32-wasi-1.9.2.tgz", + "integrity": "sha512-EpBGwkcjDicjR/ybC0g8wO5adPNdVuMrNalVgYcWi+gYtC1XYNuxe3rufcO7dA76OHGeVabcO6cSkPJKVcbCXQ==", "cpu": [ "wasm32" ], @@ -2631,16 +2736,16 @@ "license": "MIT", "optional": true, "dependencies": { - "@napi-rs/wasm-runtime": "^0.2.9" + "@napi-rs/wasm-runtime": "^0.2.11" }, "engines": { "node": ">=14.0.0" } }, "node_modules/@unrs/resolver-binding-win32-arm64-msvc": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.7.2.tgz", - "integrity": "sha512-gtYTh4/VREVSLA+gHrfbWxaMO/00y+34htY7XpioBTy56YN2eBjkPrY1ML1Zys89X3RJDKVaogzwxlM1qU7egg==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.9.2.tgz", + "integrity": "sha512-EdFbGn7o1SxGmN6aZw9wAkehZJetFPao0VGZ9OMBwKx6TkvDuj6cNeLimF/Psi6ts9lMOe+Dt6z19fZQ9Ye2fw==", "cpu": [ "arm64" ], @@ -2652,9 +2757,9 @@ ] }, "node_modules/@unrs/resolver-binding-win32-ia32-msvc": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.7.2.tgz", - "integrity": "sha512-Ywv20XHvHTDRQs12jd3MY8X5C8KLjDbg/jyaal/QLKx3fAShhJyD4blEANInsjxW3P7isHx1Blt56iUDDJO3jg==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.9.2.tgz", + "integrity": "sha512-JY9hi1p7AG+5c/dMU8o2kWemM8I6VZxfGwn1GCtf3c5i+IKcMo2NQ8OjZ4Z3/itvY/Si3K10jOBQn7qsD/whUA==", "cpu": [ "ia32" ], @@ -2666,9 +2771,9 @@ ] }, "node_modules/@unrs/resolver-binding-win32-x64-msvc": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.7.2.tgz", - "integrity": "sha512-friS8NEQfHaDbkThxopGk+LuE5v3iY0StruifjQEt7SLbA46OnfgMO15sOTkbpJkol6RB+1l1TYPXh0sCddpvA==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.9.2.tgz", + "integrity": "sha512-ryoo+EB19lMxAd80ln9BVf8pdOAxLb97amrQ3SFN9OCRn/5M5wvwDgAe4i8ZjhpbiHoDeP8yavcTEnpKBo7lZg==", "cpu": [ "x64" ], @@ -2693,9 +2798,9 @@ } }, "node_modules/acorn": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", - "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", "bin": { @@ -2930,18 +3035,20 @@ } }, "node_modules/array-includes": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", - "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.9.tgz", + "integrity": "sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==", "dev": true, "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.4", "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0", - "get-intrinsic": "^1.2.4", - "is-string": "^1.0.7" + "es-abstract": "^1.24.0", + "es-object-atoms": "^1.1.1", + "get-intrinsic": "^1.3.0", + "is-string": "^1.1.1", + "math-intrinsics": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -3261,9 +3368,9 @@ "dev": true }, "node_modules/borp": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/borp/-/borp-0.19.0.tgz", - "integrity": "sha512-rPO/r9XEXSbihEAZEhsO30SrncSciEB61xrOi8RhbaAKrp7qFuOGn1cUXYW8EwrPXlCvPhSN3+tllrSbIpowyg==", + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/borp/-/borp-0.20.0.tgz", + "integrity": "sha512-SZhSNosPoX6c9gtXKnakpkUYdAyQMkQDQwPzpPoIBV9ErWhWH2ks6paai27R37O/MNC9jLMW1lQojuZEOAF87g==", "dev": true, "license": "MIT", "dependencies": { @@ -3279,9 +3386,9 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", "dev": true, "license": "MIT", "dependencies": { @@ -3303,9 +3410,9 @@ } }, "node_modules/browserslist": { - "version": "4.24.5", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.5.tgz", - "integrity": "sha512-FDToo4Wo82hIdgc1CQ+NQD0hEhmpPjrZ3hiUgwgOG6IuTdlpr8jdjyG24P6cNP1yJpTLzS5OcGgSw0xmDU1/Tw==", + "version": "4.25.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.1.tgz", + "integrity": "sha512-KGj0KoOMXLpSNkkEI6Z6mShmQy0bc1I+T7K9N81k4WWMrfz+6fQ6es80B/YLAeRoKvjYE1YSHHOW1qe9xIVzHw==", "dev": true, "funding": [ { @@ -3323,8 +3430,8 @@ ], "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001716", - "electron-to-chromium": "^1.5.149", + "caniuse-lite": "^1.0.30001726", + "electron-to-chromium": "^1.5.173", "node-releases": "^2.0.19", "update-browserslist-db": "^1.1.3" }, @@ -3534,9 +3641,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001718", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001718.tgz", - "integrity": "sha512-AflseV1ahcSunK53NfEs9gFWgOEmzr0f+kaMFA4xiLZlr9Hzt7HxcSpIFcnNCUkz6R6dWKa54rUz3HUmI3nVcw==", + "version": "1.0.30001726", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001726.tgz", + "integrity": "sha512-VQAUIUzBiZ/UnlM28fSp2CRF3ivUn1BWEvxMcVTNwpw91Py1pGbPIyIKtd+tzct9C3ouceCVdGAXxZOpZAsgdw==", "dev": true, "funding": [ { @@ -4059,9 +4166,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.157", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.157.tgz", - "integrity": "sha512-/0ybgsQd1muo8QlnuTpKwtl0oX5YMlUGbm8xyqgDU00motRkKFFbUJySAQBWcY79rVqNLWIWa87BGVGClwAB2w==", + "version": "1.5.177", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.177.tgz", + "integrity": "sha512-7EH2G59nLsEMj97fpDuvVcYi6lwTcM1xuWw3PssD8xzboAW7zj7iB3COEEEATUfjLHrs5uKBLQT03V/8URx06g==", "dev": true, "license": "ISC" }, @@ -4086,9 +4193,9 @@ "license": "MIT" }, "node_modules/enhanced-resolve": { - "version": "5.18.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.1.tgz", - "integrity": "sha512-ZSW3ma5GkcQBIpwZTSRAI8N71Uuwgs93IezB7mf7R60tC8ZbJideoDNKjHn2O9KIlx6rkGTTEk1xUCK2E1Y2Yg==", + "version": "5.18.2", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.18.2.tgz", + "integrity": "sha512-6Jw4sE1maoRJo3q8MsSIn2onJFbLTOjY9hlx4DZXmOKvLRd1Ok2kXmAGXaafL2+ijsJZ1ClYbl/pmqr9+k4iUQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4110,9 +4217,9 @@ } }, "node_modules/es-abstract": { - "version": "1.23.10", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.10.tgz", - "integrity": "sha512-MtUbM072wlJNyeYAe0mhzrD+M6DIJa96CZAOBBrhDbgKnB4MApIKefcyAB1eOdYn8cUNZgvwBvEzdoAYsxgEIw==", + "version": "1.24.0", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.0.tgz", + "integrity": "sha512-WSzPgsdLtTcQwm4CROfS5ju2Wa1QQcVeT37jFjYzdFz1r9ahadC8B8/a4qxJxM+09F18iumCdRmlr96ZYkQvEg==", "dev": true, "license": "MIT", "dependencies": { @@ -4143,7 +4250,9 @@ "is-array-buffer": "^3.0.5", "is-callable": "^1.2.7", "is-data-view": "^1.0.2", + "is-negative-zero": "^2.0.3", "is-regex": "^1.2.1", + "is-set": "^2.0.3", "is-shared-array-buffer": "^1.0.4", "is-string": "^1.1.1", "is-typed-array": "^1.1.15", @@ -4158,6 +4267,7 @@ "safe-push-apply": "^1.0.0", "safe-regex-test": "^1.1.0", "set-proto": "^1.0.0", + "stop-iteration-iterator": "^1.1.0", "string.prototype.trim": "^1.2.10", "string.prototype.trimend": "^1.0.9", "string.prototype.trimstart": "^1.0.8", @@ -4284,9 +4394,9 @@ } }, "node_modules/esbuild": { - "version": "0.25.4", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.4.tgz", - "integrity": "sha512-8pgjLUcUjcgDg+2Q4NYXnPbo/vncAY4UmyaCm0jZevERqCHZIaWwdJHkf8XQtu4AxSKCdvrUbT0XUr1IdZzI8Q==", + "version": "0.25.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.5.tgz", + "integrity": "sha512-P8OtKZRv/5J5hhz0cUAdu/cLuPIKXpQl1R9pZtvmHWQvrAUVd0UNIPT4IB4W3rNOqVO0rlqHmCIbSwxh/c9yUQ==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -4297,31 +4407,31 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.25.4", - "@esbuild/android-arm": "0.25.4", - "@esbuild/android-arm64": "0.25.4", - "@esbuild/android-x64": "0.25.4", - "@esbuild/darwin-arm64": "0.25.4", - "@esbuild/darwin-x64": "0.25.4", - "@esbuild/freebsd-arm64": "0.25.4", - "@esbuild/freebsd-x64": "0.25.4", - "@esbuild/linux-arm": "0.25.4", - "@esbuild/linux-arm64": "0.25.4", - "@esbuild/linux-ia32": "0.25.4", - "@esbuild/linux-loong64": "0.25.4", - "@esbuild/linux-mips64el": "0.25.4", - "@esbuild/linux-ppc64": "0.25.4", - "@esbuild/linux-riscv64": "0.25.4", - "@esbuild/linux-s390x": "0.25.4", - "@esbuild/linux-x64": "0.25.4", - "@esbuild/netbsd-arm64": "0.25.4", - "@esbuild/netbsd-x64": "0.25.4", - "@esbuild/openbsd-arm64": "0.25.4", - "@esbuild/openbsd-x64": "0.25.4", - "@esbuild/sunos-x64": "0.25.4", - "@esbuild/win32-arm64": "0.25.4", - "@esbuild/win32-ia32": "0.25.4", - "@esbuild/win32-x64": "0.25.4" + "@esbuild/aix-ppc64": "0.25.5", + "@esbuild/android-arm": "0.25.5", + "@esbuild/android-arm64": "0.25.5", + "@esbuild/android-x64": "0.25.5", + "@esbuild/darwin-arm64": "0.25.5", + "@esbuild/darwin-x64": "0.25.5", + "@esbuild/freebsd-arm64": "0.25.5", + "@esbuild/freebsd-x64": "0.25.5", + "@esbuild/linux-arm": "0.25.5", + "@esbuild/linux-arm64": "0.25.5", + "@esbuild/linux-ia32": "0.25.5", + "@esbuild/linux-loong64": "0.25.5", + "@esbuild/linux-mips64el": "0.25.5", + "@esbuild/linux-ppc64": "0.25.5", + "@esbuild/linux-riscv64": "0.25.5", + "@esbuild/linux-s390x": "0.25.5", + "@esbuild/linux-x64": "0.25.5", + "@esbuild/netbsd-arm64": "0.25.5", + "@esbuild/netbsd-x64": "0.25.5", + "@esbuild/openbsd-arm64": "0.25.5", + "@esbuild/openbsd-x64": "0.25.5", + "@esbuild/sunos-x64": "0.25.5", + "@esbuild/win32-arm64": "0.25.5", + "@esbuild/win32-ia32": "0.25.5", + "@esbuild/win32-x64": "0.25.5" } }, "node_modules/escalade": { @@ -4348,19 +4458,19 @@ } }, "node_modules/eslint": { - "version": "9.27.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.27.0.tgz", - "integrity": "sha512-ixRawFQuMB9DZ7fjU3iGGganFDp3+45bPOdaRurcFHSXO1e/sYwUX/FtQZpLZJR6SjMoJH8hR2pPEAfDyCoU2Q==", + "version": "9.29.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.29.0.tgz", + "integrity": "sha512-GsGizj2Y1rCWDu6XoEekL3RLilp0voSePurjZIkxL3wlm5o5EC9VpgaP7lrCvjnkuLvzFBQWB3vWB3K5KQTveQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.20.0", + "@eslint/config-array": "^0.20.1", "@eslint/config-helpers": "^0.2.1", "@eslint/core": "^0.14.0", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.27.0", + "@eslint/js": "9.29.0", "@eslint/plugin-kit": "^0.3.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", @@ -4372,9 +4482,9 @@ "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.3.0", - "eslint-visitor-keys": "^4.2.0", - "espree": "^10.3.0", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -4505,26 +4615,29 @@ "node": ">=8" } }, - "node_modules/eslint-import-resolver-node": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", - "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", - "dev": true, - "license": "MIT", - "dependencies": { - "debug": "^3.2.7", - "is-core-module": "^2.13.0", - "resolve": "^1.22.4" - } - }, - "node_modules/eslint-import-resolver-node/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "node_modules/eslint-import-context": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/eslint-import-context/-/eslint-import-context-0.1.9.tgz", + "integrity": "sha512-K9Hb+yRaGAGUbwjhFNHvSmmkZs9+zbuoe3kFQ4V1wYjrepUFYM2dZAfNtjbbj3qsPfUfsA68Bx/ICWQMi+C8Eg==", "dev": true, "license": "MIT", "dependencies": { - "ms": "^2.1.1" + "get-tsconfig": "^4.10.1", + "stable-hash-x": "^0.2.0" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-import-context" + }, + "peerDependencies": { + "unrs-resolver": "^1.0.0" + }, + "peerDependenciesMeta": { + "unrs-resolver": { + "optional": true + } } }, "node_modules/eslint-import-resolver-typescript": { @@ -4585,23 +4698,21 @@ } }, "node_modules/eslint-plugin-import-x": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-import-x/-/eslint-plugin-import-x-4.12.2.tgz", - "integrity": "sha512-0jVUgJQipbs0yUfLe7LwYD6p8rIGqCysWZdyJFgkPzDyJgiKpuCaXlywKUAWgJ6u1nLpfrdt21B60OUkupyBrQ==", + "version": "4.16.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import-x/-/eslint-plugin-import-x-4.16.1.tgz", + "integrity": "sha512-vPZZsiOKaBAIATpFE2uMI4w5IRwdv/FpQ+qZZMR4E+PeOcM4OeoEbqxRMnywdxP19TyB/3h6QBB0EWon7letSQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/utils": "^8.31.0", + "@typescript-eslint/types": "^8.35.0", "comment-parser": "^1.4.1", - "debug": "^4.4.0", - "eslint-import-resolver-node": "^0.3.9", - "get-tsconfig": "^4.10.0", + "debug": "^4.4.1", + "eslint-import-context": "^0.1.9", "is-glob": "^4.0.3", "minimatch": "^9.0.3 || ^10.0.1", - "semver": "^7.7.1", - "stable-hash": "^0.0.5", - "tslib": "^2.8.1", - "unrs-resolver": "^1.7.0" + "semver": "^7.7.2", + "stable-hash-x": "^0.2.0", + "unrs-resolver": "^1.9.2" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4610,27 +4721,27 @@ "url": "https://opencollective.com/eslint-plugin-import-x" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0" - } - }, - "node_modules/eslint-plugin-import-x/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" + "@typescript-eslint/utils": "^8.0.0", + "eslint": "^8.57.0 || ^9.0.0", + "eslint-import-resolver-node": "*" + }, + "peerDependenciesMeta": { + "@typescript-eslint/utils": { + "optional": true + }, + "eslint-import-resolver-node": { + "optional": true + } } }, "node_modules/eslint-plugin-import-x/node_modules/minimatch": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", - "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.3.tgz", + "integrity": "sha512-IPZ167aShDZZUMdRk66cyQAW3qr0WzbHkPdMYa8bzZhlHhO3jALbKdxcaak7W9FfT2rZNpQuUu4Od7ILEpXSaw==", "dev": true, "license": "ISC", "dependencies": { - "brace-expansion": "^2.0.1" + "@isaacs/brace-expansion": "^5.0.0" }, "engines": { "node": "20 || >=22" @@ -4653,20 +4764,22 @@ } }, "node_modules/eslint-plugin-n": { - "version": "17.18.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-17.18.0.tgz", - "integrity": "sha512-hvZ/HusueqTJ7VDLoCpjN0hx4N4+jHIWTXD4TMLHy9F23XkDagR9v+xQWRWR57yY55GPF8NnD4ox9iGTxirY8A==", + "version": "17.20.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-17.20.0.tgz", + "integrity": "sha512-IRSoatgB/NQJZG5EeTbv/iAx1byOGdbbyhQrNvWdCfTnmPxUT0ao9/eGOeG7ljD8wJBsxwE8f6tES5Db0FRKEw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.5.0", + "@typescript-eslint/utils": "^8.26.1", "enhanced-resolve": "^5.17.1", "eslint-plugin-es-x": "^7.8.0", "get-tsconfig": "^4.8.1", "globals": "^15.11.0", "ignore": "^5.3.2", "minimatch": "^9.0.5", - "semver": "^7.6.3" + "semver": "^7.6.3", + "ts-declaration-location": "^1.0.6" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4679,9 +4792,9 @@ } }, "node_modules/eslint-plugin-n/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4808,9 +4921,9 @@ "license": "MIT" }, "node_modules/eslint-scope": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.3.0.tgz", - "integrity": "sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -4825,9 +4938,9 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", "dev": true, "license": "Apache-2.0", "engines": { @@ -4897,15 +5010,15 @@ } }, "node_modules/espree": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", - "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "acorn": "^8.14.0", + "acorn": "^8.15.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.2.0" + "eslint-visitor-keys": "^4.2.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4985,24 +5098,24 @@ } }, "node_modules/execa": { - "version": "9.5.3", - "resolved": "https://registry.npmjs.org/execa/-/execa-9.5.3.tgz", - "integrity": "sha512-QFNnTvU3UjgWFy8Ef9iDHvIdcgZ344ebkwYx4/KLbR+CKQA4xBaHzv+iRpp86QfMHP8faFQLh8iOc57215y4Rg==", + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-9.6.0.tgz", + "integrity": "sha512-jpWzZ1ZhwUmeWRhS7Qv3mhpOhLfwI+uAX4e5fOcXqwMR7EcJ0pj2kV1CVzHVMX/LphnKWD3LObjZCoJ71lKpHw==", "dev": true, "license": "MIT", "dependencies": { "@sindresorhus/merge-streams": "^4.0.0", - "cross-spawn": "^7.0.3", + "cross-spawn": "^7.0.6", "figures": "^6.1.0", "get-stream": "^9.0.0", - "human-signals": "^8.0.0", + "human-signals": "^8.0.1", "is-plain-obj": "^4.1.0", "is-stream": "^4.0.1", "npm-run-path": "^6.0.0", - "pretty-ms": "^9.0.0", + "pretty-ms": "^9.2.0", "signal-exit": "^4.1.0", "strip-final-newline": "^4.0.0", - "yoctocolors": "^2.0.0" + "yoctocolors": "^2.1.1" }, "engines": { "node": "^18.19.0 || >=20.5.0" @@ -5038,9 +5151,9 @@ } }, "node_modules/fast-check": { - "version": "3.23.2", - "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-3.23.2.tgz", - "integrity": "sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-4.1.1.tgz", + "integrity": "sha512-8+yQYeNYqBfWem0Nmm7BUnh27wm+qwGvI0xln60c8RPM5rVekxZf/Ildng2GNBfjaG6utIebFmVBPlNtZlBLxg==", "dev": true, "funding": [ { @@ -5054,10 +5167,10 @@ ], "license": "MIT", "dependencies": { - "pure-rand": "^6.1.0" + "pure-rand": "^7.0.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=12.17.0" } }, "node_modules/fast-deep-equal": { @@ -5460,9 +5573,9 @@ } }, "node_modules/glob/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -6111,6 +6224,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -6618,6 +6744,23 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/jest-circus/node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT" + }, "node_modules/jest-cli": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz", @@ -8494,9 +8637,9 @@ } }, "node_modules/pure-rand": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", - "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-7.0.1.tgz", + "integrity": "sha512-oTUZM/NAZS8p7ANR3SHh30kXB+zK2r2BPcEn/awJIbOvq82WoMN4p62AWWp3Hhw50G0xMsw1mhIBLqHw64EcNQ==", "dev": true, "funding": [ { @@ -9203,6 +9346,16 @@ "dev": true, "license": "MIT" }, + "node_modules/stable-hash-x": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/stable-hash-x/-/stable-hash-x-0.2.0.tgz", + "integrity": "sha512-o3yWv49B/o4QZk5ZcsALc6t0+eCelPc44zZsLtCQnZPDwFpDYSWcDnrv2TtMmMbQ7uKo3J0HTURCqckw23czNQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/stack-utils": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", @@ -9226,6 +9379,20 @@ "node": ">=8" } }, + "node_modules/stop-iteration-iterator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.1.0.tgz", + "integrity": "sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "internal-slot": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -9580,9 +9747,9 @@ } }, "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -9606,9 +9773,9 @@ } }, "node_modules/tinyglobby": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.13.tgz", - "integrity": "sha512-mEwzpUgrLySlveBwEVDMKk5B57bhLPYovRfPAXD5gA/98Opn0rCDj3GtLwFvCvH5RK9uPCExUROW5NjDwvqkxw==", + "version": "0.2.14", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.14.tgz", + "integrity": "sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==", "dev": true, "license": "MIT", "dependencies": { @@ -9623,9 +9790,9 @@ } }, "node_modules/tinyglobby/node_modules/fdir": { - "version": "6.4.4", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.4.tgz", - "integrity": "sha512-1NZP+GK4GfuAv3PqKvxQRDMjdSRZjnkq7KfhlNrCNNlZ0ygQFpebfrnfnq/W7fpUnAv9aGWmY1zKx7FYL3gwhg==", + "version": "6.4.6", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.6.tgz", + "integrity": "sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==", "dev": true, "license": "MIT", "peerDependencies": { @@ -9693,14 +9860,50 @@ "typescript": ">=4.8.4" } }, + "node_modules/ts-declaration-location": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/ts-declaration-location/-/ts-declaration-location-1.0.7.tgz", + "integrity": "sha512-EDyGAwH1gO0Ausm9gV6T2nUvBgXT5kGoCMJPllOaooZ+4VvJiKBdZE7wK18N1deEowhcUptS+5GXZK8U/fvpwA==", + "dev": true, + "funding": [ + { + "type": "ko-fi", + "url": "https://ko-fi.com/rebeccastevens" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/ts-declaration-location" + } + ], + "license": "BSD-3-Clause", + "dependencies": { + "picomatch": "^4.0.2" + }, + "peerDependencies": { + "typescript": ">=4.0.0" + } + }, + "node_modules/ts-declaration-location/node_modules/picomatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/tsd": { - "version": "0.31.2", - "resolved": "https://registry.npmjs.org/tsd/-/tsd-0.31.2.tgz", - "integrity": "sha512-VplBAQwvYrHzVihtzXiUVXu5bGcr7uH1juQZ1lmKgkuGNGT+FechUCqmx9/zk7wibcqR2xaNEwCkDyKh+VVZnQ==", + "version": "0.32.0", + "resolved": "https://registry.npmjs.org/tsd/-/tsd-0.32.0.tgz", + "integrity": "sha512-R5lBZCbxGBowOcW0gpQaiIjGYrG5NmU+PfFDKcc3zbtzWjML1o/zAwzdDnS2ZheSlPu9GW51azpFqEPUBq9DoQ==", "dev": true, "license": "MIT", "dependencies": { - "@tsd/typescript": "~5.4.3", + "@tsd/typescript": "~5.8.3", "eslint-formatter-pretty": "^4.1.0", "globby": "^11.0.1", "jest-diff": "^29.0.3", @@ -9730,7 +9933,8 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "dev": true, - "license": "0BSD" + "license": "0BSD", + "optional": true }, "node_modules/tunnel": { "version": "0.0.6", @@ -9871,15 +10075,15 @@ } }, "node_modules/typescript-eslint": { - "version": "8.32.1", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.32.1.tgz", - "integrity": "sha512-D7el+eaDHAmXvrZBy1zpzSNIRqnCOrkwTgZxTu3MUqRWk8k0q9m9Ho4+vPf7iHtgUfrK/o8IZaEApsxPlHTFCg==", + "version": "8.35.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.35.0.tgz", + "integrity": "sha512-uEnz70b7kBz6eg/j0Czy6K5NivaYopgxRjsnAJ2Fx5oTLo3wefTHIbL7AkQr1+7tJCRVpTs/wiM8JR/11Loq9A==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.32.1", - "@typescript-eslint/parser": "8.32.1", - "@typescript-eslint/utils": "8.32.1" + "@typescript-eslint/eslint-plugin": "8.35.0", + "@typescript-eslint/parser": "8.35.0", + "@typescript-eslint/utils": "8.35.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -9956,36 +10160,38 @@ } }, "node_modules/unrs-resolver": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.7.2.tgz", - "integrity": "sha512-BBKpaylOW8KbHsu378Zky/dGh4ckT/4NW/0SHRABdqRLcQJ2dAOjDo9g97p04sWflm0kqPqpUatxReNV/dqI5A==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.9.2.tgz", + "integrity": "sha512-VUyWiTNQD7itdiMuJy+EuLEErLj3uwX/EpHQF8EOf33Dq3Ju6VW1GXm+swk6+1h7a49uv9fKZ+dft9jU7esdLA==", "dev": true, "hasInstallScript": true, "license": "MIT", "dependencies": { - "napi-postinstall": "^0.2.2" + "napi-postinstall": "^0.2.4" }, "funding": { - "url": "https://github.com/sponsors/JounQin" + "url": "https://opencollective.com/unrs-resolver" }, "optionalDependencies": { - "@unrs/resolver-binding-darwin-arm64": "1.7.2", - "@unrs/resolver-binding-darwin-x64": "1.7.2", - "@unrs/resolver-binding-freebsd-x64": "1.7.2", - "@unrs/resolver-binding-linux-arm-gnueabihf": "1.7.2", - "@unrs/resolver-binding-linux-arm-musleabihf": "1.7.2", - "@unrs/resolver-binding-linux-arm64-gnu": "1.7.2", - "@unrs/resolver-binding-linux-arm64-musl": "1.7.2", - "@unrs/resolver-binding-linux-ppc64-gnu": "1.7.2", - "@unrs/resolver-binding-linux-riscv64-gnu": "1.7.2", - "@unrs/resolver-binding-linux-riscv64-musl": "1.7.2", - "@unrs/resolver-binding-linux-s390x-gnu": "1.7.2", - "@unrs/resolver-binding-linux-x64-gnu": "1.7.2", - "@unrs/resolver-binding-linux-x64-musl": "1.7.2", - "@unrs/resolver-binding-wasm32-wasi": "1.7.2", - "@unrs/resolver-binding-win32-arm64-msvc": "1.7.2", - "@unrs/resolver-binding-win32-ia32-msvc": "1.7.2", - "@unrs/resolver-binding-win32-x64-msvc": "1.7.2" + "@unrs/resolver-binding-android-arm-eabi": "1.9.2", + "@unrs/resolver-binding-android-arm64": "1.9.2", + "@unrs/resolver-binding-darwin-arm64": "1.9.2", + "@unrs/resolver-binding-darwin-x64": "1.9.2", + "@unrs/resolver-binding-freebsd-x64": "1.9.2", + "@unrs/resolver-binding-linux-arm-gnueabihf": "1.9.2", + "@unrs/resolver-binding-linux-arm-musleabihf": "1.9.2", + "@unrs/resolver-binding-linux-arm64-gnu": "1.9.2", + "@unrs/resolver-binding-linux-arm64-musl": "1.9.2", + "@unrs/resolver-binding-linux-ppc64-gnu": "1.9.2", + "@unrs/resolver-binding-linux-riscv64-gnu": "1.9.2", + "@unrs/resolver-binding-linux-riscv64-musl": "1.9.2", + "@unrs/resolver-binding-linux-s390x-gnu": "1.9.2", + "@unrs/resolver-binding-linux-x64-gnu": "1.9.2", + "@unrs/resolver-binding-linux-x64-musl": "1.9.2", + "@unrs/resolver-binding-wasm32-wasi": "1.9.2", + "@unrs/resolver-binding-win32-arm64-msvc": "1.9.2", + "@unrs/resolver-binding-win32-ia32-msvc": "1.9.2", + "@unrs/resolver-binding-win32-x64-msvc": "1.9.2" } }, "node_modules/update-browserslist-db": { diff --git a/deps/undici/src/package.json b/deps/undici/src/package.json index ca21dfd50ccefb..4d9ae38bac9123 100644 --- a/deps/undici/src/package.json +++ b/deps/undici/src/package.json @@ -1,6 +1,6 @@ { "name": "undici", - "version": "7.10.0", + "version": "7.11.0", "description": "An HTTP/1.1 client, written from scratch for Node.js", "homepage": "https://undici.nodejs.org", "bugs": { @@ -112,20 +112,20 @@ "@sinonjs/fake-timers": "^12.0.0", "@types/node": "^18.19.50", "abort-controller": "^3.0.0", - "borp": "^0.19.0", + "borp": "^0.20.0", "c8": "^10.0.0", "cross-env": "^7.0.3", "dns-packet": "^5.4.0", "esbuild": "^0.25.2", "eslint": "^9.9.0", - "fast-check": "^3.17.1", + "fast-check": "^4.1.1", "https-pem": "^3.0.0", "husky": "^9.0.7", "jest": "^29.0.2", "neostandard": "^0.12.0", "node-forge": "^1.3.1", "proxy": "^2.1.1", - "tsd": "^0.31.2", + "tsd": "^0.32.0", "typescript": "^5.6.2", "ws": "^8.11.0" }, diff --git a/deps/undici/src/types/diagnostics-channel.d.ts b/deps/undici/src/types/diagnostics-channel.d.ts index 0c8477e16a8cda..eb3d50dfd6a397 100644 --- a/deps/undici/src/types/diagnostics-channel.d.ts +++ b/deps/undici/src/types/diagnostics-channel.d.ts @@ -31,6 +31,15 @@ declare namespace DiagnosticsChannel { export interface RequestBodySentMessage { request: Request; } + + export interface RequestBodyChunkSentMessage { + request: Request; + chunk: Uint8Array | string; + } + export interface RequestBodyChunkReceivedMessage { + request: Request; + chunk: Buffer; + } export interface RequestHeadersMessage { request: Request; response: Response; diff --git a/deps/undici/src/types/dispatcher.d.ts b/deps/undici/src/types/dispatcher.d.ts index 0584e36f565d49..5da4c720c20118 100644 --- a/deps/undici/src/types/dispatcher.d.ts +++ b/deps/undici/src/types/dispatcher.d.ts @@ -97,7 +97,8 @@ declare class Dispatcher extends EventEmitter { declare namespace Dispatcher { export interface ComposedDispatcher extends Dispatcher {} - export type DispatcherComposeInterceptor = (dispatch: Dispatcher['dispatch']) => Dispatcher['dispatch'] + export type Dispatch = Dispatcher['dispatch'] + export type DispatcherComposeInterceptor = (dispatch: Dispatch) => Dispatch export interface DispatchOptions { origin?: string | URL; path: string; @@ -276,6 +277,6 @@ declare namespace Dispatcher { } export interface DispatchInterceptor { - (dispatch: Dispatcher['dispatch']): Dispatcher['dispatch'] + (dispatch: Dispatch): Dispatch } } diff --git a/deps/undici/src/types/env-http-proxy-agent.d.ts b/deps/undici/src/types/env-http-proxy-agent.d.ts index 28fbb846a35f7b..1733d7f6e32ab1 100644 --- a/deps/undici/src/types/env-http-proxy-agent.d.ts +++ b/deps/undici/src/types/env-http-proxy-agent.d.ts @@ -1,4 +1,5 @@ import Agent from './agent' +import ProxyAgent from './proxy-agent' import Dispatcher from './dispatcher' export default EnvHttpProxyAgent @@ -10,7 +11,7 @@ declare class EnvHttpProxyAgent extends Dispatcher { } declare namespace EnvHttpProxyAgent { - export interface Options extends Agent.Options { + export interface Options extends Omit { /** Overrides the value of the HTTP_PROXY environment variable */ httpProxy?: string; /** Overrides the value of the HTTPS_PROXY environment variable */ diff --git a/deps/undici/src/types/eventsource.d.ts b/deps/undici/src/types/eventsource.d.ts index deccd730041e0b..c85c4a14e586e4 100644 --- a/deps/undici/src/types/eventsource.d.ts +++ b/deps/undici/src/types/eventsource.d.ts @@ -18,9 +18,9 @@ interface EventSource extends EventTarget { readonly CLOSED: 2 readonly CONNECTING: 0 readonly OPEN: 1 - onerror: (this: EventSource, ev: ErrorEvent) => any - onmessage: (this: EventSource, ev: MessageEvent) => any - onopen: (this: EventSource, ev: Event) => any + onerror: ((this: EventSource, ev: ErrorEvent) => any) | null + onmessage: ((this: EventSource, ev: MessageEvent) => any) | null + onopen: ((this: EventSource, ev: Event) => any) | null readonly readyState: 0 | 1 | 2 readonly url: string readonly withCredentials: boolean diff --git a/deps/undici/src/types/fetch.d.ts b/deps/undici/src/types/fetch.d.ts index 4edf41eb055c5f..2cf502900d13e9 100644 --- a/deps/undici/src/types/fetch.d.ts +++ b/deps/undici/src/types/fetch.d.ts @@ -33,6 +33,7 @@ export class BodyMixin { readonly arrayBuffer: () => Promise readonly blob: () => Promise + readonly bytes: () => Promise /** * @deprecated This method is not recommended for parsing multipart/form-data bodies in server environments. * It is recommended to use a library such as [@fastify/busboy](https://www.npmjs.com/package/@fastify/busboy) as follows: diff --git a/deps/undici/src/types/handlers.d.ts b/deps/undici/src/types/handlers.d.ts index a165f26c7d713c..8007dbf8e39a13 100644 --- a/deps/undici/src/types/handlers.d.ts +++ b/deps/undici/src/types/handlers.d.ts @@ -2,7 +2,7 @@ import Dispatcher from './dispatcher' export declare class RedirectHandler implements Dispatcher.DispatchHandler { constructor ( - dispatch: Dispatcher, + dispatch: Dispatcher.Dispatch, maxRedirections: number, opts: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandler, diff --git a/deps/undici/src/types/mock-client.d.ts b/deps/undici/src/types/mock-client.d.ts index 88e16d9fb4fa4d..702e82464942a6 100644 --- a/deps/undici/src/types/mock-client.d.ts +++ b/deps/undici/src/types/mock-client.d.ts @@ -14,6 +14,8 @@ declare class MockClient extends Client implements Interceptable { dispatch (options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandler): boolean /** Closes the mock client and gracefully waits for enqueued requests to complete. */ close (): Promise + /** Clean up all the prepared mocks. */ + cleanMocks (): void } declare namespace MockClient { diff --git a/deps/undici/src/types/mock-interceptor.d.ts b/deps/undici/src/types/mock-interceptor.d.ts index 418db413e5d5d1..83c0b3831ef189 100644 --- a/deps/undici/src/types/mock-interceptor.d.ts +++ b/deps/undici/src/types/mock-interceptor.d.ts @@ -84,6 +84,8 @@ declare namespace MockInterceptor { interface Interceptable extends Dispatcher { /** Intercepts any matching requests that use the same origin as this mock client. */ intercept(options: MockInterceptor.Options): MockInterceptor; + /** Clean up all the prepared mocks. */ + cleanMocks (): void } export { diff --git a/deps/undici/src/types/mock-pool.d.ts b/deps/undici/src/types/mock-pool.d.ts index 5a9d9cb274fd35..f35f357bc136e9 100644 --- a/deps/undici/src/types/mock-pool.d.ts +++ b/deps/undici/src/types/mock-pool.d.ts @@ -14,6 +14,8 @@ declare class MockPool extends Pool implements Interceptable { dispatch (options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandler): boolean /** Closes the mock pool and gracefully waits for enqueued requests to complete. */ close (): Promise + /** Clean up all the prepared mocks. */ + cleanMocks (): void } declare namespace MockPool { diff --git a/deps/undici/src/types/retry-handler.d.ts b/deps/undici/src/types/retry-handler.d.ts index 988e74b2b02052..3bc484b2d07054 100644 --- a/deps/undici/src/types/retry-handler.d.ts +++ b/deps/undici/src/types/retry-handler.d.ts @@ -35,6 +35,15 @@ declare namespace RetryHandler { ) => void export interface RetryOptions { + /** + * If true, the retry handler will throw an error if the request fails, + * this will prevent the folling handlers from being called, and will destroy the socket. + * + * @type {boolean} + * @memberof RetryOptions + * @default true + */ + throwOnError?: boolean; /** * Callback to be invoked on every retry iteration. * It receives the error, current state of the retry object and the options object diff --git a/deps/undici/src/types/webidl.d.ts b/deps/undici/src/types/webidl.d.ts index 33b93439aae7ea..56ce4a9aebd4b3 100644 --- a/deps/undici/src/types/webidl.d.ts +++ b/deps/undici/src/types/webidl.d.ts @@ -16,9 +16,12 @@ interface ConvertToIntOpts { } interface WebidlErrors { + /** + * @description Instantiate an error + */ exception (opts: { header: string, message: string }): TypeError /** - * @description Throw an error when conversion from one type to another has failed + * @description Instantiate an error when conversion from one type to another has failed */ conversionFailed (opts: { prefix: string @@ -75,7 +78,7 @@ interface WebidlUtil { ): number /** - * @see https://webidl.spec.whatwg.org/#abstract-opdef-converttoint + * @see https://webidl.spec.whatwg.org/#abstract-opdef-integerpart */ IntegerPart (N: number): number @@ -182,20 +185,21 @@ interface WebidlConverters { [Key: string]: (...args: any[]) => unknown } -type IsAssertion = (arg: any) => arg is T +type WebidlIsFunction = (arg: any) => arg is T interface WebidlIs { - Request: IsAssertion - Response: IsAssertion - ReadableStream: IsAssertion - Blob: IsAssertion - URLSearchParams: IsAssertion - File: IsAssertion - FormData: IsAssertion - URL: IsAssertion - WebSocketError: IsAssertion - AbortSignal: IsAssertion - MessagePort: IsAssertion + Request: WebidlIsFunction + Response: WebidlIsFunction + ReadableStream: WebidlIsFunction + Blob: WebidlIsFunction + URLSearchParams: WebidlIsFunction + File: WebidlIsFunction + FormData: WebidlIsFunction + URL: WebidlIsFunction + WebSocketError: WebidlIsFunction + AbortSignal: WebidlIsFunction + MessagePort: WebidlIsFunction + USVString: WebidlIsFunction } export interface Webidl { @@ -233,7 +237,7 @@ export interface Webidl { * Similar to {@link Webidl.brandCheck} but allows skipping the check if third party * interfaces are allowed. */ - interfaceConverter (typeCheck: IsAssertion, name: string): ( + interfaceConverter (typeCheck: WebidlIsFunction, name: string): ( V: unknown, prefix: string, argument: string diff --git a/deps/undici/src/types/websocket.d.ts b/deps/undici/src/types/websocket.d.ts index 02e4865c7d8b00..e97c4e3e1d892c 100644 --- a/deps/undici/src/types/websocket.d.ts +++ b/deps/undici/src/types/websocket.d.ts @@ -136,7 +136,7 @@ interface ErrorEvent extends Event { readonly filename: string readonly lineno: number readonly colno: number - readonly error: any + readonly error: Error } export declare const ErrorEvent: { diff --git a/deps/undici/undici.js b/deps/undici/undici.js index 8905ca01ae25ad..f0ffc700c65247 100644 --- a/deps/undici/undici.js +++ b/deps/undici/undici.js @@ -543,14 +543,12 @@ var require_timers = __commonJS({ } __name(onTick, "onTick"); function refreshTimeout() { - if (fastNowTimeout) { + if (fastNowTimeout?.refresh) { fastNowTimeout.refresh(); } else { clearTimeout(fastNowTimeout); fastNowTimeout = setTimeout(onTick, TICK_MS); - if (fastNowTimeout.unref) { - fastNowTimeout.unref(); - } + fastNowTimeout?.unref(); } } __name(refreshTimeout, "refreshTimeout"); @@ -1022,7 +1020,6 @@ var require_util = __commonJS({ var stream = require("node:stream"); var net = require("node:net"); var { Blob: Blob2 } = require("node:buffer"); - var nodeUtil = require("node:util"); var { stringify } = require("node:querystring"); var { EventEmitter: EE } = require("node:events"); var timers = require_timers(); @@ -1411,20 +1408,6 @@ var require_util = __commonJS({ return () => signal.removeListener("abort", listener); } __name(addAbortListener, "addAbortListener"); - var toUSVString = (() => { - if (typeof String.prototype.toWellFormed === "function") { - return (value) => `${value}`.toWellFormed(); - } else { - return nodeUtil.toUSVString; - } - })(); - var isUSVString = (() => { - if (typeof String.prototype.isWellFormed === "function") { - return (value) => `${value}`.isWellFormed(); - } else { - return (value) => toUSVString(value) === `${value}`; - } - })(); function isTokenCharCode(c) { switch (c) { case 34: @@ -1575,8 +1558,6 @@ var require_util = __commonJS({ module2.exports = { kEnumerableProperty, isDisturbed, - toUSVString, - isUSVString, isBlobLike, parseOrigin, parseURL, @@ -2147,6 +2128,8 @@ var require_diagnostics = __commonJS({ // Request create: diagnosticsChannel.channel("undici:request:create"), bodySent: diagnosticsChannel.channel("undici:request:bodySent"), + bodyChunkSent: diagnosticsChannel.channel("undici:request:bodyChunkSent"), + bodyChunkReceived: diagnosticsChannel.channel("undici:request:bodyChunkReceived"), headers: diagnosticsChannel.channel("undici:request:headers"), trailers: diagnosticsChannel.channel("undici:request:trailers"), error: diagnosticsChannel.channel("undici:request:error"), @@ -2216,7 +2199,7 @@ var require_diagnostics = __commonJS({ const { request: { method, path, origin } } = evt; - debugLog("sending request to %s %s/%s", method, origin, path); + debugLog("sending request to %s %s%s", method, origin, path); } ); } @@ -2235,7 +2218,7 @@ var require_diagnostics = __commonJS({ response: { statusCode } } = evt; debugLog( - "received response to %s %s/%s - HTTP %d", + "received response to %s %s%s - HTTP %d", method, origin, path, @@ -2249,7 +2232,7 @@ var require_diagnostics = __commonJS({ const { request: { method, path, origin } } = evt; - debugLog("trailers received from %s %s/%s", method, origin, path); + debugLog("trailers received from %s %s%s", method, origin, path); } ); diagnosticsChannel.subscribe( @@ -2260,7 +2243,7 @@ var require_diagnostics = __commonJS({ error } = evt; debugLog( - "request to %s %s/%s errored - %s", + "request to %s %s%s errored - %s", method, origin, path, @@ -2489,6 +2472,9 @@ var require_request = __commonJS({ } } onBodySent(chunk) { + if (channels.bodyChunkSent.hasSubscribers) { + channels.bodyChunkSent.publish({ request: this, chunk }); + } if (this[kHandler].onBodySent) { try { return this[kHandler].onBodySent(chunk); @@ -2537,6 +2523,9 @@ var require_request = __commonJS({ onData(chunk) { assert(!this.aborted); assert(!this.completed); + if (channels.bodyChunkReceived.hasSubscribers) { + channels.bodyChunkReceived.publish({ request: this, chunk }); + } try { return this[kHandler].onData(chunk); } catch (err) { @@ -2671,61 +2660,35 @@ var require_connect = __commonJS({ var util = require_util(); var { InvalidArgumentError } = require_errors(); var tls; - var SessionCache; - if (global.FinalizationRegistry && !(process.env.NODE_V8_COVERAGE || process.env.UNDICI_NO_FG)) { - SessionCache = class WeakSessionCache { - static { - __name(this, "WeakSessionCache"); - } - constructor(maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions; - this._sessionCache = /* @__PURE__ */ new Map(); - this._sessionRegistry = new global.FinalizationRegistry((key) => { - if (this._sessionCache.size < this._maxCachedSessions) { - return; - } - const ref = this._sessionCache.get(key); - if (ref !== void 0 && ref.deref() === void 0) { - this._sessionCache.delete(key); - } - }); - } - get(sessionKey) { - const ref = this._sessionCache.get(sessionKey); - return ref ? ref.deref() : null; - } - set(sessionKey, session) { - if (this._maxCachedSessions === 0) { - return; - } - this._sessionCache.set(sessionKey, new WeakRef(session)); - this._sessionRegistry.register(session, sessionKey); - } - }; - } else { - SessionCache = class SimpleSessionCache { - static { - __name(this, "SimpleSessionCache"); - } - constructor(maxCachedSessions) { - this._maxCachedSessions = maxCachedSessions; - this._sessionCache = /* @__PURE__ */ new Map(); - } - get(sessionKey) { - return this._sessionCache.get(sessionKey); - } - set(sessionKey, session) { - if (this._maxCachedSessions === 0) { + var SessionCache = class WeakSessionCache { + static { + __name(this, "WeakSessionCache"); + } + constructor(maxCachedSessions) { + this._maxCachedSessions = maxCachedSessions; + this._sessionCache = /* @__PURE__ */ new Map(); + this._sessionRegistry = new FinalizationRegistry((key) => { + if (this._sessionCache.size < this._maxCachedSessions) { return; } - if (this._sessionCache.size >= this._maxCachedSessions) { - const { value: oldestKey } = this._sessionCache.keys().next(); - this._sessionCache.delete(oldestKey); + const ref = this._sessionCache.get(key); + if (ref !== void 0 && ref.deref() === void 0) { + this._sessionCache.delete(key); } - this._sessionCache.set(sessionKey, session); + }); + } + get(sessionKey) { + const ref = this._sessionCache.get(sessionKey); + return ref ? ref.deref() : null; + } + set(sessionKey, session) { + if (this._maxCachedSessions === 0) { + return; } - }; - } + this._sessionCache.set(sessionKey, new WeakRef(session)); + this._sessionRegistry.register(session, sessionKey); + } + }; function buildConnector({ allowH2, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) { if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero"); @@ -4072,13 +4035,12 @@ var require_data_url = __commonJS({ } }); -// lib/web/fetch/webidl.js +// lib/web/webidl/index.js var require_webidl = __commonJS({ - "lib/web/fetch/webidl.js"(exports2, module2) { + "lib/web/webidl/index.js"(exports2, module2) { "use strict"; var { types, inspect } = require("node:util"); var { markAsUncloneable } = require("node:worker_threads"); - var { toUSVString } = require_util(); var UNDEFINED = 1; var BOOLEAN = 2; var STRING = 3; @@ -4097,11 +4059,11 @@ var require_webidl = __commonJS({ webidl.errors.exception = function(message) { return new TypeError(`${message.header}: ${message.message}`); }; - webidl.errors.conversionFailed = function(context) { - const plural = context.types.length === 1 ? "" : " one of"; - const message = `${context.argument} could not be converted to${plural}: ${context.types.join(", ")}.`; + webidl.errors.conversionFailed = function(opts) { + const plural = opts.types.length === 1 ? "" : " one of"; + const message = `${opts.argument} could not be converted to${plural}: ${opts.types.join(", ")}.`; return webidl.errors.exception({ - header: context.prefix, + header: opts.prefix, message }); }; @@ -4272,6 +4234,8 @@ var require_webidl = __commonJS({ return inspect(V); case STRING: return `"${V}"`; + case BIGINT: + return `${V}n`; default: return `${V}`; } @@ -4391,6 +4355,9 @@ var require_webidl = __commonJS({ return converter(V, prefix, argument); }; }; + webidl.is.USVString = function(value) { + return typeof value === "string" && value.isWellFormed(); + }; webidl.is.ReadableStream = webidl.util.MakeTypeAssertion(ReadableStream); webidl.is.Blob = webidl.util.MakeTypeAssertion(Blob); webidl.is.URLSearchParams = webidl.util.MakeTypeAssertion(URLSearchParams); @@ -4427,7 +4394,12 @@ var require_webidl = __commonJS({ } return x; }; - webidl.converters.USVString = toUSVString; + webidl.converters.USVString = function(value) { + if (typeof value === "string") { + return value.toWellFormed(); + } + return `${value}`.toWellFormed(); + }; webidl.converters.boolean = function(V) { const x = Boolean(V); return x; @@ -5202,7 +5174,7 @@ var require_util2 = __commonJS({ return; } if (!isUint8Array(chunk)) { - failureSteps(TypeError("Received non-Uint8Array chunk")); + failureSteps(new TypeError("Received non-Uint8Array chunk")); return; } bytes.push(chunk); @@ -5674,7 +5646,7 @@ var require_formdata = __commonJS({ var require_formdata_parser = __commonJS({ "lib/web/fetch/formdata-parser.js"(exports2, module2) { "use strict"; - var { isUSVString, bufferToLowerCasedHeaderName } = require_util(); + var { bufferToLowerCasedHeaderName } = require_util(); var { utf8DecodeBytes } = require_util2(); var { HTTP_TOKEN_CODEPOINTS, isomorphicDecode } = require_data_url(); var { makeEntry } = require_formdata(); @@ -5771,8 +5743,8 @@ var require_formdata_parser = __commonJS({ } else { value = utf8DecodeBytes(Buffer.from(body)); } - assert(isUSVString(name)); - assert(typeof value === "string" && isUSVString(value) || webidl.is.File(value)); + assert(webidl.is.USVString(name)); + assert(typeof value === "string" && webidl.is.USVString(value) || webidl.is.File(value)); entryList.push(makeEntry(name, value, filename)); } } @@ -5981,7 +5953,7 @@ var require_body = __commonJS({ function noop() { } __name(noop, "noop"); - var hasFinalizationRegistry = globalThis.FinalizationRegistry && process.version.indexOf("v18") !== 0; + var hasFinalizationRegistry = globalThis.FinalizationRegistry; var streamRegistry; if (hasFinalizationRegistry) { streamRegistry = new FinalizationRegistry((weakRef) => { @@ -6480,7 +6452,7 @@ var require_client_h1 = __commonJS({ this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this)); } else { this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this)); - this.timeout.unref(); + this.timeout?.unref(); } } this.timeoutValue = delay; @@ -8950,7 +8922,8 @@ var require_proxy_agent = __commonJS({ signal: opts2.signal, headers: { ...this[kProxyHeaders], - host: opts2.host + host: opts2.host, + ...opts2.connections == null || opts2.connections > 0 ? { "proxy-connection": "keep-alive" } : {} }, servername: this[kProxyTls]?.servername || proxyHostname }); @@ -10095,45 +10068,7 @@ var require_response = __commonJS({ var require_dispatcher_weakref = __commonJS({ "lib/web/fetch/dispatcher-weakref.js"(exports2, module2) { "use strict"; - var { kConnected, kSize } = require_symbols(); - var CompatWeakRef = class { - static { - __name(this, "CompatWeakRef"); - } - constructor(value) { - this.value = value; - } - deref() { - return this.value[kConnected] === 0 && this.value[kSize] === 0 ? void 0 : this.value; - } - }; - var CompatFinalizer = class { - static { - __name(this, "CompatFinalizer"); - } - constructor(finalizer) { - this.finalizer = finalizer; - } - register(dispatcher, key) { - if (dispatcher.on) { - dispatcher.on("disconnect", () => { - if (dispatcher[kConnected] === 0 && dispatcher[kSize] === 0) { - this.finalizer(key); - } - }); - } - } - unregister(key) { - } - }; module2.exports = function() { - if (process.env.NODE_V8_COVERAGE && process.version.startsWith("v18")) { - process._rawDebug("Using compatibility WeakRef and FinalizationRegistry"); - return { - WeakRef: CompatWeakRef, - FinalizationRegistry: CompatFinalizer - }; - } return { WeakRef, FinalizationRegistry }; }; } @@ -11903,6 +11838,11 @@ var require_fetch = __commonJS({ flush: zlib.constants.BROTLI_OPERATION_FLUSH, finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH })); + } else if (coding === "zstd" && typeof zlib.createZstdDecompress === "function") { + decoders.push(zlib.createZstdDecompress({ + flush: zlib.constants.ZSTD_e_continue, + finishFlush: zlib.constants.ZSTD_e_end + })); } else { decoders.length = 0; break; @@ -12607,7 +12547,9 @@ var require_frame = __commonJS({ } }; module2.exports = { - WebsocketFrameSend + WebsocketFrameSend, + generateMask + // for benchmark }; } }); @@ -12664,7 +12606,7 @@ var require_connection = __commonJS({ handler.readyState = states.CLOSED; } if (response.type === "error" || response.status !== 101) { - failWebsocketConnection(handler, 1002, "Received network error or non-101 status code."); + failWebsocketConnection(handler, 1002, "Received network error or non-101 status code.", response.error); return; } if (protocols.length !== 0 && !response.headersList.get("Sec-WebSocket-Protocol")) { @@ -12753,7 +12695,7 @@ var require_connection = __commonJS({ } } __name(closeWebSocketConnection, "closeWebSocketConnection"); - function failWebsocketConnection(handler, code, reason) { + function failWebsocketConnection(handler, code, reason, cause) { if (isEstablished(handler.readyState)) { closeWebSocketConnection(handler, code, reason, false); } @@ -12761,7 +12703,7 @@ var require_connection = __commonJS({ if (handler.socket?.destroyed === false) { handler.socket.destroy(); } - handler.onFail(code, reason); + handler.onFail(code, reason, cause); } __name(failWebsocketConnection, "failWebsocketConnection"); module2.exports = { @@ -13290,7 +13232,7 @@ var require_websocket = __commonJS({ /** @type {Handler} */ #handler = { onConnectionEstablished: /* @__PURE__ */ __name((response, extensions) => this.#onConnectionEstablished(response, extensions), "onConnectionEstablished"), - onFail: /* @__PURE__ */ __name((code, reason) => this.#onFail(code, reason), "onFail"), + onFail: /* @__PURE__ */ __name((code, reason, cause) => this.#onFail(code, reason, cause), "onFail"), onMessage: /* @__PURE__ */ __name((opcode, data) => this.#onMessage(opcode, data), "onMessage"), onParserError: /* @__PURE__ */ __name((err) => failWebsocketConnection(this.#handler, null, err.message), "onParserError"), onParserDrain: /* @__PURE__ */ __name(() => this.#onParserDrain(), "onParserDrain"), @@ -13525,10 +13467,10 @@ var require_websocket = __commonJS({ } fireEvent("open", this); } - #onFail(code, reason) { + #onFail(code, reason, cause) { if (reason) { fireEvent("error", this, (type, init) => new ErrorEvent2(type, init), { - error: new Error(reason), + error: new Error(reason, cause ? { cause } : void 0), message: reason }); } @@ -13698,7 +13640,7 @@ var require_util4 = __commonJS({ __name(isASCIINumber, "isASCIINumber"); function delay(ms) { return new Promise((resolve) => { - setTimeout(resolve, ms).unref(); + setTimeout(resolve, ms); }); } __name(delay, "delay"); @@ -14074,11 +14016,9 @@ var require_eventsource = __commonJS({ dispatcher: this.#dispatcher }; const processEventSourceEndOfBody = /* @__PURE__ */ __name((response) => { - if (isNetworkError(response)) { - this.dispatchEvent(new Event("error")); - this.close(); + if (!isNetworkError(response)) { + return this.#reconnect(); } - this.#reconnect(); }, "processEventSourceEndOfBody"); fetchParams.processResponseEndOfBody = processEventSourceEndOfBody; fetchParams.processResponse = (response) => { @@ -14986,7 +14926,7 @@ var require_api_stream = __commonJS({ finished(res, { readable: false }, (err) => { const { callback, res: res2, opaque: opaque2, trailers, abort } = this; this.res = null; - if (err || !res2.readable) { + if (err || !res2?.readable) { util.destroy(res2, err); } this.callback = null; diff --git a/deps/v8/src/builtins/builtins-async-disposable-stack.cc b/deps/v8/src/builtins/builtins-async-disposable-stack.cc index 86487c2a11f119..7ac649108edcce 100644 --- a/deps/v8/src/builtins/builtins-async-disposable-stack.cc +++ b/deps/v8/src/builtins/builtins-async-disposable-stack.cc @@ -87,10 +87,6 @@ BUILTIN(AsyncDisposeFromSyncDispose) { kMethod))), isolate); - v8::TryCatch try_catch(reinterpret_cast(isolate)); - try_catch.SetVerbose(false); - try_catch.SetCaptureMessage(false); - MaybeDirectHandle result = Execution::Call(isolate, sync_method, receiver, {}); @@ -105,7 +101,8 @@ BUILTIN(AsyncDisposeFromSyncDispose) { return {}; } // d. IfAbruptRejectPromise(result, promiseCapability). - DCHECK(try_catch.HasCaught()); + isolate->clear_internal_exception(); + isolate->clear_pending_message(); JSPromise::Reject(promise, direct_handle(exception, isolate)); } diff --git a/deps/v8/src/codegen/riscv/macro-assembler-riscv.h b/deps/v8/src/codegen/riscv/macro-assembler-riscv.h index 4e4cb2b39271d3..39fc2edff6fa30 100644 --- a/deps/v8/src/codegen/riscv/macro-assembler-riscv.h +++ b/deps/v8/src/codegen/riscv/macro-assembler-riscv.h @@ -406,10 +406,7 @@ class V8_EXPORT_PRIVATE MacroAssembler : public MacroAssemblerBase { push_helper(rs...); } - template <> - void push_helper(Register r) { - StoreWord(r, MemOperand(sp, 0)); - } + void push_helper() {} public: // Push a number of registers. The leftmost register first (to the highest @@ -554,10 +551,7 @@ class V8_EXPORT_PRIVATE MacroAssembler : public MacroAssemblerBase { LoadWord(r, MemOperand(sp, sizeof...(rs) * kSystemPointerSize)); } - template <> - void pop_helper(Register r) { - LoadWord(r, MemOperand(sp, 0)); - } + void pop_helper() {} public: // Pop a number of registers. The leftmost register last (from the highest diff --git a/deps/v8/test/inspector/debugger/break-on-exception-promise-catch-prediction-expected.txt b/deps/v8/test/inspector/debugger/break-on-exception-promise-catch-prediction-expected.txt index a0172dc2494fe5..2e649ddb8fa5b8 100644 --- a/deps/v8/test/inspector/debugger/break-on-exception-promise-catch-prediction-expected.txt +++ b/deps/v8/test/inspector/debugger/break-on-exception-promise-catch-prediction-expected.txt @@ -1133,7 +1133,7 @@ Correctly predicted as caught Running test: testCase > Throwing from throwInAsyncDisposeFormSync, handling with dontHandleAsync -Paused on caught exception +Paused on uncaught promiseRejection [Symbol.dispose] (catch-prediction.js:188:6) throwInAsyncDisposeFormSync (catch-prediction.js:185:18) dontHandleAsync (catch-prediction.js:196:8) @@ -1171,7 +1171,7 @@ Correctly predicted as uncaught Running test: testCase > Throwing from throwInAsyncDisposeFormSync, handling with awaitAndCreateInTry -Paused on caught exception +Paused on caught promiseRejection [Symbol.dispose] (catch-prediction.js:188:6) throwInAsyncDisposeFormSync (catch-prediction.js:185:18) awaitAndCreateInTry (catch-prediction.js:202:10) diff --git a/deps/v8/test/mjsunit/harmony/regress/regress-418103036.js b/deps/v8/test/mjsunit/harmony/regress/regress-418103036.js new file mode 100644 index 00000000000000..537bd9d0a918d3 --- /dev/null +++ b/deps/v8/test/mjsunit/harmony/regress/regress-418103036.js @@ -0,0 +1,26 @@ +// Copyright 2025 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Flags: --ignore-unhandled-promises + +const obj = { + get f() { + async function f() { + function g() { + throw 1; + } + g[Symbol.dispose] = g; + await using y = g; + } + return f(); + }, +}; + +async function test(obj) { + const ser = d8.serializer.serialize(obj); + const des = d8.serializer.deserialize(ser); + await des; +} + +assertThrowsAsync(test(obj), Error); diff --git a/doc/api/buffer.md b/doc/api/buffer.md index d7ba1089a97e65..665f132ae41ab7 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -464,7 +464,7 @@ changes: description: No longer experimental. --> -A [`Blob`][] encapsulates immutable, raw data that can be safely shared across +A {Blob} encapsulates immutable, raw data that can be safely shared across multiple worker threads. ### `new buffer.Blob([sources[, options]])` @@ -5526,7 +5526,6 @@ introducing security vulnerabilities into an application. [UTF-16]: https://en.wikipedia.org/wiki/UTF-16 [UTF-8]: https://en.wikipedia.org/wiki/UTF-8 [WHATWG Encoding Standard]: https://encoding.spec.whatwg.org/ -[`Blob`]: https://developer.mozilla.org/en-US/docs/Web/API/Blob [`Buffer.alloc()`]: #static-method-bufferallocsize-fill-encoding [`Buffer.allocUnsafe()`]: #static-method-bufferallocunsafesize [`Buffer.allocUnsafeSlow()`]: #static-method-bufferallocunsafeslowsize diff --git a/doc/api/child_process.md b/doc/api/child_process.md index f340d5f912178f..efbb4652a34ea2 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -48,7 +48,7 @@ By default, pipes for `stdin`, `stdout`, and `stderr` are established between the parent Node.js process and the spawned subprocess. These pipes have limited (and platform-specific) capacity. If the subprocess writes to stdout in excess of that limit without the output being captured, the -subprocess blocks waiting for the pipe buffer to accept more data. This is +subprocess blocks, waiting for the pipe buffer to accept more data. This is identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }` option if the output will not be consumed. diff --git a/doc/api/cli.md b/doc/api/cli.md index 660f80675d7797..54e9aac80368b3 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -153,6 +153,12 @@ Error: Cannot load native addon because loading addons is disabled. > Stability: 1.1 - Active development @@ -183,11 +189,15 @@ Error: Access to this API has been restricted } ``` -Unlike `child_process.spawn`, the `child_process.fork` API copies the execution -arguments from the parent process. This means that if you start Node.js with the -Permission Model enabled and include the `--allow-child-process` flag, calling -`child_process.fork()` will propagate all Permission Model flags to the child -process. +The `child_process.fork()` API inherits the execution arguments from the +parent process. This means that if Node.js is started with the Permission +Model enabled and the `--allow-child-process` flag is set, any child process +created using `child_process.fork()` will automatically receive all relevant +Permission Model flags. + +This behavior also applies to `child_process.spawn()`, but in that case, the +flags are propagated via the `NODE_OPTIONS` environment variable rather than +directly through the process arguments. ### `--allow-fs-read` @@ -1806,7 +1816,7 @@ For more information, see the [TypeScript type-stripping][] documentation. added: v22.0.0 --> -Disable exposition of [`WebSocket`][] on the global scope. +Disable exposition of {WebSocket} on the global scope. ### `--no-extra-info-on-fatal-exception` @@ -3092,6 +3102,19 @@ mode. If no file is provided, Node.js will exit with status code `9`. node --watch index.js ``` +### `--watch-kill-signal` + + + +Customizes the signal sent to the process on watch mode restarts. + +```bash +node --watch --watch-kill-signal SIGINT test.js +``` + ### `--watch-path` > Stability: 1.2 - Release candidate @@ -4219,8 +4223,11 @@ added: input encoding is desired for a string input, user could encode the string into a `TypedArray` using either `TextEncoder` or `Buffer.from()` and passing the encoded `TypedArray` into this API instead. -* `outputEncoding` {string|undefined} [Encoding][encoding] used to encode the - returned digest. **Default:** `'hex'`. +* `options` {Object|string} + * `outputEncoding` {string} [Encoding][encoding] used to encode the + returned digest. **Default:** `'hex'`. + * `outputLength` {number} For XOF hash functions such as 'shake256', + the outputLength option can be used to specify the desired output length in bytes. * Returns: {string|Buffer} A utility for creating one-shot hash digests of data. It can be faster than @@ -4233,6 +4240,8 @@ version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc. On recent releases of OpenSSL, `openssl list -digest-algorithms` will display the available digest algorithms. +If `options` is a string, then it specifies the `outputEncoding`. + Example: ```cjs diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 75cd84818cdece..5c62c5268e05e4 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -3997,6 +3997,19 @@ Type: Documentation-only The [`util.types.isNativeError`][] API is deprecated. Please use [`Error.isError`][] instead. +### DEP0198: Creating SHAKE-128 and SHAKE-256 digests without an explicit `options.outputLength` + + + +Type: Documentation-only (supports [`--pending-deprecation`][]) + +Creating SHAKE-128 and SHAKE-256 digests without an explicit `options.outputLength` is deprecated. + [DEP0142]: #dep0142-repl_builtinlibs [NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf [RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3 diff --git a/doc/api/fs.md b/doc/api/fs.md index 330747519a1553..b8a7c9d80b1616 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -1314,6 +1314,37 @@ characters directly to the `prefix` string. For instance, given a directory `prefix` must end with a trailing platform-specific path separator (`require('node:path').sep`). +### `fsPromises.mkdtempDisposable(prefix[, options])` + + + +* `prefix` {string|Buffer|URL} +* `options` {string|Object} + * `encoding` {string} **Default:** `'utf8'` +* Returns: {Promise} Fulfills with a Promise for an async-disposable Object: + * `path` {string} The path of the created directory. + * `remove` {AsyncFunction} A function which removes the created directory. + * `[Symbol.asyncDispose]` {AsyncFunction} The same as `remove`. + +The resulting Promise holds an async-disposable object whose `path` property +holds the created directory path. When the object is disposed, the directory +and its contents will be removed asynchronously if it still exists. If the +directory cannot be deleted, disposal will throw an error. The object has an +async `remove()` method which will perform the same task. + +Both this function and the disposal function on the resulting object are +async, so it should be used with `await` + `await using` as in +`await using dir = await fsPromises.mkdtempDisposable('prefix')`. + + + +For detailed information, see the documentation of [`fsPromises.mkdtemp()`][]. + +The optional `options` argument can be a string specifying an encoding, or an +object with an `encoding` property specifying the character encoding to use. + ### `fsPromises.open(path, flags[, mode])` + +* `prefix` {string|Buffer|URL} +* `options` {string|Object} + * `encoding` {string} **Default:** `'utf8'` +* Returns: {Object} A disposable object: + * `path` {string} The path of the created directory. + * `remove` {Function} A function which removes the created directory. + * `[Symbol.dispose]` {Function} The same as `remove`. + +Returns a disposable object whose `path` property holds the created directory +path. When the object is disposed, the directory and its contents will be +removed if it still exists. If the directory cannot be deleted, disposal will +throw an error. The object has a `remove()` method which will perform the same +task. + + + +For detailed information, see the documentation of [`fs.mkdtemp()`][]. + +There is no callback-based version of this API because it is designed for use +with the `using` syntax. + +The optional `options` argument can be a string specifying an encoding, or an +object with an `encoding` property specifying the character encoding to use. + ### `fs.opendirSync(path[, options])` +> Stability: 2 - Stable + These objects are available in all modules. The following variables may appear to be global but are not. They exist only in @@ -31,12 +33,8 @@ changes: description: No longer experimental. --> -> Stability: 2 - Stable - - - A utility class used to signal cancelation in selected `Promise`-based APIs. -The API is based on the Web API [`AbortController`][]. +The API is based on the Web API {AbortController}. ```js const ac = new AbortController(); @@ -232,10 +230,6 @@ If `abortSignal.aborted` is `true`, throws `abortSignal.reason`. added: v18.0.0 --> -> Stability: 2 - Stable - - - See {Blob}. ## Class: `Buffer` @@ -244,10 +238,6 @@ See {Blob}. added: v0.1.103 --> -> Stability: 2 - Stable - - - * {Function} Used to handle binary data. See the [buffer section][]. @@ -284,14 +274,12 @@ added: v16.0.0 Global alias for [`buffer.atob()`][]. -## `BroadcastChannel` +## Class: `BroadcastChannel` -> Stability: 2 - Stable - See {BroadcastChannel}. ## `btoa(data)` @@ -310,10 +298,6 @@ Global alias for [`buffer.btoa()`][]. added: v0.9.1 --> -> Stability: 2 - Stable - - - [`clearImmediate`][] is described in the [timers][] section. ## `clearInterval(intervalObject)` @@ -322,10 +306,6 @@ added: v0.9.1 added: v0.0.1 --> -> Stability: 2 - Stable - - - [`clearInterval`][] is described in the [timers][] section. ## `clearTimeout(timeoutObject)` @@ -334,25 +314,15 @@ added: v0.0.1 added: v0.0.1 --> -> Stability: 2 - Stable - - - [`clearTimeout`][] is described in the [timers][] section. -## `CloseEvent` +## Class: `CloseEvent` -> Stability: 2 - Stable - - - -The `CloseEvent` class. See [`CloseEvent`][] for more details. - -A browser-compatible implementation of [`CloseEvent`][]. Disable this API +A browser-compatible implementation of {CloseEvent}. Disable this API with the [`--no-experimental-websocket`][] CLI flag. ## Class: `CompressionStream` @@ -375,10 +345,6 @@ A browser-compatible implementation of [`CompressionStream`][]. added: v0.1.100 --> -> Stability: 2 - Stable - - - * {Object} Used to print to stdout and stderr. See the [`console`][] section. @@ -397,7 +363,7 @@ changes: A browser-compatible implementation of [`CountQueuingStrategy`][]. -## `Crypto` +## Class: `Crypto` -> Stability: 2 - Stable - A browser-compatible implementation of {Crypto}. This global is available only if the Node.js binary was compiled with including support for the `node:crypto` module. @@ -433,11 +397,9 @@ changes: description: No longer behind `--experimental-global-webcrypto` CLI flag. --> -> Stability: 2 - Stable - A browser-compatible implementation of the [Web Crypto API][]. -## `CryptoKey` +## Class: `CryptoKey` -> Stability: 2 - Stable - A browser-compatible implementation of {CryptoKey}. This global is available only if the Node.js binary was compiled with including support for the `node:crypto` module. -## `CustomEvent` +## Class: `CustomEvent` -> Stability: 2 - Stable - - - -A browser-compatible implementation of the [`CustomEvent` Web API][]. +A browser-compatible implementation of {CustomEvent}. ## Class: `DecompressionStream` @@ -498,7 +454,7 @@ changes: A browser-compatible implementation of [`DecompressionStream`][]. -## `Event` +## Class: `Event` -> Stability: 2 - Stable - - - A browser-compatible implementation of the `Event` class. See [`EventTarget` and `Event` API][] for more details. -## `EventSource` +## Class: `EventSource` -> Stability: 2 - Stable - - - A browser-compatible implementation of the `EventTarget` class. See [`EventTarget` and `Event` API][] for more details. @@ -565,8 +513,6 @@ changes: description: No longer behind `--experimental-fetch` CLI flag. --> -> Stability: 2 - Stable - A browser-compatible implementation of the [`fetch()`][] function. ```mjs @@ -581,7 +527,7 @@ The implementation is based upon [undici](https://undici.nodejs.org), an HTTP/1. written from scratch for Node.js. You can figure out which version of `undici` is bundled in your Node.js process reading the `process.versions.undici` property. -## Custom dispatcher +### Custom dispatcher You can use a custom dispatcher to dispatch requests passing it in fetch's options object. The dispatcher must be compatible with `undici`'s @@ -600,7 +546,7 @@ import { setGlobalDispatcher } from 'undici'; setGlobalDispatcher(new MyAgent()); ``` -## Related classes +### Related classes The following globals are available to use with `fetch`: @@ -615,13 +561,9 @@ The following globals are available to use with `fetch`: added: v20.0.0 --> -> Stability: 2 - Stable - - - See {File}. -## Class `FormData` +## Class: `FormData` -> Stability: 2 - Stable - A browser-compatible implementation of {FormData}. ## `global` @@ -647,8 +587,6 @@ A browser-compatible implementation of {FormData}. added: v0.1.27 --> - - > Stability: 3 - Legacy. Use [`globalThis`][] instead. * {Object} The global namespace object. @@ -660,7 +598,7 @@ the global scope; `var something` inside a Node.js module will be local to that module, regardless of whether it is a [CommonJS module][] or an [ECMAScript module][]. -## Class `Headers` +## Class: `Headers` -> Stability: 2 - Stable - A browser-compatible implementation of {Headers}. ## `localStorage` @@ -696,47 +632,35 @@ Enable this API with the [`--experimental-webstorage`][] CLI flag. `localStorage` data is not stored per user or per request when used in the context of a server, it is shared across all users and requests. -## `MessageChannel` +## Class: `MessageChannel` -> Stability: 2 - Stable - - - The `MessageChannel` class. See [`MessageChannel`][] for more details. -## `MessageEvent` +## Class: `MessageEvent` -> Stability: 2 - Stable - - +A browser-compatible implementation of {MessageEvent}. -The `MessageEvent` class. See [`MessageEvent`][] for more details. - -## `MessagePort` +## Class: `MessagePort` -> Stability: 2 - Stable - - - The `MessagePort` class. See [`MessagePort`][] for more details. ## `module` This variable may appear to be global but is not. See [`module`][]. -## `Navigator` +## Class: `Navigator` -> Stability: 2 - Stable - - - The `PerformanceEntry` class. See [`PerformanceEntry`][] for more details. -## `PerformanceMark` +## Class: `PerformanceMark` -> Stability: 2 - Stable - - - The `PerformanceMark` class. See [`PerformanceMark`][] for more details. -## `PerformanceMeasure` +## Class: `PerformanceMeasure` -> Stability: 2 - Stable - - - The `PerformanceMeasure` class. See [`PerformanceMeasure`][] for more details. -## `PerformanceObserver` +## Class: `PerformanceObserver` -> Stability: 2 - Stable - - - The `PerformanceObserver` class. See [`PerformanceObserver`][] for more details. -## `PerformanceObserverEntryList` +## Class: `PerformanceObserverEntryList` -> Stability: 2 - Stable - - - The `PerformanceObserverEntryList` class. See [`PerformanceObserverEntryList`][] for more details. -## `PerformanceResourceTiming` +## Class: `PerformanceResourceTiming` -> Stability: 2 - Stable - - - The `PerformanceResourceTiming` class. See [`PerformanceResourceTiming`][] for more details. @@ -924,8 +824,6 @@ more details. added: v16.0.0 --> -> Stability: 2 - Stable - The [`perf_hooks.performance`][] object. ## `process` @@ -934,10 +832,6 @@ The [`perf_hooks.performance`][] object. added: v0.1.7 --> -> Stability: 2 - Stable - - - * {Object} The process object. See the [`process` object][] section. @@ -948,10 +842,6 @@ The process object. See the [`process` object][] section. added: v11.0.0 --> -> Stability: 2 - Stable - - - * `callback` {Function} Function to be queued. The `queueMicrotask()` method queues a microtask to invoke `callback`. If @@ -1072,7 +962,7 @@ A browser-compatible implementation of [`ReadableStreamDefaultReader`][]. This variable may appear to be global but is not. See [`require()`][]. -## `Response` +## Class: `Response` -> Stability: 2 - Stable - A browser-compatible implementation of {Response}. -## `Request` +## Class: `Request` -> Stability: 2 - Stable - A browser-compatible implementation of {Request}. ## `sessionStorage` @@ -1130,10 +1016,6 @@ the currently running process, and is not shared between workers. added: v0.9.1 --> -> Stability: 2 - Stable - - - [`setImmediate`][] is described in the [timers][] section. ## `setInterval(callback, delay[, ...args])` @@ -1142,10 +1024,6 @@ added: v0.9.1 added: v0.0.1 --> -> Stability: 2 - Stable - - - [`setInterval`][] is described in the [timers][] section. ## `setTimeout(callback, delay[, ...args])` @@ -1154,10 +1032,6 @@ added: v0.0.1 added: v0.0.1 --> -> Stability: 2 - Stable - - - [`setTimeout`][] is described in the [timers][] section. ## Class: `Storage` @@ -1166,10 +1040,10 @@ added: v0.0.1 added: v22.4.0 --> -> Stability: 1.0 - Early development. +> Stability: 1.0 - Early development. Enable this API with the +> [`--experimental-webstorage`][] CLI flag. -A browser-compatible implementation of [`Storage`][]. Enable this API with the -[`--experimental-webstorage`][] CLI flag. +A browser-compatible implementation of {Storage}. ## `structuredClone(value[, options])` @@ -1177,13 +1051,9 @@ A browser-compatible implementation of [`Storage`][]. Enable this API with the added: v17.0.0 --> -> Stability: 2 - Stable - - - The WHATWG [`structuredClone`][] method. -## `SubtleCrypto` +## Class: `SubtleCrypto` -> Stability: 2 - Stable - A browser-compatible implementation of {SubtleCrypto}. This global is available only if the Node.js binary was compiled with including support for the `node:crypto` module. -## `DOMException` +## Class: `DOMException` -> Stability: 2 - Stable - - - -The WHATWG `DOMException` class. See [`DOMException`][] for more details. +The WHATWG {DOMException} class. -## `TextDecoder` +## Class: `TextDecoder` -> Stability: 2 - Stable - - - The WHATWG `TextDecoder` class. See the [`TextDecoder`][] section. ## Class: `TextDecoderStream` @@ -1239,16 +1099,12 @@ changes: A browser-compatible implementation of [`TextDecoderStream`][]. -## `TextEncoder` +## Class: `TextEncoder` -> Stability: 2 - Stable - - - The WHATWG `TextEncoder` class. See the [`TextEncoder`][] section. ## Class: `TextEncoderStream` @@ -1293,19 +1149,15 @@ changes: A browser-compatible implementation of [`TransformStreamDefaultController`][]. -## `URL` +## Class: `URL` -> Stability: 2 - Stable - - - The WHATWG `URL` class. See the [`URL`][] section. -## `URLPattern` +## Class: `URLPattern` - The WHATWG `URLPattern` class. See the [`URLPattern`][] section. -## `URLSearchParams` +## Class: `URLSearchParams` -> Stability: 2 - Stable - - - The WHATWG `URLSearchParams` class. See the [`URLSearchParams`][] section. -## `WebAssembly` +## Class: `WebAssembly` -> Stability: 2 - Stable - - - * {Object} The object that acts as the namespace for all W3C [WebAssembly][webassembly-org] related functionality. See the [Mozilla Developer Network][webassembly-mdn] for usage and compatibility. -## `WebSocket` +## Class: `WebSocket` -> Stability: 2 - Stable - -A browser-compatible implementation of [`WebSocket`][]. Disable this API +A browser-compatible implementation of {WebSocket}. Disable this API with the [`--no-experimental-websocket`][] CLI flag. ## Class: `WritableStream` @@ -1418,18 +1258,12 @@ A browser-compatible implementation of [`WritableStreamDefaultWriter`][]. [`--localstorage-file`]: cli.md#--localstorage-filefile [`--no-experimental-global-navigator`]: cli.md#--no-experimental-global-navigator [`--no-experimental-websocket`]: cli.md#--no-experimental-websocket -[`AbortController`]: https://developer.mozilla.org/en-US/docs/Web/API/AbortController [`ByteLengthQueuingStrategy`]: webstreams.md#class-bytelengthqueuingstrategy -[`CloseEvent`]: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent/CloseEvent [`CompressionStream`]: webstreams.md#class-compressionstream [`CountQueuingStrategy`]: webstreams.md#class-countqueuingstrategy -[`CustomEvent` Web API]: https://dom.spec.whatwg.org/#customevent -[`DOMException`]: https://developer.mozilla.org/en-US/docs/Web/API/DOMException [`DecompressionStream`]: webstreams.md#class-decompressionstream -[`EventSource`]: https://developer.mozilla.org/en-US/docs/Web/API/EventSource [`EventTarget` and `Event` API]: events.md#eventtarget-and-event-api [`MessageChannel`]: worker_threads.md#class-messagechannel -[`MessageEvent`]: https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent/MessageEvent [`MessagePort`]: worker_threads.md#class-messageport [`PerformanceEntry`]: perf_hooks.md#class-performanceentry [`PerformanceMark`]: perf_hooks.md#class-performancemark @@ -1443,7 +1277,6 @@ A browser-compatible implementation of [`WritableStreamDefaultWriter`][]. [`ReadableStreamDefaultController`]: webstreams.md#class-readablestreamdefaultcontroller [`ReadableStreamDefaultReader`]: webstreams.md#class-readablestreamdefaultreader [`ReadableStream`]: webstreams.md#class-readablestream -[`Storage`]: https://developer.mozilla.org/en-US/docs/Web/API/Storage [`TextDecoderStream`]: webstreams.md#class-textdecoderstream [`TextDecoder`]: util.md#class-utiltextdecoder [`TextEncoderStream`]: webstreams.md#class-textencoderstream @@ -1453,7 +1286,6 @@ A browser-compatible implementation of [`WritableStreamDefaultWriter`][]. [`URLPattern`]: url.md#class-urlpattern [`URLSearchParams`]: url.md#class-urlsearchparams [`URL`]: url.md#class-url -[`WebSocket`]: https://developer.mozilla.org/en-US/docs/Web/API/WebSocket [`WritableStreamDefaultController`]: webstreams.md#class-writablestreamdefaultcontroller [`WritableStreamDefaultWriter`]: webstreams.md#class-writablestreamdefaultwriter [`WritableStream`]: webstreams.md#class-writablestream diff --git a/doc/api/http.md b/doc/api/http.md index 21d8f412af303f..d104032e0f848c 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -3820,7 +3820,8 @@ changes: * `family` {number} IP address family to use when resolving `host` or `hostname`. Valid values are `4` or `6`. When unspecified, both IP v4 and v6 will be used. - * `headers` {Object} An object containing request headers. + * `headers` {Object|Array} An object or an array of strings containing request + headers. The array is in the same format as [`message.rawHeaders`][]. * `hints` {number} Optional [`dns.lookup()` hints][]. * `host` {string} A domain name or IP address of the server to issue the request to. **Default:** `'localhost'`. @@ -4233,14 +4234,14 @@ added: Set the maximum number of idle HTTP parsers. -## `WebSocket` +## Class: `WebSocket` -A browser-compatible implementation of [`WebSocket`][]. +A browser-compatible implementation of {WebSocket}. [RFC 8187]: https://www.rfc-editor.org/rfc/rfc8187.txt [`'ERR_HTTP_CONTENT_LENGTH_MISMATCH'`]: errors.md#err_http_content_length_mismatch @@ -4258,7 +4259,6 @@ A browser-compatible implementation of [`WebSocket`][]. [`Headers`]: globals.md#class-headers [`TypeError`]: errors.md#class-typeerror [`URL`]: url.md#the-whatwg-url-api -[`WebSocket`]: https://developer.mozilla.org/en-US/docs/Web/API/WebSocket [`agent.createConnection()`]: #agentcreateconnectionoptions-callback [`agent.getName()`]: #agentgetnameoptions [`destroy()`]: #agentdestroy @@ -4275,6 +4275,7 @@ A browser-compatible implementation of [`WebSocket`][]. [`http.globalAgent`]: #httpglobalagent [`http.request()`]: #httprequestoptions-callback [`message.headers`]: #messageheaders +[`message.rawHeaders`]: #messagerawheaders [`message.socket`]: #messagesocket [`message.trailers`]: #messagetrailers [`net.Server.close()`]: net.md#serverclosecallback diff --git a/doc/api/permissions.md b/doc/api/permissions.md index 132dc681351cde..343a8c332a1298 100644 --- a/doc/api/permissions.md +++ b/doc/api/permissions.md @@ -2,8 +2,6 @@ - - Permissions can be used to control what system resources the Node.js process has access to or what actions the process can take with those resources. @@ -194,7 +192,7 @@ easy to configure permissions as needed when using `npx`. There are constraints you need to know before using this system: -* The model does not inherit to a child node process or a worker thread. +* The model does not inherit to a worker thread. * When using the Permission Model the following features will be restricted: * Native modules * Child process diff --git a/doc/api/sqlite.md b/doc/api/sqlite.md index 7bdd85b51bc5ef..b8ec27fe6e51a8 100644 --- a/doc/api/sqlite.md +++ b/doc/api/sqlite.md @@ -95,6 +95,10 @@ exposed by this class execute synchronously. * `path` {string | Buffer | URL} The path of the database. A SQLite database can be @@ -124,6 +128,14 @@ added: v22.5.0 * `timeout` {number} The [busy timeout][] in milliseconds. This is the maximum amount of time that SQLite will wait for a database lock to be released before returning an error. **Default:** `0`. + * `readBigInts` {boolean} If `true`, integer fields are read as JavaScript `BigInt` values. If `false`, + integer fields are read as JavaScript numbers. **Default:** `false`. + * `returnArrays` {boolean} If `true`, query results are returned as arrays instead of objects. + **Default:** `false`. + * `allowBareNamedParameters` {boolean} If `true`, allows binding named parameters without the prefix + character (e.g., `foo` instead of `:foo`). **Default:** `true`. + * `allowUnknownNamedParameters` {boolean} If `true`, unknown named parameters are ignored when binding. + If `false`, an exception is thrown for unknown named parameters. **Default:** `false`. Constructs a new `DatabaseSync` instance. diff --git a/doc/api/stream.md b/doc/api/stream.md index a088d4e00298f0..f381748240312e 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -3040,6 +3040,44 @@ console.log(res); // prints 'HELLOWORLD' See [`readable.compose(stream)`][] for `stream.compose` as operator. +### `stream.isErrored(stream)` + + + +* `stream` {Readable|Writable|Duplex|WritableStream|ReadableStream} +* Returns: {boolean} + +Returns whether the stream has encountered an error. + +### `stream.isReadable(stream)` + + + +* `stream` {Readable|Duplex|ReadableStream} +* Returns: {boolean} + +Returns whether the stream is readable. + ### `stream.Readable.from(iterable[, options])` - -* `stream` {Readable|Writable|Duplex|WritableStream|ReadableStream} -* Returns: {boolean} - -Returns whether the stream has encountered an error. - -### `stream.isReadable(stream)` - - - -* `stream` {Readable|Duplex|ReadableStream} -* Returns: {boolean} - -Returns whether the stream is readable. - ### `stream.Readable.toWeb(streamReadable[, options])` + +> Stability: 0 - Deprecated: Use [`sourceTextModule.moduleRequests`][] instead. + +* {string\[]} + +The specifiers of all dependencies of this module. The returned array is frozen +to disallow any changes to it. + +Corresponds to the `[[RequestedModules]]` field of [Cyclic Module Record][]s in +the ECMAScript specification. + +### `sourceTextModule.moduleRequests` + + + +* {ModuleRequest\[]} Dependencies of this module. + +The requested import dependencies of this module. The returned array is frozen +to disallow any changes to it. + +For example, given a source text: + + + +```mjs +import foo from 'foo'; +import fooAlias from 'foo'; +import bar from './bar.js'; +import withAttrs from '../with-attrs.ts' with { arbitraryAttr: 'attr-val' }; +import source Module from 'wasm-mod.wasm'; +``` + + + +The value of the `sourceTextModule.moduleRequests` will be: + +```js +[ + { + specifier: 'foo', + attributes: {}, + phase: 'evaluation', + }, + { + specifier: 'foo', + attributes: {}, + phase: 'evaluation', + }, + { + specifier: './bar.js', + attributes: {}, + phase: 'evaluation', + }, + { + specifier: '../with-attrs.ts', + attributes: { arbitraryAttr: 'attr-val' }, + phase: 'evaluation', + }, + { + specifier: 'wasm-mod.wasm', + attributes: {}, + phase: 'source', + }, +]; +``` + ## Class: `vm.SyntheticModule` + +* {Object} + * `specifier` {string} The specifier of the requested module. + * `attributes` {Object} The `"with"` value passed to the + [WithClause][] in a [ImportDeclaration][], or an empty object if no value was + provided. + * `phase` {string} The phase of the requested module (`"source"` or `"evaluation"`). + +A `ModuleRequest` represents the request to import a module with given import attributes and phase. + ## `vm.compileFunction(code[, params[, options]])` + +* `instance` {WebAssembly.Instance} +* `options` {Object} + * `memory` {WebAssembly.Memory} **Default:** `instance.exports.memory`. + +Set up WASI host bindings to `instance` without calling `initialize()` +or `start()`. This method is useful when the WASI module is instantiated in +child threads for sharing the memory across threads. + +`finalizeBindings()` requires that either `instance` exports a +[`WebAssembly.Memory`][] named `memory` or user specify a +[`WebAssembly.Memory`][] object in `options.memory`. If the `memory` is invalid +an exception is thrown. + +`start()` and `initialize()` will call `finalizeBindings()` internally. +If `finalizeBindings()` is called more than once, an exception is thrown. + ### `wasi.wasiImport` + +```js +[Symbol.dispose]() { + return void this.dispose(); + // or + this.dispose(); + // or + return; + // or + // no return +} + +async [Symbol.asyncDispose]() { + await this.dispose(); + // or + return; + // or + // no return +} +``` + +### Debuggability of disposer methods + +To improve debugging experience, The `Symbol.dispose` and `Symbol.asyncDispose` +functions should not be direct aliases of named disposer functions. They should +instead defer to the named disposer. This ensures the stack traces can be more +informative about whether a disposer was called via `using` or was called +directly. + +For example: + + + +```js +// Do something like this: +function dispose() { ... } +return { + dispose, + [Symbol.dispose]() { this.dispose(); } +}; + +// Rather than this: +function dispose() { ... } +return { + dispose, + [Symbol.dispose]: dispose +}; +``` + +### A Note on documenting disposable objects + +When documenting disposable objects, it is important to clearly indicate that +the object is disposable and how it should be disposed of. This includes +documenting the `Symbol.dispose` and `Symbol.asyncDispose` methods, as well as +any named disposal methods that the object exposes. + +If the disposable object is anonymous (that is, it is a regular JavaScript +object that implements the `Symbol.dispose` method), it is still important to +document that it is disposable and how it should be disposed of. + +Within the documentation, it is possible to document anonymous objects as if +they were classes, using the `Class: ` prefix and otherwise presenting the +object as if you were documenting a regular JavaScript class, even if it is +never actually instantiated as a class. Examples of this pattern can be seen, +for instance, in the documentation of the [Web Crypto API](../api/webcrypto.md). + +So, for example, if you have an API that returns an anonymous disposable object, +you might document it like: + +```markdown +### Class: `MyDisposableObject` + +#### `myDisposableObject.dispose()` + +... + +#### `myDisposableObject[Symbol.dispose]()` + +... + +### `foo.getMyDisposableObject()` + +* Returns: {MyDisposableObject} +``` + +## Guidelines for introducing explicit resource management into existing APIs + +Introducing the ability to use `using` into existing APIs can be tricky. + +The best way to understand the issues is to look at a real world example. PR +[58516](https://github.com/nodejs/node/pull/58516) is a good case. This PR +sought to introduce `Symbol.dispose` and `Symbol.asyncDispose` capabilities +into the `fs.mkdtemp` API such that a temporary directory could be created and +be automatically disposed of when the scope in which it was created exited. +However, the existing implementation of the `fs.mkdtemp` API returns a string +value that cannot be made disposable. There are also sync, callback, and +promise-based variations of the existing API that further complicate the +situation. + +In the initial proposal, the `fs.mkdtemp` API was changed to return an object +that implements the `Symbol.dispose` method but only if a specific option is +provided. This would mean that the return value of the API would become +polymorphic, returning different types based on how it was called. This adds +a lot of complexity to the API and makes it difficult to reason about the +return value. It also makes it difficult to programmatically detect whether +the version of the API being used supports `using` or not. +`fs.mkdtemp('...', { disposable: true })` would act differently in older versions +of Node.js than in newer versions with no way to detect this at runtime other +than to inspect the return value. + +Some APIs that already return objects that can be made disposable do not have +this kind of issue. For example, the `setImmediate()` API in Node.js returns an +object that implements the `Symbol.dispose` method. This change was made without +much fanfare because the return value of the API was already an object. + +So, some APIs can be made disposable easily without any issues while others +require more thought and consideration. The following guidelines can help +when introducing these capabilities into existing APIs: + +1. Avoid polymorphic return values: If an API already returns a value that + can be made disposable, and it makes sense to make it disposable, do so. Do + not, however, make the return value polymorphic determined by an option + passed into the API. +2. Introduce new API variants that are `using` capable: If an existing API + cannot be made disposable without changing the return type or making it + polymorphic, consider introducing a new API variant. For example, + `fs.mkdtempDisposable` could be introduced to return a disposable object + while the existing `fs.mkdtemp` API continues to return a string. Yes, it + means more APIs to maintain but it avoids the complexity and confusion of + polymorphic return values. If adding a new API variant is not ideal, remember + that changing the return type of an existing API is quite likely a breaking + change. +3. When an existing API signature does not lend itself easily to supporting making + the return value disposable and a new API needs to be introduced, it is worth + considering whether the existing API should be deprecated in favor of the new. + Deprecation is never a decision to be taken lightly, however, as it can have major + ecosystem impact. + +## Guidelines for using disposable objects + +Because disposable objects can be disposed of at any time, it is important +to be careful when using them. Here are some guidelines for using disposables: + +1. Never use `using` or `await using` with disposable objects that you + do not own. For instance, the following code is problematic if you + are not the owner of `someObject`: + +```js +function foo(someObject) { + using resource = someObject; +} +``` + +The reason this is problematic is that the `using` statement will +unconditionally call the `Symbol.dispose` method on `someObject` when the block +exits, but you do not control the lifecycle of `someObject`. If `someObject` +is disposed of, it may lead to unexpected behavior in the rest of the +code that called the `foo` function. + +2. When there is a clear difference between disposing of an object in a success + context vs. an exception context, always explicitly dispose of objects the + successful code paths, including early returns. For example: + +```js +class MyDisposableResource { + close() { + console.log('Resource closed'); + } + + abort() { + console.log('Resource aborted'); + } + + [Symbol.dispose]() { + // Assume the error case here... + this.abort(); + } +} + +function foo() { + using res = new MyDisposableResource(); + if (someCondition) { + // Early return, ensure the resource is disposed of + res.close(); + return; + } + // do other stuff + res.close(); +} +``` + +This is because of the fact that, when the disposer is called, it has no way +of knowing if there is a pending exception or not and it is generally safest +to assume that it is being called in an exceptional state. + +Many types of disposable objects make no differentiation between success and +exception cases, in which case relying entirely on `using` is just fine (and +preferred). The disposable returned by `setImmediate()` is a good example here. +All that does is call `clearImmediate()` and it does not matter if the block +errored or not. + +3. Remember that disposers are invoked in a stack, in the reverse order + in which they were created. For example, + +```js +class MyDisposable { + constructor(name) { + this.name = name; + } + [Symbol.dispose]() { + console.log(`Disposing ${this.name}`); + } +} + +{ + using a = new MyDisposable('A'); + using b = new MyDisposable('B'); + using c = new MyDisposable('C'); + // When this block exits, the disposal methods will be called in the + // reverse order: C, B, A. +} +``` + +Because of this, it is important to consider the possible relationships +between disposable objects. For example, if one disposable object holds a +reference to another disposable object the cleanup order may be important. diff --git a/doc/contributing/security-release-process.md b/doc/contributing/security-release-process.md index 0903557a1de181..6c2f8a3a6e2400 100644 --- a/doc/contributing/security-release-process.md +++ b/doc/contributing/security-release-process.md @@ -41,7 +41,6 @@ The current security stewards are documented in the main Node.js | IBM | Joe | | | Platformatic | Matteo | | | NodeSource | Juan | | -| Red Hat | Michael | | ## Planning diff --git a/doc/contributing/strategic-initiatives.md b/doc/contributing/strategic-initiatives.md index 0799a6958a9b40..0643b9254ea7ee 100644 --- a/doc/contributing/strategic-initiatives.md +++ b/doc/contributing/strategic-initiatives.md @@ -8,7 +8,6 @@ agenda to ensure they are active and have the support they need. | Initiative | Champion | Links | | ---------------------- | -------------------------------- | ------------------------------------------------- | -| Core Promise APIs | [Antoine du Hamel][aduh95] | | | QUIC / HTTP3 | [James M Snell][jasnell] | | | Shadow Realm | [Chengzhong Wu][legendecas] | | | Startup Snapshot | [Joyee Cheung][joyeecheung] | | @@ -23,24 +22,24 @@ agenda to ensure they are active and have the support they need. ## Completed initiatives -| Initiative | Champion | Links | -| ------------------ | -------------------------- | -------------------------------------------------------------------- | -| Build resources | Michael Dawson | | -| CVE Management | Michael Dawson | | -| Governance | Myles Borins | | -| Moderation Team | Rich Trott | | -| Modules | Myles Borins | | -| N-API | Michael Dawson | | -| npm Integration | Myles Borins | | -| OpenSSL Evolution | Rod Vagg | | -| Open Web Standards | Myles Borins, Joyee Cheung | | -| VM module fix | Franziska Hinkelmann | | -| Workers | Anna Henningsen | | +| Initiative | Champion | Links | +| ------------------ | -------------------------------- | -------------------------------------------------------------------- | +| Build resources | Michael Dawson | | +| Core Promise APIs | Matteo Collina, Antoine du Hamel | | +| CVE Management | Michael Dawson | | +| Governance | Myles Borins | | +| Moderation Team | Rich Trott | | +| Modules | Myles Borins | | +| N-API | Michael Dawson | | +| npm Integration | Myles Borins | | +| OpenSSL Evolution | Rod Vagg | | +| Open Web Standards | Myles Borins, Joyee Cheung | | +| VM module fix | Franziska Hinkelmann | | +| Workers | Anna Henningsen | | [RaisinTen]: https://github.com/RaisinTen -[aduh95]: https://github.com/aduh95 [benjamingr]: https://github.com/benjamingr [jasnell]: https://github.com/jasnell [joyeecheung]: https://github.com/joyeecheung diff --git a/doc/node-config-schema.json b/doc/node-config-schema.json index 75902338c806cb..def724fb760c66 100644 --- a/doc/node-config-schema.json +++ b/doc/node-config-schema.json @@ -562,6 +562,9 @@ "watch": { "type": "boolean" }, + "watch-kill-signal": { + "type": "string" + }, "watch-path": { "oneOf": [ { diff --git a/doc/node.1 b/doc/node.1 index de6a3f7aa5f6fd..a5f301a01ebdef 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -618,6 +618,19 @@ Set V8's thread pool size which will be used to allocate background jobs. If set to 0 then V8 will choose an appropriate size of the thread pool based on the number of online processors. If the value provided is larger than V8's maximum, then the largest value will be chosen. . +.It Fl -watch +Starts Node.js in watch mode. When in watch mode, changes in the watched files cause the Node.js process to restart. + +By default, watch mode will watch the entry point and any required or imported module. Use --watch-path to specify what paths to watch. +. +.It Fl -watch-path +Starts Node.js in watch mode and specifies what paths to watch. When in watch mode, changes in the watched paths cause the Node.js process to restart. + +This will turn off watching of required or imported modules, even when used in combination with --watch. +. +.It Fl -watch-kill-signal +Customizes the signal sent to the process on watch mode restarts. +. .It Fl -zero-fill-buffers Automatically zero-fills all newly allocated Buffer and SlowBuffer instances. . diff --git a/eslint.config.mjs b/eslint.config.mjs index e3b3fdada0c0b7..b3e84fb04e5d23 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -285,7 +285,7 @@ export default [ '@stylistic/js/computed-property-spacing': 'error', '@stylistic/js/dot-location': ['error', 'property'], '@stylistic/js/eol-last': 'error', - '@stylistic/js/func-call-spacing': 'error', + '@stylistic/js/function-call-spacing': 'error', '@stylistic/js/indent': ['error', 2, { ArrayExpression: 'first', CallExpression: { arguments: 'first' }, diff --git a/lib/assert.js b/lib/assert.js index 657ac6225d9833..af34cbfd3f4e42 100644 --- a/lib/assert.js +++ b/lib/assert.js @@ -707,7 +707,7 @@ assert.doesNotReject = async function doesNotReject(fn, ...args) { }; /** - * Throws `value` if the value is not `null` or `undefined`. + * Throws `AssertionError` if the value is not `null` or `undefined`. * @param {any} err * @returns {void} */ diff --git a/lib/child_process.js b/lib/child_process.js index 21616c69f877ec..baa0a56d1ecdc7 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -95,6 +95,8 @@ const { const MAX_BUFFER = 1024 * 1024; +const permission = require('internal/process/permission'); + const isZOS = process.platform === 'os390'; let addAbortListener; @@ -536,6 +538,31 @@ function copyProcessEnvToEnv(env, name, optionEnv) { } } +let permissionModelFlagsToCopy; + +function getPermissionModelFlagsToCopy() { + if (permissionModelFlagsToCopy === undefined) { + permissionModelFlagsToCopy = [...permission.availableFlags(), '--permission']; + } + return permissionModelFlagsToCopy; +} + +function copyPermissionModelFlagsToEnv(env, key, args) { + // Do not override if permission was already passed to file + if (args.includes('--permission') || (env[key] && env[key].indexOf('--permission') !== -1)) { + return; + } + + const flagsToCopy = getPermissionModelFlagsToCopy(); + for (const arg of process.execArgv) { + for (const flag of flagsToCopy) { + if (arg.startsWith(flag)) { + env[key] = `${env[key] ? env[key] + ' ' + arg : arg}`; + } + } + } +} + let emittedDEP0190Already = false; function normalizeSpawnArguments(file, args, options) { validateString(file, 'file'); @@ -652,7 +679,8 @@ function normalizeSpawnArguments(file, args, options) { ArrayPrototypeUnshift(args, file); } - const env = options.env || process.env; + // Shallow copy to guarantee changes won't impact process.env + const env = options.env || { ...process.env }; const envPairs = []; // process.env.NODE_V8_COVERAGE always propagates, making it possible to @@ -672,6 +700,10 @@ function normalizeSpawnArguments(file, args, options) { copyProcessEnvToEnv(env, '_EDC_SUSV3', options.env); } + if (permission.isEnabled()) { + copyPermissionModelFlagsToEnv(env, 'NODE_OPTIONS', args); + } + let envKeys = []; // Prototype values are intentionally included. for (const key in env) { diff --git a/lib/fs.js b/lib/fs.js index 14e83e5d4c6816..4b1f400f0ad838 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -42,6 +42,7 @@ const { StringPrototypeCharCodeAt, StringPrototypeIndexOf, StringPrototypeSlice, + SymbolDispose, uncurryThis, } = primordials; @@ -3033,6 +3034,36 @@ function mkdtempSync(prefix, options) { return binding.mkdtemp(prefix, options.encoding); } +/** + * Synchronously creates a unique temporary directory. + * The returned value is a disposable object which removes the + * directory and its contents when disposed. + * @param {string | Buffer | URL} prefix + * @param {string | { encoding?: string; }} [options] + * @returns {object} A disposable object with a "path" property. + */ +function mkdtempDisposableSync(prefix, options) { + options = getOptions(options); + + prefix = getValidatedPath(prefix, 'prefix'); + warnOnNonPortableTemplate(prefix); + + const path = binding.mkdtemp(prefix, options.encoding); + // Stash the full path in case of process.chdir() + const fullPath = pathModule.resolve(process.cwd(), path); + + const remove = () => { + binding.rmSync(fullPath, 0 /* maxRetries */, true /* recursive */, 100 /* retryDelay */); + }; + return { + path, + remove, + [SymbolDispose]() { + remove(); + }, + }; +} + /** * Asynchronously copies `src` to `dest`. By * default, `dest` is overwritten if it already exists. @@ -3238,6 +3269,7 @@ module.exports = fs = { mkdirSync, mkdtemp, mkdtempSync, + mkdtempDisposableSync, open, openSync, openAsBlob, diff --git a/lib/internal/assert/utils.js b/lib/internal/assert/utils.js index 59b5a16f1309a5..d059fa89baf7d4 100644 --- a/lib/internal/assert/utils.js +++ b/lib/internal/assert/utils.js @@ -9,7 +9,6 @@ const { SafeMap, StringPrototypeCharCodeAt, StringPrototypeIncludes, - StringPrototypeIndexOf, StringPrototypeReplace, StringPrototypeSlice, StringPrototypeSplit, @@ -174,7 +173,6 @@ function getErrMessage(message, fn) { const line = call.getLineNumber() - 1; let column = call.getColumnNumber() - 1; let identifier; - let code; if (filename) { identifier = `${filename}${line}${column}`; @@ -199,31 +197,24 @@ function getErrMessage(message, fn) { // errors are handled faster. if (errorStackTraceLimitIsWritable) Error.stackTraceLimit = 0; - if (filename) { - if (decoder === undefined) { - const { StringDecoder } = require('string_decoder'); - decoder = new StringDecoder('utf8'); - } - - // ESM file prop is a file proto. Convert that to path. - // This ensure opensync will not throw ENOENT for ESM files. - const fileProtoPrefix = 'file://'; - if (StringPrototypeStartsWith(filename, fileProtoPrefix)) { - filename = fileURLToPath(filename); - } + if (decoder === undefined) { + const { StringDecoder } = require('string_decoder'); + decoder = new StringDecoder('utf8'); + } - fd = openSync(filename, 'r', 0o666); - // Reset column and message. - ({ 0: column, 1: message } = getCode(fd, line, column)); - // Flush unfinished multi byte characters. - decoder.end(); - } else { - for (let i = 0; i < line; i++) { - code = StringPrototypeSlice(code, - StringPrototypeIndexOf(code, '\n') + 1); - } - ({ 0: column, 1: message } = parseCode(code, column)); + // ESM file prop is a file proto. Convert that to path. + // This ensure opensync will not throw ENOENT for ESM files. + const fileProtoPrefix = 'file://'; + if (StringPrototypeStartsWith(filename, fileProtoPrefix)) { + filename = fileURLToPath(filename); } + + fd = openSync(filename, 'r', 0o666); + // Reset column and message. + ({ 0: column, 1: message } = getCode(fd, line, column)); + // Flush unfinished multi byte characters. + decoder.end(); + // Always normalize indentation, otherwise the message could look weird. if (StringPrototypeIncludes(message, '\n')) { if (EOL === '\r\n') { diff --git a/lib/internal/crypto/hash.js b/lib/internal/crypto/hash.js index fda2017fa0cc95..8dff1ea2cbfbd5 100644 --- a/lib/internal/crypto/hash.js +++ b/lib/internal/crypto/hash.js @@ -3,6 +3,7 @@ const { ObjectSetPrototypeOf, ReflectApply, + StringPrototypeReplace, StringPrototypeToLowerCase, Symbol, } = primordials; @@ -33,6 +34,8 @@ const { lazyDOMException, normalizeEncoding, encodingsMap, + isPendingDeprecation, + getDeprecationWarningEmitter, } = require('internal/util'); const { @@ -51,6 +54,7 @@ const { const { validateEncoding, validateString, + validateObject, validateUint32, } = require('internal/validators'); @@ -63,6 +67,25 @@ const LazyTransform = require('internal/streams/lazy_transform'); const kState = Symbol('kState'); const kFinalized = Symbol('kFinalized'); +/** + * @param {string} name + */ +function normalizeAlgorithm(name) { + return StringPrototypeReplace(StringPrototypeToLowerCase(name), '-', ''); +} + +const maybeEmitDeprecationWarning = getDeprecationWarningEmitter( + 'DEP0198', + 'Creating SHAKE128/256 digests without an explicit options.outputLength is deprecated.', + undefined, + false, + (algorithm) => { + if (!isPendingDeprecation()) return false; + const normalized = normalizeAlgorithm(algorithm); + return normalized === 'shake128' || normalized === 'shake256'; + }, +); + function Hash(algorithm, options) { if (!new.target) return new Hash(algorithm, options); @@ -80,6 +103,9 @@ function Hash(algorithm, options) { this[kState] = { [kFinalized]: false, }; + if (!isCopy && xofLen === undefined) { + maybeEmitDeprecationWarning(algorithm); + } ReflectApply(LazyTransform, this, [options]); } @@ -193,14 +219,27 @@ async function asyncDigest(algorithm, data) { throw lazyDOMException('Unrecognized algorithm name', 'NotSupportedError'); } -function hash(algorithm, input, outputEncoding = 'hex') { +function hash(algorithm, input, options) { validateString(algorithm, 'algorithm'); if (typeof input !== 'string' && !isArrayBufferView(input)) { throw new ERR_INVALID_ARG_TYPE('input', ['Buffer', 'TypedArray', 'DataView', 'string'], input); } + let outputEncoding; + let outputLength; + + if (typeof options === 'string') { + outputEncoding = options; + } else if (options !== undefined) { + validateObject(options, 'options'); + outputLength = options.outputLength; + outputEncoding = options.outputEncoding; + } + + outputEncoding ??= 'hex'; + let normalized = outputEncoding; // Fast case: if it's 'hex', we don't need to validate it further. - if (outputEncoding !== 'hex') { + if (normalized !== 'hex') { validateString(outputEncoding, 'outputEncoding'); normalized = normalizeEncoding(outputEncoding); // If the encoding is invalid, normalizeEncoding() returns undefined. @@ -213,8 +252,17 @@ function hash(algorithm, input, outputEncoding = 'hex') { } } } + + if (outputLength !== undefined) { + validateUint32(outputLength, 'outputLength'); + } + + if (outputLength === undefined) { + maybeEmitDeprecationWarning(algorithm); + } + return oneShotDigest(algorithm, getCachedHashId(algorithm), getHashCache(), - input, normalized, encodingsMap[normalized]); + input, normalized, encodingsMap[normalized], outputLength); } module.exports = { diff --git a/lib/internal/fs/dir.js b/lib/internal/fs/dir.js index f7b89b1fa8dba2..88b797ca905581 100644 --- a/lib/internal/fs/dir.js +++ b/lib/internal/fs/dir.js @@ -18,6 +18,7 @@ const { codes: { ERR_DIR_CLOSED, ERR_DIR_CONCURRENT_OPERATION, + ERR_INVALID_THIS, ERR_MISSING_ARGS, }, } = require('internal/errors'); @@ -58,7 +59,13 @@ class Dir { }), }; - validateUint32(this.#options.bufferSize, 'options.bufferSize', true); + try { + validateUint32(this.#options.bufferSize, 'options.bufferSize', true); + } catch (validationError) { + // Userland won't be able to close handle if we throw, so we close it first + this.#handle.close(); + throw validationError; + } this.#readPromisified = FunctionPrototypeBind( promisify(this.#readImpl), this, false); @@ -67,6 +74,8 @@ class Dir { } get path() { + if (!(#path in this)) + throw new ERR_INVALID_THIS('Dir'); return this.#path; } diff --git a/lib/internal/fs/promises.js b/lib/internal/fs/promises.js index a5607810ca5bb2..e29b63b7aeef7c 100644 --- a/lib/internal/fs/promises.js +++ b/lib/internal/fs/promises.js @@ -1188,6 +1188,39 @@ async function mkdtemp(prefix, options) { ); } +async function mkdtempDisposable(prefix, options) { + options = getOptions(options); + + prefix = getValidatedPath(prefix, 'prefix'); + warnOnNonPortableTemplate(prefix); + + const cwd = process.cwd(); + const path = await PromisePrototypeThen( + binding.mkdtemp(prefix, options.encoding, kUsePromises), + undefined, + handleErrorFromBinding, + ); + // Stash the full path in case of process.chdir() + const fullPath = pathModule.resolve(cwd, path); + + const remove = async () => { + const rmrf = lazyRimRaf(); + await rmrf(fullPath, { + maxRetries: 0, + recursive: true, + retryDelay: 0, + }); + }; + return { + __proto__: null, + path, + remove, + async [SymbolAsyncDispose]() { + await remove(); + }, + }; +} + async function writeFile(path, data, options) { options = getOptions(options, { encoding: 'utf8', @@ -1300,6 +1333,7 @@ module.exports = { lutimes, realpath, mkdtemp, + mkdtempDisposable, writeFile, appendFile, readFile, diff --git a/lib/internal/fs/streams.js b/lib/internal/fs/streams.js index 43f06d0104de61..e35934d987bb3d 100644 --- a/lib/internal/fs/streams.js +++ b/lib/internal/fs/streams.js @@ -26,6 +26,7 @@ const { validateBoolean, validateFunction, validateInteger, + validateThisInternalField, } = require('internal/validators'); const { errorOrDestroy } = require('internal/streams/destroy'); const fs = require('fs'); @@ -231,9 +232,11 @@ ObjectSetPrototypeOf(ReadStream, Readable); ObjectDefineProperty(ReadStream.prototype, 'autoClose', { __proto__: null, get() { + validateThisInternalField(this, kFs, 'ReadStream'); return this._readableState.autoDestroy; }, set(val) { + validateThisInternalField(this, kFs, 'ReadStream'); this._readableState.autoDestroy = val; }, }); @@ -400,9 +403,11 @@ ObjectSetPrototypeOf(WriteStream, Writable); ObjectDefineProperty(WriteStream.prototype, 'autoClose', { __proto__: null, get() { + validateThisInternalField(this, kFs, 'WriteStream'); return this._writableState.autoDestroy; }, set(val) { + validateThisInternalField(this, kFs, 'WriteStream'); this._writableState.autoDestroy = val; }, }); diff --git a/lib/internal/heap_utils.js b/lib/internal/heap_utils.js index 1b18f997f08a9b..d3e8cdf532cd88 100644 --- a/lib/internal/heap_utils.js +++ b/lib/internal/heap_utils.js @@ -53,11 +53,12 @@ class HeapSnapshotStream extends Readable { this[kHandle].readStart(); } - _destroy() { + _destroy(err, callback) { // Release the references on the handle so that // it can be garbage collected. this[kHandle][owner_symbol] = undefined; this[kHandle] = undefined; + callback(err); } [kUpdateTimer]() { diff --git a/lib/internal/inspector/network.js b/lib/internal/inspector/network.js index a035f7cea119c2..e64837a532c2ae 100644 --- a/lib/internal/inspector/network.js +++ b/lib/internal/inspector/network.js @@ -2,6 +2,7 @@ const { NumberMAX_SAFE_INTEGER, + StringPrototypeToLowerCase, Symbol, } = primordials; @@ -52,8 +53,8 @@ function sniffMimeType(contentType) { let charset; try { const mimeTypeObj = new MIMEType(contentType); - mimeType = mimeTypeObj.essence || ''; - charset = mimeTypeObj.params.get('charset') || ''; + mimeType = StringPrototypeToLowerCase(mimeTypeObj.essence || ''); + charset = StringPrototypeToLowerCase(mimeTypeObj.params.get('charset') || ''); } catch { mimeType = ''; charset = ''; diff --git a/lib/internal/inspector/network_undici.js b/lib/internal/inspector/network_undici.js index 2cb6a0a8785323..95be848910f3da 100644 --- a/lib/internal/inspector/network_undici.js +++ b/lib/internal/inspector/network_undici.js @@ -2,6 +2,7 @@ const { DateNow, + StringPrototypeToLowerCase, } = primordials; const { @@ -13,16 +14,25 @@ const { } = require('internal/inspector/network'); const dc = require('diagnostics_channel'); const { Network } = require('inspector'); +const { Buffer } = require('buffer'); // Convert an undici request headers array to a plain object (Map) function requestHeadersArrayToDictionary(headers) { const dict = {}; + let charset; + let mimeType; for (let idx = 0; idx < headers.length; idx += 2) { const key = `${headers[idx]}`; const value = `${headers[idx + 1]}`; dict[key] = value; + + if (StringPrototypeToLowerCase(key) === 'content-type') { + const result = sniffMimeType(value); + charset = result.charset; + mimeType = result.mimeType; + } } - return dict; + return [dict, charset, mimeType]; }; // Convert an undici response headers array to a plain object (Map) @@ -32,7 +42,7 @@ function responseHeadersArrayToDictionary(headers) { let mimeType; for (let idx = 0; idx < headers.length; idx += 2) { const key = `${headers[idx]}`; - const lowerCasedKey = key.toLowerCase(); + const lowerCasedKey = StringPrototypeToLowerCase(key); const value = `${headers[idx + 1]}`; const prevValue = dict[key]; @@ -63,8 +73,7 @@ function onClientRequestStart({ request }) { const url = `${request.origin}${request.path}`; request[kInspectorRequestId] = getNextRequestId(); - const headers = requestHeadersArrayToDictionary(request.headers); - const { charset } = sniffMimeType(headers); + const { 0: headers, 1: charset } = requestHeadersArrayToDictionary(request.headers); Network.requestWillBeSent({ requestId: request[kInspectorRequestId], @@ -74,7 +83,8 @@ function onClientRequestStart({ request }) { request: { url, method: request.method, - headers: requestHeadersArrayToDictionary(request.headers), + headers: headers, + hasPostData: request.body != null, }, }); } @@ -97,6 +107,40 @@ function onClientRequestError({ request, error }) { }); } +/** + * When a chunk of the request body is being sent, cache it until `getRequestPostData` request. + * https://chromedevtools.github.io/devtools-protocol/1-3/Network/#method-getRequestPostData + * @param {{ request: undici.Request, chunk: Uint8Array | string }} event + */ +function onClientRequestBodyChunkSent({ request, chunk }) { + if (typeof request[kInspectorRequestId] !== 'string') { + return; + } + + const buffer = Buffer.from(chunk); + Network.dataSent({ + requestId: request[kInspectorRequestId], + timestamp: getMonotonicTime(), + dataLength: buffer.byteLength, + data: buffer, + }); +} + +/** + * Mark a request body as fully sent. + * @param {{request: undici.Request}} event + */ +function onClientRequestBodySent({ request }) { + if (typeof request[kInspectorRequestId] !== 'string') { + return; + } + + Network.dataSent({ + requestId: request[kInspectorRequestId], + finished: true, + }); +} + /** * When response headers are received, emit Network.responseReceived event. * https://chromedevtools.github.io/devtools-protocol/1-3/Network/#event-responseReceived @@ -126,6 +170,27 @@ function onClientResponseHeaders({ request, response }) { }); } +/** + * When a chunk of the response body has been received, cache it until `getResponseBody` request + * https://chromedevtools.github.io/devtools-protocol/1-3/Network/#method-getResponseBody or + * stream it with `streamResourceContent` request. + * https://chromedevtools.github.io/devtools-protocol/tot/Network/#method-streamResourceContent + * @param {{ request: undici.Request, chunk: Uint8Array | string }} event + */ +function onClientRequestBodyChunkReceived({ request, chunk }) { + if (typeof request[kInspectorRequestId] !== 'string') { + return; + } + + Network.dataReceived({ + requestId: request[kInspectorRequestId], + timestamp: getMonotonicTime(), + dataLength: chunk.byteLength, + encodedDataLength: chunk.byteLength, + data: chunk, + }); +} + /** * When a response is completed, emit Network.loadingFinished event. * https://chromedevtools.github.io/devtools-protocol/1-3/Network/#event-loadingFinished @@ -146,6 +211,9 @@ function enable() { dc.subscribe('undici:request:error', onClientRequestError); dc.subscribe('undici:request:headers', onClientResponseHeaders); dc.subscribe('undici:request:trailers', onClientResponseFinish); + dc.subscribe('undici:request:bodyChunkSent', onClientRequestBodyChunkSent); + dc.subscribe('undici:request:bodySent', onClientRequestBodySent); + dc.subscribe('undici:request:bodyChunkReceived', onClientRequestBodyChunkReceived); } function disable() { @@ -153,6 +221,9 @@ function disable() { dc.unsubscribe('undici:request:error', onClientRequestError); dc.unsubscribe('undici:request:headers', onClientResponseHeaders); dc.unsubscribe('undici:request:trailers', onClientResponseFinish); + dc.unsubscribe('undici:request:bodyChunkSent', onClientRequestBodyChunkSent); + dc.unsubscribe('undici:request:bodySent', onClientRequestBodySent); + dc.unsubscribe('undici:request:bodyChunkReceived', onClientRequestBodyChunkReceived); } module.exports = { diff --git a/lib/internal/main/watch_mode.js b/lib/internal/main/watch_mode.js index dc8323a7c3b377..37d126f1257b3e 100644 --- a/lib/internal/main/watch_mode.js +++ b/lib/internal/main/watch_mode.js @@ -20,6 +20,7 @@ const { const { getOptionValue } = require('internal/options'); const { FilesWatcher } = require('internal/watch_mode/files_watcher'); const { green, blue, red, white, clear } = require('internal/util/colors'); +const { convertToValidSignal } = require('internal/util'); const { spawn } = require('child_process'); const { inspect } = require('util'); @@ -30,8 +31,7 @@ const { once } = require('events'); prepareMainThreadExecution(false, false); markBootstrapComplete(); -// TODO(MoLow): Make kill signal configurable -const kKillSignal = 'SIGTERM'; +const kKillSignal = convertToValidSignal(getOptionValue('--watch-kill-signal')); const kShouldFilterModules = getOptionValue('--watch-path').length === 0; const kEnvFile = getOptionValue('--env-file') || getOptionValue('--env-file-if-exists'); const kWatchedPaths = ArrayPrototypeMap(getOptionValue('--watch-path'), (path) => resolve(path)); diff --git a/lib/internal/modules/customization_hooks.js b/lib/internal/modules/customization_hooks.js index 7237318abec96f..f085b4c570d23a 100644 --- a/lib/internal/modules/customization_hooks.js +++ b/lib/internal/modules/customization_hooks.js @@ -6,6 +6,7 @@ const { ArrayPrototypeSplice, ObjectAssign, ObjectFreeze, + StringPrototypeSlice, StringPrototypeStartsWith, Symbol, } = primordials; @@ -126,9 +127,12 @@ function registerHooks(hooks) { */ function convertCJSFilenameToURL(filename) { if (!filename) { return filename; } - const builtinId = BuiltinModule.normalizeRequirableId(filename); - if (builtinId) { - return `node:${builtinId}`; + let normalizedId = filename; + if (StringPrototypeStartsWith(filename, 'node:')) { + normalizedId = StringPrototypeSlice(filename, 5); + } + if (BuiltinModule.canBeRequiredByUsers(normalizedId)) { + return `node:${normalizedId}`; } // Handle the case where filename is neither a path, nor a built-in id, // which is possible via monkey-patching. diff --git a/lib/internal/modules/esm/module_job.js b/lib/internal/modules/esm/module_job.js index cac4f603229f33..2dd9ce80c7618a 100644 --- a/lib/internal/modules/esm/module_job.js +++ b/lib/internal/modules/esm/module_job.js @@ -73,9 +73,16 @@ const isCommonJSGlobalLikeNotDefinedError = (errorMessage) => * @param {string} url * @returns {void} */ -const explainCommonJSGlobalLikeNotDefinedError = (e, url) => { +const explainCommonJSGlobalLikeNotDefinedError = (e, url, hasTopLevelAwait) => { if (e?.name === 'ReferenceError' && isCommonJSGlobalLikeNotDefinedError(e.message)) { + + if (hasTopLevelAwait) { + e.message = `Cannot determine intended module format because both require() and top-level await are present. If the code is intended to be CommonJS, wrap await in an async function. If the code is intended to be an ES module, replace require() with import.`; + e.code = 'ERR_AMBIGUOUS_MODULE_SYNTAX'; + return; + } + e.message += ' in ES module scope'; if (StringPrototypeStartsWith(e.message, 'require ')) { @@ -183,8 +190,7 @@ class ModuleJob extends ModuleJobBase { const evaluationDepJobs = Array(moduleRequests.length); ObjectSetPrototypeOf(evaluationDepJobs, null); - // Specifiers should be aligned with the moduleRequests array in order. - const specifiers = Array(moduleRequests.length); + // Modules should be aligned with the moduleRequests array in order. const modulePromises = Array(moduleRequests.length); // Track each loop for whether it is an evaluation phase or source phase request. let isEvaluation; @@ -210,11 +216,10 @@ class ModuleJob extends ModuleJobBase { return job.modulePromise; }); modulePromises[idx] = modulePromise; - specifiers[idx] = specifier; } const modules = await SafePromiseAllReturnArrayLike(modulePromises); - this.module.link(specifiers, modules); + this.module.link(modules); return evaluationDepJobs; } @@ -364,7 +369,7 @@ class ModuleJob extends ModuleJobBase { try { await this.module.evaluate(timeout, breakOnSigint); } catch (e) { - explainCommonJSGlobalLikeNotDefinedError(e, this.module.url); + explainCommonJSGlobalLikeNotDefinedError(e, this.module.url, this.module.hasTopLevelAwait()); throw e; } return { __proto__: null, module: this.module }; @@ -426,22 +431,20 @@ class ModuleJobSync extends ModuleJobBase { this.#loader.loadCache.set(this.url, this.type, this); try { const moduleRequests = this.module.getModuleRequests(); - // Specifiers should be aligned with the moduleRequests array in order. - const specifiers = Array(moduleRequests.length); + // Modules should be aligned with the moduleRequests array in order. const modules = Array(moduleRequests.length); const evaluationDepJobs = Array(moduleRequests.length); let j = 0; for (let i = 0; i < moduleRequests.length; ++i) { const { specifier, attributes, phase } = moduleRequests[i]; const job = this.#loader.getModuleJobForRequire(specifier, this.url, attributes, phase); - specifiers[i] = specifier; modules[i] = job.module; if (phase === kEvaluationPhase) { evaluationDepJobs[j++] = job; } } evaluationDepJobs.length = j; - this.module.link(specifiers, modules); + this.module.link(modules); this.linked = evaluationDepJobs; } finally { // Restore it - if it succeeds, we'll reset in the caller; Otherwise it's @@ -498,7 +501,7 @@ class ModuleJobSync extends ModuleJobBase { const namespace = this.module.evaluateSync(filename, parentFilename); return { __proto__: null, module: this.module, namespace }; } catch (e) { - explainCommonJSGlobalLikeNotDefinedError(e, this.module.url); + explainCommonJSGlobalLikeNotDefinedError(e, this.module.url, this.module.hasTopLevelAwait()); throw e; } } diff --git a/lib/internal/modules/typescript.js b/lib/internal/modules/typescript.js index fe029c7cd24052..eeda58b3a10097 100644 --- a/lib/internal/modules/typescript.js +++ b/lib/internal/modules/typescript.js @@ -30,7 +30,7 @@ const { /** * The TypeScript parsing mode, either 'strip-only' or 'transform'. - * @type {string} + * @type {function(): TypeScriptMode} */ const getTypeScriptParsingMode = getLazy(() => (getOptionValue('--experimental-transform-types') ? diff --git a/lib/internal/process/permission.js b/lib/internal/process/permission.js index bfdfe29fe4739f..0000fd700b1075 100644 --- a/lib/internal/process/permission.js +++ b/lib/internal/process/permission.js @@ -33,4 +33,14 @@ module.exports = ObjectFreeze({ return permission.has(scope, reference); }, + availableFlags() { + return [ + '--allow-fs-read', + '--allow-fs-write', + '--allow-addons', + '--allow-child-process', + '--allow-wasi', + '--allow-worker', + ]; + }, }); diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js index 8877184fcc54df..0ff35dcbf35e96 100644 --- a/lib/internal/process/pre_execution.js +++ b/lib/internal/process/pre_execution.js @@ -126,7 +126,6 @@ function prepareExecution(options) { initializeConfigFileSupport(); require('internal/dns/utils').initializeDns(); - setupHttpProxy(); if (isMainThread) { assert(internalBinding('worker').isMainThread); @@ -159,6 +158,10 @@ function prepareExecution(options) { setupUserModules(forceDefaultLoader); } + // This has to be done after the user module loader is initialized, + // in case undici is externalized. + setupHttpProxy(); + return mainEntry; } @@ -609,15 +612,8 @@ function initializePermission() { }, }); } else { - const availablePermissionFlags = [ - '--allow-fs-read', - '--allow-fs-write', - '--allow-addons', - '--allow-child-process', - '--allow-wasi', - '--allow-worker', - ]; - ArrayPrototypeForEach(availablePermissionFlags, (flag) => { + const { availableFlags } = require('internal/process/permission'); + ArrayPrototypeForEach(availableFlags(), (flag) => { const value = getOptionValue(flag); if (value.length) { throw new ERR_MISSING_OPTION('--permission'); diff --git a/lib/internal/test_runner/mock/mock.js b/lib/internal/test_runner/mock/mock.js index 9dc358397aa1f9..86a2c5199af368 100644 --- a/lib/internal/test_runner/mock/mock.js +++ b/lib/internal/test_runner/mock/mock.js @@ -671,7 +671,7 @@ class MockTracker { if (baseURL.searchParams.has(kMockSearchParam)) { throw new ERR_INVALID_STATE( - `Cannot mock '${specifier}.' The module is already mocked.`, + `Cannot mock '${specifier}'. The module is already mocked.`, ); } diff --git a/lib/internal/test_runner/runner.js b/lib/internal/test_runner/runner.js index 1d9e9ba1b38c96..958ad1e060fbbe 100644 --- a/lib/internal/test_runner/runner.js +++ b/lib/internal/test_runner/runner.js @@ -103,9 +103,12 @@ const kFilterArgs = [ '--experimental-test-coverage', '--watch', '--experimental-default-config-file', +]; +const kFilterArgValues = [ + '--test-reporter', + '--test-reporter-destination', '--experimental-config-file', ]; -const kFilterArgValues = ['--test-reporter', '--test-reporter-destination']; const kDiagnosticsFilterArgs = ['tests', 'suites', 'pass', 'fail', 'cancelled', 'skipped', 'todo', 'duration_ms']; const kCanceledTests = new SafeSet() @@ -145,6 +148,7 @@ function getRunArgs(path, { forceExit, only, argv: suppliedArgs, execArgv, + root: { timeout }, cwd }) { const argv = ArrayPrototypeFilter(process.execArgv, filterExecArgv); if (forceExit === true) { @@ -162,6 +166,9 @@ function getRunArgs(path, { forceExit, if (only === true) { ArrayPrototypePush(argv, '--test-only'); } + if (timeout != null) { + ArrayPrototypePush(argv, `--test-timeout=${timeout}`); + } ArrayPrototypePushApply(argv, execArgv); diff --git a/lib/internal/tty.js b/lib/internal/tty.js index 0e3d901804f99e..5363ba1f3b865f 100644 --- a/lib/internal/tty.js +++ b/lib/internal/tty.js @@ -99,9 +99,9 @@ function warnOnDeactivatedColors(env) { if (warned) return; let name = ''; - if (env.NODE_DISABLE_COLORS !== undefined) + if (env.NODE_DISABLE_COLORS !== undefined && env.NODE_DISABLE_COLORS !== '') name = 'NODE_DISABLE_COLORS'; - if (env.NO_COLOR !== undefined) { + if (env.NO_COLOR !== undefined && env.NO_COLOR !== '') { if (name !== '') { name += "' and '"; } @@ -141,9 +141,9 @@ function getColorDepth(env = process.env) { } } - if (env.NODE_DISABLE_COLORS !== undefined || + if ((env.NODE_DISABLE_COLORS !== undefined && env.NODE_DISABLE_COLORS !== '') || // See https://no-color.org/ - env.NO_COLOR !== undefined || + (env.NO_COLOR !== undefined && env.NO_COLOR !== '') || // The "dumb" special terminal, as defined by terminfo, doesn't support // ANSI color control codes. // See https://invisible-island.net/ncurses/terminfo.ti.html#toc-_Specials diff --git a/lib/internal/util.js b/lib/internal/util.js index 180ca49b3207eb..331625543e23e9 100644 --- a/lib/internal/util.js +++ b/lib/internal/util.js @@ -110,8 +110,8 @@ function getDeprecationWarningEmitter( shouldEmitWarning = () => true, ) { let warned = false; - return function() { - if (!warned && shouldEmitWarning()) { + return function(arg) { + if (!warned && shouldEmitWarning(arg)) { warned = true; if (code === 'ExperimentalWarning') { process.emitWarning(msg, code, deprecated); @@ -1011,4 +1011,6 @@ module.exports = { setOwnProperty, pendingDeprecate, WeakReference, + isPendingDeprecation, + getDeprecationWarningEmitter, }; diff --git a/lib/internal/vm/module.js b/lib/internal/vm/module.js index 12397aaac386e5..aba5c2872daa39 100644 --- a/lib/internal/vm/module.js +++ b/lib/internal/vm/module.js @@ -62,9 +62,11 @@ const { kEvaluated, kErrored, kSourcePhase, + kEvaluationPhase, } = binding; const STATUS_MAP = { + __proto__: null, [kUninstantiated]: 'unlinked', [kInstantiating]: 'linking', [kInstantiated]: 'linked', @@ -73,6 +75,12 @@ const STATUS_MAP = { [kErrored]: 'errored', }; +const PHASE_MAP = { + __proto__: null, + [kSourcePhase]: 'source', + [kEvaluationPhase]: 'evaluation', +}; + let globalModuleId = 0; const defaultModuleName = 'vm:module'; @@ -90,6 +98,12 @@ function isModule(object) { return true; } +function phaseEnumToPhaseName(phase) { + const phaseName = PHASE_MAP[phase]; + assert(phaseName !== undefined, `Invalid phase value: ${phase}`); + return phaseName; +} + class Module { constructor(options) { emitExperimentalWarning('VM Modules'); @@ -134,23 +148,10 @@ class Module { }); } - let registry = { __proto__: null }; if (sourceText !== undefined) { this[kWrap] = new ModuleWrap(identifier, context, sourceText, options.lineOffset, options.columnOffset, options.cachedData); - registry = { - __proto__: null, - initializeImportMeta: options.initializeImportMeta, - importModuleDynamically: options.importModuleDynamically ? - importModuleDynamicallyWrap(options.importModuleDynamically) : - undefined, - }; - // This will take precedence over the referrer as the object being - // passed into the callbacks. - registry.callbackReferrer = this; - const { registerModule } = require('internal/modules/esm/utils'); - registerModule(this[kWrap], registry); } else { assert(syntheticEvaluationSteps); this[kWrap] = new ModuleWrap(identifier, context, @@ -252,13 +253,15 @@ class Module { } } -const kDependencySpecifiers = Symbol('kDependencySpecifiers'); const kNoError = Symbol('kNoError'); class SourceTextModule extends Module { #error = kNoError; #statusOverride; + #moduleRequests; + #dependencySpecifiers; + constructor(sourceText, options = kEmptyObject) { validateString(sourceText, 'sourceText'); validateObject(options, 'options'); @@ -299,20 +302,38 @@ class SourceTextModule extends Module { importModuleDynamically, }); - this[kDependencySpecifiers] = undefined; + const registry = { + __proto__: null, + initializeImportMeta: options.initializeImportMeta, + importModuleDynamically: options.importModuleDynamically ? + importModuleDynamicallyWrap(options.importModuleDynamically) : + undefined, + }; + // This will take precedence over the referrer as the object being + // passed into the callbacks. + registry.callbackReferrer = this; + const { registerModule } = require('internal/modules/esm/utils'); + registerModule(this[kWrap], registry); + + this.#moduleRequests = ObjectFreeze(ArrayPrototypeMap(this[kWrap].getModuleRequests(), (request) => { + return ObjectFreeze({ + __proto__: null, + specifier: request.specifier, + attributes: request.attributes, + phase: phaseEnumToPhaseName(request.phase), + }); + })); } async [kLink](linker) { this.#statusOverride = 'linking'; - const moduleRequests = this[kWrap].getModuleRequests(); // Iterates the module requests and links with the linker. - // Specifiers should be aligned with the moduleRequests array in order. - const specifiers = Array(moduleRequests.length); - const modulePromises = Array(moduleRequests.length); + // Modules should be aligned with the moduleRequests array in order. + const modulePromises = Array(this.#moduleRequests.length); // Iterates with index to avoid calling into userspace with `Symbol.iterator`. - for (let idx = 0; idx < moduleRequests.length; idx++) { - const { specifier, attributes } = moduleRequests[idx]; + for (let idx = 0; idx < this.#moduleRequests.length; idx++) { + const { specifier, attributes } = this.#moduleRequests[idx]; const linkerResult = linker(specifier, this, { attributes, @@ -335,12 +356,11 @@ class SourceTextModule extends Module { return module[kWrap]; }); modulePromises[idx] = modulePromise; - specifiers[idx] = specifier; } try { const modules = await SafePromiseAllReturnArrayLike(modulePromises); - this[kWrap].link(specifiers, modules); + this[kWrap].link(modules); } catch (e) { this.#error = e; throw e; @@ -350,16 +370,16 @@ class SourceTextModule extends Module { } get dependencySpecifiers() { - validateThisInternalField(this, kDependencySpecifiers, 'SourceTextModule'); - // TODO(legendecas): add a new getter to expose the import attributes as the value type - // of [[RequestedModules]] is changed in https://tc39.es/proposal-import-attributes/#table-cyclic-module-fields. - this[kDependencySpecifiers] ??= ObjectFreeze( - ArrayPrototypeMap(this[kWrap].getModuleRequests(), (request) => request.specifier)); - return this[kDependencySpecifiers]; + this.#dependencySpecifiers ??= ObjectFreeze( + ArrayPrototypeMap(this.#moduleRequests, (request) => request.specifier)); + return this.#dependencySpecifiers; + } + + get moduleRequests() { + return this.#moduleRequests; } get status() { - validateThisInternalField(this, kDependencySpecifiers, 'SourceTextModule'); if (this.#error !== kNoError) { return 'errored'; } @@ -370,7 +390,6 @@ class SourceTextModule extends Module { } get error() { - validateThisInternalField(this, kDependencySpecifiers, 'SourceTextModule'); if (this.#error !== kNoError) { return this.#error; } @@ -447,9 +466,12 @@ class SyntheticModule extends Module { */ function importModuleDynamicallyWrap(importModuleDynamically) { const importModuleDynamicallyWrapper = async (specifier, referrer, attributes, phase) => { - const phaseString = phase === kSourcePhase ? 'source' : 'evaluation'; - const m = await ReflectApply(importModuleDynamically, this, [specifier, referrer, attributes, - phaseString]); + const phaseName = phaseEnumToPhaseName(phase); + const m = await ReflectApply( + importModuleDynamically, + this, + [specifier, referrer, attributes, phaseName], + ); if (isModuleNamespaceObject(m)) { if (phase === kSourcePhase) throw new ERR_VM_MODULE_NOT_MODULE(); return m; diff --git a/lib/repl.js b/lib/repl.js index 5c3d07476975da..96af504f76ea87 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -748,7 +748,9 @@ function REPLServer(prompt, process.emit('uncaughtException', e); self.clearBufferedCommand(); self.lines.level = []; - self.displayPrompt(); + if (!self.closed) { + self.displayPrompt(); + } }); } else { if (errStack === '') { @@ -778,7 +780,9 @@ function REPLServer(prompt, self.output.write(errStack); self.clearBufferedCommand(); self.lines.level = []; - self.displayPrompt(); + if (!self.closed) { + self.displayPrompt(); + } } }); @@ -1225,8 +1229,6 @@ REPLServer.prototype.setPrompt = function setPrompt(prompt) { const importRE = /\bimport\s*\(\s*['"`](([\w@./:-]+\/)?(?:[\w@./:-]*))(?![^'"`])$/; const requireRE = /\brequire\s*\(\s*['"`](([\w@./:-]+\/)?(?:[\w@./:-]*))(?![^'"`])$/; const fsAutoCompleteRE = /fs(?:\.promises)?\.\s*[a-z][a-zA-Z]+\(\s*["'](.*)/; -const simpleExpressionRE = - /(?:[\w$'"`[{(](?:(\w| |\t)*?['"`]|\$|['"`\]})])*\??(?:\.|])?)*?(?:[a-zA-Z_$])?(?:\w|\$)*\??\.?$/; const versionedFileNamesRe = /-\d+\.\d+/; function isIdentifier(str) { @@ -1480,29 +1482,20 @@ function complete(line, callback) { } else if ((match = RegExpPrototypeExec(fsAutoCompleteRE, line)) !== null && this.allowBlockingCompletions) { ({ 0: completionGroups, 1: completeOn } = completeFSFunctions(match)); - // Handle variable member lookup. - // We support simple chained expressions like the following (no function - // calls, etc.). That is for simplicity and also because we *eval* that - // leading expression so for safety (see WARNING above) don't want to - // eval function calls. - // - // foo.bar<|> # completions for 'foo' with filter 'bar' - // spam.eggs.<|> # completions for 'spam.eggs' with filter '' - // foo<|> # all scope vars with filter 'foo' - // foo.<|> # completions for 'foo' with filter '' } else if (line.length === 0 || RegExpPrototypeExec(/\w|\.|\$/, line[line.length - 1]) !== null) { - const { 0: match } = RegExpPrototypeExec(simpleExpressionRE, line) || ['']; - if (line.length !== 0 && !match) { + const completeTarget = line.length === 0 ? line : findExpressionCompleteTarget(line); + + if (line.length !== 0 && !completeTarget) { completionGroupsLoaded(); return; } let expr = ''; - completeOn = match; + completeOn = completeTarget; if (StringPrototypeEndsWith(line, '.')) { - expr = StringPrototypeSlice(match, 0, -1); + expr = StringPrototypeSlice(completeTarget, 0, -1); } else if (line.length !== 0) { - const bits = StringPrototypeSplit(match, '.'); + const bits = StringPrototypeSplit(completeTarget, '.'); filter = ArrayPrototypePop(bits); expr = ArrayPrototypeJoin(bits, '.'); } @@ -1531,7 +1524,7 @@ function complete(line, callback) { } return includesProxiesOrGetters( - StringPrototypeSplit(match, '.'), + StringPrototypeSplit(completeTarget, '.'), this.eval, this.context, (includes) => { @@ -1642,6 +1635,100 @@ function complete(line, callback) { } } +/** + * This function tries to extract a target for tab completion from code representing an expression. + * + * Such target is basically the last piece of the expression that can be evaluated for the potential + * tab completion. + * + * Some examples: + * - The complete target for `const a = obj.b` is `obj.b` + * (because tab completion will evaluate and check the `obj.b` object) + * - The complete target for `tru` is `tru` + * (since we'd ideally want to complete that to `true`) + * - The complete target for `{ a: tru` is `tru` + * (like the last example, we'd ideally want that to complete to true) + * - There is no complete target for `{ a: true }` + * (there is nothing to complete) + * @param {string} code the code representing the expression to analyze + * @returns {string|null} a substring of the code representing the complete target is there was one, `null` otherwise + */ +function findExpressionCompleteTarget(code) { + if (!code) { + return null; + } + + if (code.at(-1) === '.') { + if (code.at(-2) === '?') { + // The code ends with the optional chaining operator (`?.`), + // such code can't generate a valid AST so we need to strip + // the suffix, run this function's logic and add back the + // optional chaining operator to the result if present + const result = findExpressionCompleteTarget(code.slice(0, -2)); + return !result ? result : `${result}?.`; + } + + // The code ends with a dot, such code can't generate a valid AST + // so we need to strip the suffix, run this function's logic and + // add back the dot to the result if present + const result = findExpressionCompleteTarget(code.slice(0, -1)); + return !result ? result : `${result}.`; + } + + let ast; + try { + ast = acornParse(code, { __proto__: null, sourceType: 'module', ecmaVersion: 'latest' }); + } catch { + const keywords = code.split(' '); + + if (keywords.length > 1) { + // Something went wrong with the parsing, however this can be due to incomplete code + // (that is for example missing a closing bracket, as for example `{ a: obj.te`), in + // this case we take the last code keyword and try again + // TODO(dario-piotrowicz): make this more robust, right now we only split by spaces + // but that's not always enough, for example it doesn't handle + // this code: `{ a: obj['hello world'].te` + return findExpressionCompleteTarget(keywords.at(-1)); + } + + // The ast parsing has legitimately failed so we return null + return null; + } + + const lastBodyStatement = ast.body[ast.body.length - 1]; + + if (!lastBodyStatement) { + return null; + } + + // If the last statement is a block we know there is not going to be a potential + // completion target (e.g. in `{ a: true }` there is no completion to be done) + if (lastBodyStatement.type === 'BlockStatement') { + return null; + } + + // If the last statement is an expression and it has a right side, that's what we + // want to potentially complete on, so let's re-run the function's logic on that + if (lastBodyStatement.type === 'ExpressionStatement' && lastBodyStatement.expression.right) { + const exprRight = lastBodyStatement.expression.right; + const exprRightCode = code.slice(exprRight.start, exprRight.end); + return findExpressionCompleteTarget(exprRightCode); + } + + // If the last statement is a variable declaration statement the last declaration is + // what we can potentially complete on, so let's re-run the function's logic on that + if (lastBodyStatement.type === 'VariableDeclaration') { + const lastDeclarationInit = lastBodyStatement.declarations.at(-1).init; + const lastDeclarationInitCode = code.slice(lastDeclarationInit.start, lastDeclarationInit.end); + return findExpressionCompleteTarget(lastDeclarationInitCode); + } + + // If any of the above early returns haven't activated then it means that + // the potential complete target is the full code (e.g. the code represents + // a simple partial identifier, a member expression, etc...) + return code; +} + function includesProxiesOrGetters(exprSegments, evalFn, context, callback, currentExpr = '', idx = 0) { const currentSegment = exprSegments[idx]; currentExpr += `${currentExpr.length === 0 ? '' : '.'}${currentSegment}`; diff --git a/lib/wasi.js b/lib/wasi.js index 6c700219a80d4b..9971b533e72394 100644 --- a/lib/wasi.js +++ b/lib/wasi.js @@ -34,15 +34,6 @@ const kBindingName = Symbol('kBindingName'); emitExperimentalWarning('WASI'); - -function setupInstance(self, instance) { - validateObject(instance, 'instance'); - validateObject(instance.exports, 'instance.exports'); - - self[kInstance] = instance; - self[kSetMemory](instance.exports.memory); -} - class WASI { constructor(options = kEmptyObject) { validateObject(options, 'options'); @@ -118,14 +109,25 @@ class WASI { this[kInstance] = undefined; } - // Must not export _initialize, must export _start - start(instance) { + finalizeBindings(instance, { + memory = instance?.exports?.memory, + } = {}) { if (this[kStarted]) { throw new ERR_WASI_ALREADY_STARTED(); } + + validateObject(instance, 'instance'); + validateObject(instance.exports, 'instance.exports'); + + this[kSetMemory](memory); + + this[kInstance] = instance; this[kStarted] = true; + } - setupInstance(this, instance); + // Must not export _initialize, must export _start + start(instance) { + this.finalizeBindings(instance); const { _start, _initialize } = this[kInstance].exports; @@ -145,12 +147,7 @@ class WASI { // Must not export _start, may optionally export _initialize initialize(instance) { - if (this[kStarted]) { - throw new ERR_WASI_ALREADY_STARTED(); - } - this[kStarted] = true; - - setupInstance(this, instance); + this.finalizeBindings(instance); const { _start, _initialize } = this[kInstance].exports; diff --git a/node.gni b/node.gni index 35ccd0487f20ce..b049f0692980c3 100644 --- a/node.gni +++ b/node.gni @@ -16,6 +16,9 @@ declare_args() { # The location of simdutf - use the one from node's deps by default. node_simdutf_path = "//third_party/simdutf" + # The location of inspector_protocol - use the one from node's deps by default. + node_inspector_protocol_path = "//third_party/inspector_protocol" + # The NODE_MODULE_VERSION defined in node_version.h. node_module_version = exec_script("$node_path/tools/getmoduleversion.py", [], "value") diff --git a/node.gyp b/node.gyp index 677ccdcafd772b..fc14d6e5fc24f7 100644 --- a/node.gyp +++ b/node.gyp @@ -163,6 +163,7 @@ 'src/permission/permission.cc', 'src/permission/wasi_permission.cc', 'src/permission/worker_permission.cc', + 'src/permission/addon_permission.cc', 'src/pipe_wrap.cc', 'src/process_wrap.cc', 'src/signal_wrap.cc', @@ -292,6 +293,7 @@ 'src/permission/permission.h', 'src/permission/wasi_permission.h', 'src/permission/worker_permission.h', + 'src/permission/addon_permission.h', 'src/pipe_wrap.h', 'src/req_wrap.h', 'src/req_wrap-inl.h', diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index 5016c3d51dac66..c18a750239c2a2 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -902,8 +902,7 @@ void ChannelWrap::StartTimer() { return; } int timeout = timeout_; - if (timeout == 0) timeout = 1; - if (timeout < 0 || timeout > 1000) timeout = 1000; + if (timeout <= 0 || timeout > 1000) timeout = 1000; uv_timer_start(timer_handle_, AresTimeout, timeout, timeout); } @@ -1566,6 +1565,8 @@ Maybe SoaTraits::Parse(QuerySoaWrap* wrap, if (status != ARES_SUCCESS) return Just(status); + auto cleanup = OnScopeLeave([&]() { ares_free_data(soa_out); }); + Local soa_record = Object::New(env->isolate()); if (soa_record @@ -1606,8 +1607,6 @@ Maybe SoaTraits::Parse(QuerySoaWrap* wrap, return Nothing(); } - ares_free_data(soa_out); - wrap->CallOnComplete(soa_record); return Just(ARES_SUCCESS); } diff --git a/src/cleanup_queue.cc b/src/cleanup_queue.cc index 5923db6b89d4b4..83632515ffe967 100644 --- a/src/cleanup_queue.cc +++ b/src/cleanup_queue.cc @@ -13,13 +13,13 @@ std::vector CleanupQueue::GetOrdered() // We can't erase the copied elements from `cleanup_hooks_` yet, because we // need to be able to check whether they were un-scheduled by another hook. - std::sort(callbacks.begin(), - callbacks.end(), - [](const CleanupHookCallback& a, const CleanupHookCallback& b) { - // Sort in descending order so that the most recently inserted - // callbacks are run first. - return a.insertion_order_counter_ > b.insertion_order_counter_; - }); + std::ranges::sort( + callbacks, + [](const CleanupHookCallback& a, const CleanupHookCallback& b) { + // Sort in descending order so that the most recently inserted + // callbacks are run first. + return a.insertion_order_counter_ > b.insertion_order_counter_; + }); return callbacks; } diff --git a/src/crypto/crypto_context.cc b/src/crypto/crypto_context.cc index 1ffce89df5f760..798b4ffb52b1bc 100644 --- a/src/crypto/crypto_context.cc +++ b/src/crypto/crypto_context.cc @@ -77,8 +77,6 @@ static const char* const root_certs[] = { #include "node_root_certs.h" // NOLINT(build/include_order) }; -static const char system_cert_path[] = NODE_OPENSSL_SYSTEM_CERT_PATH; - static std::string extra_root_certs_file; // NOLINT(runtime/string) static std::atomic has_cached_bundled_root_certs{false}; @@ -838,11 +836,13 @@ X509_STORE* NewRootCertStore() { X509_STORE* store = X509_STORE_new(); CHECK_NOT_NULL(store); - if (*system_cert_path != '\0') { +#ifdef NODE_OPENSSL_SYSTEM_CERT_PATH + if constexpr (sizeof(NODE_OPENSSL_SYSTEM_CERT_PATH) > 1) { ERR_set_mark(); - X509_STORE_load_locations(store, system_cert_path, nullptr); + X509_STORE_load_locations(store, NODE_OPENSSL_SYSTEM_CERT_PATH, nullptr); ERR_pop_to_mark(); } +#endif Mutex::ScopedLock cli_lock(node::per_process::cli_options_mutex); if (per_process::cli_options->ssl_openssl_cert_store) { diff --git a/src/crypto/crypto_hash.cc b/src/crypto/crypto_hash.cc index f9f5e18f2b106a..ee8633d3119af4 100644 --- a/src/crypto/crypto_hash.cc +++ b/src/crypto/crypto_hash.cc @@ -208,17 +208,18 @@ const EVP_MD* GetDigestImplementation(Environment* env, } // crypto.digest(algorithm, algorithmId, algorithmCache, -// input, outputEncoding, outputEncodingId) +// input, outputEncoding, outputEncodingId, outputLength) void Hash::OneShotDigest(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); Isolate* isolate = env->isolate(); - CHECK_EQ(args.Length(), 6); + CHECK_EQ(args.Length(), 7); CHECK(args[0]->IsString()); // algorithm CHECK(args[1]->IsInt32()); // algorithmId CHECK(args[2]->IsObject()); // algorithmCache CHECK(args[3]->IsString() || args[3]->IsArrayBufferView()); // input CHECK(args[4]->IsString()); // outputEncoding CHECK(args[5]->IsUint32() || args[5]->IsUndefined()); // outputEncodingId + CHECK(args[6]->IsUint32() || args[6]->IsUndefined()); // outputLength const EVP_MD* md = GetDigestImplementation(env, args[0], args[1], args[2]); if (md == nullptr) [[unlikely]] { @@ -230,21 +231,68 @@ void Hash::OneShotDigest(const FunctionCallbackInfo& args) { enum encoding output_enc = ParseEncoding(isolate, args[4], args[5], HEX); - DataPointer output = ([&] { + bool is_xof = (EVP_MD_flags(md) & EVP_MD_FLAG_XOF) != 0; + int output_length = EVP_MD_size(md); + + // This is to cause hash() to fail when an incorrect + // outputLength option was passed for a non-XOF hash function. + if (!is_xof && !args[6]->IsUndefined()) { + output_length = args[6].As()->Value(); + if (output_length != EVP_MD_size(md)) { + Utf8Value method(isolate, args[0]); + std::string message = + "Output length " + std::to_string(output_length) + " is invalid for "; + message += method.ToString() + ", which does not support XOF"; + return ThrowCryptoError(env, ERR_get_error(), message.c_str()); + } + } else if (is_xof) { + if (!args[6]->IsUndefined()) { + output_length = args[6].As()->Value(); + } else if (output_length == 0) { + // This is to handle OpenSSL 3.4's breaking change in SHAKE128/256 + // default lengths + const char* name = OBJ_nid2sn(EVP_MD_type(md)); + if (name != nullptr) { + if (strcmp(name, "SHAKE128") == 0) { + output_length = 16; + } else if (strcmp(name, "SHAKE256") == 0) { + output_length = 32; + } + } + } + } + + if (output_length == 0) { + if (output_enc == BUFFER) { + Local ab = v8::ArrayBuffer::New(isolate, 0); + args.GetReturnValue().Set( + Buffer::New(isolate, ab, 0, 0).ToLocalChecked()); + } else { + args.GetReturnValue().Set(v8::String::Empty(isolate)); + } + return; + } + + DataPointer output = ([&]() -> DataPointer { + Utf8Value utf8(isolate, args[3]); + ncrypto::Buffer buf; if (args[3]->IsString()) { - Utf8Value utf8(isolate, args[3]); - ncrypto::Buffer buf{ + buf = { .data = reinterpret_cast(utf8.out()), .len = utf8.length(), }; - return ncrypto::hashDigest(buf, md); + } else { + ArrayBufferViewContents input(args[3]); + buf = { + .data = reinterpret_cast(input.data()), + .len = input.length(), + }; + } + + if (is_xof) { + return ncrypto::xofHashDigest(buf, md, output_length); } - ArrayBufferViewContents input(args[3]); - ncrypto::Buffer buf{ - .data = reinterpret_cast(input.data()), - .len = input.length(), - }; return ncrypto::hashDigest(buf, md); })(); @@ -331,6 +379,18 @@ bool Hash::HashInit(const EVP_MD* md, Maybe xof_md_len) { } md_len_ = mdctx_.getDigestSize(); + // TODO(@panva): remove this behaviour when DEP0198 is End-Of-Life + if (mdctx_.hasXofFlag() && !xof_md_len.IsJust() && md_len_ == 0) { + const char* name = OBJ_nid2sn(EVP_MD_type(md)); + if (name != nullptr) { + if (strcmp(name, "SHAKE128") == 0) { + md_len_ = 16; + } else if (strcmp(name, "SHAKE256") == 0) { + md_len_ = 32; + } + } + } + if (xof_md_len.IsJust() && xof_md_len.FromJust() != md_len_) { // This is a little hack to cause createHash to fail when an incorrect // hashSize option was passed for a non-XOF hash function. diff --git a/src/crypto/crypto_timing.cc b/src/crypto/crypto_timing.cc index 22e36e10fa798a..a0194f22cfd51e 100644 --- a/src/crypto/crypto_timing.cc +++ b/src/crypto/crypto_timing.cc @@ -68,16 +68,18 @@ bool FastTimingSafeEqual(Local receiver, return CRYPTO_memcmp(a.data(), b.data(), a.length()) == 0; } -static CFunction fast_equal(CFunction::Make(FastTimingSafeEqual)); +static CFunction fast_timing_safe_equal(CFunction::Make(FastTimingSafeEqual)); void Initialize(Environment* env, Local target) { - SetFastMethodNoSideEffect( - env->context(), target, "timingSafeEqual", TimingSafeEqual, &fast_equal); + SetFastMethodNoSideEffect(env->context(), + target, + "timingSafeEqual", + TimingSafeEqual, + &fast_timing_safe_equal); } void RegisterExternalReferences(ExternalReferenceRegistry* registry) { registry->Register(TimingSafeEqual); - registry->Register(FastTimingSafeEqual); - registry->Register(fast_equal.GetTypeInfo()); + registry->Register(fast_timing_safe_equal); } } // namespace Timing diff --git a/src/crypto/crypto_util.cc b/src/crypto/crypto_util.cc index 46b5202482d7c0..8a186cbce8f137 100644 --- a/src/crypto/crypto_util.cc +++ b/src/crypto/crypto_util.cc @@ -218,7 +218,7 @@ void CryptoErrorStore::Capture() { ERR_error_string_n(err, buf, sizeof(buf)); errors_.emplace_back(buf); } - std::reverse(std::begin(errors_), std::end(errors_)); + std::ranges::reverse(errors_); } bool CryptoErrorStore::Empty() const { diff --git a/src/debug_utils.cc b/src/debug_utils.cc index 97884b9a0f8d6d..65283ef31da35d 100644 --- a/src/debug_utils.cc +++ b/src/debug_utils.cc @@ -488,7 +488,7 @@ std::vector NativeSymbolDebuggingContext::GetLoadedLibraries() { WideCharToMultiByte( CP_UTF8, 0, module_name, -1, str, size, nullptr, nullptr); list.emplace_back(str); - delete str; + delete[] str; } } } diff --git a/src/env.cc b/src/env.cc index 833f4bac4066f5..25c99e5f6d81e9 100644 --- a/src/env.cc +++ b/src/env.cc @@ -913,6 +913,7 @@ Environment::Environment(IsolateData* isolate_data, // unless explicitly allowed by the user if (!options_->allow_addons) { options_->allow_native_addons = false; + permission()->Apply(this, {"*"}, permission::PermissionScope::kAddon); } flags_ = flags_ | EnvironmentFlags::kNoCreateInspector; permission()->Apply(this, {"*"}, permission::PermissionScope::kInspector); diff --git a/src/env_properties.h b/src/env_properties.h index 8852d83eda3c3f..70f3da751eb341 100644 --- a/src/env_properties.h +++ b/src/env_properties.h @@ -72,6 +72,8 @@ V(ack_string, "ack") \ V(address_string, "address") \ V(aliases_string, "aliases") \ + V(allow_bare_named_params_string, "allowBareNamedParameters") \ + V(allow_unknown_named_params_string, "allowUnknownNamedParameters") \ V(alpn_callback_string, "ALPNCallback") \ V(args_string, "args") \ V(asn1curve_string, "asn1Curve") \ @@ -324,6 +326,7 @@ V(raw_string, "raw") \ V(read_host_object_string, "_readHostObject") \ V(readable_string, "readable") \ + V(read_bigints_string, "readBigInts") \ V(reason_string, "reason") \ V(refresh_string, "refresh") \ V(regexp_string, "regexp") \ diff --git a/src/histogram.cc b/src/histogram.cc index afedb5cefe83d2..aa73551281d33d 100644 --- a/src/histogram.cc +++ b/src/histogram.cc @@ -117,22 +117,14 @@ void HistogramImpl::RegisterExternalReferences( registry->Register(GetPercentiles); registry->Register(GetPercentilesBigInt); registry->Register(DoReset); - registry->Register(fast_reset_.GetTypeInfo()); - registry->Register(fast_get_count_.GetTypeInfo()); - registry->Register(fast_get_min_.GetTypeInfo()); - registry->Register(fast_get_max_.GetTypeInfo()); - registry->Register(fast_get_mean_.GetTypeInfo()); - registry->Register(fast_get_exceeds_.GetTypeInfo()); - registry->Register(fast_get_stddev_.GetTypeInfo()); - registry->Register(fast_get_percentile_.GetTypeInfo()); - registry->Register(FastReset); - registry->Register(FastGetCount); - registry->Register(FastGetMin); - registry->Register(FastGetMax); - registry->Register(FastGetMean); - registry->Register(FastGetExceeds); - registry->Register(FastGetStddev); - registry->Register(FastGetPercentile); + registry->Register(fast_reset_); + registry->Register(fast_get_count_); + registry->Register(fast_get_min_); + registry->Register(fast_get_max_); + registry->Register(fast_get_mean_); + registry->Register(fast_get_exceeds_); + registry->Register(fast_get_stddev_); + registry->Register(fast_get_percentile_); is_registered = true; } @@ -302,10 +294,8 @@ void HistogramBase::RegisterExternalReferences( registry->Register(Add); registry->Register(Record); registry->Register(RecordDelta); - registry->Register(fast_record_.GetTypeInfo()); - registry->Register(fast_record_delta_.GetTypeInfo()); - registry->Register(FastRecord); - registry->Register(FastRecordDelta); + registry->Register(fast_record_); + registry->Register(fast_record_delta_); HistogramImpl::RegisterExternalReferences(registry); } @@ -356,10 +346,8 @@ void IntervalHistogram::RegisterExternalReferences( ExternalReferenceRegistry* registry) { registry->Register(Start); registry->Register(Stop); - registry->Register(fast_start_.GetTypeInfo()); - registry->Register(fast_stop_.GetTypeInfo()); - registry->Register(FastStart); - registry->Register(FastStop); + registry->Register(fast_start_); + registry->Register(fast_stop_); HistogramImpl::RegisterExternalReferences(registry); } diff --git a/src/inspector/node_string.h b/src/inspector/node_string.h index 94ec9b2301998c..bcdedaa2ae4ab1 100644 --- a/src/inspector/node_string.h +++ b/src/inspector/node_string.h @@ -6,7 +6,6 @@ #include #include #include -#include "crdtp/maybe.h" #include "crdtp/protocol_core.h" #include "util.h" #include "v8-inspector.h" @@ -31,11 +30,6 @@ struct ProtocolTypeTraits { std::vector* bytes); }; -template <> -struct detail::MaybeTypedef { - typedef ValueMaybe type; -}; - } // namespace crdtp namespace node { diff --git a/src/inspector/unofficial.gni b/src/inspector/unofficial.gni index 3d7aa148678b26..4810d93eb971b2 100644 --- a/src/inspector/unofficial.gni +++ b/src/inspector/unofficial.gni @@ -13,7 +13,7 @@ template("inspector_gn_build") { } node_gen_dir = get_label_info("../..", "target_gen_dir") - protocol_tool_path = "../../deps/inspector_protocol" + protocol_tool_path = "$node_inspector_protocol_path" gypi_values = exec_script( "../../tools/gypi_to_gn.py", diff --git a/src/inspector_socket.cc b/src/inspector_socket.cc index 5246b9170a7a78..788a3aeb65df69 100644 --- a/src/inspector_socket.cc +++ b/src/inspector_socket.cc @@ -10,6 +10,7 @@ #include #include #include +#include #define ACCEPT_KEY_LENGTH nbytes::Base64EncodedSize(20) @@ -205,7 +206,7 @@ static bool IsIPAddress(const std::string& host) { // (other than ::/128) that represent non-routable IPv4 addresses. However, // this translation assumes that the host is interpreted as an IPv6 address // in the first place, at which point DNS rebinding should not be an issue. - if (std::all_of(ipv6, ipv6 + sizeof(ipv6), [](auto b) { return b == 0; })) { + if (std::ranges::all_of(ipv6, [](auto b) { return b == 0; })) { return false; } diff --git a/src/inspector_socket_server.cc b/src/inspector_socket_server.cc index f8f6a1b4ab6bd0..4df85fe8461bae 100644 --- a/src/inspector_socket_server.cc +++ b/src/inspector_socket_server.cc @@ -451,7 +451,7 @@ void InspectorSocketServer::TerminateConnections() { bool InspectorSocketServer::TargetExists(const std::string& id) { const std::vector& target_ids = delegate_->GetTargetIds(); - const auto& found = std::find(target_ids.begin(), target_ids.end(), id); + const auto& found = std::ranges::find(target_ids, id); return found != target_ids.end(); } diff --git a/src/module_wrap.cc b/src/module_wrap.cc index 2b81a4d5da63ec..3d27b878fd2220 100644 --- a/src/module_wrap.cc +++ b/src/module_wrap.cc @@ -63,6 +63,51 @@ using v8::UnboundModuleScript; using v8::Undefined; using v8::Value; +void ModuleCacheKey::MemoryInfo(MemoryTracker* tracker) const { + tracker->TrackField("specifier", specifier); + tracker->TrackField("import_attributes", import_attributes); +} + +template +ModuleCacheKey ModuleCacheKey::From(Local context, + Local specifier, + Local import_attributes) { + CHECK_EQ(import_attributes->Length() % elements_per_attribute, 0); + Isolate* isolate = context->GetIsolate(); + std::size_t h1 = specifier->GetIdentityHash(); + size_t num_attributes = import_attributes->Length() / elements_per_attribute; + ImportAttributeVector attributes; + attributes.reserve(num_attributes); + + std::size_t h2 = 0; + + for (int i = 0; i < import_attributes->Length(); + i += elements_per_attribute) { + Local v8_key = import_attributes->Get(context, i).As(); + Local v8_value = + import_attributes->Get(context, i + 1).As(); + Utf8Value key_utf8(isolate, v8_key); + Utf8Value value_utf8(isolate, v8_value); + + attributes.emplace_back(key_utf8.ToString(), value_utf8.ToString()); + h2 ^= v8_key->GetIdentityHash(); + h2 ^= v8_value->GetIdentityHash(); + } + + // Combine the hashes using a simple XOR and bit shift to reduce + // collisions. Note that the hash does not guarantee uniqueness. + std::size_t hash = h1 ^ (h2 << 1); + + Utf8Value utf8_specifier(isolate, specifier); + return ModuleCacheKey{utf8_specifier.ToString(), attributes, hash}; +} + +ModuleCacheKey ModuleCacheKey::From(Local context, + Local v8_request) { + return From( + context, v8_request->GetSpecifier(), v8_request->GetImportAttributes()); +} + ModuleWrap::ModuleWrap(Realm* realm, Local object, Local module, @@ -448,12 +493,17 @@ static Local createImportAttributesContainer( values[idx] = raw_attributes->Get(realm->context(), i + 1).As(); } - return Object::New( + Local attributes = Object::New( isolate, Null(isolate), names.data(), values.data(), num_attributes); + attributes->SetIntegrityLevel(realm->context(), v8::IntegrityLevel::kFrozen) + .Check(); + return attributes; } static Local createModuleRequestsContainer( Realm* realm, Isolate* isolate, Local raw_requests) { + EscapableHandleScope scope(isolate); + Local context = realm->context(); LocalVector requests(isolate, raw_requests->Length()); for (int i = 0; i < raw_requests->Length(); i++) { @@ -483,11 +533,12 @@ static Local createModuleRequestsContainer( Local request = Object::New(isolate, Null(isolate), names, values, arraysize(names)); + request->SetIntegrityLevel(context, v8::IntegrityLevel::kFrozen).Check(); requests[i] = request; } - return Array::New(isolate, requests.data(), requests.size()); + return scope.Escape(Array::New(isolate, requests.data(), requests.size())); } void ModuleWrap::GetModuleRequests(const FunctionCallbackInfo& args) { @@ -503,7 +554,7 @@ void ModuleWrap::GetModuleRequests(const FunctionCallbackInfo& args) { realm, isolate, module->GetModuleRequests())); } -// moduleWrap.link(specifiers, moduleWraps) +// moduleWrap.link(moduleWraps) void ModuleWrap::Link(const FunctionCallbackInfo& args) { Realm* realm = Realm::GetCurrent(args); Isolate* isolate = args.GetIsolate(); @@ -512,33 +563,28 @@ void ModuleWrap::Link(const FunctionCallbackInfo& args) { ModuleWrap* dependent; ASSIGN_OR_RETURN_UNWRAP(&dependent, args.This()); - CHECK_EQ(args.Length(), 2); + CHECK_EQ(args.Length(), 1); - Local specifiers = args[0].As(); - Local modules = args[1].As(); - CHECK_EQ(specifiers->Length(), modules->Length()); + Local requests = + dependent->module_.Get(isolate)->GetModuleRequests(); + Local modules = args[0].As(); + CHECK_EQ(modules->Length(), static_cast(requests->Length())); - std::vector> specifiers_buffer; - if (FromV8Array(context, specifiers, &specifiers_buffer).IsNothing()) { - return; - } std::vector> modules_buffer; if (FromV8Array(context, modules, &modules_buffer).IsNothing()) { return; } - for (uint32_t i = 0; i < specifiers->Length(); i++) { - Local specifier_str = - specifiers_buffer[i].Get(isolate).As(); + for (uint32_t i = 0; i < modules_buffer.size(); i++) { Local module_object = modules_buffer[i].Get(isolate).As(); CHECK( realm->isolate_data()->module_wrap_constructor_template()->HasInstance( module_object)); - Utf8Value specifier(isolate, specifier_str); - dependent->resolve_cache_[specifier.ToString()].Reset(isolate, - module_object); + ModuleCacheKey module_cache_key = ModuleCacheKey::From( + context, requests->Get(context, i).As()); + dependent->resolve_cache_[module_cache_key].Reset(isolate, module_object); } } @@ -876,6 +922,27 @@ void ModuleWrap::IsGraphAsync(const FunctionCallbackInfo& args) { args.GetReturnValue().Set(module->IsGraphAsync()); } +void ModuleWrap::HasTopLevelAwait(const FunctionCallbackInfo& args) { + Isolate* isolate = args.GetIsolate(); + ModuleWrap* obj; + ASSIGN_OR_RETURN_UNWRAP(&obj, args.This()); + + Local module = obj->module_.Get(isolate); + + // Check if module is valid + if (module.IsEmpty()) { + args.GetReturnValue().Set(false); + return; + } + + // For source text modules, check if the graph is async + // For synthetic modules, it's always false + bool has_top_level_await = + module->IsSourceTextModule() && module->IsGraphAsync(); + + args.GetReturnValue().Set(has_top_level_await); +} + void ModuleWrap::GetError(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); ModuleWrap* obj; @@ -897,27 +964,27 @@ MaybeLocal ModuleWrap::ResolveModuleCallback( return MaybeLocal(); } - Utf8Value specifier_utf8(isolate, specifier); - std::string specifier_std(*specifier_utf8, specifier_utf8.length()); + ModuleCacheKey cache_key = + ModuleCacheKey::From(context, specifier, import_attributes); ModuleWrap* dependent = GetFromModule(env, referrer); if (dependent == nullptr) { THROW_ERR_VM_MODULE_LINK_FAILURE( - env, "request for '%s' is from invalid module", specifier_std); + env, "request for '%s' is from invalid module", cache_key.specifier); return MaybeLocal(); } - if (dependent->resolve_cache_.count(specifier_std) != 1) { + if (dependent->resolve_cache_.count(cache_key) != 1) { THROW_ERR_VM_MODULE_LINK_FAILURE( - env, "request for '%s' is not in cache", specifier_std); + env, "request for '%s' is not in cache", cache_key.specifier); return MaybeLocal(); } Local module_object = - dependent->resolve_cache_[specifier_std].Get(isolate); + dependent->resolve_cache_[cache_key].Get(isolate); if (module_object.IsEmpty() || !module_object->IsObject()) { THROW_ERR_VM_MODULE_LINK_FAILURE( - env, "request for '%s' did not return an object", specifier_std); + env, "request for '%s' did not return an object", cache_key.specifier); return MaybeLocal(); } @@ -938,27 +1005,27 @@ MaybeLocal ModuleWrap::ResolveSourceCallback( return MaybeLocal(); } - Utf8Value specifier_utf8(isolate, specifier); - std::string specifier_std(*specifier_utf8, specifier_utf8.length()); + ModuleCacheKey cache_key = + ModuleCacheKey::From(context, specifier, import_attributes); ModuleWrap* dependent = GetFromModule(env, referrer); if (dependent == nullptr) { THROW_ERR_VM_MODULE_LINK_FAILURE( - env, "request for '%s' is from invalid module", specifier_std); + env, "request for '%s' is from invalid module", cache_key.specifier); return MaybeLocal(); } - if (dependent->resolve_cache_.count(specifier_std) != 1) { + if (dependent->resolve_cache_.count(cache_key) != 1) { THROW_ERR_VM_MODULE_LINK_FAILURE( - env, "request for '%s' is not in cache", specifier_std); + env, "request for '%s' is not in cache", cache_key.specifier); return MaybeLocal(); } Local module_object = - dependent->resolve_cache_[specifier_std].Get(isolate); + dependent->resolve_cache_[cache_key].Get(isolate); if (module_object.IsEmpty() || !module_object->IsObject()) { THROW_ERR_VM_MODULE_LINK_FAILURE( - env, "request for '%s' did not return an object", specifier_std); + env, "request for '%s' did not return an object", cache_key.specifier); return MaybeLocal(); } @@ -1304,6 +1371,8 @@ void ModuleWrap::CreatePerIsolateProperties(IsolateData* isolate_data, SetProtoMethodNoSideEffect(isolate, tpl, "getNamespace", GetNamespace); SetProtoMethodNoSideEffect(isolate, tpl, "getStatus", GetStatus); SetProtoMethodNoSideEffect(isolate, tpl, "isGraphAsync", IsGraphAsync); + SetProtoMethodNoSideEffect( + isolate, tpl, "hasTopLevelAwait", HasTopLevelAwait); SetProtoMethodNoSideEffect(isolate, tpl, "getError", GetError); SetConstructorFunction(isolate, target, "ModuleWrap", tpl); isolate_data->set_module_wrap_constructor_template(tpl); @@ -1366,6 +1435,7 @@ void ModuleWrap::RegisterExternalReferences( registry->Register(GetStatus); registry->Register(GetError); registry->Register(IsGraphAsync); + registry->Register(HasTopLevelAwait); registry->Register(CreateRequiredModuleFacade); diff --git a/src/module_wrap.h b/src/module_wrap.h index 1172fb0332b48a..dbab9946c7210b 100644 --- a/src/module_wrap.h +++ b/src/module_wrap.h @@ -38,6 +38,57 @@ enum ModulePhase : int { kEvaluationPhase = 2, }; +/** + * ModuleCacheKey is used to uniquely identify a module request + * in the module cache. It is a composition of the module specifier + * and the import attributes. ModuleImportPhase is not included + * in the key. + */ +struct ModuleCacheKey : public MemoryRetainer { + using ImportAttributeVector = + std::vector>; + + std::string specifier; + ImportAttributeVector import_attributes; + // A hash of the specifier, and import attributes. + // This does not guarantee uniqueness, but is used to reduce + // the number of comparisons needed when checking for equality. + std::size_t hash; + + SET_MEMORY_INFO_NAME(ModuleCacheKey) + SET_SELF_SIZE(ModuleCacheKey) + void MemoryInfo(MemoryTracker* tracker) const override; + + template + static ModuleCacheKey From(v8::Local context, + v8::Local specifier, + v8::Local import_attributes); + static ModuleCacheKey From(v8::Local context, + v8::Local v8_request); + + struct Hash { + std::size_t operator()(const ModuleCacheKey& request) const { + return request.hash; + } + }; + + // Equality operator for ModuleCacheKey. + bool operator==(const ModuleCacheKey& other) const { + // Hash does not provide uniqueness guarantee, so ignore it. + return specifier == other.specifier && + import_attributes == other.import_attributes; + } + + private: + // Use public ModuleCacheKey::From to create instances. + ModuleCacheKey(std::string specifier, + ImportAttributeVector import_attributes, + std::size_t hash) + : specifier(specifier), + import_attributes(import_attributes), + hash(hash) {} +}; + class ModuleWrap : public BaseObject { public: enum InternalFields { @@ -64,6 +115,7 @@ class ModuleWrap : public BaseObject { void MemoryInfo(MemoryTracker* tracker) const override { tracker->TrackField("resolve_cache", resolve_cache_); } + static void HasTopLevelAwait(const v8::FunctionCallbackInfo& args); v8::Local context() const; v8::Maybe CheckUnsettledTopLevelAwait(); @@ -148,7 +200,10 @@ class ModuleWrap : public BaseObject { static ModuleWrap* GetFromModule(node::Environment*, v8::Local); v8::Global module_; - std::unordered_map> resolve_cache_; + std::unordered_map, + ModuleCacheKey::Hash> + resolve_cache_; contextify::ContextifyContext* contextify_context_ = nullptr; bool synthetic_ = false; int module_hash_; diff --git a/src/node.cc b/src/node.cc index c70b2d53af954c..b56e57c2ae8b38 100644 --- a/src/node.cc +++ b/src/node.cc @@ -760,17 +760,16 @@ static ExitCode ProcessGlobalArgsInternal(std::vector* args, // TODO(aduh95): remove this when the harmony-import-attributes flag // is removed in V8. - if (std::find(v8_args.begin(), - v8_args.end(), - "--no-harmony-import-attributes") == v8_args.end()) { + if (std::ranges::find(v8_args, "--no-harmony-import-attributes") == + v8_args.end()) { v8_args.emplace_back("--harmony-import-attributes"); } auto env_opts = per_process::cli_options->per_isolate->per_env; - if (std::find(v8_args.begin(), v8_args.end(), - "--abort-on-uncaught-exception") != v8_args.end() || - std::find(v8_args.begin(), v8_args.end(), - "--abort_on_uncaught_exception") != v8_args.end()) { + if (std::ranges::find(v8_args, "--abort-on-uncaught-exception") != + v8_args.end() || + std::ranges::find(v8_args, "--abort_on_uncaught_exception") != + v8_args.end()) { env_opts->abort_on_uncaught_exception = true; } @@ -782,7 +781,7 @@ static ExitCode ProcessGlobalArgsInternal(std::vector* args, // Block SIGPROF signals when sleeping in epoll_wait/kevent/etc. Avoids the // performance penalty of frequent EINTR wakeups when the profiler is running. // Only do this for v8.log profiling, as it breaks v8::CpuProfiler users. - if (std::find(v8_args.begin(), v8_args.end(), "--prof") != v8_args.end()) { + if (std::ranges::find(v8_args, "--prof") != v8_args.end()) { uv_loop_configure(uv_default_loop(), UV_LOOP_BLOCK_SIGNAL, SIGPROF); } #endif diff --git a/src/node_api.cc b/src/node_api.cc index fbe3d84fc20d12..d9b17780f6143f 100644 --- a/src/node_api.cc +++ b/src/node_api.cc @@ -1058,8 +1058,7 @@ napi_create_external_buffer(napi_env env, #ifdef V8_ENABLE_SANDBOX return napi_set_last_error(env, napi_no_external_buffers_allowed); -#endif // V8_ENABLE_SANDBOX - +#else v8::Isolate* isolate = env->isolate; // The finalizer object will delete itself after invoking the callback. @@ -1081,6 +1080,7 @@ napi_create_external_buffer(napi_env env, // as it will be deleted when the buffer to which it is associated // is finalized. // coverity[leaked_storage] +#endif // V8_ENABLE_SANDBOX } napi_status NAPI_CDECL napi_create_buffer_copy(napi_env env, diff --git a/src/node_buffer.cc b/src/node_buffer.cc index 8ec282107e1d99..c356a22bec23bf 100644 --- a/src/node_buffer.cc +++ b/src/node_buffer.cc @@ -1634,20 +1634,16 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { registry->Register(SetBufferPrototype); registry->Register(SlowByteLengthUtf8); - registry->Register(fast_byte_length_utf8.GetTypeInfo()); - registry->Register(FastByteLengthUtf8); + registry->Register(fast_byte_length_utf8); registry->Register(SlowCopy); - registry->Register(fast_copy.GetTypeInfo()); - registry->Register(FastCopy); + registry->Register(fast_copy); registry->Register(Compare); - registry->Register(FastCompare); - registry->Register(fast_compare.GetTypeInfo()); + registry->Register(fast_compare); registry->Register(CompareOffset); registry->Register(Fill); registry->Register(IndexOfBuffer); registry->Register(SlowIndexOfNumber); - registry->Register(FastIndexOfNumber); - registry->Register(fast_index_of_number.GetTypeInfo()); + registry->Register(fast_index_of_number); registry->Register(IndexOfString); registry->Register(Swap16); @@ -1668,12 +1664,9 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { registry->Register(SlowWriteString); registry->Register(SlowWriteString); registry->Register(SlowWriteString); - registry->Register(FastWriteString); - registry->Register(fast_write_string_ascii.GetTypeInfo()); - registry->Register(FastWriteString); - registry->Register(fast_write_string_latin1.GetTypeInfo()); - registry->Register(FastWriteString); - registry->Register(fast_write_string_utf8.GetTypeInfo()); + registry->Register(fast_write_string_ascii); + registry->Register(fast_write_string_latin1); + registry->Register(fast_write_string_utf8); registry->Register(StringWrite); registry->Register(StringWrite); registry->Register(StringWrite); diff --git a/src/node_config.cc b/src/node_config.cc index 6032bbd10f41da..7245d9130d0365 100644 --- a/src/node_config.cc +++ b/src/node_config.cc @@ -7,6 +7,10 @@ #include "node_options.h" #include "util-inl.h" +#if HAVE_OPENSSL +#include "ncrypto.h" // Ensure OPENSSL_IS_BORINGSSL is defined if applicable +#endif + namespace node { using v8::Context; diff --git a/src/node_config_file.cc b/src/node_config_file.cc index 00451cafc5951a..1a19465c728ebc 100644 --- a/src/node_config_file.cc +++ b/src/node_config_file.cc @@ -131,7 +131,6 @@ ParseResult ConfigReader::ProcessOptionValue( "No-op flag %s is currently not supported\n", option_name.c_str()); return ParseResult::InvalidContent; - break; } case options_parser::OptionType::kV8Option: { FPrintF(stderr, diff --git a/src/node_contextify.cc b/src/node_contextify.cc index c4db3eb076d49b..4e10afeb28598e 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -733,7 +733,6 @@ Intercepted ContextifyContext::PropertyDefinerCallback( // kYes to behave according to the expected semantics. return Intercepted::kNo; } - return Intercepted::kNo; } // static diff --git a/src/node_credentials.cc b/src/node_credentials.cc index f86c460f6a4b85..0c7978a4843cd9 100644 --- a/src/node_credentials.cc +++ b/src/node_credentials.cc @@ -385,8 +385,7 @@ static void GetGroups(const FunctionCallbackInfo& args) { groups.resize(ngroups); gid_t egid = getegid(); - if (std::find(groups.begin(), groups.end(), egid) == groups.end()) - groups.push_back(egid); + if (std::ranges::find(groups, egid) == groups.end()) groups.push_back(egid); Local result; if (ToV8Value(env->context(), groups).ToLocal(&result)) { args.GetReturnValue().Set(result); diff --git a/src/node_dotenv.cc b/src/node_dotenv.cc index 3bdeaab1a9cb23..b3275938684d6d 100644 --- a/src/node_dotenv.cc +++ b/src/node_dotenv.cc @@ -28,7 +28,7 @@ std::vector Dotenv::GetDataFromArgs( std::vector env_files; // This will be an iterator, pointing to args.end() if no matches are found - auto matched_arg = std::find_if(args.begin(), args.end(), find_match); + auto matched_arg = std::ranges::find_if(args, find_match); while (matched_arg != args.end()) { if (*matched_arg == "--") { diff --git a/src/node_external_reference.h b/src/node_external_reference.h index 5981e9db9c3bc4..0a7752c6a4fcec 100644 --- a/src/node_external_reference.h +++ b/src/node_external_reference.h @@ -10,90 +10,6 @@ namespace node { -using CFunctionCallbackWithalueAndOptions = bool (*)( - v8::Local, v8::Local, v8::FastApiCallbackOptions&); -using CFunctionCallbackWithMultipleValueAndOptions = - bool (*)(v8::Local, - v8::Local, - v8::Local, - v8::FastApiCallbackOptions&); -using CFunctionA = - uint32_t (*)(v8::Local receiver, - v8::Local sourceValue, - // NOLINTNEXTLINE(runtime/references) This is V8 api. - v8::FastApiCallbackOptions& options); -using CFunctionCallbackWithOneByteString = - uint32_t (*)(v8::Local, const v8::FastOneByteString&); - -using CFunctionCallbackReturnBool = bool (*)(v8::Local unused, - v8::Local receiver); -using CFunctionCallback = void (*)(v8::Local unused, - v8::Local receiver); -using CFunctionCallbackReturnDouble = - double (*)(v8::Local unused, v8::Local receiver); -using CFunctionCallbackReturnInt32 = - int32_t (*)(v8::Local receiver, - v8::Local input, - // NOLINTNEXTLINE(runtime/references) This is V8 api. - v8::FastApiCallbackOptions& options); -using CFunctionCallbackValueReturnDouble = - double (*)(v8::Local receiver); -using CFunctionCallbackValueReturnDoubleUnusedReceiver = - double (*)(v8::Local unused, v8::Local receiver); -using CFunctionCallbackWithInt64 = void (*)(v8::Local unused, - v8::Local receiver, - int64_t); -using CFunctionCallbackWithBool = void (*)(v8::Local unused, - v8::Local receiver, - bool); -using CFunctionCallbackWithString = - bool (*)(v8::Local, const v8::FastOneByteString& input); -using CFunctionCallbackWithStrings = - bool (*)(v8::Local, - const v8::FastOneByteString& input, - const v8::FastOneByteString& base); -using CFunctionCallbackWithTwoUint8Arrays = - int32_t (*)(v8::Local, - v8::Local, - v8::Local, - v8::FastApiCallbackOptions&); -using CFunctionCallbackWithUint8ArrayUint32Int64Bool = - int32_t (*)(v8::Local, - v8::Local, - uint32_t, - int64_t, - bool, - v8::FastApiCallbackOptions&); -using CFunctionWithUint32 = uint32_t (*)(v8::Local, - const uint32_t input); -using CFunctionWithReturnUint32 = uint32_t (*)(v8::Local); -using CFunctionWithReturnDouble = double (*)(v8::Local); -using CFunctionWithDoubleReturnDouble = double (*)(v8::Local, - v8::Local, - const double); -using CFunctionWithInt64Fallback = void (*)(v8::Local, - v8::Local, - const int64_t, - v8::FastApiCallbackOptions&); -using CFunctionWithBool = void (*)(v8::Local, - v8::Local, - bool); - -using CFunctionWriteString = uint32_t (*)(v8::Local, - v8::Local, - const v8::FastOneByteString&, - uint32_t, - uint32_t, - v8::FastApiCallbackOptions&); - -using CFunctionBufferCopy = uint32_t (*)(v8::Local, - v8::Local, - v8::Local, - uint32_t, - uint32_t, - uint32_t, - v8::FastApiCallbackOptions&); - // This class manages the external references from the V8 heap // to the C++ addresses in Node.js. class ExternalReferenceRegistry { @@ -101,30 +17,6 @@ class ExternalReferenceRegistry { ExternalReferenceRegistry(); #define ALLOWED_EXTERNAL_REFERENCE_TYPES(V) \ - V(CFunctionA) \ - V(CFunctionCallback) \ - V(CFunctionCallbackWithalueAndOptions) \ - V(CFunctionCallbackWithMultipleValueAndOptions) \ - V(CFunctionCallbackWithOneByteString) \ - V(CFunctionCallbackReturnBool) \ - V(CFunctionCallbackReturnDouble) \ - V(CFunctionCallbackReturnInt32) \ - V(CFunctionWithReturnUint32) \ - V(CFunctionCallbackValueReturnDouble) \ - V(CFunctionCallbackValueReturnDoubleUnusedReceiver) \ - V(CFunctionCallbackWithInt64) \ - V(CFunctionCallbackWithBool) \ - V(CFunctionCallbackWithString) \ - V(CFunctionCallbackWithStrings) \ - V(CFunctionCallbackWithTwoUint8Arrays) \ - V(CFunctionCallbackWithUint8ArrayUint32Int64Bool) \ - V(CFunctionWithUint32) \ - V(CFunctionWithDoubleReturnDouble) \ - V(CFunctionWithInt64Fallback) \ - V(CFunctionWithBool) \ - V(CFunctionBufferCopy) \ - V(CFunctionWriteString) \ - V(const v8::CFunctionInfo*) \ V(v8::FunctionCallback) \ V(v8::AccessorNameGetterCallback) \ V(v8::AccessorNameSetterCallback) \ @@ -146,6 +38,13 @@ class ExternalReferenceRegistry { ALLOWED_EXTERNAL_REFERENCE_TYPES(V) #undef V + // Registers both the underlying function pointer + // and the corresponding CFunctionInfo. + void Register(const v8::CFunction& c_func) { + RegisterT(c_func.GetAddress()); + RegisterT(c_func.GetTypeInfo()); + } + // This can be called only once. const std::vector& external_references(); diff --git a/src/node_file.cc b/src/node_file.cc index 4ac4c59bcaf90a..b172a5d87698da 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -1040,6 +1040,7 @@ static void ExistsSync(const FunctionCallbackInfo& args) { // will **not** return an error and is therefore not enough. // Double check with `uv_fs_stat()`. if (err == 0) { + uv_fs_req_cleanup(&req); FS_SYNC_TRACE_BEGIN(stat); err = uv_fs_stat(nullptr, &req, path.out(), nullptr); FS_SYNC_TRACE_END(stat); @@ -2859,10 +2860,10 @@ static void Chown(const FunctionCallbackInfo& args) { ToNamespacedPath(env, &path); CHECK(IsSafeJsInt(args[1])); - const uv_uid_t uid = FromV8Value(args[1]); + const auto uid = FromV8Value(args[1]); CHECK(IsSafeJsInt(args[2])); - const uv_gid_t gid = FromV8Value(args[2]); + const auto gid = FromV8Value(args[2]); if (argc > 3) { // chown(path, uid, gid, req) FSReqBase* req_wrap_async = GetReqWrap(args, 3); @@ -2904,10 +2905,10 @@ static void FChown(const FunctionCallbackInfo& args) { } CHECK(IsSafeJsInt(args[1])); - const uv_uid_t uid = static_cast(args[1].As()->Value()); + const auto uid = FromV8Value(args[1]); CHECK(IsSafeJsInt(args[2])); - const uv_gid_t gid = static_cast(args[2].As()->Value()); + const auto gid = FromV8Value(args[2]); if (argc > 3) { // fchown(fd, uid, gid, req) FSReqBase* req_wrap_async = GetReqWrap(args, 3); @@ -2934,10 +2935,10 @@ static void LChown(const FunctionCallbackInfo& args) { ToNamespacedPath(env, &path); CHECK(IsSafeJsInt(args[1])); - const uv_uid_t uid = FromV8Value(args[1]); + const auto uid = FromV8Value(args[1]); CHECK(IsSafeJsInt(args[2])); - const uv_gid_t gid = FromV8Value(args[2]); + const auto gid = FromV8Value(args[2]); if (argc > 3) { // lchown(path, uid, gid, req) FSReqBase* req_wrap_async = GetReqWrap(args, 3); diff --git a/src/node_http2.h b/src/node_http2.h index a60a7ba029db3e..b93c93b91f107c 100644 --- a/src/node_http2.h +++ b/src/node_http2.h @@ -692,9 +692,7 @@ class Http2Session : public AsyncWrap, bool has_pending_rststream(int32_t stream_id) { return pending_rst_streams_.end() != - std::find(pending_rst_streams_.begin(), - pending_rst_streams_.end(), - stream_id); + std::ranges::find(pending_rst_streams_, stream_id); } // Handle reads/writes from the underlying network transport. diff --git a/src/node_messaging.cc b/src/node_messaging.cc index 60e7066a46b2b0..cb321ff606f4fe 100644 --- a/src/node_messaging.cc +++ b/src/node_messaging.cc @@ -414,9 +414,8 @@ class SerializerDelegate : public ValueSerializer::Delegate { if (!host_objects_[i]->NestedTransferables().To(&nested_transferables)) return Nothing(); for (auto& nested_transferable : nested_transferables) { - if (std::find(host_objects_.begin(), - host_objects_.end(), - nested_transferable) == host_objects_.end()) { + if (std::ranges::find(host_objects_, nested_transferable) == + host_objects_.end()) { AddHostObject(nested_transferable); } } @@ -517,8 +516,7 @@ Maybe Message::Serialize(Environment* env, ThrowDataCloneException(context, env->transfer_unsupported_type_str()); return Nothing(); } - if (std::find(array_buffers.begin(), array_buffers.end(), ab) != - array_buffers.end()) { + if (std::ranges::find(array_buffers, ab) != array_buffers.end()) { ThrowDataCloneException( context, FIXED_ONE_BYTE_STRING( @@ -564,9 +562,8 @@ Maybe Message::Serialize(Environment* env, "MessagePort in transfer list is already detached")); return Nothing(); } - if (std::find(delegate.host_objects_.begin(), - delegate.host_objects_.end(), - host_object) != delegate.host_objects_.end()) { + if (std::ranges::find(delegate.host_objects_, host_object) != + delegate.host_objects_.end()) { ThrowDataCloneException( context, String::Concat( diff --git a/src/node_options.cc b/src/node_options.cc index 5adbcfd26eb04c..28e5e30a37459d 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -953,6 +953,11 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { "path to watch", &EnvironmentOptions::watch_mode_paths, kAllowedInEnvvar); + AddOption("--watch-kill-signal", + "kill signal to send to the process on watch mode restarts" + "(default: SIGTERM)", + &EnvironmentOptions::watch_mode_kill_signal, + kAllowedInEnvvar); AddOption("--watch-preserve-output", "preserve outputs on watch mode restart", &EnvironmentOptions::watch_mode_preserve_output, diff --git a/src/node_options.h b/src/node_options.h index b616249d18e1c4..28fa5511c0a0d2 100644 --- a/src/node_options.h +++ b/src/node_options.h @@ -231,6 +231,7 @@ class EnvironmentOptions : public Options { bool watch_mode = false; bool watch_mode_report_to_parent = false; bool watch_mode_preserve_output = false; + std::string watch_mode_kill_signal = "SIGTERM"; std::vector watch_mode_paths; bool syntax_check_only = false; diff --git a/src/node_os.cc b/src/node_os.cc index 7f212d345a6b7e..f2b449ac0d93f7 100644 --- a/src/node_os.cc +++ b/src/node_os.cc @@ -214,6 +214,9 @@ static void GetInterfaceAddresses(const FunctionCallbackInfo& args) { return; } + auto cleanup = + OnScopeLeave([&]() { uv_free_interface_addresses(interfaces, count); }); + Local no_scope_id = Integer::New(isolate, -1); LocalVector result(isolate); result.reserve(count * 7); @@ -268,7 +271,6 @@ static void GetInterfaceAddresses(const FunctionCallbackInfo& args) { } } - uv_free_interface_addresses(interfaces, count); args.GetReturnValue().Set(Array::New(isolate, result.data(), result.size())); } @@ -457,11 +459,9 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { registry->Register(GetLoadAvg); registry->Register(GetUptime); registry->Register(GetTotalMemory); - registry->Register(FastGetTotalMemory); - registry->Register(fast_get_total_memory.GetTypeInfo()); + registry->Register(fast_get_total_memory); registry->Register(GetFreeMemory); - registry->Register(FastGetFreeMemory); - registry->Register(fast_get_free_memory.GetTypeInfo()); + registry->Register(fast_get_free_memory); registry->Register(GetCPUInfo); registry->Register(GetInterfaceAddresses); registry->Register(GetHomeDirectory); @@ -469,8 +469,7 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { registry->Register(SetPriority); registry->Register(GetPriority); registry->Register(GetAvailableParallelism); - registry->Register(FastGetAvailableParallelism); - registry->Register(fast_get_available_parallelism.GetTypeInfo()); + registry->Register(fast_get_available_parallelism); registry->Register(GetOSInformation); } diff --git a/src/node_perf.cc b/src/node_perf.cc index d8b26f5c845be1..e984fd4c3bf003 100644 --- a/src/node_perf.cc +++ b/src/node_perf.cc @@ -410,8 +410,7 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { registry->Register(MarkBootstrapComplete); registry->Register(UvMetricsInfo); registry->Register(SlowPerformanceNow); - registry->Register(FastPerformanceNow); - registry->Register(fast_performance_now.GetTypeInfo()); + registry->Register(fast_performance_now); HistogramBase::RegisterExternalReferences(registry); IntervalHistogram::RegisterExternalReferences(registry); } diff --git a/src/node_platform.cc b/src/node_platform.cc index a4def82142d8b7..6c09cd1440e9cf 100644 --- a/src/node_platform.cc +++ b/src/node_platform.cc @@ -560,11 +560,11 @@ void PerIsolatePlatformData::RunForegroundTask(std::unique_ptr task) { } void PerIsolatePlatformData::DeleteFromScheduledTasks(DelayedTask* task) { - auto it = std::find_if(scheduled_delayed_tasks_.begin(), - scheduled_delayed_tasks_.end(), - [task](const DelayedTaskPointer& delayed) -> bool { - return delayed.get() == task; - }); + auto it = + std::ranges::find_if(scheduled_delayed_tasks_, + [task](const DelayedTaskPointer& delayed) -> bool { + return delayed.get() == task; + }); CHECK_NE(it, scheduled_delayed_tasks_.end()); scheduled_delayed_tasks_.erase(it); } diff --git a/src/node_process_methods.cc b/src/node_process_methods.cc index 62d0ae1ff4a546..51bfc633625e38 100644 --- a/src/node_process_methods.cc +++ b/src/node_process_methods.cc @@ -666,10 +666,8 @@ void BindingData::RegisterExternalReferences( ExternalReferenceRegistry* registry) { registry->Register(SlowNumber); registry->Register(SlowBigInt); - registry->Register(FastNumber); - registry->Register(FastBigInt); - registry->Register(fast_number_.GetTypeInfo()); - registry->Register(fast_bigint_.GetTypeInfo()); + registry->Register(fast_number_); + registry->Register(fast_bigint_); } BindingData* BindingData::FromV8Value(Local value) { diff --git a/src/node_process_object.cc b/src/node_process_object.cc index 3f1b276d10bdd0..5138ef7d616787 100644 --- a/src/node_process_object.cc +++ b/src/node_process_object.cc @@ -97,9 +97,8 @@ static void SetVersions(Isolate* isolate, Local versions) { NODE_VERSIONS_KEYS(V) #undef V - std::sort(&versions_array[0], - &versions_array[arraysize(versions_array)], - [](auto& a, auto& b) { return a.first < b.first; }); + std::ranges::sort(versions_array, + [](auto& a, auto& b) { return a.first < b.first; }); for (const auto& version : versions_array) { versions diff --git a/src/node_report.cc b/src/node_report.cc index f96772a065996d..2dcdfa8b139cf7 100644 --- a/src/node_report.cc +++ b/src/node_report.cc @@ -22,6 +22,7 @@ #include #include #include +#include constexpr int NODE_REPORT_VERSION = 5; constexpr int NANOS_PER_SEC = 1000 * 1000 * 1000; @@ -537,7 +538,7 @@ static void PrintJavaScriptErrorStack(JSONWriter* writer, line = ss.find('\n'); while (line != -1) { l = ss.substr(0, line); - l.erase(l.begin(), std::find_if(l.begin(), l.end(), [](int ch) { + l.erase(l.begin(), std::ranges::find_if(l, [](int ch) { return !std::iswspace(ch); })); writer->json_element(l); @@ -810,9 +811,8 @@ static void PrintComponentVersions(JSONWriter* writer) { NODE_VERSIONS_KEYS(V) #undef V - std::sort(&versions_array[0], - &versions_array[arraysize(versions_array)], - [](auto& a, auto& b) { return a.first < b.first; }); + std::ranges::sort(versions_array, + [](auto& a, auto& b) { return a.first < b.first; }); for (const auto& version : versions_array) { writer->json_keyvalue(version.first, version.second); diff --git a/src/node_sea.cc b/src/node_sea.cc index 65a338e00d4e22..891d69ae973f08 100644 --- a/src/node_sea.cc +++ b/src/node_sea.cc @@ -400,10 +400,9 @@ ExitCode GenerateSnapshotForSEA(const SeaConfig& config, return exit_code; } auto& persistents = snapshot.env_info.principal_realm.persistent_values; - auto it = std::find_if( - persistents.begin(), persistents.end(), [](const PropInfo& prop) { - return prop.name == "snapshot_deserialize_main"; - }); + auto it = std::ranges::find_if(persistents, [](const PropInfo& prop) { + return prop.name == "snapshot_deserialize_main"; + }); if (it == persistents.end()) { FPrintF( stderr, diff --git a/src/node_sqlite.cc b/src/node_sqlite.cc index 213b4cb155fef5..7bfd49cf70c605 100644 --- a/src/node_sqlite.cc +++ b/src/node_sqlite.cc @@ -966,6 +966,66 @@ void DatabaseSync::New(const FunctionCallbackInfo& args) { open_config.set_timeout(timeout_v.As()->Value()); } + + Local read_bigints_v; + if (options->Get(env->context(), env->read_bigints_string()) + .ToLocal(&read_bigints_v)) { + if (!read_bigints_v->IsUndefined()) { + if (!read_bigints_v->IsBoolean()) { + THROW_ERR_INVALID_ARG_TYPE( + env->isolate(), + R"(The "options.readBigInts" argument must be a boolean.)"); + return; + } + open_config.set_use_big_ints(read_bigints_v.As()->Value()); + } + } + + Local return_arrays_v; + if (options->Get(env->context(), env->return_arrays_string()) + .ToLocal(&return_arrays_v)) { + if (!return_arrays_v->IsUndefined()) { + if (!return_arrays_v->IsBoolean()) { + THROW_ERR_INVALID_ARG_TYPE( + env->isolate(), + R"(The "options.returnArrays" argument must be a boolean.)"); + return; + } + open_config.set_return_arrays(return_arrays_v.As()->Value()); + } + } + + Local allow_bare_named_params_v; + if (options->Get(env->context(), env->allow_bare_named_params_string()) + .ToLocal(&allow_bare_named_params_v)) { + if (!allow_bare_named_params_v->IsUndefined()) { + if (!allow_bare_named_params_v->IsBoolean()) { + THROW_ERR_INVALID_ARG_TYPE( + env->isolate(), + R"(The "options.allowBareNamedParameters" )" + "argument must be a boolean."); + return; + } + open_config.set_allow_bare_named_params( + allow_bare_named_params_v.As()->Value()); + } + } + + Local allow_unknown_named_params_v; + if (options->Get(env->context(), env->allow_unknown_named_params_string()) + .ToLocal(&allow_unknown_named_params_v)) { + if (!allow_unknown_named_params_v->IsUndefined()) { + if (!allow_unknown_named_params_v->IsBoolean()) { + THROW_ERR_INVALID_ARG_TYPE( + env->isolate(), + R"(The "options.allowUnknownNamedParameters" )" + "argument must be a boolean."); + return; + } + open_config.set_allow_unknown_named_params( + allow_unknown_named_params_v.As()->Value()); + } + } } new DatabaseSync( @@ -1764,12 +1824,11 @@ StatementSync::StatementSync(Environment* env, : BaseObject(env, object), db_(std::move(db)) { MakeWeak(); statement_ = stmt; - // In the future, some of these options could be set at the database - // connection level and inherited by statements to reduce boilerplate. - return_arrays_ = false; - use_big_ints_ = false; - allow_bare_named_params_ = true; - allow_unknown_named_params_ = false; + use_big_ints_ = db_->use_big_ints(); + return_arrays_ = db_->return_arrays(); + allow_bare_named_params_ = db_->allow_bare_named_params(); + allow_unknown_named_params_ = db_->allow_unknown_named_params(); + bare_named_params_ = std::nullopt; } diff --git a/src/node_sqlite.h b/src/node_sqlite.h index eff62a97a8d873..34845accf3f782 100644 --- a/src/node_sqlite.h +++ b/src/node_sqlite.h @@ -39,12 +39,40 @@ class DatabaseOpenConfiguration { inline int get_timeout() { return timeout_; } + inline void set_use_big_ints(bool flag) { use_big_ints_ = flag; } + + inline bool get_use_big_ints() const { return use_big_ints_; } + + inline void set_return_arrays(bool flag) { return_arrays_ = flag; } + + inline bool get_return_arrays() const { return return_arrays_; } + + inline void set_allow_bare_named_params(bool flag) { + allow_bare_named_params_ = flag; + } + + inline bool get_allow_bare_named_params() const { + return allow_bare_named_params_; + } + + inline void set_allow_unknown_named_params(bool flag) { + allow_unknown_named_params_ = flag; + } + + inline bool get_allow_unknown_named_params() const { + return allow_unknown_named_params_; + } + private: std::string location_; bool read_only_ = false; bool enable_foreign_keys_ = true; bool enable_dqs_ = false; int timeout_ = 0; + bool use_big_ints_ = false; + bool return_arrays_ = false; + bool allow_bare_named_params_ = true; + bool allow_unknown_named_params_ = false; }; class StatementSync; @@ -81,6 +109,14 @@ class DatabaseSync : public BaseObject { void FinalizeBackups(); void UntrackStatement(StatementSync* statement); bool IsOpen(); + bool use_big_ints() const { return open_config_.get_use_big_ints(); } + bool return_arrays() const { return open_config_.get_return_arrays(); } + bool allow_bare_named_params() const { + return open_config_.get_allow_bare_named_params(); + } + bool allow_unknown_named_params() const { + return open_config_.get_allow_unknown_named_params(); + } sqlite3* Connection(); // In some situations, such as when using custom functions, it is possible diff --git a/src/node_task_runner.cc b/src/node_task_runner.cc index efaf6f01b3fbf9..2a6d3815a26c09 100644 --- a/src/node_task_runner.cc +++ b/src/node_task_runner.cc @@ -351,8 +351,7 @@ void RunTask(const std::shared_ptr& result, PositionalArgs GetPositionalArgs(const std::vector& args) { // If the "--" flag is not found, return an empty optional // Otherwise, return the positional arguments as a single string - if (auto dash_dash = std::find(args.begin(), args.end(), "--"); - dash_dash != args.end()) { + if (auto dash_dash = std::ranges::find(args, "--"); dash_dash != args.end()) { PositionalArgs positional_args{}; positional_args.reserve(args.size() - (dash_dash - args.begin())); for (auto it = dash_dash + 1; it != args.end(); ++it) { diff --git a/src/node_types.cc b/src/node_types.cc index ed96fd6fd50a4f..ae4d76803a7db4 100644 --- a/src/node_types.cc +++ b/src/node_types.cc @@ -113,18 +113,15 @@ void InitializeTypes(Local target, void RegisterTypesExternalReferences(ExternalReferenceRegistry* registry) { #define V(type) \ registry->Register(Is##type); \ - registry->Register(Is##type##FastApi); \ - registry->Register(fast_is_##type##_.GetTypeInfo()); + registry->Register(fast_is_##type##_); VALUE_METHOD_MAP(V) #undef V registry->Register(IsAnyArrayBuffer); - registry->Register(IsAnyArrayBufferFastApi); - registry->Register(fast_is_any_array_buffer_.GetTypeInfo()); + registry->Register(fast_is_any_array_buffer_); registry->Register(IsBoxedPrimitive); - registry->Register(IsBoxedPrimitiveFastApi); - registry->Register(fast_is_boxed_primitive_.GetTypeInfo()); + registry->Register(fast_is_boxed_primitive_); } } // namespace node diff --git a/src/node_url.cc b/src/node_url.cc index 0a374f623fe1cd..9d1e8ec0516157 100644 --- a/src/node_url.cc +++ b/src/node_url.cc @@ -544,11 +544,8 @@ void BindingData::RegisterExternalReferences( registry->Register(PathToFileURL); registry->Register(Update); registry->Register(CanParse); - registry->Register(FastCanParse); - registry->Register(FastCanParseWithBase); - for (const CFunction& method : fast_can_parse_methods_) { - registry->Register(method.GetTypeInfo()); + registry->Register(method); } } diff --git a/src/node_util.cc b/src/node_util.cc index 2ac4a130cb65fe..1972d30b9b3899 100644 --- a/src/node_util.cc +++ b/src/node_util.cc @@ -442,8 +442,7 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { registry->Register(Sleep); registry->Register(ArrayBufferViewHasBuffer); registry->Register(GuessHandleType); - registry->Register(FastGuessHandleType); - registry->Register(fast_guess_handle_type_.GetTypeInfo()); + registry->Register(fast_guess_handle_type_); registry->Register(ParseEnv); registry->Register(IsInsideNodeModules); registry->Register(DefineLazyProperties); diff --git a/src/node_v8.cc b/src/node_v8.cc index 2b7ce9b28969dc..9f3c721680fabf 100644 --- a/src/node_v8.cc +++ b/src/node_v8.cc @@ -725,8 +725,7 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { registry->Register(GCProfiler::Stop); registry->Register(GetCppHeapStatistics); registry->Register(IsStringOneByteRepresentation); - registry->Register(FastIsStringOneByteRepresentation); - registry->Register(fast_is_string_one_byte_representation_.GetTypeInfo()); + registry->Register(fast_is_string_one_byte_representation_); } } // namespace v8_utils diff --git a/src/node_version.h b/src/node_version.h index d410464fbf5a5e..9b71ca02746194 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -23,13 +23,13 @@ #define SRC_NODE_VERSION_H_ #define NODE_MAJOR_VERSION 24 -#define NODE_MINOR_VERSION 3 -#define NODE_PATCH_VERSION 1 +#define NODE_MINOR_VERSION 4 +#define NODE_PATCH_VERSION 0 #define NODE_VERSION_IS_LTS 0 #define NODE_VERSION_LTS_CODENAME "" -#define NODE_VERSION_IS_RELEASE 0 +#define NODE_VERSION_IS_RELEASE 1 #ifndef NODE_STRINGIFY #define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n) diff --git a/src/node_watchdog.cc b/src/node_watchdog.cc index 4403bd4f157bff..7a493bf460701f 100644 --- a/src/node_watchdog.cc +++ b/src/node_watchdog.cc @@ -389,7 +389,7 @@ void SigintWatchdogHelper::Register(SigintWatchdogBase* wd) { void SigintWatchdogHelper::Unregister(SigintWatchdogBase* wd) { Mutex::ScopedLock lock(list_mutex_); - auto it = std::find(watchdogs_.begin(), watchdogs_.end(), wd); + auto it = std::ranges::find(watchdogs_, wd); CHECK_NE(it, watchdogs_.end()); watchdogs_.erase(it); diff --git a/src/permission/addon_permission.cc b/src/permission/addon_permission.cc new file mode 100644 index 00000000000000..20123a72e6e06e --- /dev/null +++ b/src/permission/addon_permission.cc @@ -0,0 +1,24 @@ +#include "addon_permission.h" + +#include + +namespace node { + +namespace permission { + +// Currently, Addon manage a single state +// Once denied, it's always denied +void AddonPermission::Apply(Environment* env, + const std::vector& allow, + PermissionScope scope) { + deny_all_ = true; +} + +bool AddonPermission::is_granted(Environment* env, + PermissionScope perm, + const std::string_view& param) const { + return deny_all_ == false; +} + +} // namespace permission +} // namespace node diff --git a/src/permission/addon_permission.h b/src/permission/addon_permission.h new file mode 100644 index 00000000000000..9702862d098703 --- /dev/null +++ b/src/permission/addon_permission.h @@ -0,0 +1,31 @@ +#ifndef SRC_PERMISSION_ADDON_PERMISSION_H_ +#define SRC_PERMISSION_ADDON_PERMISSION_H_ + +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + +#include +#include "permission/permission_base.h" + +namespace node { + +namespace permission { + +class AddonPermission final : public PermissionBase { + public: + void Apply(Environment* env, + const std::vector& allow, + PermissionScope scope) override; + bool is_granted(Environment* env, + PermissionScope perm, + const std::string_view& param = "") const override; + + private: + bool deny_all_; +}; + +} // namespace permission + +} // namespace node + +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS +#endif // SRC_PERMISSION_ADDON_PERMISSION_H_ diff --git a/src/permission/fs_permission.cc b/src/permission/fs_permission.cc index 0d42b3f535a597..1fef8fd777440e 100644 --- a/src/permission/fs_permission.cc +++ b/src/permission/fs_permission.cc @@ -72,43 +72,53 @@ bool is_tree_granted( return granted_tree->Lookup(resolved_param, true); } -void PrintTree(const node::permission::FSPermission::RadixTree::Node* node, - size_t spaces = 0) { - std::string whitespace(spaces, ' '); +static const char* kBoxDrawingsLightUpAndRight = "└─ "; +static const char* kBoxDrawingsLightVerticalAndRight = "├─ "; +void PrintTree(const node::permission::FSPermission::RadixTree::Node* node, + size_t depth = 0, + const std::string& branch_prefix = "", + bool is_last = true) { if (node == nullptr) { return; } - if (node->wildcard_child != nullptr) { - node::per_process::Debug(node::DebugCategory::PERMISSION_MODEL, - "%s Wildcard: %s\n", - whitespace, - node->prefix); - } else { + + if (depth > 0 || (node->prefix.length() > 0)) { + std::string indent; + + if (depth > 0) { + indent = branch_prefix; + if (is_last) { + indent += kBoxDrawingsLightUpAndRight; + } else { + indent += kBoxDrawingsLightVerticalAndRight; + } + } + node::per_process::Debug(node::DebugCategory::PERMISSION_MODEL, - "%s Prefix: %s\n", - whitespace, - node->prefix); - if (node->children.size()) { - size_t child = 0; - for (const auto& pair : node->children) { - ++child; - node::per_process::Debug(node::DebugCategory::PERMISSION_MODEL, - "%s Child(%s): %s\n", - whitespace, - child, - std::string(1, pair.first)); - PrintTree(pair.second, spaces + 2); + "%s%s\n", + indent.c_str(), + node->prefix.c_str()); + } + + if (node->children.size() > 0) { + size_t count = 0; + size_t total = node->children.size(); + + std::string next_branch_prefix; + if (depth > 0) { + next_branch_prefix = branch_prefix; + if (is_last) { + next_branch_prefix += " "; + } else { + next_branch_prefix += "│ "; } - node::per_process::Debug(node::DebugCategory::PERMISSION_MODEL, - "%s End of tree - child(%s)\n", - whitespace, - child); - } else { - node::per_process::Debug(node::DebugCategory::PERMISSION_MODEL, - "%s End of tree: %s\n", - whitespace, - node->prefix); + } + + for (const auto& pair : node->children) { + count++; + bool child_is_last = (count == total); + PrintTree(pair.second, depth + 1, next_branch_prefix, child_is_last); } } } diff --git a/src/permission/permission.cc b/src/permission/permission.cc index 774f0934815b6c..cbb75f0930e314 100644 --- a/src/permission/permission.cc +++ b/src/permission/permission.cc @@ -84,6 +84,7 @@ Permission::Permission() : enabled_(false) { std::shared_ptr inspector = std::make_shared(); std::shared_ptr wasi = std::make_shared(); + std::shared_ptr addon = std::make_shared(); #define V(Name, _, __, ___) \ nodes_.insert(std::make_pair(PermissionScope::k##Name, fs)); FILESYSTEM_PERMISSIONS(V) @@ -104,6 +105,10 @@ Permission::Permission() : enabled_(false) { nodes_.insert(std::make_pair(PermissionScope::k##Name, wasi)); WASI_PERMISSIONS(V) #undef V +#define V(Name, _, __, ___) \ + nodes_.insert(std::make_pair(PermissionScope::k##Name, addon)); + ADDON_PERMISSIONS(V) +#undef V } const char* GetErrorFlagSuggestion(node::permission::PermissionScope perm) { diff --git a/src/permission/permission.h b/src/permission/permission.h index 8e5bb87803656f..da796ab7b80559 100644 --- a/src/permission/permission.h +++ b/src/permission/permission.h @@ -5,6 +5,7 @@ #include "debug_utils.h" #include "node_options.h" +#include "permission/addon_permission.h" #include "permission/child_process_permission.h" #include "permission/fs_permission.h" #include "permission/inspector_permission.h" diff --git a/src/permission/permission_base.h b/src/permission/permission_base.h index 8f0bae088bd0ea..b260de5d223068 100644 --- a/src/permission/permission_base.h +++ b/src/permission/permission_base.h @@ -29,12 +29,16 @@ namespace permission { #define INSPECTOR_PERMISSIONS(V) V(Inspector, "inspector", PermissionsRoot, "") +#define ADDON_PERMISSIONS(V) \ + V(Addon, "addon", PermissionsRoot, "--allow-addons") + #define PERMISSIONS(V) \ FILESYSTEM_PERMISSIONS(V) \ CHILD_PROCESS_PERMISSIONS(V) \ WASI_PERMISSIONS(V) \ WORKER_THREADS_PERMISSIONS(V) \ - INSPECTOR_PERMISSIONS(V) + INSPECTOR_PERMISSIONS(V) \ + ADDON_PERMISSIONS(V) #define V(name, _, __, ___) k##name, enum class PermissionScope { diff --git a/src/timers.cc b/src/timers.cc index 2c7b1813602d6f..bf90e68479da14 100644 --- a/src/timers.cc +++ b/src/timers.cc @@ -126,7 +126,7 @@ void BindingData::Deserialize(Local context, v8::CFunction BindingData::fast_get_libuv_now_( v8::CFunction::Make(FastGetLibuvNow)); -v8::CFunction BindingData::fast_schedule_timers_( +v8::CFunction BindingData::fast_schedule_timer_( v8::CFunction::Make(FastScheduleTimer)); v8::CFunction BindingData::fast_toggle_timer_ref_( v8::CFunction::Make(FastToggleTimerRef)); @@ -144,7 +144,7 @@ void BindingData::CreatePerIsolateProperties(IsolateData* isolate_data, target, "scheduleTimer", SlowScheduleTimer, - &fast_schedule_timers_); + &fast_schedule_timer_); SetFastMethod(isolate, target, "toggleTimerRef", @@ -185,20 +185,16 @@ void BindingData::RegisterTimerExternalReferences( registry->Register(SetupTimers); registry->Register(SlowGetLibuvNow); - registry->Register(FastGetLibuvNow); - registry->Register(fast_get_libuv_now_.GetTypeInfo()); + registry->Register(fast_get_libuv_now_); registry->Register(SlowScheduleTimer); - registry->Register(FastScheduleTimer); - registry->Register(fast_schedule_timers_.GetTypeInfo()); + registry->Register(fast_schedule_timer_); registry->Register(SlowToggleTimerRef); - registry->Register(FastToggleTimerRef); - registry->Register(fast_toggle_timer_ref_.GetTypeInfo()); + registry->Register(fast_toggle_timer_ref_); registry->Register(SlowToggleImmediateRef); - registry->Register(FastToggleImmediateRef); - registry->Register(fast_toggle_immediate_ref_.GetTypeInfo()); + registry->Register(fast_toggle_immediate_ref_); } } // namespace timers diff --git a/src/timers.h b/src/timers.h index 5148ea5bc7bd82..3c3a4d60d34ae8 100644 --- a/src/timers.h +++ b/src/timers.h @@ -61,7 +61,7 @@ class BindingData : public SnapshotableObject { private: static v8::CFunction fast_get_libuv_now_; - static v8::CFunction fast_schedule_timers_; + static v8::CFunction fast_schedule_timer_; static v8::CFunction fast_toggle_timer_ref_; static v8::CFunction fast_toggle_immediate_ref_; }; diff --git a/src/undici_version.h b/src/undici_version.h index 0cba4a2b7d7842..4a06fb4dd3a67d 100644 --- a/src/undici_version.h +++ b/src/undici_version.h @@ -2,5 +2,5 @@ // Refer to tools/dep_updaters/update-undici.sh #ifndef SRC_UNDICI_VERSION_H_ #define SRC_UNDICI_VERSION_H_ -#define UNDICI_VERSION "7.10.0" +#define UNDICI_VERSION "7.11.0" #endif // SRC_UNDICI_VERSION_H_ diff --git a/src/util-inl.h b/src/util-inl.h index 73a09a56bd598d..3493732471fd95 100644 --- a/src/util-inl.h +++ b/src/util-inl.h @@ -627,19 +627,24 @@ constexpr std::string_view FastStringKey::as_string_view() const { // Converts a V8 numeric value to a corresponding C++ primitive or enum type. template ::is_specialized || std::is_enum_v>> T FromV8Value(v8::Local value) { if constexpr (std::is_enum_v) { using Underlying = std::underlying_type_t; - return static_cast(FromV8Value(value)); + return static_cast(FromV8Value(value)); } else if constexpr (std::is_integral_v && std::is_unsigned_v) { static_assert( std::numeric_limits::max() <= std::numeric_limits::max() && std::numeric_limits::min() >= std::numeric_limits::min(), "Type is out of unsigned integer range"); - CHECK(value->IsUint32()); + if constexpr (!loose) { + CHECK(value->IsUint32()); + } else { + CHECK(value->IsNumber()); + } return static_cast(value.As()->Value()); } else if constexpr (std::is_integral_v && std::is_signed_v) { static_assert( @@ -647,7 +652,11 @@ T FromV8Value(v8::Local value) { std::numeric_limits::min() >= std::numeric_limits::min(), "Type is out of signed integer range"); - CHECK(value->IsInt32()); + if constexpr (!loose) { + CHECK(value->IsInt32()); + } else { + CHECK(value->IsNumber()); + } return static_cast(value.As()->Value()); } else { static_assert(std::is_floating_point_v, diff --git a/test/benchmark/test-benchmark-source-map.js b/test/benchmark/test-benchmark-source-map.js new file mode 100644 index 00000000000000..c4d58b4bdff62c --- /dev/null +++ b/test/benchmark/test-benchmark-source-map.js @@ -0,0 +1,7 @@ +'use strict'; + +require('../common'); + +const runBenchmark = require('../common/benchmark'); + +runBenchmark('source_map', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); diff --git a/test/cctest/test_inspector_socket_server.cc b/test/cctest/test_inspector_socket_server.cc index 451fbbd6acfc4d..2f7fca83b7db4d 100644 --- a/test/cctest/test_inspector_socket_server.cc +++ b/test/cctest/test_inspector_socket_server.cc @@ -318,8 +318,7 @@ class TestSocketServerDelegate : public SocketServerDelegate { void StartSession(int session_id, const std::string& target_id) override { session_id_ = session_id; - CHECK_NE(targets_.end(), - std::find(targets_.begin(), targets_.end(), target_id)); + CHECK_NE(targets_.end(), std::ranges::find(targets_, target_id)); harness_->Connected(session_id_); } diff --git a/test/es-module/test-esm-detect-ambiguous.mjs b/test/es-module/test-esm-detect-ambiguous.mjs index 8b630b8cff6314..a583da981fed5c 100644 --- a/test/es-module/test-esm-detect-ambiguous.mjs +++ b/test/es-module/test-esm-detect-ambiguous.mjs @@ -281,7 +281,10 @@ describe('Module syntax detection', { concurrency: !process.env.TEST_PARALLEL }, 'const fs = require("node:fs"); await Promise.resolve();', ]); - match(stderr, /ReferenceError: require is not defined in ES module scope/); + match( + stderr, + /ReferenceError: Cannot determine intended module format because both require\(\) and top-level await are present\. If the code is intended to be CommonJS, wrap await in an async function\. If the code is intended to be an ES module, replace require\(\) with import\./ + ); strictEqual(stdout, ''); strictEqual(code, 1); strictEqual(signal, null); @@ -423,3 +426,24 @@ describe('when working with Worker threads', () => { strictEqual(signal, null); }); }); + +describe('cjs & esm ambiguous syntax case', () => { + it('should throw an ambiguous syntax error when using top-level await with require', async () => { + const { stderr, code, signal } = await spawnPromisified( + process.execPath, + [ + '--input-type=module', + '--eval', + `await 1;\nconst fs = require('fs');`, + ] + ); + + match( + stderr, + /ReferenceError: Cannot determine intended module format because both require\(\) and top-level await are present\. If the code is intended to be CommonJS, wrap await in an async function\. If the code is intended to be an ES module, replace require\(\) with import\./ + ); + + strictEqual(code, 1); + strictEqual(signal, null); + }); +}); diff --git a/test/es-module/test-esm-import-attributes-identity.mjs b/test/es-module/test-esm-import-attributes-identity.mjs new file mode 100644 index 00000000000000..0f5b98ff046645 --- /dev/null +++ b/test/es-module/test-esm-import-attributes-identity.mjs @@ -0,0 +1,59 @@ +import '../common/index.mjs'; +import assert from 'node:assert'; +import Module from 'node:module'; + +// This test verifies that importing two modules with different import +// attributes should result in different module instances, if the module loader +// resolves to module instances. +// +// For example, +// ```mjs +// import * as secret1 from '../primitive-42.json' with { type: 'json' }; +// import * as secret2 from '../primitive-42.json'; +// ``` +// should result in two different module instances, if the second import +// is been evaluated as a CommonJS module. +// +// ECMA-262 requires that in `HostLoadImportedModule`, if the operation is called +// multiple times with two (referrer, moduleRequest) pairs, it should return the same +// result. But if the moduleRequest is different, it should return a different, +// and the module loader resolves to different module instances, it should return +// different module instances. +// Refs: https://tc39.es/ecma262/#sec-HostLoadImportedModule + +const kJsonModuleSpecifier = '../primitive-42.json'; +const fixtureUrl = new URL('../fixtures/primitive-42.json', import.meta.url).href; + +Module.registerHooks({ + resolve: (specifier, context, nextResolve) => { + if (kJsonModuleSpecifier !== specifier) { + return nextResolve(specifier, context); + } + if (context.importAttributes.type === 'json') { + return { + url: fixtureUrl, + // Return a new importAttributes object to ensure + // that the module loader treats this as a same module request. + importAttributes: { + type: 'json', + }, + shortCircuit: true, + format: 'json', + }; + } + return { + url: fixtureUrl, + // Return a new importAttributes object to ensure + // that the module loader treats this as a same module request. + importAttributes: {}, + shortCircuit: true, + format: 'module', + }; + }, +}); + +const { secretModule, secretJson, secretJson2 } = await import('../fixtures/es-modules/json-modules-attributes.mjs'); +assert.notStrictEqual(secretModule, secretJson); +assert.strictEqual(secretJson, secretJson2); +assert.strictEqual(secretJson.default, 42); +assert.strictEqual(secretModule.default, undefined); diff --git a/test/es-module/test-esm-json.mjs b/test/es-module/test-esm-json.mjs index 083194ab4237b0..b85767803531eb 100644 --- a/test/es-module/test-esm-json.mjs +++ b/test/es-module/test-esm-json.mjs @@ -16,6 +16,11 @@ describe('ESM: importing JSON', () => { assert.strictEqual(secret.ofLife, 42); }); + it('should load JSON with import calls', async () => { + const module = await import('../fixtures/experimental.json', { with: { type: 'json' } }); + assert.strictEqual(module.default.ofLife, 42); + }); + it('should not print an experimental warning', async () => { const { code, signal, stderr } = await spawnPromisified(execPath, [ fixtures.path('/es-modules/json-modules.mjs'), diff --git a/test/fixtures/es-module-loaders/hooks-input.mjs b/test/fixtures/es-module-loaders/hooks-input.mjs index 854b8e619281e4..e4eb159b398797 100644 --- a/test/fixtures/es-module-loaders/hooks-input.mjs +++ b/test/fixtures/es-module-loaders/hooks-input.mjs @@ -30,6 +30,8 @@ export async function resolve(specifier, context, next) { assert.deepStrictEqual(context.importAttributes, { type: 'json', }); + } else { + throw new Error(`Unexpected resolve call: ${specifier}`); } // Ensure `context` has all and only the properties it's supposed to diff --git a/test/fixtures/es-modules/json-modules-attributes.mjs b/test/fixtures/es-modules/json-modules-attributes.mjs new file mode 100644 index 00000000000000..d0eb79f4f5dd72 --- /dev/null +++ b/test/fixtures/es-modules/json-modules-attributes.mjs @@ -0,0 +1,5 @@ +import * as secretJson from '../primitive-42.json' with { type: 'json' }; +import * as secretModule from '../primitive-42.json'; +import * as secretJson2 from '../primitive-42.json' with { type: 'json' }; + +export { secretModule, secretJson, secretJson2 }; diff --git a/test/fixtures/permission/fs-write.js b/test/fixtures/permission/fs-write.js index 590df0b6587b25..9ac9a30facc196 100644 --- a/test/fixtures/permission/fs-write.js +++ b/test/fixtures/permission/fs-write.js @@ -199,6 +199,7 @@ const relativeProtectedFolder = process.env.RELATIVEBLOCKEDFOLDER; }); } +// fs.mkdtemp { assert.throws(() => { fs.mkdtempSync(path.join(blockedFolder, 'any-folder')); @@ -212,6 +213,16 @@ const relativeProtectedFolder = process.env.RELATIVEBLOCKEDFOLDER; })); } +// fs.mkdtempDisposableSync +{ + assert.throws(() => { + fs.mkdtempDisposableSync(path.join(blockedFolder, 'any-folder')); + },{ + code: 'ERR_ACCESS_DENIED', + permission: 'FileSystemWrite', + }); +} + // fs.rename { assert.throws(() => { diff --git a/test/fixtures/primitive-42.json b/test/fixtures/primitive-42.json new file mode 100644 index 00000000000000..d81cc0710eb6cf --- /dev/null +++ b/test/fixtures/primitive-42.json @@ -0,0 +1 @@ +42 diff --git a/test/fixtures/rc/non-readable/node.config.json b/test/fixtures/rc/non-readable/node.config.json deleted file mode 100755 index 21e2b85fbda8fc..00000000000000 --- a/test/fixtures/rc/non-readable/node.config.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "nodeOptions": { - "max-http-header-size": 10 - } -} diff --git a/test/fixtures/test-runner/options-propagation/experimental-config-file.test.mjs b/test/fixtures/test-runner/options-propagation/experimental-config-file.test.mjs new file mode 100644 index 00000000000000..aa36ec2b52d53b --- /dev/null +++ b/test/fixtures/test-runner/options-propagation/experimental-config-file.test.mjs @@ -0,0 +1,8 @@ +import { test } from 'node:test'; +import { strictEqual } from 'node:assert'; +import internal from 'internal/options'; + +test('it should not receive --experimental-config-file option', () => { + const optionValue = internal.getOptionValue("--experimental-config-file"); + strictEqual(optionValue, ''); +}) diff --git a/test/fixtures/test-runner/options-propagation/node.config.json b/test/fixtures/test-runner/options-propagation/node.config.json new file mode 100644 index 00000000000000..98a35b7d3eebd2 --- /dev/null +++ b/test/fixtures/test-runner/options-propagation/node.config.json @@ -0,0 +1,5 @@ +{ + "testRunner": { + "experimental-test-coverage": true + } +} diff --git a/test/fixtures/wasi-preview-1.js b/test/fixtures/wasi-preview-1.js index 3c11c6db1646bc..535bc3e5ec181a 100644 --- a/test/fixtures/wasi-preview-1.js +++ b/test/fixtures/wasi-preview-1.js @@ -5,8 +5,21 @@ const fixtures = require('../common/fixtures'); const tmpdir = require('../common/tmpdir'); const fs = require('fs'); const path = require('path'); +const { parseArgs } = require('util'); const common = require('../common'); const { WASI } = require('wasi'); +const { Worker, isMainThread, parentPort, workerData } = require('worker_threads'); + +const args = parseArgs({ + allowPositionals: true, + options: { + target: { + type: 'string', + default: 'wasm32-wasip1', + }, + }, + strict: false, +}); function returnOnExitEnvToValue(env) { const envValue = env.RETURN_ON_EXIT; @@ -36,13 +49,182 @@ const wasiPreview1 = new WASI({ // Validate the getImportObject helper assert.strictEqual(wasiPreview1.wasiImport, wasiPreview1.getImportObject().wasi_snapshot_preview1); -const modulePathPreview1 = path.join(wasmDir, `${process.argv[2]}.wasm`); -const bufferPreview1 = fs.readFileSync(modulePathPreview1); (async () => { - const { instance: instancePreview1 } = - await WebAssembly.instantiate(bufferPreview1, - wasiPreview1.getImportObject()); + const importObject = { ...wasiPreview1.getImportObject() }; + if (args.values.target === 'wasm32-wasip1-threads') { + let nextTid = 43; + const workers = []; + const terminateAllThreads = () => { + workers.forEach((w) => w.terminate()); + }; + const proc_exit = importObject.wasi_snapshot_preview1.proc_exit; + importObject.wasi_snapshot_preview1.proc_exit = function(code) { + terminateAllThreads(); + return proc_exit.call(this, code); + }; + const spawn = (startArg, threadId) => { + const tid = nextTid++; + const name = `pthread-${tid}`; + const sab = new SharedArrayBuffer(8 + 8192); + const result = new Int32Array(sab); + + const workerData = { + name, + startArg, + tid, + wasmModule, + memory: importObject.env.memory, + result, + }; + + const worker = new Worker(__filename, { + name, + argv: process.argv.slice(2), + execArgv: [ + '--experimental-wasi-unstable-preview1', + ], + workerData, + }); + workers[tid] = worker; + + worker.on('message', ({ cmd, startArg, threadId, tid }) => { + if (cmd === 'loaded') { + worker.unref(); + } else if (cmd === 'thread-spawn') { + spawn(startArg, threadId); + } else if (cmd === 'cleanup-thread') { + workers[tid].terminate(); + delete workers[tid]; + } else if (cmd === 'terminate-all-threads') { + terminateAllThreads(); + } + }); - wasiPreview1.start(instancePreview1); + worker.on('error', (e) => { + terminateAllThreads(); + throw new Error(e); + }); + + const r = Atomics.wait(result, 0, 0, 1000); + if (r === 'timed-out') { + workers[tid].terminate(); + delete workers[tid]; + if (threadId) { + Atomics.store(threadId, 0, -6); + Atomics.notify(threadId, 0); + } + return -6; + } + if (Atomics.load(result, 0) !== 0) { + const decoder = new TextDecoder(); + const nameLength = Atomics.load(result, 1); + const messageLength = Atomics.load(result, 2); + const stackLength = Atomics.load(result, 3); + const name = decoder.decode(sab.slice(16, 16 + nameLength)); + const message = decoder.decode(sab.slice(16 + nameLength, 16 + nameLength + messageLength)); + const stack = decoder.decode( + sab.slice(16 + nameLength + messageLength, + 16 + nameLength + messageLength + stackLength)); + const ErrorConstructor = globalThis[name] ?? ( + name === 'RuntimeError' ? (WebAssembly.RuntimeError ?? Error) : Error); + const error = new ErrorConstructor(message); + Object.defineProperty(error, 'stack', { + value: stack, + writable: true, + enumerable: false, + configurable: true, + }); + Object.defineProperty(error, 'name', { + value: name, + writable: true, + enumerable: false, + configurable: true, + }); + throw error; + } + if (threadId) { + Atomics.store(threadId, 0, tid); + Atomics.notify(threadId, 0); + } + return tid; + }; + const memory = isMainThread ? new WebAssembly.Memory({ + initial: 16777216 / 65536, + maximum: 2147483648 / 65536, + shared: true, + }) : workerData.memory; + importObject.env ??= {}; + importObject.env.memory = memory; + importObject.wasi = { + 'thread-spawn': (startArg) => { + if (isMainThread) { + return spawn(startArg); + } + const threadIdBuffer = new SharedArrayBuffer(4); + const id = new Int32Array(threadIdBuffer); + Atomics.store(id, 0, -1); + parentPort.postMessage({ + cmd: 'thread-spawn', + startArg, + threadId: id, + }); + Atomics.wait(id, 0, -1); + const tid = Atomics.load(id, 0); + return tid; + }, + }; + } + let wasmModule; + let instancePreview1; + try { + if (isMainThread) { + const modulePathPreview1 = path.join(wasmDir, `${args.positionals[0]}.wasm`); + const bufferPreview1 = fs.readFileSync(modulePathPreview1); + wasmModule = await WebAssembly.compile(bufferPreview1); + } else { + wasmModule = workerData.wasmModule; + } + instancePreview1 = await WebAssembly.instantiate(wasmModule, importObject); + + if (isMainThread) { + wasiPreview1.start(instancePreview1); + } else { + wasiPreview1.finalizeBindings(instancePreview1, { + memory: importObject.env.memory, + }); + parentPort.postMessage({ cmd: 'loaded' }); + Atomics.store(workerData.result, 0, 0); + Atomics.notify(workerData.result, 0); + } + } catch (e) { + if (!isMainThread) { + const encoder = new TextEncoder(); + const nameBuffer = encoder.encode(e.name); + const messageBuffer = encoder.encode(e.message); + const stackBuffer = encoder.encode(e.stack); + Atomics.store(workerData.result, 0, 1); + Atomics.store(workerData.result, 1, nameBuffer.length); + Atomics.store(workerData.result, 2, messageBuffer.length); + Atomics.store(workerData.result, 3, stackBuffer.length); + const u8arr = new Uint8Array(workerData.result.buffer); + u8arr.set(nameBuffer, 16); + u8arr.set(messageBuffer, 16 + nameBuffer.length); + u8arr.set(stackBuffer, 16 + nameBuffer.length + messageBuffer.length); + Atomics.notify(workerData.result, 0); + } + throw e; + } + if (!isMainThread) { + try { + instancePreview1.exports.wasi_thread_start(workerData.tid, workerData.startArg); + } catch (err) { + if (err instanceof WebAssembly.RuntimeError) { + parentPort.postMessage({ cmd: 'terminate-all-threads' }); + } + throw err + } + + parentPort.postMessage({ cmd: 'cleanup-thread', tid: workerData.tid }); + } })().then(common.mustCall()); diff --git a/test/fixtures/wpt/README.md b/test/fixtures/wpt/README.md index 232f78fb00c8ea..626a684d6959c8 100644 --- a/test/fixtures/wpt/README.md +++ b/test/fixtures/wpt/README.md @@ -29,7 +29,7 @@ Last update: - resources: https://github.com/web-platform-tests/wpt/tree/1e140d63ec/resources - streams: https://github.com/web-platform-tests/wpt/tree/bc9dcbbf1a/streams - url: https://github.com/web-platform-tests/wpt/tree/9504a83e01/url -- urlpattern: https://github.com/web-platform-tests/wpt/tree/3ffda23e5a/urlpattern +- urlpattern: https://github.com/web-platform-tests/wpt/tree/84b75f0880/urlpattern - 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/urlpattern/urlpattern-constructor.html b/test/fixtures/wpt/urlpattern/urlpattern-constructor.html new file mode 100644 index 00000000000000..2d83b7dc0325b4 --- /dev/null +++ b/test/fixtures/wpt/urlpattern/urlpattern-constructor.html @@ -0,0 +1,14 @@ + + + + diff --git a/test/fixtures/wpt/versions.json b/test/fixtures/wpt/versions.json index 79031f7caa4b78..247dd0103932c7 100644 --- a/test/fixtures/wpt/versions.json +++ b/test/fixtures/wpt/versions.json @@ -76,7 +76,7 @@ "path": "url" }, "urlpattern": { - "commit": "3ffda23e5af7c59590b17c2710a22efd22dd4973", + "commit": "84b75f08801c8cfe407c25614c49132075b8afab", "path": "urlpattern" }, "user-timing": { diff --git a/test/known_issues/test-fs-cp-async-buffer.js b/test/known_issues/test-fs-cp-async-buffer.js new file mode 100644 index 00000000000000..4cbf02414749fe --- /dev/null +++ b/test/known_issues/test-fs-cp-async-buffer.js @@ -0,0 +1,23 @@ +'use strict'; + +// We expect this test to fail because the implementation of fsPromise.cp +// does not properly support the use of Buffer as the source or destination +// argument like fs.cpSync does. +// Refs: https://github.com/nodejs/node/issues/58634 +// Refs: https://github.com/nodejs/node/issues/58869 + +const common = require('../common'); +const { mkdirSync, promises } = require('fs'); +const { join } = require('path'); +const tmpdir = require('../common/tmpdir'); + +tmpdir.refresh(); + +const tmpA = join(tmpdir.path, 'a'); +const tmpB = join(tmpdir.path, 'b'); + +mkdirSync(tmpA, { recursive: true }); + +promises.cp(Buffer.from(tmpA), Buffer.from(tmpB), { + recursive: true, +}).then(common.mustCall()); diff --git a/test/known_issues/test-fs-cp-filter.js b/test/known_issues/test-fs-cp-filter.js new file mode 100644 index 00000000000000..d6ac92aebe0e9b --- /dev/null +++ b/test/known_issues/test-fs-cp-filter.js @@ -0,0 +1,34 @@ +'use strict'; + +// This test will fail because the the implementation does not properly +// handle the case when the `src` or `dest` is a Buffer and the `filter` +// function is utilized when recursively copying directories. +// Refs: https://github.com/nodejs/node/issues/58634 +// Refs: https://github.com/nodejs/node/issues/58869 + +const common = require('../common'); + +const { + cpSync, + mkdirSync, +} = require('fs'); + +const { + join, +} = require('path'); + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +const pathA = join(tmpdir.path, 'a'); +const pathAC = join(pathA, 'c'); +const pathB = join(tmpdir.path, 'b'); +mkdirSync(pathAC, { recursive: true }); + +cpSync(Buffer.from(pathA), Buffer.from(pathB), { + recursive: true, + // This should be called multiple times, once for each file/directory, + // but it's only called once in this test because we're expecting this + // to fail. + filter: common.mustCall(() => true, 1), +}); diff --git a/test/known_issues/test-fs-cp-non-utf8.js b/test/known_issues/test-fs-cp-non-utf8.js new file mode 100644 index 00000000000000..12c04a4227f6c2 --- /dev/null +++ b/test/known_issues/test-fs-cp-non-utf8.js @@ -0,0 +1,54 @@ +'use strict'; + +// Refs: https://github.com/nodejs/node/issues/58634 +// Refs: https://github.com/nodejs/node/issues/58869 + +const common = require('../common'); + +if (!common.isLinux) { + common.skip('This test is only applicable to Linux'); +} + +const { ok, strictEqual } = require('assert'); +const { join } = require('path'); +const path = require('path'); +const tmpdir = require('../common/tmpdir'); +const { + cpSync, + existsSync, + mkdirSync, + writeFileSync, + readFileSync, +} = require('fs'); +tmpdir.refresh(); + +const tmpdirPath = Buffer.from(join(tmpdir.path, 'a', 'c')); +const sepBuf = Buffer.from(path.sep); + +mkdirSync(tmpdirPath, { recursive: true }); + +// The name is the Shift-JIS encoded version of こんにちは世界, +// or "Hello, World" in Japanese. On Linux systems, this name is +// a valid path name and should be handled correctly by the copy +// operation. However, the implementation of cp makes the assumption +// that the path names are UTF-8 encoded, so while we can create the +// file and check its existence using a Buffer, the recursive cp +// operation will fail because it tries to interpret every file name +// as UTF-8. +const name = Buffer.from([ + 0x82, 0xB1, 0x82, 0xF1, 0x82, 0xC9, 0x82, + 0xBF, 0x82, 0xCD, 0x90, 0x6C, 0x8C, 0x8E, +]); +const testPath = Buffer.concat([tmpdirPath, sepBuf, name]); + +writeFileSync(testPath, 'test content'); +ok(existsSync(testPath)); +strictEqual(readFileSync(testPath, 'utf8'), 'test content'); + +// The cpSync is expected to fail because the implementation does not +// properly handle non-UTF8 names in the path. + +cpSync(join(tmpdir.path, 'a'), join(tmpdir.path, 'b'), { + recursive: true, + filter: common.mustCall(() => true, 1), +}); diff --git a/test/known_issues/test-fs-readdir-promise-recursive-with-buffer.js b/test/known_issues/test-fs-readdir-promise-recursive-with-buffer.js new file mode 100644 index 00000000000000..7d8649ac9826ab --- /dev/null +++ b/test/known_issues/test-fs-readdir-promise-recursive-with-buffer.js @@ -0,0 +1,15 @@ +'use strict'; + +// This test will fail because the the implementation does not properly +// handle the case when the path is a Buffer and the function is called +// in recursive mode. + +// Refs: https://github.com/nodejs/node/issues/58892 + +const common = require('../common'); + +const { readdir } = require('node:fs/promises'); +const { join } = require('node:path'); + +const testDirPath = join(__dirname, '..', '..'); +readdir(Buffer.from(testDirPath), { recursive: true }).then(common.mustCall()); diff --git a/test/known_issues/test-fs-readdir-recursive-with-buffer.js b/test/known_issues/test-fs-readdir-recursive-with-buffer.js new file mode 100644 index 00000000000000..2c1f74232ddaab --- /dev/null +++ b/test/known_issues/test-fs-readdir-recursive-with-buffer.js @@ -0,0 +1,15 @@ +'use strict'; + +// This test will fail because the the implementation does not properly +// handle the case when the path is a Buffer and the function is called +// in recursive mode. + +// Refs: https://github.com/nodejs/node/issues/58892 + +const common = require('../common'); + +const { readdir } = require('node:fs'); +const { join } = require('node:path'); + +const testDirPath = join(__dirname, '..', '..'); +readdir(Buffer.from(testDirPath), { recursive: true }, common.mustCall()); diff --git a/test/known_issues/test-fs-readdir-sync-recursive-with-buffer.js b/test/known_issues/test-fs-readdir-sync-recursive-with-buffer.js new file mode 100644 index 00000000000000..291fe7ffe8bce4 --- /dev/null +++ b/test/known_issues/test-fs-readdir-sync-recursive-with-buffer.js @@ -0,0 +1,15 @@ +'use strict'; + +// This test will fail because the the implementation does not properly +// handle the case when the path is a Buffer and the function is called +// in recursive mode. + +// Refs: https://github.com/nodejs/node/issues/58892 + +require('../common'); + +const { readdirSync } = require('node:fs'); +const { join } = require('node:path'); + +const testDirPath = join(__dirname, '..', '..'); +readdirSync(Buffer.from(testDirPath), { recursive: true }); diff --git a/test/module-hooks/test-module-hooks-builtin-require.js b/test/module-hooks/test-module-hooks-builtin-require.js new file mode 100644 index 00000000000000..0d81f8dfb277b5 --- /dev/null +++ b/test/module-hooks/test-module-hooks-builtin-require.js @@ -0,0 +1,48 @@ +'use strict'; + +// This tests that when builtins that demand the `node:` prefix are +// required, the URL returned by the default resolution step is still +// prefixed and valid, and that gets passed to the load hook is still +// the one with the `node:` prefix. The one with the prefix +// stripped for internal lookups should not get passed into the hooks. + +const common = require('../common'); +const assert = require('assert'); +const { registerHooks } = require('module'); + +const schemelessBlockList = new Set([ + 'sea', + 'sqlite', + 'test', + 'test/reporters', +]); + +const testModules = []; +for (const mod of schemelessBlockList) { + testModules.push(`node:${mod}`); +} + +const hook = registerHooks({ + resolve: common.mustCall((specifier, context, nextResolve) => { + const result = nextResolve(specifier, context); + assert.match(result.url, /^node:/); + assert.strictEqual(schemelessBlockList.has(result.url.slice(5, result.url.length)), true); + return result; + }, testModules.length), + load: common.mustCall(function load(url, context, nextLoad) { + assert.match(url, /^node:/); + assert.strictEqual(schemelessBlockList.has(url.slice(5, url.length)), true); + const result = nextLoad(url, context); + assert.strictEqual(result.source, null); + return { + source: 'throw new Error("I should not be thrown because the loader ignores user-supplied source for builtins")', + format: 'builtin', + }; + }, testModules.length), +}); + +for (const mod of testModules) { + require(mod); +} + +hook.deregister(); diff --git a/test/module-hooks/test-module-hooks-load-builtin-require.js b/test/module-hooks/test-module-hooks-load-builtin-require.js index 78f732d2dd9207..023c5431efa553 100644 --- a/test/module-hooks/test-module-hooks-load-builtin-require.js +++ b/test/module-hooks/test-module-hooks-load-builtin-require.js @@ -11,8 +11,9 @@ const { registerHooks } = require('module'); // Pick a builtin that's unlikely to be loaded already - like zlib. assert(!process.moduleLoadList.includes('NativeModule zlib')); +let hook; -const hook = registerHooks({ +hook = registerHooks({ load: common.mustCall(function load(url, context, nextLoad) { assert.strictEqual(url, 'node:zlib'); const result = nextLoad(url, context); @@ -27,3 +28,39 @@ const hook = registerHooks({ assert.strictEqual(typeof require('zlib').createGzip, 'function'); hook.deregister(); + +// This tests that when builtins that demand the `node:` prefix are +// required, the URL returned by the default resolution step is still +// prefixed and valid, and that gets passed to the load hook is still +// the one with the `node:` prefix. The one with the prefix +// stripped for internal lookups should not get passed into the hooks. +const schemelessBlockList = new Set([ + 'sea', + 'sqlite', + 'test', + 'test/reporters', +]); + +const testModules = []; +for (const mod of schemelessBlockList) { + testModules.push(`node:${mod}`); +} + +hook = registerHooks({ + load: common.mustCall(function load(url, context, nextLoad) { + assert.match(url, /^node:/); + assert.strictEqual(schemelessBlockList.has(url.slice(5, url.length)), true); + const result = nextLoad(url, context); + assert.strictEqual(result.source, null); + return { + source: 'throw new Error("I should not be thrown because the loader ignores user-supplied source for builtins")', + format: 'builtin', + }; + }, testModules.length), +}); + +for (const mod of testModules) { + require(mod); +} + +hook.deregister(); diff --git a/test/parallel/test-cli-node-cli-manpage-env-vars.mjs b/test/parallel/test-cli-node-cli-manpage-env-vars.mjs new file mode 100644 index 00000000000000..703b1f04073615 --- /dev/null +++ b/test/parallel/test-cli-node-cli-manpage-env-vars.mjs @@ -0,0 +1,106 @@ +import '../common/index.mjs'; +import assert from 'node:assert'; +import { createReadStream } from 'node:fs'; +import { createInterface } from 'node:readline'; +import { resolve, join } from 'node:path'; + +// This test checks that all the environment variables defined in the public CLI documentation (doc/api/cli.md) +// are also documented in the manpage file (doc/node.1) and vice-versa (that all the environment variables +// in the manpage are present in the CLI documentation) + +const rootDir = resolve(import.meta.dirname, '..', '..'); + +const cliMdEnvVarNames = await collectCliMdEnvVarNames(); +const manpageEnvVarNames = await collectManPageEnvVarNames(); + +assert(cliMdEnvVarNames.size > 0, + 'Unexpectedly not even a single env variable was detected when scanning the `doc/api/cli.md` file' +); + +assert(manpageEnvVarNames.size > 0, + 'Unexpectedly not even a single env variable was detected when scanning the `doc/node.1` file' +); + +// TODO(dario-piotrowicz): add the missing env variables to the manpage and remove this set +// (refs: https://github.com/nodejs/node/issues/58894) +const knownEnvVariablesMissingFromManPage = new Set([ + 'NODE_COMPILE_CACHE', + 'NODE_DISABLE_COMPILE_CACHE', + 'NODE_PENDING_PIPE_INSTANCES', + 'NODE_TEST_CONTEXT', + 'NODE_USE_ENV_PROXY', +]); + +for (const envVarName of cliMdEnvVarNames) { + if (!manpageEnvVarNames.has(envVarName) && !knownEnvVariablesMissingFromManPage.has(envVarName)) { + assert.fail(`The "${envVarName}" environment variable (present in \`doc/api/cli.md\`) is missing from the \`doc/node.1\` file`); + } + manpageEnvVarNames.delete(envVarName); +} + +if (manpageEnvVarNames.size > 0) { + assert.fail(`The following env variables are present in the \`doc/node.1\` file but not in the \`doc/api/cli.md\` file: ${ + [...manpageEnvVarNames].map((name) => `"${name}"`).join(', ') + }`); +} + +async function collectManPageEnvVarNames() { + const manPagePath = join(rootDir, 'doc', 'node.1'); + const fileStream = createReadStream(manPagePath); + + const rl = createInterface({ + input: fileStream, + }); + + const envVarNames = new Set(); + + for await (const line of rl) { + const match = line.match(/^\.It Ev (?[^ ]*)/); + if (match) { + envVarNames.add(match.groups.envName); + } + } + + return envVarNames; +} + +async function collectCliMdEnvVarNames() { + const cliMdPath = join(rootDir, 'doc', 'api', 'cli.md'); + const fileStream = createReadStream(cliMdPath); + + let insideEnvVariablesSection = false; + + const rl = createInterface({ + input: fileStream, + }); + + const envVariableRE = /^### `(?[^`]*?)(?:=[^`]+)?`$/; + + const envVarNames = new Set(); + + for await (const line of rl) { + if (line.startsWith('## ')) { + if (insideEnvVariablesSection) { + // We were in the environment variables section and we're now exiting it, + // so there is no need to keep checking the remaining lines, + // we might as well close the stream and return + fileStream.close(); + return envVarNames; + } + + // We've just entered the options section + insideEnvVariablesSection = line === '## Environment variables'; + continue; + } + + if (insideEnvVariablesSection) { + const match = line.match(envVariableRE); + if (match) { + const { varName } = match.groups; + envVarNames.add(varName); + } + } + } + + return envVarNames; +} diff --git a/test/parallel/test-cli-node-cli-manpage-options.mjs b/test/parallel/test-cli-node-cli-manpage-options.mjs new file mode 100644 index 00000000000000..388b35a04f647e --- /dev/null +++ b/test/parallel/test-cli-node-cli-manpage-options.mjs @@ -0,0 +1,167 @@ +import '../common/index.mjs'; +import assert from 'node:assert'; +import { createReadStream, readFileSync } from 'node:fs'; +import { createInterface } from 'node:readline'; +import { resolve, join } from 'node:path'; +import { EOL } from 'node:os'; + +// This test checks that all the CLI flags defined in the public CLI documentation (doc/api/cli.md) +// are also documented in the manpage file (doc/node.1) +// Note: the opposite (that all variables in doc/node.1 are documented in the CLI documentation) +// is covered in the test-cli-node-options-docs.js file + +const rootDir = resolve(import.meta.dirname, '..', '..'); + +const cliMdPath = join(rootDir, 'doc', 'api', 'cli.md'); +const cliMdContentsStream = createReadStream(cliMdPath); + +const manPagePath = join(rootDir, 'doc', 'node.1'); +const manPageContents = readFileSync(manPagePath, { encoding: 'utf8' }); + +// TODO(dario-piotrowicz): add the missing flags to the node.1 and remove this set +// (refs: https://github.com/nodejs/node/issues/58895) +const knownFlagsMissingFromManPage = new Set([ + 'build-snapshot', + 'build-snapshot-config', + 'disable-sigusr1', + 'disable-warning', + 'dns-result-order', + 'enable-network-family-autoselection', + 'env-file-if-exists', + 'env-file', + 'experimental-network-inspection', + 'experimental-print-required-tla', + 'experimental-require-module', + 'experimental-sea-config', + 'experimental-worker-inspection', + 'expose-gc', + 'force-node-api-uncaught-exceptions-policy', + 'import', + 'network-family-autoselection-attempt-timeout', + 'no-async-context-frame', + 'no-experimental-detect-module', + 'no-experimental-global-navigator', + 'no-experimental-require-module', + 'no-network-family-autoselection', + 'openssl-legacy-provider', + 'openssl-shared-config', + 'report-dir', + 'report-directory', + 'report-exclude-env', + 'report-exclude-network', + 'run', + 'snapshot-blob', + 'trace-env', + 'trace-env-js-stack', + 'trace-env-native-stack', + 'trace-require-module', + 'use-system-ca', + 'watch-preserve-output', +]); + +const optionsEncountered = { dash: 0, dashDash: 0, named: 0 }; +let insideOptionsSection = false; + +const rl = createInterface({ + input: cliMdContentsStream, +}); + +const isOptionLineRegex = /^###(?: `[^`]*`,?)*$/; + +for await (const line of rl) { + if (line.startsWith('## ')) { + if (insideOptionsSection) { + // We were in the options section and we're now exiting it, + // so there is no need to keep checking the remaining lines, + // we might as well close the stream and exit the loop + cliMdContentsStream.close(); + break; + } + + // We've just entered the options section + insideOptionsSection = line === '## Options'; + continue; + } + + if (insideOptionsSection && isOptionLineRegex.test(line)) { + if (line === '### `-`') { + if (!manPageContents.includes(`${EOL}.It Sy -${EOL}`)) { + throw new Error(`The \`-\` flag is missing in the \`doc/node.1\` file`); + } + optionsEncountered.dash++; + continue; + } + + if (line === '### `--`') { + if (!manPageContents.includes(`${EOL}.It Fl -${EOL}`)) { + throw new Error(`The \`--\` flag is missing in the \`doc/node.1\` file`); + } + optionsEncountered.dashDash++; + continue; + } + + const flagNames = extractFlagNames(line); + + optionsEncountered.named += flagNames.length; + + const manLine = `.It ${flagNames + .map((flag) => `Fl ${flag.length > 1 ? '-' : ''}${flag}`) + .join(' , ')}`; + + if ( + // Note: we don't check the full line (note the EOL only at the beginning) because + // options can have arguments and we do want to ignore those + !manPageContents.includes(`${EOL}${manLine}`) && + !flagNames.every((flag) => knownFlagsMissingFromManPage.has(flag))) { + assert.fail( + `The following flag${ + flagNames.length === 1 ? '' : 's' + } (present in \`doc/api/cli.md\`) ${flagNames.length === 1 ? 'is' : 'are'} missing in the \`doc/node.1\` file: ${ + flagNames.map((flag) => `"${flag}"`).join(', ') + }` + ); + } + } +} + +assert.strictEqual(optionsEncountered.dash, 1); + +assert.strictEqual(optionsEncountered.dashDash, 1); + +assert(optionsEncountered.named > 0, + 'Unexpectedly not even a single cli flag/option was detected when scanning the `doc/cli.md` file' +); + +/** + * Function that given a string containing backtick enclosed cli flags + * separated by `, ` returns the name of flags present in the string + * e.g. `extractFlagNames('`-x`, `--print "script"`')` === `['x', 'print']` + * @param {string} str target string + * @returns {string[]} the name of the detected flags + */ +function extractFlagNames(str) { + const match = str.match(/`[^`]*?`/g); + if (!match) { + return []; + } + return match.map((flag) => { + // Remove the backticks from the flag + flag = flag.slice(1, -1); + + // Remove the dash or dashes + flag = flag.replace(/^--?/, ''); + + // If the flag contains parameters make sure to remove those + const nameDelimiters = ['=', ' ', '[']; + const nameCutOffIdx = Math.min(...nameDelimiters.map((d) => { + const idx = flag.indexOf(d); + if (idx > 0) { + return idx; + } + return flag.length; + })); + flag = flag.slice(0, nameCutOffIdx); + + return flag; + }); +} diff --git a/test/parallel/test-config-file.js b/test/parallel/test-config-file.js index 57824d16e4ca9a..75d0922630cd3a 100644 --- a/test/parallel/test-config-file.js +++ b/test/parallel/test-config-file.js @@ -1,12 +1,17 @@ 'use strict'; -const { spawnPromisified, skipIfSQLiteMissing } = require('../common'); +const { + isWindows, + spawnPromisified, + skipIfSQLiteMissing, +} = require('../common'); skipIfSQLiteMissing(); const fixtures = require('../common/fixtures'); +const tmpdir = require('../common/tmpdir'); const { match, strictEqual, deepStrictEqual } = require('node:assert'); const { test, it, describe } = require('node:test'); -const { chmodSync, constants } = require('node:fs'); -const common = require('../common'); +const { chmodSync, writeFileSync, constants } = require('node:fs'); +const { join } = require('node:path'); test('should handle non existing json', async () => { const result = await spawnPromisified(process.execPath, [ @@ -239,6 +244,7 @@ test('--inspect=true should be parsed correctly', { skip: !process.features.insp '--no-warnings', '--experimental-config-file', fixtures.path('rc/inspect-true.json'), + '--inspect-port', '0', '-p', 'require("node:inspector").url()', ]); match(result.stderr, /^Debugger listening on (ws:\/\/[^\s]+)/); @@ -363,21 +369,24 @@ test('should override node.config.json when specificied', async () => { // Skip on windows because it doesn't support chmod changing read permissions // Also skip if user is root because it would have read permissions anyway test('should throw an error when the file is non readable', { - skip: common.isWindows || process.getuid() === 0, + skip: isWindows || process.getuid() === 0, }, async () => { - chmodSync(fixtures.path('rc/non-readable/node.config.json'), constants.O_RDONLY); + tmpdir.refresh(); + const dest = join(tmpdir.path, 'node.config.json'); + writeFileSync(dest, JSON.stringify({ + nodeOptions: { 'max-http-header-size': 10 } + })); + chmodSync(dest, constants.O_RDONLY); const result = await spawnPromisified(process.execPath, [ '--no-warnings', '--experimental-default-config-file', '-p', 'http.maxHeaderSize', ], { - cwd: fixtures.path('rc/non-readable'), + cwd: tmpdir.path, }); match(result.stderr, /Cannot read configuration from node\.config\.json: permission denied/); strictEqual(result.stdout, ''); strictEqual(result.code, 9); - chmodSync(fixtures.path('rc/non-readable/node.config.json'), - constants.S_IRWXU | constants.S_IRWXG | constants.S_IRWXO); }); describe('namespace-scoped options', () => { diff --git a/test/parallel/test-crypto-default-shake-lengths-oneshot.js b/test/parallel/test-crypto-default-shake-lengths-oneshot.js new file mode 100644 index 00000000000000..247e58d93c4303 --- /dev/null +++ b/test/parallel/test-crypto-default-shake-lengths-oneshot.js @@ -0,0 +1,18 @@ +// Flags: --pending-deprecation +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const { hash } = require('crypto'); + +common.expectWarning({ + DeprecationWarning: { + DEP0198: 'Creating SHAKE128/256 digests without an explicit options.outputLength is deprecated.', + } +}); + +{ + hash('shake128', 'test'); +} diff --git a/test/parallel/test-crypto-default-shake-lengths.js b/test/parallel/test-crypto-default-shake-lengths.js new file mode 100644 index 00000000000000..1e558814ca0e4a --- /dev/null +++ b/test/parallel/test-crypto-default-shake-lengths.js @@ -0,0 +1,18 @@ +// Flags: --pending-deprecation +'use strict'; + +const common = require('../common'); +if (!common.hasCrypto) + common.skip('missing crypto'); + +const { createHash } = require('crypto'); + +common.expectWarning({ + DeprecationWarning: { + DEP0198: 'Creating SHAKE128/256 digests without an explicit options.outputLength is deprecated.', + } +}); + +{ + createHash('shake128').update('test').digest(); +} diff --git a/test/parallel/test-crypto-hash.js b/test/parallel/test-crypto-hash.js index 61145aee0727fb..929dd36c669239 100644 --- a/test/parallel/test-crypto-hash.js +++ b/test/parallel/test-crypto-hash.js @@ -8,7 +8,6 @@ const assert = require('assert'); const crypto = require('crypto'); const fs = require('fs'); -const { hasOpenSSL } = require('../common/crypto'); const fixtures = require('../common/fixtures'); let cryptoType; @@ -184,21 +183,19 @@ assert.throws( // Test XOF hash functions and the outputLength option. { - // Default outputLengths. Since OpenSSL 3.4 an outputLength is mandatory - if (!hasOpenSSL(3, 4)) { - assert.strictEqual(crypto.createHash('shake128').digest('hex'), - '7f9c2ba4e88f827d616045507605853e'); - assert.strictEqual(crypto.createHash('shake128', null).digest('hex'), - '7f9c2ba4e88f827d616045507605853e'); - assert.strictEqual(crypto.createHash('shake256').digest('hex'), - '46b9dd2b0ba88d13233b3feb743eeb24' + - '3fcd52ea62b81b82b50c27646ed5762f'); - assert.strictEqual(crypto.createHash('shake256', { outputLength: 0 }) - .copy() // Default outputLength. - .digest('hex'), - '46b9dd2b0ba88d13233b3feb743eeb24' + - '3fcd52ea62b81b82b50c27646ed5762f'); - } + // Default outputLengths. + assert.strictEqual(crypto.createHash('shake128').digest('hex'), + '7f9c2ba4e88f827d616045507605853e'); + assert.strictEqual(crypto.createHash('shake128', null).digest('hex'), + '7f9c2ba4e88f827d616045507605853e'); + assert.strictEqual(crypto.createHash('shake256').digest('hex'), + '46b9dd2b0ba88d13233b3feb743eeb24' + + '3fcd52ea62b81b82b50c27646ed5762f'); + assert.strictEqual(crypto.createHash('shake256', { outputLength: 0 }) + .copy() // Default outputLength. + .digest('hex'), + '46b9dd2b0ba88d13233b3feb743eeb24' + + '3fcd52ea62b81b82b50c27646ed5762f'); // Short outputLengths. assert.strictEqual(crypto.createHash('shake128', { outputLength: 0 }) diff --git a/test/parallel/test-crypto-oneshot-hash-xof.js b/test/parallel/test-crypto-oneshot-hash-xof.js new file mode 100644 index 00000000000000..75cb4800ff1bd5 --- /dev/null +++ b/test/parallel/test-crypto-oneshot-hash-xof.js @@ -0,0 +1,122 @@ +'use strict'; +// This tests crypto.hash() works. +const common = require('../common'); + +if (!common.hasCrypto) common.skip('missing crypto'); + +const assert = require('assert'); +const crypto = require('crypto'); + +// Test XOF hash functions and the outputLength option. +{ + // Default outputLengths. + assert.strictEqual( + crypto.hash('shake128', ''), + '7f9c2ba4e88f827d616045507605853e' + ); + + assert.strictEqual( + crypto.hash('shake256', ''), + '46b9dd2b0ba88d13233b3feb743eeb243fcd52ea62b81b82b50c27646ed5762f' + ); + + // outputEncoding as an option. + assert.strictEqual( + crypto.hash('shake128', '', { outputEncoding: 'base64url' }), + 'f5wrpOiPgn1hYEVQdgWFPg' + ); + + assert.strictEqual( + crypto.hash('shake256', '', { outputEncoding: 'base64url' }), + 'RrndKwuojRMjOz_rdD7rJD_NUupiuBuCtQwnZG7Vdi8' + ); + + assert.deepStrictEqual( + crypto.hash('shake128', '', { outputEncoding: 'buffer' }), + Buffer.from('f5wrpOiPgn1hYEVQdgWFPg', 'base64url') + ); + + assert.deepStrictEqual( + crypto.hash('shake256', '', { outputEncoding: 'buffer' }), + Buffer.from('RrndKwuojRMjOz_rdD7rJD_NUupiuBuCtQwnZG7Vdi8', 'base64url') + ); + + // Short outputLengths. + assert.strictEqual(crypto.hash('shake128', '', { outputLength: 0 }), ''); + assert.deepStrictEqual(crypto.hash('shake128', '', { outputEncoding: 'buffer', outputLength: 0 }), + Buffer.alloc(0)); + + assert.strictEqual( + crypto.hash('shake128', '', { outputLength: 5 }), + crypto.createHash('shake128', { outputLength: 5 }).update('').digest('hex') + ); + // Check length + assert.strictEqual( + crypto.hash('shake128', '', { outputLength: 5 }).length, + crypto.createHash('shake128', { outputLength: 5 }).update('').digest('hex') + .length + ); + + assert.strictEqual( + crypto.hash('shake128', '', { outputLength: 15 }), + crypto.createHash('shake128', { outputLength: 15 }).update('').digest('hex') + ); + // Check length + assert.strictEqual( + crypto.hash('shake128', '', { outputLength: 15 }).length, + crypto.createHash('shake128', { outputLength: 15 }).update('').digest('hex') + .length + ); + + assert.strictEqual( + crypto.hash('shake256', '', { outputLength: 16 }), + crypto.createHash('shake256', { outputLength: 16 }).update('').digest('hex') + ); + // Check length + assert.strictEqual( + crypto.hash('shake256', '', { outputLength: 16 }).length, + crypto.createHash('shake256', { outputLength: 16 }).update('').digest('hex') + .length + ); + + // Large outputLengths. + assert.strictEqual( + crypto.hash('shake128', '', { outputLength: 128 }), + crypto + .createHash('shake128', { outputLength: 128 }).update('') + .digest('hex') + ); + // Check length without encoding + assert.strictEqual( + crypto.hash('shake128', '', { outputLength: 128 }).length, + crypto + .createHash('shake128', { outputLength: 128 }).update('') + .digest('hex').length + ); + assert.strictEqual( + crypto.hash('shake256', '', { outputLength: 128 }), + crypto + .createHash('shake256', { outputLength: 128 }).update('') + .digest('hex') + ); + + const actual = crypto.hash('shake256', 'The message is shorter than the hash!', { outputLength: 1024 * 1024 }); + const expected = crypto + .createHash('shake256', { + outputLength: 1024 * 1024, + }) + .update('The message is shorter than the hash!') + .digest('hex'); + assert.strictEqual(actual, expected); + + // Non-XOF hash functions should accept valid outputLength options as well. + assert.strictEqual(crypto.hash('sha224', '', { outputLength: 28 }), + 'd14a028c2a3a2bc9476102bb288234c4' + + '15a2b01f828ea62ac5b3e42f'); + + // Non-XOF hash functions should fail when outputLength isn't their actual outputLength + assert.throws(() => crypto.hash('sha224', '', { outputLength: 32 }), + { message: 'Output length 32 is invalid for sha224, which does not support XOF' }); + assert.throws(() => crypto.hash('sha224', '', { outputLength: 0 }), + { message: 'Output length 0 is invalid for sha224, which does not support XOF' }); +} diff --git a/test/parallel/test-crypto-oneshot-hash.js b/test/parallel/test-crypto-oneshot-hash.js index 861aded5dd3f60..f6ac8656c94e79 100644 --- a/test/parallel/test-crypto-oneshot-hash.js +++ b/test/parallel/test-crypto-oneshot-hash.js @@ -8,7 +8,6 @@ if (!common.hasCrypto) const assert = require('assert'); const crypto = require('crypto'); const fixtures = require('../common/fixtures'); -const { hasOpenSSL } = require('../common/crypto'); const fs = require('fs'); // Test errors for invalid arguments. @@ -20,7 +19,7 @@ const fs = require('fs'); assert.throws(() => { crypto.hash('sha1', invalid); }, { code: 'ERR_INVALID_ARG_TYPE' }); }); -[null, true, 1, () => {}, {}].forEach((invalid) => { +[0, 1, NaN, true, Symbol(0)].forEach((invalid) => { assert.throws(() => { crypto.hash('sha1', 'test', invalid); }, { code: 'ERR_INVALID_ARG_TYPE' }); }); @@ -32,9 +31,6 @@ const methods = crypto.getHashes(); const input = fs.readFileSync(fixtures.path('utf8_test_text.txt')); for (const method of methods) { - // Skip failing tests on OpenSSL 3.4.0 - if (method.startsWith('shake') && hasOpenSSL(3, 4)) - continue; for (const outputEncoding of ['buffer', 'hex', 'base64', undefined]) { const oldDigest = crypto.createHash(method).update(input).digest(outputEncoding || 'hex'); const digestFromBuffer = crypto.hash(method, input, outputEncoding); diff --git a/test/parallel/test-fs-chown-negative-one.js b/test/parallel/test-fs-chown-negative-one.js new file mode 100644 index 00000000000000..092d4782d1154f --- /dev/null +++ b/test/parallel/test-fs-chown-negative-one.js @@ -0,0 +1,32 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const fs = require('fs'); +const path = require('path'); +const tmpdir = require('../common/tmpdir'); + +tmpdir.refresh(); + +const testFile = path.join(tmpdir.path, 'chown-test-file.txt'); + +fs.writeFileSync(testFile, 'test content for chown'); + +const stats = fs.statSync(testFile); +const uid = stats.uid; +const gid = stats.gid; + +// -1 for uid and gid means "don't change the value" +{ + fs.chown(testFile, -1, -1, common.mustSucceed(() => { + const stats = fs.statSync(testFile); + assert.strictEqual(stats.uid, uid); + assert.strictEqual(stats.gid, gid); + })); +} +{ + fs.chownSync(testFile, -1, -1); + const stats = fs.statSync(testFile); + assert.strictEqual(stats.uid, uid); + assert.strictEqual(stats.gid, gid); +} diff --git a/test/parallel/test-fs-existssync-memleak-longpath.js b/test/parallel/test-fs-existssync-memleak-longpath.js new file mode 100644 index 00000000000000..90617badc96d33 --- /dev/null +++ b/test/parallel/test-fs-existssync-memleak-longpath.js @@ -0,0 +1,47 @@ +// Flags: --expose-gc --expose-internals +'use strict'; + +const common = require('../common'); +const { checkIfCollectableByCounting } = require('../common/gc'); +const assert = require('assert'); +const fs = require('node:fs'); +const path = require('node:path'); +const tmpdir = require('../common/tmpdir'); +const { internalBinding } = require('internal/test/binding'); +const { FSReqCallback } = internalBinding('fs'); + +// The CVE primarily affects Windows but we should test on all platforms + +{ + tmpdir.refresh(); +} + +{ + const longFileNamePart = 'a'.repeat(200); + const fileName = tmpdir.resolve(`long-file-name-${longFileNamePart}-for-memory-leak-test.txt`); + fs.writeFileSync(fileName, 'test content', 'utf8'); + const fullPath = path.resolve(fileName); + + assert(fs.existsSync(fullPath), 'Test file should exist'); + + async function runTest() { + try { + await checkIfCollectableByCounting( + () => { + for (let i = 0; i < 10; i++) { + fs.existsSync(fullPath); + } + return 10; + }, + FSReqCallback, + 10 + ); + } catch (err) { + assert.ifError(err, 'Memory leak detected: FSReqCallback objects were not collected'); + } finally { + tmpdir.refresh(); + } + } + + runTest().then(common.mustCall()); +} diff --git a/test/parallel/test-fs-fchown-negative-one.js b/test/parallel/test-fs-fchown-negative-one.js new file mode 100644 index 00000000000000..e88b3a2428fd09 --- /dev/null +++ b/test/parallel/test-fs-fchown-negative-one.js @@ -0,0 +1,42 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const fs = require('fs'); +const path = require('path'); +const tmpdir = require('../common/tmpdir'); + +tmpdir.refresh(); + +const testFilePath = path.join(tmpdir.path, 'fchown-test-file.txt'); + +fs.writeFileSync(testFilePath, 'test content for fchown'); + +{ + const fd = fs.openSync(testFilePath, 'r+'); + const stats = fs.fstatSync(fd); + const uid = stats.uid; + const gid = stats.gid; + + fs.fchown(fd, -1, -1, common.mustSucceed(() => { + const stats = fs.fstatSync(fd); + assert.strictEqual(stats.uid, uid); + assert.strictEqual(stats.gid, gid); + fs.closeSync(fd); + })); +} + +// Test sync fchown with -1 values +{ + const fd = fs.openSync(testFilePath, 'r+'); + const stats = fs.fstatSync(fd); + const uid = stats.uid; + const gid = stats.gid; + + fs.fchownSync(fd, -1, -1); + const statsAfter = fs.fstatSync(fd); + assert.strictEqual(statsAfter.uid, uid); + assert.strictEqual(statsAfter.gid, gid); + + fs.closeSync(fd); +} diff --git a/test/parallel/test-fs-lchown-negative-one.js b/test/parallel/test-fs-lchown-negative-one.js new file mode 100644 index 00000000000000..d681f3e429b3d2 --- /dev/null +++ b/test/parallel/test-fs-lchown-negative-one.js @@ -0,0 +1,34 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const fs = require('fs'); +const path = require('path'); +const tmpdir = require('../common/tmpdir'); + +tmpdir.refresh(); + +const testFile = path.join(tmpdir.path, 'lchown-test-file.txt'); +const testLink = path.join(tmpdir.path, 'lchown-test-link'); + +fs.writeFileSync(testFile, 'test content for lchown'); +fs.symlinkSync(testFile, testLink); + +const stats = fs.lstatSync(testLink); +const uid = stats.uid; +const gid = stats.gid; + +// -1 for uid and gid means "don't change the value" +{ + fs.lchown(testLink, -1, -1, common.mustSucceed(() => { + const stats = fs.lstatSync(testLink); + assert.strictEqual(stats.uid, uid); + assert.strictEqual(stats.gid, gid); + })); +} +{ + fs.lchownSync(testLink, -1, -1); + const stats = fs.lstatSync(testLink); + assert.strictEqual(stats.uid, uid); + assert.strictEqual(stats.gid, gid); +} diff --git a/test/parallel/test-fs-mkdtempDisposableSync.js b/test/parallel/test-fs-mkdtempDisposableSync.js new file mode 100644 index 00000000000000..62a96c71b9330f --- /dev/null +++ b/test/parallel/test-fs-mkdtempDisposableSync.js @@ -0,0 +1,92 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const fs = require('fs'); +const path = require('path'); +const { isMainThread } = require('worker_threads'); + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +// Basic usage +{ + const result = fs.mkdtempDisposableSync(tmpdir.resolve('foo.')); + + assert.strictEqual(path.basename(result.path).length, 'foo.XXXXXX'.length); + assert.strictEqual(path.dirname(result.path), tmpdir.path); + assert(fs.existsSync(result.path)); + + result.remove(); + + assert(!fs.existsSync(result.path)); + + // Second removal does not throw error + result.remove(); +} + +// Usage with [Symbol.dispose]() +{ + const result = fs.mkdtempDisposableSync(tmpdir.resolve('foo.')); + + assert(fs.existsSync(result.path)); + + result[Symbol.dispose](); + + assert(!fs.existsSync(result.path)); + + // Second removal does not throw error + result[Symbol.dispose](); +} + +// `chdir`` does not affect removal +// Can't use chdir in workers +if (isMainThread) { + const originalCwd = process.cwd(); + + process.chdir(tmpdir.path); + const first = fs.mkdtempDisposableSync('first.'); + const second = fs.mkdtempDisposableSync('second.'); + + const fullFirstPath = path.join(tmpdir.path, first.path); + const fullSecondPath = path.join(tmpdir.path, second.path); + + assert(fs.existsSync(fullFirstPath)); + assert(fs.existsSync(fullSecondPath)); + + process.chdir(fullFirstPath); + second.remove(); + + assert(!fs.existsSync(fullSecondPath)); + + process.chdir(tmpdir.path); + first.remove(); + assert(!fs.existsSync(fullFirstPath)); + + process.chdir(originalCwd); +} + +// Errors from cleanup are thrown +// It is difficult to arrange for rmdir to fail on windows +if (!common.isWindows) { + const base = fs.mkdtempDisposableSync(tmpdir.resolve('foo.')); + + // On Unix we can prevent removal by making the parent directory read-only + const child = fs.mkdtempDisposableSync(path.join(base.path, 'bar.')); + + const originalMode = fs.statSync(base.path).mode; + fs.chmodSync(base.path, 0o444); + + assert.throws(() => { + child.remove(); + }, /EACCES|EPERM/); + + fs.chmodSync(base.path, originalMode); + + // Removal works once permissions are reset + child.remove(); + assert(!fs.existsSync(child.path)); + + base.remove(); + assert(!fs.existsSync(base.path)); +} diff --git a/test/parallel/test-fs-opendir.js b/test/parallel/test-fs-opendir.js index 625a0f75d02c10..5e3a92dab42f2f 100644 --- a/test/parallel/test-fs-opendir.js +++ b/test/parallel/test-fs-opendir.js @@ -4,12 +4,20 @@ const common = require('../common'); const assert = require('assert'); const fs = require('fs'); const path = require('path'); +const process = require('node:process'); const tmpdir = require('../common/tmpdir'); const testDir = tmpdir.path; const files = ['empty', 'files', 'for', 'just', 'testing']; +process.on('warning', (cause) => { + // If any directory handle was left unclosed and then GC'd, + // it will emit `Warning: Closing directory handle on garbage collection`. + // Treat this warning as error. + throw new Error('Expected no warnings', { cause }); +}); + // Make sure tmp directory is clean tmpdir.refresh(); @@ -18,6 +26,13 @@ files.forEach(function(filename) { fs.closeSync(fs.openSync(path.join(testDir, filename), 'w')); }); +function assertDir(dir) { + assert(dir instanceof fs.Dir); + assert.throws(() => dir.constructor.prototype.path, { + code: 'ERR_INVALID_THIS', + }); +} + function assertDirent(dirent) { assert(dirent instanceof fs.Dirent); assert.strictEqual(dirent.isFile(), true); @@ -45,6 +60,7 @@ const invalidCallbackObj = { // Check the opendir Sync version { const dir = fs.opendirSync(testDir); + assertDir(dir); const entries = files.map(() => { const dirent = dir.readSync(); assertDirent(dirent); @@ -67,6 +83,7 @@ const invalidCallbackObj = { // Check the opendir async version fs.opendir(testDir, common.mustSucceed((dir) => { + assertDir(dir); let sync = true; dir.read(common.mustSucceed((dirent) => { assert(!sync); @@ -120,6 +137,7 @@ fs.opendir(__filename, common.mustCall(function(e) { async function doPromiseTest() { // Check the opendir Promise version const dir = await fs.promises.opendir(testDir); + assertDir(dir); const entries = []; let i = files.length; @@ -219,6 +237,7 @@ for (const bufferSize of ['', '1', null]) { async function doAsyncIterInvalidCallbackTest() { const dir = await fs.promises.opendir(testDir); assert.throws(() => dir.close('not function'), invalidCallbackObj); + dir.close(); } doAsyncIterInvalidCallbackTest().then(common.mustCall()); @@ -247,6 +266,7 @@ doConcurrentAsyncAndSyncOps().then(common.mustCall()); { const dir = fs.opendirSync(testDir); assert.throws(() => dir.read('INVALID_CALLBACK'), /ERR_INVALID_ARG_TYPE/); + dir.close(); } // Check that concurrent read() operations don't do weird things. diff --git a/test/parallel/test-fs-promises-mkdtempDisposable.js b/test/parallel/test-fs-promises-mkdtempDisposable.js new file mode 100644 index 00000000000000..154bc0d62c8d8c --- /dev/null +++ b/test/parallel/test-fs-promises-mkdtempDisposable.js @@ -0,0 +1,97 @@ +'use strict'; + +const common = require('../common'); +const assert = require('assert'); +const fs = require('fs'); +const fsPromises = require('fs/promises'); +const path = require('path'); +const { isMainThread } = require('worker_threads'); + +const tmpdir = require('../common/tmpdir'); +tmpdir.refresh(); + +async function basicUsage() { + const result = await fsPromises.mkdtempDisposable(tmpdir.resolve('foo.')); + + assert.strictEqual(path.basename(result.path).length, 'foo.XXXXXX'.length); + assert.strictEqual(path.dirname(result.path), tmpdir.path); + assert(fs.existsSync(result.path)); + + await result.remove(); + + assert(!fs.existsSync(result.path)); + + // Second removal does not throw error + result.remove(); +} + +async function symbolAsyncDispose() { + const result = await fsPromises.mkdtempDisposable(tmpdir.resolve('foo.')); + + assert(fs.existsSync(result.path)); + + await result[Symbol.asyncDispose](); + + assert(!fs.existsSync(result.path)); + + // Second removal does not throw error + await result[Symbol.asyncDispose](); +} + +async function chdirDoesNotAffectRemoval() { + // Can't use chdir in workers + if (!isMainThread) return; + + const originalCwd = process.cwd(); + + process.chdir(tmpdir.path); + const first = await fsPromises.mkdtempDisposable('first.'); + const second = await fsPromises.mkdtempDisposable('second.'); + + const fullFirstPath = path.join(tmpdir.path, first.path); + const fullSecondPath = path.join(tmpdir.path, second.path); + + assert(fs.existsSync(fullFirstPath)); + assert(fs.existsSync(fullSecondPath)); + + process.chdir(fullFirstPath); + await second.remove(); + + assert(!fs.existsSync(fullSecondPath)); + + process.chdir(tmpdir.path); + await first.remove(); + assert(!fs.existsSync(fullFirstPath)); + + process.chdir(originalCwd); +} + +async function errorsAreReThrown() { + // It is difficult to arrange for rmdir to fail on windows + if (common.isWindows) return; + const base = await fsPromises.mkdtempDisposable(tmpdir.resolve('foo.')); + + // On Unix we can prevent removal by making the parent directory read-only + const child = await fsPromises.mkdtempDisposable(path.join(base.path, 'bar.')); + + const originalMode = fs.statSync(base.path).mode; + fs.chmodSync(base.path, 0o444); + + await assert.rejects(child.remove(), /EACCES|EPERM/); + + fs.chmodSync(base.path, originalMode); + + // Removal works once permissions are reset + await child.remove(); + assert(!fs.existsSync(child.path)); + + await base.remove(); + assert(!fs.existsSync(base.path)); +} + +(async () => { + await basicUsage(); + await symbolAsyncDispose(); + await chdirDoesNotAffectRemoval(); + await errorsAreReThrown(); +})().then(common.mustCall()); diff --git a/test/parallel/test-fs-write-stream-autoclose-option.js b/test/parallel/test-fs-write-stream-autoclose-option.js index fe738091bd6c68..ded45a42945e17 100644 --- a/test/parallel/test-fs-write-stream-autoclose-option.js +++ b/test/parallel/test-fs-write-stream-autoclose-option.js @@ -56,3 +56,7 @@ function next3() { })); })); } + +assert.throws(() => fs.WriteStream.prototype.autoClose, { + code: 'ERR_INVALID_THIS', +}); diff --git a/test/parallel/test-http-proxy-fetch.js b/test/parallel/test-http-proxy-fetch.js index dc59a331630662..7e2f7c2eca5ee9 100644 --- a/test/parallel/test-http-proxy-fetch.js +++ b/test/parallel/test-http-proxy-fetch.js @@ -23,15 +23,16 @@ const { createProxyServer, checkProxiedRequest } = require('../common/proxy-serv const serverHost = `localhost:${server.address().port}`; // FIXME(undici:4083): undici currently always tunnels the request over - // CONNECT, no matter it's HTTP traffic or not, which is different from e.g. - // how curl behaves. + // CONNECT if proxyTunnel is not explicitly set to false, but what we + // need is for it to be automatically false for HTTP requests to be + // consistent with curl. const expectedLogs = [{ method: 'CONNECT', url: serverHost, headers: { - // FIXME(undici:4086): this should be keep-alive. - connection: 'close', - host: serverHost + 'connection': 'close', + 'host': serverHost, + 'proxy-connection': 'keep-alive' } }]; diff --git a/test/parallel/test-https-proxy-fetch.js b/test/parallel/test-https-proxy-fetch.js index e043e01338e299..b4dab4e3eebb6b 100644 --- a/test/parallel/test-https-proxy-fetch.js +++ b/test/parallel/test-https-proxy-fetch.js @@ -33,9 +33,9 @@ const { createProxyServer, checkProxiedRequest } = require('../common/proxy-serv method: 'CONNECT', url: serverHost, headers: { - // FIXME(undici:4086): this should be keep-alive. - connection: 'close', - host: serverHost + 'connection': 'close', + 'host': serverHost, + 'proxy-connection': 'keep-alive' } }]; diff --git a/test/parallel/test-inspector-network-fetch.js b/test/parallel/test-inspector-network-fetch.js index cc16667c54a02d..02d6b584fbcfd3 100644 --- a/test/parallel/test-inspector-network-fetch.js +++ b/test/parallel/test-inspector-network-fetch.js @@ -1,10 +1,11 @@ -// Flags: --inspect=0 --experimental-network-inspection +// Flags: --inspect=0 --experimental-network-inspection --expose-internals 'use strict'; const common = require('../common'); common.skipIfInspectorDisabled(); const assert = require('node:assert'); +const { once } = require('node:events'); const { addresses } = require('../common/internet'); const fixtures = require('../common/fixtures'); const http = require('node:http'); @@ -12,8 +13,8 @@ const https = require('node:https'); const inspector = require('node:inspector/promises'); // Disable certificate validation for the global fetch. -const undici = require('../../deps/undici/src/index.js'); -undici.setGlobalDispatcher(new undici.Agent({ +const undici = require('internal/deps/undici/undici'); +undici.setGlobalDispatcher(new undici.EnvHttpProxyAgent({ connect: { rejectUnauthorized: false, }, @@ -42,11 +43,19 @@ const setResponseHeaders = (res) => { const handleRequest = (req, res) => { const path = req.url; switch (path) { - case '/hello-world': + case '/hello-world': { setResponseHeaders(res); - res.writeHead(200); - res.end('hello world\n'); + const chunks = []; + req.on('data', (chunk) => { + chunks.push(chunk); + }); + req.on('end', () => { + assert.strictEqual(Buffer.concat(chunks).toString(), 'foobar'); + res.writeHead(200); + res.end('hello world\n'); + }); break; + } default: assert(false, `Unexpected path: ${path}`); } @@ -73,127 +82,126 @@ function findFrameInInitiator(scriptName, initiator) { return frame; } -const testHttpGet = () => new Promise((resolve, reject) => { - session.on('Network.requestWillBeSent', common.mustCall(({ params }) => { - assert.ok(params.requestId.startsWith('node-network-event-')); - assert.strictEqual(params.request.url, `http://127.0.0.1:${httpServer.address().port}/hello-world`); - assert.strictEqual(params.request.method, 'GET'); - assert.strictEqual(typeof params.request.headers, 'object'); - assert.strictEqual(params.request.headers['accept-language'], 'en-US'); - assert.strictEqual(params.request.headers.cookie, 'k1=v1; k2=v2'); - assert.strictEqual(params.request.headers.age, '1000'); - assert.strictEqual(params.request.headers['x-header1'], 'value1, value2'); - assert.strictEqual(typeof params.timestamp, 'number'); - assert.strictEqual(typeof params.wallTime, 'number'); - - assert.strictEqual(typeof params.initiator, 'object'); - assert.strictEqual(params.initiator.type, 'script'); - assert.ok(findFrameInInitiator(__filename, params.initiator)); - })); - session.on('Network.responseReceived', common.mustCall(({ params }) => { - assert.ok(params.requestId.startsWith('node-network-event-')); - assert.strictEqual(typeof params.timestamp, 'number'); - assert.strictEqual(params.type, 'Fetch'); - assert.strictEqual(params.response.status, 200); - assert.strictEqual(params.response.statusText, 'OK'); - assert.strictEqual(params.response.url, `http://127.0.0.1:${httpServer.address().port}/hello-world`); - assert.strictEqual(typeof params.response.headers, 'object'); - assert.strictEqual(params.response.headers.server, 'node'); - assert.strictEqual(params.response.headers.etag, '12345'); - assert.strictEqual(params.response.headers['Set-Cookie'], 'key1=value1\nkey2=value2'); - assert.strictEqual(params.response.headers['x-header2'], 'value1, value2'); - assert.strictEqual(params.response.mimeType, 'text/plain'); - assert.strictEqual(params.response.charset, 'utf-8'); - })); - session.on('Network.loadingFinished', common.mustCall(({ params }) => { - assert.ok(params.requestId.startsWith('node-network-event-')); - assert.strictEqual(typeof params.timestamp, 'number'); - resolve(); - })); - - fetch(`http://127.0.0.1:${httpServer.address().port}/hello-world`, { - headers: requestHeaders, - }).then(common.mustCall()); -}); +function verifyRequestWillBeSent({ method, params }, expect) { + assert.strictEqual(method, 'Network.requestWillBeSent'); + + assert.ok(params.requestId.startsWith('node-network-event-')); + assert.strictEqual(params.request.url, expect.url); + assert.strictEqual(params.request.method, expect.method); + assert.strictEqual(typeof params.request.headers, 'object'); + assert.strictEqual(params.request.headers['accept-language'], 'en-US'); + assert.strictEqual(params.request.headers.cookie, 'k1=v1; k2=v2'); + assert.strictEqual(params.request.headers.age, '1000'); + assert.strictEqual(params.request.headers['x-header1'], 'value1, value2'); + assert.strictEqual(typeof params.timestamp, 'number'); + assert.strictEqual(typeof params.wallTime, 'number'); + + assert.strictEqual(typeof params.initiator, 'object'); + assert.strictEqual(params.initiator.type, 'script'); + assert.ok(findFrameInInitiator(__filename, params.initiator)); + + return params; +} + +function verifyResponseReceived({ method, params }, expect) { + assert.strictEqual(method, 'Network.responseReceived'); + + assert.ok(params.requestId.startsWith('node-network-event-')); + assert.strictEqual(typeof params.timestamp, 'number'); + assert.strictEqual(params.type, 'Fetch'); + assert.strictEqual(params.response.status, 200); + assert.strictEqual(params.response.statusText, 'OK'); + assert.strictEqual(params.response.url, expect.url); + assert.strictEqual(typeof params.response.headers, 'object'); + assert.strictEqual(params.response.headers.server, 'node'); + assert.strictEqual(params.response.headers.etag, '12345'); + assert.strictEqual(params.response.headers['Set-Cookie'], 'key1=value1\nkey2=value2'); + assert.strictEqual(params.response.headers['x-header2'], 'value1, value2'); + assert.strictEqual(params.response.mimeType, 'text/plain'); + assert.strictEqual(params.response.charset, 'utf-8'); + + return params; +} + +function verifyLoadingFinished({ method, params }) { + assert.strictEqual(method, 'Network.loadingFinished'); + + assert.ok(params.requestId.startsWith('node-network-event-')); + assert.strictEqual(typeof params.timestamp, 'number'); + return params; +} + +function verifyLoadingFailed({ method, params }) { + assert.strictEqual(method, 'Network.loadingFailed'); + + assert.ok(params.requestId.startsWith('node-network-event-')); + assert.strictEqual(typeof params.timestamp, 'number'); + assert.strictEqual(params.type, 'Fetch'); + assert.strictEqual(typeof params.errorText, 'string'); +} + +async function testRequest(url) { + const requestWillBeSentFuture = once(session, 'Network.requestWillBeSent') + .then(([event]) => verifyRequestWillBeSent(event, { url, method: 'POST' })); + + const responseReceivedFuture = once(session, 'Network.responseReceived') + .then(([event]) => verifyResponseReceived(event, { url })); -const testHttpsGet = () => new Promise((resolve, reject) => { - session.on('Network.requestWillBeSent', common.mustCall(({ params }) => { - assert.ok(params.requestId.startsWith('node-network-event-')); - assert.strictEqual(params.request.url, `https://127.0.0.1:${httpsServer.address().port}/hello-world`); - assert.strictEqual(params.request.method, 'GET'); - assert.strictEqual(typeof params.request.headers, 'object'); - assert.strictEqual(params.request.headers['accept-language'], 'en-US'); - assert.strictEqual(params.request.headers.cookie, 'k1=v1; k2=v2'); - assert.strictEqual(params.request.headers.age, '1000'); - assert.strictEqual(params.request.headers['x-header1'], 'value1, value2'); - assert.strictEqual(typeof params.timestamp, 'number'); - assert.strictEqual(typeof params.wallTime, 'number'); - })); - session.on('Network.responseReceived', common.mustCall(({ params }) => { - assert.ok(params.requestId.startsWith('node-network-event-')); - assert.strictEqual(typeof params.timestamp, 'number'); - assert.strictEqual(params.type, 'Fetch'); - assert.strictEqual(params.response.status, 200); - assert.strictEqual(params.response.statusText, 'OK'); - assert.strictEqual(params.response.url, `https://127.0.0.1:${httpsServer.address().port}/hello-world`); - assert.strictEqual(typeof params.response.headers, 'object'); - assert.strictEqual(params.response.headers.server, 'node'); - assert.strictEqual(params.response.headers.etag, '12345'); - assert.strictEqual(params.response.headers['Set-Cookie'], 'key1=value1\nkey2=value2'); - assert.strictEqual(params.response.headers['x-header2'], 'value1, value2'); - assert.strictEqual(params.response.mimeType, 'text/plain'); - assert.strictEqual(params.response.charset, 'utf-8'); - })); - session.on('Network.loadingFinished', common.mustCall(({ params }) => { - assert.ok(params.requestId.startsWith('node-network-event-')); - assert.strictEqual(typeof params.timestamp, 'number'); - resolve(); - })); - - fetch(`https://127.0.0.1:${httpsServer.address().port}/hello-world`, { + const loadingFinishedFuture = once(session, 'Network.loadingFinished') + .then(([event]) => verifyLoadingFinished(event)); + + await fetch(url, { + method: 'POST', + body: 'foobar', headers: requestHeaders, - }).then(common.mustCall()); -}); + }); -const testHttpError = () => new Promise((resolve, reject) => { - session.on('Network.requestWillBeSent', common.mustCall()); - session.on('Network.loadingFailed', common.mustCall(({ params }) => { - assert.ok(params.requestId.startsWith('node-network-event-')); - assert.strictEqual(typeof params.timestamp, 'number'); - assert.strictEqual(params.type, 'Fetch'); - assert.strictEqual(typeof params.errorText, 'string'); - resolve(); - })); - session.on('Network.responseReceived', common.mustNotCall()); - session.on('Network.loadingFinished', common.mustNotCall()); + await requestWillBeSentFuture; + const responseReceived = await responseReceivedFuture; + const loadingFinished = await loadingFinishedFuture; + assert.ok(loadingFinished.timestamp >= responseReceived.timestamp); - fetch(`http://${addresses.INVALID_HOST}`).catch(common.mustCall()); -}); + const requestBody = await session.post('Network.getRequestPostData', { + requestId: responseReceived.requestId, + }); + assert.strictEqual(requestBody.postData, 'foobar'); + const responseBody = await session.post('Network.getResponseBody', { + requestId: responseReceived.requestId, + }); + assert.strictEqual(responseBody.base64Encoded, false); + assert.strictEqual(responseBody.body, 'hello world\n'); +} -const testHttpsError = () => new Promise((resolve, reject) => { - session.on('Network.requestWillBeSent', common.mustCall()); - session.on('Network.loadingFailed', common.mustCall(({ params }) => { - assert.ok(params.requestId.startsWith('node-network-event-')); - assert.strictEqual(typeof params.timestamp, 'number'); - assert.strictEqual(params.type, 'Fetch'); - assert.strictEqual(typeof params.errorText, 'string'); - resolve(); - })); +async function testRequestError(url) { + const requestWillBeSentFuture = once(session, 'Network.requestWillBeSent') + .then(([event]) => verifyRequestWillBeSent(event, { url, method: 'GET' })); session.on('Network.responseReceived', common.mustNotCall()); session.on('Network.loadingFinished', common.mustNotCall()); - fetch(`https://${addresses.INVALID_HOST}`).catch(common.mustCall()); -}); + const loadingFailedFuture = once(session, 'Network.loadingFailed') + .then(([event]) => verifyLoadingFailed(event)); + + fetch(url, { + headers: requestHeaders, + }).catch(common.mustCall()); + + await requestWillBeSentFuture; + await loadingFailedFuture; +} const testNetworkInspection = async () => { - await testHttpGet(); + // HTTP + await testRequest(`http://127.0.0.1:${httpServer.address().port}/hello-world`); session.removeAllListeners(); - await testHttpsGet(); + // HTTPS + await testRequest(`https://127.0.0.1:${httpsServer.address().port}/hello-world`); session.removeAllListeners(); - await testHttpError(); + // HTTP with invalid host + await testRequestError(`http://${addresses.INVALID_HOST}/`); session.removeAllListeners(); - await testHttpsError(); + // HTTPS with invalid host + await testRequestError(`https://${addresses.INVALID_HOST}/`); session.removeAllListeners(); }; diff --git a/test/parallel/test-internal-module-wrap.js b/test/parallel/test-internal-module-wrap.js index 3839338bc2da98..760d717c69ef8c 100644 --- a/test/parallel/test-internal-module-wrap.js +++ b/test/parallel/test-internal-module-wrap.js @@ -14,7 +14,7 @@ const bar = new ModuleWrap('bar', undefined, 'export const five = 5', 0, 0); assert.strictEqual(moduleRequests.length, 1); assert.strictEqual(moduleRequests[0].specifier, 'bar'); - foo.link(['bar'], [bar]); + foo.link([bar]); foo.instantiate(); assert.strictEqual(await foo.evaluate(-1, false), undefined); diff --git a/test/parallel/test-permission-allow-addons-cli.js b/test/parallel/test-permission-allow-addons-cli.js index 342bdb6bc01e35..b86e4265fc0b57 100644 --- a/test/parallel/test-permission-allow-addons-cli.js +++ b/test/parallel/test-permission-allow-addons-cli.js @@ -19,3 +19,7 @@ const loadFixture = createRequire(fixtures.path('node_modules')); const msg = loadFixture('pkgexports/no-addons'); assert.strictEqual(msg, 'using native addons'); } + +{ + assert.ok(process.permission.has('addon')); +} diff --git a/test/parallel/test-permission-allow-child-process-cli.js b/test/parallel/test-permission-allow-child-process-cli.js index cf7e79e208d389..f2ec02f02f46f5 100644 --- a/test/parallel/test-permission-allow-child-process-cli.js +++ b/test/parallel/test-permission-allow-child-process-cli.js @@ -13,6 +13,7 @@ const assert = require('assert'); const childProcess = require('child_process'); const fs = require('fs'); +// Child Process (and fork) should inherit permission model flags if (process.argv[2] === 'child') { assert.throws(() => { fs.writeFileSync(__filename, 'should not write'); @@ -34,7 +35,12 @@ if (process.argv[2] === 'child') { // doesNotThrow childProcess.spawnSync(process.execPath, ['--version']); childProcess.execSync(...common.escapePOSIXShell`"${process.execPath}" --version`); + childProcess.execFileSync(process.execPath, ['--version']); + + // Guarantee permission model flags are inherited const child = childProcess.fork(__filename, ['child']); child.on('close', common.mustCall()); - childProcess.execFileSync(process.execPath, ['--version']); + + const { status } = childProcess.spawnSync(process.execPath, [__filename, 'child']); + assert.strictEqual(status, 0); } diff --git a/test/parallel/test-permission-child-process-inherit-flags.js b/test/parallel/test-permission-child-process-inherit-flags.js new file mode 100644 index 00000000000000..fb1506bf274f43 --- /dev/null +++ b/test/parallel/test-permission-child-process-inherit-flags.js @@ -0,0 +1,102 @@ +// Flags: --permission --allow-child-process --allow-fs-read=* --allow-worker +'use strict'; + +const common = require('../common'); +const { isMainThread } = require('worker_threads'); + +if (!isMainThread) { + common.skip('This test only works on a main thread'); +} + +const assert = require('assert'); +const childProcess = require('child_process'); + +{ + assert.ok(process.permission.has('child')); +} + +{ + assert.strictEqual(process.env.NODE_OPTIONS, undefined); +} + +{ + const { status, stdout } = childProcess.spawnSync(process.execPath, + [ + '-e', + ` + console.log(process.permission.has("fs.write")); + console.log(process.permission.has("fs.read")); + console.log(process.permission.has("child")); + console.log(process.permission.has("net")); + console.log(process.permission.has("worker")); + `, + ] + ); + const [fsWrite, fsRead, child, net, worker] = stdout.toString().split('\n'); + assert.strictEqual(status, 0); + assert.strictEqual(fsWrite, 'false'); + assert.strictEqual(fsRead, 'true'); + assert.strictEqual(child, 'true'); + assert.strictEqual(net, 'false'); + assert.strictEqual(worker, 'true'); +} + +// It should not override when --permission is passed +{ + const { status, stdout } = childProcess.spawnSync( + process.execPath, + [ + '--permission', + '--allow-fs-write=*', + '-e', + ` + console.log(process.permission.has("fs.write")); + console.log(process.permission.has("fs.read")); + console.log(process.permission.has("child")); + console.log(process.permission.has("net")); + console.log(process.permission.has("worker")); + `, + ] + ); + const [fsWrite, fsRead, child, net, worker] = stdout.toString().split('\n'); + assert.strictEqual(status, 0); + assert.strictEqual(fsWrite, 'true'); + assert.strictEqual(fsRead, 'false'); + assert.strictEqual(child, 'false'); + assert.strictEqual(net, 'false'); + assert.strictEqual(worker, 'false'); +} + +// It should not override when NODE_OPTIONS with --permission is passed +{ + const { status, stdout } = childProcess.spawnSync( + process.execPath, + [ + '-e', + ` + console.log(process.permission.has("fs.write")); + console.log(process.permission.has("fs.read")); + console.log(process.permission.has("child")); + console.log(process.permission.has("net")); + console.log(process.permission.has("worker")); + `, + ], + { + env: { + ...process.env, + 'NODE_OPTIONS': '--permission --allow-fs-write=*', + } + } + ); + const [fsWrite, fsRead, child, net, worker] = stdout.toString().split('\n'); + assert.strictEqual(status, 0); + assert.strictEqual(fsWrite, 'true'); + assert.strictEqual(fsRead, 'false'); + assert.strictEqual(child, 'false'); + assert.strictEqual(net, 'false'); + assert.strictEqual(worker, 'false'); +} + +{ + assert.strictEqual(process.env.NODE_OPTIONS, undefined); +} diff --git a/test/parallel/test-permission-fs-supported.js b/test/parallel/test-permission-fs-supported.js index 5797e191cd201a..a6cf9146c629c0 100644 --- a/test/parallel/test-permission-fs-supported.js +++ b/test/parallel/test-permission-fs-supported.js @@ -38,6 +38,7 @@ const supportedApis = [ ...syncAndAsyncAPI('open'), 'openAsBlob', ...syncAndAsyncAPI('mkdtemp'), + 'mkdtempDisposableSync', ...syncAndAsyncAPI('readdir'), ...syncAndAsyncAPI('readFile'), ...syncAndAsyncAPI('readlink'), diff --git a/test/parallel/test-permission-has.js b/test/parallel/test-permission-has.js index bf23af014c7a40..dd0da2d1d8046d 100644 --- a/test/parallel/test-permission-has.js +++ b/test/parallel/test-permission-has.js @@ -25,3 +25,13 @@ const assert = require('assert'); { assert.ok(!process.permission.has('FileSystemWrite', Buffer.from('reference'))); } + +{ + assert.ok(!process.permission.has('fs')); + assert.ok(process.permission.has('fs.read')); + assert.ok(!process.permission.has('fs.write')); + assert.ok(!process.permission.has('wasi')); + assert.ok(!process.permission.has('worker')); + assert.ok(!process.permission.has('inspector')); + assert.ok(!process.permission.has('addon')); +} diff --git a/test/parallel/test-repl-eval-error-after-close.js b/test/parallel/test-repl-eval-error-after-close.js new file mode 100644 index 00000000000000..6940f12ce009bd --- /dev/null +++ b/test/parallel/test-repl-eval-error-after-close.js @@ -0,0 +1,45 @@ +'use strict'; + +const common = require('../common'); +const repl = require('node:repl'); +const stream = require('node:stream'); +const assert = require('node:assert'); + +// This test checks that an eval function returning an error in its callback +// after the repl server has been closed doesn't cause an ERR_USE_AFTER_CLOSE +// error to be thrown (reference: https://github.com/nodejs/node/issues/58784) + +(async () => { + const close$ = Promise.withResolvers(); + const eval$ = Promise.withResolvers(); + + const input = new stream.PassThrough(); + const output = new stream.PassThrough(); + + const replServer = repl.start({ + input, + output, + eval(_cmd, _context, _file, cb) { + close$.promise.then(() => { + cb(new Error('Error returned from the eval callback')); + eval$.resolve(); + }); + }, + }); + + let outputStr = ''; + output.on('data', (data) => { + outputStr += data; + }); + + input.write('\n'); + + replServer.close(); + close$.resolve(); + + process.on('uncaughtException', common.mustNotCall()); + + await eval$.promise; + + assert.match(outputStr, /Uncaught Error: Error returned from the eval callback/); +})().then(common.mustCall()); diff --git a/test/parallel/test-repl-tab-complete-computed-props.js b/test/parallel/test-repl-tab-complete-computed-props.js index 753d01fdab017a..aee348b91223b2 100644 --- a/test/parallel/test-repl-tab-complete-computed-props.js +++ b/test/parallel/test-repl-tab-complete-computed-props.js @@ -109,6 +109,11 @@ describe('REPL tab object completion on computed properties', () => { [oneStr]: 1, ['Hello World']: 'hello world!', }; + + const lookupObj = { + stringLookup: helloWorldStr, + ['number lookup']: oneStr, + }; `, ]); }); @@ -126,5 +131,29 @@ describe('REPL tab object completion on computed properties', () => { input: 'obj[helloWorldStr].tolocaleup', expectedCompletions: ['obj[helloWorldStr].toLocaleUpperCase'], })); + + it('works with a simple inlined computed property', () => testCompletion(replServer, { + input: 'obj["Hello " + "World"].tolocaleup', + expectedCompletions: ['obj["Hello " + "World"].toLocaleUpperCase'], + })); + + it('works with a ternary inlined computed property', () => testCompletion(replServer, { + input: 'obj[(1 + 2 > 5) ? oneStr : "Hello " + "World"].toLocaleUpperCase', + expectedCompletions: ['obj[(1 + 2 > 5) ? oneStr : "Hello " + "World"].toLocaleUpperCase'], + })); + + it('works with an inlined computed property with a nested property lookup', () => + testCompletion(replServer, { + input: 'obj[lookupObj.stringLookup].tolocaleupp', + expectedCompletions: ['obj[lookupObj.stringLookup].toLocaleUpperCase'], + }) + ); + + it('works with an inlined computed property with a nested inlined computer property lookup', () => + testCompletion(replServer, { + input: 'obj[lookupObj["number" + " lookup"]].toFi', + expectedCompletions: ['obj[lookupObj["number" + " lookup"]].toFixed'], + }) + ); }); }); diff --git a/test/parallel/test-runner-cli.js b/test/parallel/test-runner-cli.js index c6c08bd7b8d81b..287e97861c9285 100644 --- a/test/parallel/test-runner-cli.js +++ b/test/parallel/test-runner-cli.js @@ -429,3 +429,52 @@ for (const isolation of ['none', 'process']) { assert.strictEqual(child.status, 0); assert.strictEqual(child.signal, null); } + +{ + // Should not propagate --experimental-config-file option to sub test in isolation process + const fixturePath = join(testFixtures, 'options-propagation'); + const args = [ + '--test-reporter=tap', + '--no-warnings', + `--experimental-config-file=node.config.json`, + '--expose-internals', + '--test', + ]; + const child = spawnSync(process.execPath, args, { cwd: fixturePath }); + + assert.strictEqual(child.stderr.toString(), ''); + const stdout = child.stdout.toString(); + + assert.match(stdout, /tests 1/); + assert.match(stdout, /suites 0/); + assert.match(stdout, /pass 1/); + assert.match(stdout, /fail 0/); + assert.match(stdout, /cancelled 0/); + assert.match(stdout, /skipped 0/); + assert.match(stdout, /todo 0/); + + + assert.strictEqual(child.status, 0); +} + +{ + if (process.features.inspector) { + // https://github.com/nodejs/node/issues/58828 + // Should not print report twice when --experimental-test-coverage is set via config file + const fixturePath = join(testFixtures, 'options-propagation'); + const args = [ + '--test-reporter=tap', + '--no-warnings', + `--experimental-config-file=node.config.json`, + '--expose-internals', + '--test', + ]; + + const child = spawnSync(process.execPath, args, { cwd: fixturePath }); + const stdout = child.stdout.toString(); + + const coverageReportMatches = stdout.match(/# start of coverage report/g); + assert.strictEqual(coverageReportMatches?.length, 1); + assert.strictEqual(child.stderr.toString(), ''); + } +} diff --git a/test/parallel/test-runner-run.mjs b/test/parallel/test-runner-run.mjs index 06ccf0643eba46..7ddd8c1dcd83e5 100644 --- a/test/parallel/test-runner-run.mjs +++ b/test/parallel/test-runner-run.mjs @@ -88,9 +88,11 @@ describe('require(\'node:test\').run', { concurrency: true }, () => { it('should support timeout', async () => { const stream = run({ timeout: 50, files: [ - fixtures.path('test-runner', 'timeout-basic.mjs'), + fixtures.path('test-runner', 'plan', 'timeout-basic.mjs'), ] }); - stream.on('test:fail', common.mustCall(1)); + stream.on('test:fail', common.mustCall((data) => { + assert.strictEqual(data.details.error.failureType, 'testTimeoutFailure'); + }, 2)); stream.on('test:pass', common.mustNotCall()); // eslint-disable-next-line no-unused-vars for await (const _ of stream); diff --git a/test/parallel/test-runner-watch-mode-kill-signal.mjs b/test/parallel/test-runner-watch-mode-kill-signal.mjs new file mode 100644 index 00000000000000..d59f4522fadc7f --- /dev/null +++ b/test/parallel/test-runner-watch-mode-kill-signal.mjs @@ -0,0 +1,131 @@ +import * as common from '../common/index.mjs'; +import { describe, it, beforeEach } from 'node:test'; +import assert from 'node:assert'; +import { spawn } from 'node:child_process'; +import { writeFileSync } from 'node:fs'; +import tmpdir from '../common/tmpdir.js'; + +if (common.isWindows) { + common.skip('no signals on Windows'); +} + +if (common.isIBMi) { + common.skip('IBMi does not support `fs.watch()`'); +} + +if (common.isAIX) { + common.skip('folder watch capability is limited in AIX.'); +} + +const indexContents = ` + process.on('SIGTERM', () => { console.log('__SIGTERM received__'); process.exit(); }); + process.on('SIGINT', () => { console.log('__SIGINT received__'); process.exit(); }); + process.send('script ready'); + setTimeout(() => {}, 100_000); +`; + +let indexPath = ''; + +function refresh() { + tmpdir.refresh(); + indexPath = tmpdir.resolve('index.js'); + writeFileSync(indexPath, indexContents); +} + +describe('test runner watch mode with --watch-kill-signal', () => { + beforeEach(refresh); + + it('defaults to SIGTERM', async () => { + const child = spawn( + process.execPath, + ['--watch', indexPath], + { + cwd: tmpdir.path, + stdio: ['pipe', 'pipe', 'pipe', 'ipc'], + } + ); + + let stdout = ''; + child.stdout.on('data', (data) => { + stdout += `${data}`; + if (/__(SIGINT|SIGTERM) received__/.test(stdout)) { + child.kill(); + } + }); + + child.on('message', (msg) => { + if (msg === 'script ready') { + writeFileSync(indexPath, indexContents); + } + }); + + await new Promise((resolve) => + child.on('exit', () => { + resolve(); + }) + ); + + assert.match(stdout, /__SIGTERM received__/); + assert.doesNotMatch(stdout, /__SIGINT received__/); + }); + + it('can be overridden (to SIGINT)', async () => { + const child = spawn( + process.execPath, + ['--watch', '--watch-kill-signal', 'SIGINT', indexPath], + { + cwd: tmpdir.path, + stdio: ['pipe', 'pipe', 'pipe', 'ipc'], + } + ); + + let stdout = ''; + child.stdout.on('data', (data) => { + stdout += `${data}`; + if (/__(SIGINT|SIGTERM) received__/.test(stdout)) { + child.kill(); + } + }); + + child.on('message', (msg) => { + if (msg === 'script ready') { + writeFileSync(indexPath, indexContents); + } + }); + + await new Promise((resolve) => + child.on('exit', () => { + resolve(); + }) + ); + + assert.match(stdout, /__SIGINT received__/); + assert.doesNotMatch(stdout, /__SIGTERM received__/); + }); + + it('errors if an invalid signal is provided', async () => { + const currentRun = Promise.withResolvers(); + const child = spawn( + process.execPath, + ['--watch', '--watch-kill-signal', 'invalid_signal', indexPath], + { + cwd: tmpdir.path, + } + ); + let stdout = ''; + + child.stderr.on('data', (data) => { + stdout += data.toString(); + currentRun.resolve(); + }); + + await currentRun.promise; + + assert.match( + stdout, + new RegExp( + /TypeError \[ERR_UNKNOWN_SIGNAL\]: Unknown signal: invalid_signal/ + ) + ); + }); +}); diff --git a/test/parallel/test-sqlite-database-sync.js b/test/parallel/test-sqlite-database-sync.js index b7a6718cd99a34..5b34dec4cc220f 100644 --- a/test/parallel/test-sqlite-database-sync.js +++ b/test/parallel/test-sqlite-database-sync.js @@ -174,6 +174,113 @@ suite('DatabaseSync() constructor', () => { t.after(() => { db.close(); }); db.exec('SELECT "foo";'); }); + + test('throws if options.readBigInts is provided but is not a boolean', (t) => { + t.assert.throws(() => { + new DatabaseSync('foo', { readBigInts: 42 }); + }, { + code: 'ERR_INVALID_ARG_TYPE', + message: 'The "options.readBigInts" argument must be a boolean.', + }); + }); + + test('allows reading big integers', (t) => { + const dbPath = nextDb(); + const db = new DatabaseSync(dbPath, { readBigInts: true }); + t.after(() => { db.close(); }); + + const setup = db.exec(` + CREATE TABLE data(key INTEGER PRIMARY KEY, val INTEGER) STRICT; + INSERT INTO data (key, val) VALUES (1, 42); + `); + t.assert.strictEqual(setup, undefined); + + const query = db.prepare('SELECT val FROM data'); + t.assert.deepStrictEqual(query.get(), { __proto__: null, val: 42n }); + + const insert = db.prepare('INSERT INTO data (key) VALUES (?)'); + t.assert.deepStrictEqual( + insert.run(20), + { changes: 1n, lastInsertRowid: 20n }, + ); + }); + + test('throws if options.returnArrays is provided but is not a boolean', (t) => { + t.assert.throws(() => { + new DatabaseSync('foo', { returnArrays: 42 }); + }, { + code: 'ERR_INVALID_ARG_TYPE', + message: 'The "options.returnArrays" argument must be a boolean.', + }); + }); + + test('allows returning arrays', (t) => { + const dbPath = nextDb(); + const db = new DatabaseSync(dbPath, { returnArrays: true }); + t.after(() => { db.close(); }); + const setup = db.exec(` + CREATE TABLE data(key INTEGER PRIMARY KEY, val TEXT) STRICT; + INSERT INTO data (key, val) VALUES (1, 'one'); + INSERT INTO data (key, val) VALUES (2, 'two'); + `); + t.assert.strictEqual(setup, undefined); + + const query = db.prepare('SELECT key, val FROM data WHERE key = 1'); + t.assert.deepStrictEqual(query.get(), [1, 'one']); + }); + + test('throws if options.allowBareNamedParameters is provided but is not a boolean', (t) => { + t.assert.throws(() => { + new DatabaseSync('foo', { allowBareNamedParameters: 42 }); + }, { + code: 'ERR_INVALID_ARG_TYPE', + message: 'The "options.allowBareNamedParameters" argument must be a boolean.', + }); + }); + + test('throws if bare named parameters are used when option is false', (t) => { + const dbPath = nextDb(); + const db = new DatabaseSync(dbPath, { allowBareNamedParameters: false }); + t.after(() => { db.close(); }); + const setup = db.exec( + 'CREATE TABLE data(key INTEGER PRIMARY KEY, val INTEGER) STRICT;' + ); + t.assert.strictEqual(setup, undefined); + + const stmt = db.prepare('INSERT INTO data (key, val) VALUES ($k, $v)'); + t.assert.throws(() => { + stmt.run({ k: 2, v: 4 }); + }, { + code: 'ERR_INVALID_STATE', + message: /Unknown named parameter 'k'/, + }); + }); + + test('throws if options.allowUnknownNamedParameters is provided but is not a boolean', (t) => { + t.assert.throws(() => { + new DatabaseSync('foo', { allowUnknownNamedParameters: 42 }); + }, { + code: 'ERR_INVALID_ARG_TYPE', + message: 'The "options.allowUnknownNamedParameters" argument must be a boolean.', + }); + }); + + test('allows unknown named parameters', (t) => { + const dbPath = nextDb(); + const db = new DatabaseSync(dbPath, { allowUnknownNamedParameters: true }); + t.after(() => { db.close(); }); + const setup = db.exec( + 'CREATE TABLE data(key INTEGER, val INTEGER) STRICT;' + ); + t.assert.strictEqual(setup, undefined); + + const stmt = db.prepare('INSERT INTO data (key, val) VALUES ($k, $v)'); + const params = { $a: 1, $b: 2, $k: 42, $y: 25, $v: 84, $z: 99 }; + t.assert.deepStrictEqual( + stmt.run(params), + { changes: 1, lastInsertRowid: 1 }, + ); + }); }); suite('DatabaseSync.prototype.open()', () => { diff --git a/test/parallel/test-tick-processor-arguments.js b/test/parallel/test-tick-processor-arguments.js index 28c1c68fe3704e..1448ea46dbaeb4 100644 --- a/test/parallel/test-tick-processor-arguments.js +++ b/test/parallel/test-tick-processor-arguments.js @@ -16,7 +16,7 @@ tmpdir.refresh(); spawnSync(process.execPath, [ '--prof', '-p', '42' ], { cwd: tmpdir.path }); const files = fs.readdirSync(tmpdir.path); -const logfile = files.filter((name) => /\.log$/.test(name))[0]; +const logfile = files.find((name) => /\.log$/.test(name)); assert(logfile); // Make sure that the --preprocess argument is passed through correctly, diff --git a/test/parallel/test-vm-module-errors.js b/test/parallel/test-vm-module-errors.js index 2828a8138841e5..4cd2eedd9a817b 100644 --- a/test/parallel/test-vm-module-errors.js +++ b/test/parallel/test-vm-module-errors.js @@ -237,23 +237,29 @@ function checkInvalidCachedData() { } function checkGettersErrors() { - const expectedError = { code: 'ERR_INVALID_THIS' }; + const expectedError = { name: 'TypeError' }; const getters = ['identifier', 'context', 'namespace', 'status', 'error']; getters.forEach((getter) => { assert.throws(() => { // eslint-disable-next-line no-unused-expressions Module.prototype[getter]; - }, expectedError); + }, expectedError, `Module.prototype.${getter} should throw`); assert.throws(() => { // eslint-disable-next-line no-unused-expressions SourceTextModule.prototype[getter]; - }, expectedError); + }, expectedError, `SourceTextModule.prototype.${getter} should throw`); + }); + + const sourceTextModuleGetters = [ + 'moduleRequests', + 'dependencySpecifiers', + ]; + sourceTextModuleGetters.forEach((getter) => { + assert.throws(() => { + // eslint-disable-next-line no-unused-expressions + SourceTextModule.prototype[getter]; + }, expectedError, `SourceTextModule.prototype.${getter} should throw`); }); - // `dependencySpecifiers` getter is just part of SourceTextModule - assert.throws(() => { - // eslint-disable-next-line no-unused-expressions - SourceTextModule.prototype.dependencySpecifiers; - }, expectedError); } const finished = common.mustCall(); diff --git a/test/parallel/test-vm-module-modulerequests.js b/test/parallel/test-vm-module-modulerequests.js new file mode 100644 index 00000000000000..87fb34cae3823e --- /dev/null +++ b/test/parallel/test-vm-module-modulerequests.js @@ -0,0 +1,101 @@ +'use strict'; + +// Flags: --experimental-vm-modules --js-source-phase-imports + +require('../common'); +const assert = require('node:assert'); +const { + SourceTextModule, +} = require('node:vm'); +const test = require('node:test'); + +test('SourceTextModule.moduleRequests should return module requests', (t) => { + const m = new SourceTextModule(` + import { foo } from './foo.js'; + import { bar } from './bar.json' with { type: 'json' }; + import { quz } from './quz.js' with { attr1: 'quz' }; + import { quz as quz2 } from './quz.js' with { attr2: 'quark', attr3: 'baz' }; + import source Module from './source-module'; + export { foo, bar, quz, quz2 }; + `); + + const requests = m.moduleRequests; + assert.strictEqual(requests.length, 5); + assert.deepStrictEqual(requests[0], { + __proto__: null, + specifier: './foo.js', + attributes: { + __proto__: null, + }, + phase: 'evaluation', + }); + assert.deepStrictEqual(requests[1], { + __proto__: null, + specifier: './bar.json', + attributes: { + __proto__: null, + type: 'json' + }, + phase: 'evaluation', + }); + assert.deepStrictEqual(requests[2], { + __proto__: null, + specifier: './quz.js', + attributes: { + __proto__: null, + attr1: 'quz', + }, + phase: 'evaluation', + }); + assert.deepStrictEqual(requests[3], { + __proto__: null, + specifier: './quz.js', + attributes: { + __proto__: null, + attr2: 'quark', + attr3: 'baz', + }, + phase: 'evaluation', + }); + assert.deepStrictEqual(requests[4], { + __proto__: null, + specifier: './source-module', + attributes: { + __proto__: null, + }, + phase: 'source', + }); + + // Check the deprecated dependencySpecifiers property. + // The dependencySpecifiers items are not unique. + assert.deepStrictEqual(m.dependencySpecifiers, [ + './foo.js', + './bar.json', + './quz.js', + './quz.js', + './source-module', + ]); +}); + +test('SourceTextModule.moduleRequests items are frozen', (t) => { + const m = new SourceTextModule(` + import { foo } from './foo.js'; + `); + + const requests = m.moduleRequests; + assert.strictEqual(requests.length, 1); + + const propertyNames = ['specifier', 'attributes', 'phase']; + for (const propertyName of propertyNames) { + assert.throws(() => { + requests[0][propertyName] = 'bar.js'; + }, { + name: 'TypeError', + }); + } + assert.throws(() => { + requests[0].attributes.type = 'json'; + }, { + name: 'TypeError', + }); +}); diff --git a/test/parallel/test-worker-message-port-transfer-fake-js-transferable-internal.js b/test/parallel/test-worker-message-port-transfer-fake-js-transferable-internal.js index 87e34f054b24f7..46895871e0a179 100644 --- a/test/parallel/test-worker-message-port-transfer-fake-js-transferable-internal.js +++ b/test/parallel/test-worker-message-port-transfer-fake-js-transferable-internal.js @@ -13,7 +13,7 @@ const { once } = require('events'); assert.strictEqual(fh.constructor.name, 'FileHandle'); const kTransfer = Object.getOwnPropertySymbols(Object.getPrototypeOf(fh)) - .filter((symbol) => symbol.description === 'messaging_transfer_symbol')[0]; + .find((symbol) => symbol.description === 'messaging_transfer_symbol'); assert.strictEqual(typeof kTransfer, 'symbol'); fh[kTransfer] = () => { return { diff --git a/test/parallel/test-worker-message-port-transfer-fake-js-transferable.js b/test/parallel/test-worker-message-port-transfer-fake-js-transferable.js index 494adbb9e2bc7c..7153ebc4d2f801 100644 --- a/test/parallel/test-worker-message-port-transfer-fake-js-transferable.js +++ b/test/parallel/test-worker-message-port-transfer-fake-js-transferable.js @@ -17,7 +17,7 @@ module.exports = { assert.strictEqual(fh.constructor.name, 'FileHandle'); const kTransfer = Object.getOwnPropertySymbols(Object.getPrototypeOf(fh)) - .filter((symbol) => symbol.description === 'messaging_transfer_symbol')[0]; + .find((symbol) => symbol.description === 'messaging_transfer_symbol'); assert.strictEqual(typeof kTransfer, 'symbol'); fh[kTransfer] = () => { return { diff --git a/test/pseudo-tty/test-tty-color-support.js b/test/pseudo-tty/test-tty-color-support.js index 6b122d85789951..6a2e2a3a88fdf1 100644 --- a/test/pseudo-tty/test-tty-color-support.js +++ b/test/pseudo-tty/test-tty-color-support.js @@ -61,7 +61,13 @@ const writeStream = new WriteStream(fd); [{ TERM: 'ansi' }, 4], [{ TERM: 'ANSI' }, 4], [{ TERM: 'color' }, 4], + [{ TERM: 'linux' }, 4], + [{ TERM: 'fail' }, 1], + [{ TERM: 'color', NO_COLOR: '' }, 4], + [{ TERM: 'color', NODE_DISABLE_COLORS: '' }, 4], [{ TERM: 'color', NODE_DISABLE_COLORS: '1' }, 1], + [{ TERM: 'color', NODE_DISABLE_COLORS: 0 }, 1], + [{ TERM: 'color', NODE_DISABLE_COLORS: null }, 1], [{ TERM: 'console' }, 4], [{ TERM: 'direct' }, 4], [{ TERM: 'dumb' }, 1], @@ -78,7 +84,9 @@ const writeStream = new WriteStream(fd); [{ NO_COLOR: '1', FORCE_COLOR: '2' }, 8], [{ NODE_DISABLE_COLORS: '1', FORCE_COLOR: '3' }, 24], [{ NO_COLOR: '1', COLORTERM: '24bit' }, 1], - [{ NO_COLOR: '', COLORTERM: '24bit' }, 1], + [{ NO_COLOR: '', COLORTERM: '24bit' }, 24], + [{ NO_COLOR: null, COLORTERM: '24bit' }, 1], + [{ NO_COLOR: 0, COLORTERM: '24bit' }, 1], [{ TMUX: '1', FORCE_COLOR: 0 }, 1], [{ NO_COLOR: 'true', FORCE_COLOR: 0, COLORTERM: 'truecolor' }, 1], [{ TERM: 'xterm-256color', COLORTERM: 'truecolor' }, 24], diff --git a/test/sequential/test-heapdump.js b/test/sequential/test-heapdump.js index f9df88375ae596..013da83125313c 100644 --- a/test/sequential/test-heapdump.js +++ b/test/sequential/test-heapdump.js @@ -10,6 +10,7 @@ if (!isMainThread) { const { writeHeapSnapshot, getHeapSnapshot } = require('v8'); const assert = require('assert'); const fs = require('fs'); +const { promises: { pipeline }, PassThrough } = require('stream'); const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); @@ -78,3 +79,13 @@ process.chdir(tmpdir.path); JSON.parse(data); })); } + +{ + const passthrough = new PassThrough(); + passthrough.on('data', common.mustCallAtLeast(1)); + + pipeline( + getHeapSnapshot(), + passthrough, + ).then(common.mustCall()); +} diff --git a/test/wasi/Makefile b/test/wasi/Makefile index 14563feda50961..1cd041338d9b8e 100644 --- a/test/wasi/Makefile +++ b/test/wasi/Makefile @@ -6,6 +6,9 @@ CFLAGS = -D_WASI_EMULATED_PROCESS_CLOCKS -lwasi-emulated-process-clocks OBJ = $(patsubst c/%.c, wasm/%.wasm, $(wildcard c/*.c)) all: $(OBJ) +wasm/pthread.wasm : c/pthread.c + $(CC) $< $(CFLAGS) --target=wasm32-wasi-threads -pthread -matomics -mbulk-memory -Wl,--import-memory,--export-memory,--shared-memory,--max-memory=2147483648 --sysroot=$(SYSROOT) -s -o $@ + wasm/%.wasm : c/%.c $(CC) $< $(CFLAGS) --target=$(TARGET) --sysroot=$(SYSROOT) -s -o $@ diff --git a/test/wasi/c/pthread.c b/test/wasi/c/pthread.c new file mode 100644 index 00000000000000..90db34be87e950 --- /dev/null +++ b/test/wasi/c/pthread.c @@ -0,0 +1,24 @@ +#include +#include +#include + +void* worker(void* data) { + int* result = (int*) data; + sleep(1); + *result = 42; + return NULL; +} + +int main() { + pthread_t thread = NULL; + int result = 0; + + int r = pthread_create(&thread, NULL, worker, &result); + assert(r == 0); + + r = pthread_join(thread, NULL); + assert(r == 0); + + assert(result == 42); + return 0; +} diff --git a/test/wasi/test-wasi.js b/test/wasi/test-wasi.js index 9be57adc9d7360..9dd583fc5bdcb9 100644 --- a/test/wasi/test-wasi.js +++ b/test/wasi/test-wasi.js @@ -26,3 +26,4 @@ testWasiPreview1(['preopen_populates']); testWasiPreview1(['stat']); testWasiPreview1(['sock']); testWasiPreview1(['write_file']); +testWasiPreview1(['--target=wasm32-wasip1-threads', 'pthread']); diff --git a/test/wasi/wasm/pthread.wasm b/test/wasi/wasm/pthread.wasm new file mode 100755 index 00000000000000..5eba9ff10b15d8 Binary files /dev/null and b/test/wasi/wasm/pthread.wasm differ diff --git a/tools/doc/type-parser.mjs b/tools/doc/type-parser.mjs index adf320af6e1989..1a54eb29d15f27 100644 --- a/tools/doc/type-parser.mjs +++ b/tools/doc/type-parser.mjs @@ -1,4 +1,5 @@ -const jsDocPrefix = 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/'; +const mdnPrefix = 'https://developer.mozilla.org/en-US/docs/Web'; +const jsDocPrefix = `${mdnPrefix}/JavaScript/`; const jsDataStructuresUrl = `${jsDocPrefix}Data_structures`; const jsPrimitives = { @@ -32,8 +33,7 @@ const customTypesMap = { 'AbortController': 'globals.html#class-abortcontroller', 'AbortSignal': 'globals.html#class-abortsignal', - 'ArrayBufferView': - 'https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView', + 'ArrayBufferView': `${mdnPrefix}/API/ArrayBufferView`, 'AsyncIterator': 'https://tc39.github.io/ecma262/#sec-asynciterator-interface', @@ -46,6 +46,8 @@ const customTypesMap = { 'bigint': `${jsDocPrefix}Reference/Global_Objects/BigInt`, 'WebAssembly.Instance': `${jsDocPrefix}Reference/Global_Objects/WebAssembly/Instance`, + 'WebAssembly.Memory': + `${jsDocPrefix}Reference/Global_Objects/WebAssembly/Memory`, 'Blob': 'buffer.html#class-blob', 'File': 'buffer.html#class-file', @@ -137,6 +139,14 @@ const customTypesMap = { 'CustomEvent': 'events.html#class-customevent', 'EventListener': 'events.html#event-listener', + 'CloseEvent': `${mdnPrefix}/API/CloseEvent`, + 'EventSource': `${mdnPrefix}/API/EventSource`, + 'MessageEvent': `${mdnPrefix}/API/MessageEvent`, + + 'DOMException': `${mdnPrefix}/API/DOMException`, + 'Storage': `${mdnPrefix}/API/Storage`, + 'WebSocket': `${mdnPrefix}/API/WebSocket`, + 'FileHandle': 'fs.html#class-filehandle', 'fs.Dir': 'fs.html#class-fsdir', 'fs.Dirent': 'fs.html#class-fsdirent', @@ -248,6 +258,7 @@ const customTypesMap = { 'vm.Module': 'vm.html#class-vmmodule', 'vm.Script': 'vm.html#class-vmscript', 'vm.SourceTextModule': 'vm.html#class-vmsourcetextmodule', + 'ModuleRequest': 'vm.html#type-modulerequest', 'vm.constants.USE_MAIN_CONTEXT_DEFAULT_LOADER': 'vm.html#vmconstantsuse_main_context_default_loader', 'vm.constants.DONT_CONTEXTIFY': diff --git a/tools/eslint/package-lock.json b/tools/eslint/package-lock.json index f88cedb265186e..ca9b30ceb9f602 100644 --- a/tools/eslint/package-lock.json +++ b/tools/eslint/package-lock.json @@ -8,17 +8,17 @@ "name": "eslint-tools", "version": "0.0.0", "dependencies": { - "@babel/core": "^7.27.1", - "@babel/eslint-parser": "^7.27.1", + "@babel/core": "^7.27.7", + "@babel/eslint-parser": "^7.27.5", "@babel/plugin-proposal-explicit-resource-management": "^7.27.1", "@babel/plugin-syntax-import-attributes": "^7.27.1", "@babel/plugin-syntax-import-source": "^7.27.1", - "@stylistic/eslint-plugin": "^4.4.1", - "eslint": "^9.25.1", + "@stylistic/eslint-plugin": "^5.1.0", + "eslint": "^9.30.0", "eslint-formatter-tap": "^8.40.0", - "eslint-plugin-jsdoc": "^50.6.11", + "eslint-plugin-jsdoc": "^51.3.1", "eslint-plugin-markdown": "^5.1.0", - "globals": "^16.0.0" + "globals": "^16.3.0" } }, "node_modules/@ampproject/remapping": { @@ -58,21 +58,20 @@ } }, "node_modules/@babel/core": { - "version": "7.27.4", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.27.4.tgz", - "integrity": "sha512-bXYxrXFubeYdvB0NhD/NBB3Qi6aZeV20GOWVI47t2dkecCEoneR4NPVcb7abpXDEvejgrUfFtG6vG/zxAKmg+g==", - "license": "MIT", + "version": "7.27.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.27.7.tgz", + "integrity": "sha512-BU2f9tlKQ5CAthiMIgpzAh4eDTLWo1mqi9jqE2OxMG0E/OM199VJt2q8BztTxpnSW0i1ymdwLXRJnYzvDM5r2w==", "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.27.3", + "@babel/generator": "^7.27.5", "@babel/helper-compilation-targets": "^7.27.2", "@babel/helper-module-transforms": "^7.27.3", - "@babel/helpers": "^7.27.4", - "@babel/parser": "^7.27.4", + "@babel/helpers": "^7.27.6", + "@babel/parser": "^7.27.7", "@babel/template": "^7.27.2", - "@babel/traverse": "^7.27.4", - "@babel/types": "^7.27.3", + "@babel/traverse": "^7.27.7", + "@babel/types": "^7.27.7", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -88,10 +87,9 @@ } }, "node_modules/@babel/eslint-parser": { - "version": "7.27.1", - "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.27.1.tgz", - "integrity": "sha512-q8rjOuadH0V6Zo4XLMkJ3RMQ9MSBqwaDByyYB0izsYdaIWGNLmEblbCOf1vyFHICcg16CD7Fsi51vcQnYxmt6Q==", - "license": "MIT", + "version": "7.27.5", + "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.27.5.tgz", + "integrity": "sha512-HLkYQfRICudzcOtjGwkPvGc5nF1b4ljLZh1IRDj50lRZ718NAKVgQpIAUX8bfg6u/yuSKY3L7E0YzIV+OxrB8Q==", "dependencies": { "@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1", "eslint-visitor-keys": "^2.1.0", @@ -106,12 +104,11 @@ } }, "node_modules/@babel/generator": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.3.tgz", - "integrity": "sha512-xnlJYj5zepml8NXtjkG0WquFUv8RskFqyFcVgTBp5k+NaA/8uw/K+OSVf8AMGw5e9HKP2ETd5xpK5MLZQD6b4Q==", - "license": "MIT", + "version": "7.27.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.27.5.tgz", + "integrity": "sha512-ZGhA37l0e/g2s1Cnzdix0O3aLYm66eF8aufiVteOgnwxgnRP8GoyMj7VWsgWnQbVKXyge7hqrFh2K2TQM6t1Hw==", "dependencies": { - "@babel/parser": "^7.27.3", + "@babel/parser": "^7.27.5", "@babel/types": "^7.27.3", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", @@ -204,25 +201,23 @@ } }, "node_modules/@babel/helpers": { - "version": "7.27.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.4.tgz", - "integrity": "sha512-Y+bO6U+I7ZKaM5G5rDUZiYfUvQPUibYmAFe7EnKdnKBbVXDZxvp+MWOH5gYciY0EPk4EScsuFMQBbEfpdRKSCQ==", - "license": "MIT", + "version": "7.27.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.27.6.tgz", + "integrity": "sha512-muE8Tt8M22638HU31A3CgfSUciwz1fhATfoVai05aPXGor//CdWDCbnlY1yvBPo07njuVOCNGCSp/GTt12lIug==", "dependencies": { "@babel/template": "^7.27.2", - "@babel/types": "^7.27.3" + "@babel/types": "^7.27.6" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.27.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.4.tgz", - "integrity": "sha512-BRmLHGwpUqLFR2jzx9orBuX/ABDkj2jLKOXrHDTN2aOKL+jFDDKaRNo9nyYsIl9h/UE/7lMKdDjKQQyxKKDZ7g==", - "license": "MIT", + "version": "7.27.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.27.7.tgz", + "integrity": "sha512-qnzXzDXdr/po3bOTbTIQZ7+TxNKxpkN5IifVLXS+r7qwynkZfPyjZfE7hCXbo7IoO9TNcSyibgONsf2HauUd3Q==", "dependencies": { - "@babel/types": "^7.27.3" + "@babel/types": "^7.27.7" }, "bin": { "parser": "bin/babel-parser.js" @@ -307,16 +302,15 @@ } }, "node_modules/@babel/traverse": { - "version": "7.27.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.4.tgz", - "integrity": "sha512-oNcu2QbHqts9BtOWJosOVJapWjBDSxGCpFvikNR5TGDYDQf3JwpIoMzIKrvfoti93cLfPJEG4tH9SPVeyCGgdA==", - "license": "MIT", + "version": "7.27.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.27.7.tgz", + "integrity": "sha512-X6ZlfR/O/s5EQ/SnUSLzr+6kGnkg8HXGMzpgsMsrJVcfDtH1vIp6ctCN4eZ1LS5c0+te5Cb6Y514fASjMRJ1nw==", "dependencies": { "@babel/code-frame": "^7.27.1", - "@babel/generator": "^7.27.3", - "@babel/parser": "^7.27.4", + "@babel/generator": "^7.27.5", + "@babel/parser": "^7.27.7", "@babel/template": "^7.27.2", - "@babel/types": "^7.27.3", + "@babel/types": "^7.27.7", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -334,10 +328,9 @@ } }, "node_modules/@babel/types": { - "version": "7.27.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.3.tgz", - "integrity": "sha512-Y1GkI4ktrtvmawoSq+4FCVHNryea6uR+qUQy0AGxLSsjCX0nVmkYQMBLHDkXZuo5hGx7eYdnIaslsdBFm7zbUw==", - "license": "MIT", + "version": "7.27.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.27.7.tgz", + "integrity": "sha512-8OLQgDScAOHXnAz2cV+RfzzNMipuLVBz2biuAJFMV9bfkNf393je3VM8CLkjQodW5+iWsSJdSgSWT6rsZoXHPw==", "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.27.1" @@ -347,19 +340,18 @@ } }, "node_modules/@es-joy/jsdoccomment": { - "version": "0.50.2", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.50.2.tgz", - "integrity": "sha512-YAdE/IJSpwbOTiaURNCKECdAwqrJuFiZhylmesBcIRawtYKnBR2wxPhoIewMg+Yu+QuYvHfJNReWpoxGBKOChA==", - "license": "MIT", + "version": "0.52.0", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.52.0.tgz", + "integrity": "sha512-BXuN7BII+8AyNtn57euU2Yxo9yA/KUDNzrpXyi3pfqKmBhhysR6ZWOebFh3vyPoqA3/j1SOvGgucElMGwlXing==", "dependencies": { - "@types/estree": "^1.0.6", - "@typescript-eslint/types": "^8.11.0", + "@types/estree": "^1.0.8", + "@typescript-eslint/types": "^8.34.1", "comment-parser": "1.4.1", "esquery": "^1.6.0", "jsdoc-type-pratt-parser": "~4.1.0" }, "engines": { - "node": ">=18" + "node": ">=20.11.0" } }, "node_modules/@eslint-community/eslint-utils": { @@ -402,10 +394,9 @@ } }, "node_modules/@eslint/config-array": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.20.0.tgz", - "integrity": "sha512-fxlS1kkIjx8+vy2SjuCB94q3htSNrufYTXubwiBFeaQHbH6Ipi43gFJq2zCMt6PHhImH3Xmr0NksKDvchWlpQQ==", - "license": "Apache-2.0", + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.0.tgz", + "integrity": "sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==", "dependencies": { "@eslint/object-schema": "^2.1.6", "debug": "^4.3.1", @@ -416,10 +407,9 @@ } }, "node_modules/@eslint/config-helpers": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.2.2.tgz", - "integrity": "sha512-+GPzk8PlG0sPpzdU5ZvIRMPidzAnZDl/s9L+y13iodqvb8leL53bTannOrQ/Im7UkpsmFU5Ily5U60LWixnmLg==", - "license": "Apache-2.0", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.0.tgz", + "integrity": "sha512-ViuymvFmcJi04qdZeDc2whTHryouGcDlaxPqarTD0ZE10ISpxGUVZGZDx4w01upyIynL3iu6IXH2bS1NhclQMw==", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } @@ -472,10 +462,9 @@ } }, "node_modules/@eslint/js": { - "version": "9.28.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.28.0.tgz", - "integrity": "sha512-fnqSjGWd/CoIp4EXIxWVK/sHA6DOHN4+8Ix2cX5ycOY7LG0UY8nHCU5pIp2eaE1Mc7Qd8kHspYNzYXT2ojPLzg==", - "license": "MIT", + "version": "9.30.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.30.0.tgz", + "integrity": "sha512-Wzw3wQwPvc9sHM+NjakWTcPx11mbZyiYHuwWa/QfZ7cIRX7WK54PSk7bdyXDaoaopUcMatv1zaQvOAAO8hCdww==", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -487,7 +476,6 @@ "version": "2.1.6", "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", - "license": "Apache-2.0", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } @@ -623,50 +611,15 @@ "eslint-scope": "5.1.1" } }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, "node_modules/@stylistic/eslint-plugin": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-4.4.1.tgz", - "integrity": "sha512-CEigAk7eOLyHvdgmpZsKFwtiqS2wFwI1fn4j09IU9GmD4euFM4jEBAViWeCqaNLlbX2k2+A/Fq9cje4HQBXuJQ==", - "license": "MIT", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-5.1.0.tgz", + "integrity": "sha512-TJRJul4u/lmry5N/kyCU+7RWWOk0wyXN+BncRlDYBqpLFnzXkd7QGVfN7KewarFIXv0IX0jSF/Ksu7aHWEDeuw==", "dependencies": { - "@typescript-eslint/utils": "^8.32.1", - "eslint-visitor-keys": "^4.2.0", - "espree": "^10.3.0", + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/types": "^8.34.1", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", "estraverse": "^5.3.0", "picomatch": "^4.0.2" }, @@ -699,10 +652,9 @@ } }, "node_modules/@types/estree": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.7.tgz", - "integrity": "sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==", - "license": "MIT" + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==" }, "node_modules/@types/json-schema": { "version": "7.0.15", @@ -725,65 +677,10 @@ "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", "license": "MIT" }, - "node_modules/@typescript-eslint/project-service": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.34.0.tgz", - "integrity": "sha512-iEgDALRf970/B2YExmtPMPF54NenZUf4xpL3wsCRx/lgjz6ul/l13R81ozP/ZNuXfnLCS+oPmG7JIxfdNYKELw==", - "license": "MIT", - "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.34.0", - "@typescript-eslint/types": "^8.34.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.34.0.tgz", - "integrity": "sha512-9Ac0X8WiLykl0aj1oYQNcLZjHgBojT6cW68yAgZ19letYu+Hxd0rE0veI1XznSSst1X5lwnxhPbVdwjDRIomRw==", - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.34.0", - "@typescript-eslint/visitor-keys": "8.34.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.34.0.tgz", - "integrity": "sha512-+W9VYHKFIzA5cBeooqQxqNriAP0QeQ7xTiDuIOr71hzgffm3EL2hxwWBIIj4GuofIbKxGNarpKqIq6Q6YrShOA==", - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" - } - }, "node_modules/@typescript-eslint/types": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.34.0.tgz", - "integrity": "sha512-9V24k/paICYPniajHfJ4cuAWETnt7Ssy+R0Rbcqo5sSFr3QEZ/8TSoUi9XeXVBGXCaLtwTOKSLGcInCAvyZeMA==", - "license": "MIT", + "version": "8.35.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.35.1.tgz", + "integrity": "sha512-q/O04vVnKHfrrhNAscndAn1tuQhIkwqnaW+eu5waD5IPts2eX1dgJxgqcPx5BX109/qAz7IG6VrEPTOYKCNfRQ==", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -792,127 +689,10 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.34.0.tgz", - "integrity": "sha512-rOi4KZxI7E0+BMqG7emPSK1bB4RICCpF7QD3KCLXn9ZvWoESsOMlHyZPAHyG04ujVplPaHbmEvs34m+wjgtVtg==", - "license": "MIT", - "dependencies": { - "@typescript-eslint/project-service": "8.34.0", - "@typescript-eslint/tsconfig-utils": "8.34.0", - "@typescript-eslint/types": "8.34.0", - "@typescript-eslint/visitor-keys": "8.34.0", - "debug": "^4.3.4", - "fast-glob": "^3.3.2", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^2.1.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { - "version": "7.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", - "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.34.0.tgz", - "integrity": "sha512-8L4tWatGchV9A1cKbjaavS6mwYwp39jql8xUmIIKJdm+qiaeHy5KMKlBrf30akXAWBzn2SqKsNOtSENWUwg7XQ==", - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.34.0", - "@typescript-eslint/types": "8.34.0", - "@typescript-eslint/typescript-estree": "8.34.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.34.0.tgz", - "integrity": "sha512-qHV7pW7E85A0x6qyrFn+O+q1k1p3tQCsqIZ1KZ5ESLXY57aTvUd3/a4rdPTeXisvhXn2VQG0VSKUqs8KHF2zcA==", - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.34.0", - "eslint-visitor-keys": "^4.2.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", - "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", - "license": "Apache-2.0", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, "node_modules/acorn": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", - "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", - "license": "MIT", + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "bin": { "acorn": "bin/acorn" }, @@ -991,18 +771,6 @@ "concat-map": "0.0.1" } }, - "node_modules/braces": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", - "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", - "license": "MIT", - "dependencies": { - "fill-range": "^7.1.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/browserslist": { "version": "4.25.0", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.25.0.tgz", @@ -1132,7 +900,6 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==", - "license": "MIT", "engines": { "node": ">= 12.0.0" } @@ -1214,18 +981,17 @@ } }, "node_modules/eslint": { - "version": "9.28.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.28.0.tgz", - "integrity": "sha512-ocgh41VhRlf9+fVpe7QKzwLj9c92fDiqOj8Y3Sd4/ZmVA4Btx4PlUYPq4pp9JDyupkf1upbEXecxL2mwNV7jPQ==", - "license": "MIT", + "version": "9.30.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.30.0.tgz", + "integrity": "sha512-iN/SiPxmQu6EVkf+m1qpBxzUhE12YqFLOSySuOyVLJLEF9nzTf+h/1AJYc1JWzCnktggeNrjvQGLngDzXirU6g==", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", - "@eslint/config-array": "^0.20.0", - "@eslint/config-helpers": "^0.2.1", + "@eslint/config-array": "^0.21.0", + "@eslint/config-helpers": "^0.3.0", "@eslint/core": "^0.14.0", "@eslint/eslintrc": "^3.3.1", - "@eslint/js": "9.28.0", + "@eslint/js": "9.30.0", "@eslint/plugin-kit": "^0.3.1", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", @@ -1237,9 +1003,9 @@ "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^8.3.0", - "eslint-visitor-keys": "^4.2.0", - "espree": "^10.3.0", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -1286,24 +1052,23 @@ } }, "node_modules/eslint-plugin-jsdoc": { - "version": "50.7.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-50.7.1.tgz", - "integrity": "sha512-XBnVA5g2kUVokTNUiE1McEPse5n9/mNUmuJcx52psT6zBs2eVcXSmQBvjfa7NZdfLVSy3u1pEDDUxoxpwy89WA==", - "license": "BSD-3-Clause", + "version": "51.3.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-51.3.1.tgz", + "integrity": "sha512-9v/e6XyrLf1HIs/uPCgm3GcUpH4BeuGVZJk7oauKKyS7su7d5Q6zx4Fq6TiYh+w7+b4Svy7ZWVCcNZJNx3y52w==", "dependencies": { - "@es-joy/jsdoccomment": "~0.50.2", + "@es-joy/jsdoccomment": "~0.52.0", "are-docs-informative": "^0.0.2", "comment-parser": "1.4.1", "debug": "^4.4.1", "escape-string-regexp": "^4.0.0", - "espree": "^10.3.0", + "espree": "^10.4.0", "esquery": "^1.6.0", "parse-imports-exports": "^0.2.4", "semver": "^7.7.2", "spdx-expression-parse": "^4.0.0" }, "engines": { - "node": ">=18" + "node": ">=20.11.0" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" @@ -1359,10 +1124,9 @@ } }, "node_modules/eslint/node_modules/eslint-scope": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.3.0.tgz", - "integrity": "sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==", - "license": "BSD-2-Clause", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -1375,10 +1139,9 @@ } }, "node_modules/eslint/node_modules/eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", - "license": "Apache-2.0", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -1390,20 +1153,18 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } }, "node_modules/espree": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", - "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", - "license": "BSD-2-Clause", + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", "dependencies": { - "acorn": "^8.14.0", + "acorn": "^8.15.0", "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^4.2.0" + "eslint-visitor-keys": "^4.2.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1413,10 +1174,9 @@ } }, "node_modules/espree/node_modules/eslint-visitor-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", - "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", - "license": "Apache-2.0", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -1490,34 +1250,6 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "license": "MIT" }, - "node_modules/fast-glob": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", - "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.2", - "merge2": "^1.3.0", - "micromatch": "^4.0.8" - }, - "engines": { - "node": ">=8.6.0" - } - }, - "node_modules/fast-glob/node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "license": "ISC", - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -1530,15 +1262,6 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "license": "MIT" }, - "node_modules/fastq": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", - "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", - "license": "ISC", - "dependencies": { - "reusify": "^1.0.4" - } - }, "node_modules/file-entry-cache": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", @@ -1551,18 +1274,6 @@ "node": ">=16.0.0" } }, - "node_modules/fill-range": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", - "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -1620,10 +1331,9 @@ } }, "node_modules/globals": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-16.2.0.tgz", - "integrity": "sha512-O+7l9tPdHCU320IigZZPj5zmRCFG9xHmx9cU8FqU2Rp+JN714seHV+2S9+JslCpY4gJwU2vOGox0wzgae/MCEg==", - "license": "MIT", + "version": "16.3.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-16.3.0.tgz", + "integrity": "sha512-bqWEnJ1Nt3neqx2q5SFfGS8r/ahumIakg3HcwtNlrVlwXIeNumWn/c7Pn/wKzGhf6SaW6H6uWXLqC30STCMchQ==", "engines": { "node": ">=18" }, @@ -1739,15 +1449,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -1776,7 +1477,6 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.1.0.tgz", "integrity": "sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg==", - "license": "MIT", "engines": { "node": ">=12.0.0" } @@ -1902,15 +1602,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/merge2": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, "node_modules/micromark": { "version": "2.11.4", "resolved": "https://registry.npmjs.org/micromark/-/micromark-2.11.4.tgz", @@ -1931,31 +1622,6 @@ "parse-entities": "^2.0.0" } }, - "node_modules/micromatch": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", - "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", - "license": "MIT", - "dependencies": { - "braces": "^3.0.3", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/micromatch/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -2132,26 +1798,6 @@ "node": ">=6" } }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT" - }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -2161,39 +1807,6 @@ "node": ">=4" } }, - "node_modules/reusify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", - "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", - "license": "MIT", - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "MIT", - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, "node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -2270,30 +1883,6 @@ "node": ">=8" } }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/ts-api-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", - "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", - "license": "MIT", - "engines": { - "node": ">=18.12" - }, - "peerDependencies": { - "typescript": ">=4.8.4" - } - }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -2306,20 +1895,6 @@ "node": ">= 0.8.0" } }, - "node_modules/typescript": { - "version": "5.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz", - "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==", - "license": "Apache-2.0", - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, "node_modules/unist-util-stringify-position": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", diff --git a/tools/eslint/package.json b/tools/eslint/package.json index 4b49434ce691e1..abdea63ea06ef0 100644 --- a/tools/eslint/package.json +++ b/tools/eslint/package.json @@ -3,16 +3,16 @@ "version": "0.0.0", "private": true, "dependencies": { - "@babel/core": "^7.27.1", - "@babel/eslint-parser": "^7.27.1", + "@babel/core": "^7.27.7", + "@babel/eslint-parser": "^7.27.5", "@babel/plugin-syntax-import-attributes": "^7.27.1", "@babel/plugin-syntax-import-source": "^7.27.1", "@babel/plugin-proposal-explicit-resource-management": "^7.27.1", - "@stylistic/eslint-plugin": "^4.4.1", - "eslint": "^9.25.1", + "@stylistic/eslint-plugin": "^5.1.0", + "eslint": "^9.30.0", "eslint-formatter-tap": "^8.40.0", - "eslint-plugin-jsdoc": "^50.6.11", + "eslint-plugin-jsdoc": "^51.3.1", "eslint-plugin-markdown": "^5.1.0", - "globals": "^16.0.0" + "globals": "^16.3.0" } } diff --git a/tools/gyp/CHANGELOG.md b/tools/gyp/CHANGELOG.md index 3f676055a6a075..c1c1c5909dc729 100644 --- a/tools/gyp/CHANGELOG.md +++ b/tools/gyp/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [0.20.2](https://github.com/nodejs/gyp-next/compare/v0.20.1...v0.20.2) (2025-06-22) + + +### Bug Fixes + +* Python lint import-outside-top-level ruff rule PLC0415 ([#298](https://github.com/nodejs/gyp-next/issues/298)) ([34f4df6](https://github.com/nodejs/gyp-next/commit/34f4df614936ee6a056e47406ebbe7e3c1cb6540)) + +## [0.20.1](https://github.com/nodejs/gyp-next/compare/v0.20.0...v0.20.1) (2025-06-06) + + +### Bug Fixes + +* Ensure Consistent Order of build_files in WriteAutoRegenerationRule ([#293](https://github.com/nodejs/gyp-next/issues/293)) ([59b5903](https://github.com/nodejs/gyp-next/commit/59b59035f4ae63419343ffdafe0f0ff511ada17d)) +* ignore failure of `GetCompilerPredefines` ([#295](https://github.com/nodejs/gyp-next/issues/295)) ([0eaea29](https://github.com/nodejs/gyp-next/commit/0eaea297f0fbb0869597aa162f66f78eb2468fad)) + ## [0.20.0](https://github.com/nodejs/gyp-next/compare/v0.19.1...v0.20.0) (2025-03-27) diff --git a/tools/gyp/pylib/gyp/MSVSSettings.py b/tools/gyp/pylib/gyp/MSVSSettings.py index fea6e672865bfe..8f8f53bb71db0c 100644 --- a/tools/gyp/pylib/gyp/MSVSSettings.py +++ b/tools/gyp/pylib/gyp/MSVSSettings.py @@ -396,8 +396,7 @@ def _ValidateExclusionSetting(setting, settings, error_msg, stderr=sys.stderr): # This may be unrecognized because it's an exclusion list. If the # setting name has the _excluded suffix, then check the root name. unrecognized = True - m = re.match(_EXCLUDED_SUFFIX_RE, setting) - if m: + if m := re.match(_EXCLUDED_SUFFIX_RE, setting): root_setting = m.group(1) unrecognized = root_setting not in settings diff --git a/tools/gyp/pylib/gyp/MSVSVersion.py b/tools/gyp/pylib/gyp/MSVSVersion.py index 93f48bc05c8dc5..a34631b4529591 100644 --- a/tools/gyp/pylib/gyp/MSVSVersion.py +++ b/tools/gyp/pylib/gyp/MSVSVersion.py @@ -219,7 +219,7 @@ def _RegistryGetValueUsingWinReg(key, value): contents of the registry key's value, or None on failure. Throws ImportError if winreg is unavailable. """ - from winreg import HKEY_LOCAL_MACHINE, OpenKey, QueryValueEx + from winreg import HKEY_LOCAL_MACHINE, OpenKey, QueryValueEx # noqa: PLC0415 try: root, subkey = key.split("\\", 1) assert root == "HKLM" # Only need HKLM for now. @@ -552,8 +552,7 @@ def SelectVisualStudioVersion(version="auto", allow_fallback=True): "2019": ("16.0",), "2022": ("17.0",), } - override_path = os.environ.get("GYP_MSVS_OVERRIDE_PATH") - if override_path: + if override_path := os.environ.get("GYP_MSVS_OVERRIDE_PATH"): msvs_version = os.environ.get("GYP_MSVS_VERSION") if not msvs_version: raise ValueError( diff --git a/tools/gyp/pylib/gyp/__init__.py b/tools/gyp/pylib/gyp/__init__.py index 77800661a48c0e..efc15fc62f032c 100755 --- a/tools/gyp/pylib/gyp/__init__.py +++ b/tools/gyp/pylib/gyp/__init__.py @@ -489,7 +489,7 @@ def gyp_main(args): options, build_files_arg = parser.parse_args(args) if options.version: - import pkg_resources + import pkg_resources # noqa: PLC0415 print(f"v{pkg_resources.get_distribution('gyp-next').version}") return 0 build_files = build_files_arg diff --git a/tools/gyp/pylib/gyp/common.py b/tools/gyp/pylib/gyp/common.py index fbf1024fc38319..9431c432c893bc 100644 --- a/tools/gyp/pylib/gyp/common.py +++ b/tools/gyp/pylib/gyp/common.py @@ -421,8 +421,9 @@ def EnsureDirExists(path): except OSError: pass -def GetCrossCompilerPredefines(): # -> dict +def GetCompilerPredefines(): # -> dict cmd = [] + defines = {} # shlex.split() will eat '\' in posix mode, but # setting posix=False will preserve extra '"' cause CreateProcess fail on Windows @@ -439,7 +440,7 @@ def replace_sep(s): if CXXFLAGS := os.environ.get("CXXFLAGS"): cmd += shlex.split(replace_sep(CXXFLAGS)) else: - return {} + return defines if sys.platform == "win32": fd, input = tempfile.mkstemp(suffix=".c") @@ -450,17 +451,33 @@ def replace_sep(s): real_cmd, shell=True, capture_output=True, check=True ).stdout + except subprocess.CalledProcessError as e: + print( + "Warning: failed to get compiler predefines\n" + "cmd: %s\n" + "status: %d" % (e.cmd, e.returncode), + file=sys.stderr + ) + return defines finally: os.unlink(input) else: input = "/dev/null" real_cmd = [*cmd, "-dM", "-E", "-x", "c", input] - stdout = subprocess.run( - real_cmd, shell=False, - capture_output=True, check=True - ).stdout + try: + stdout = subprocess.run( + real_cmd, shell=False, + capture_output=True, check=True + ).stdout + except subprocess.CalledProcessError as e: + print( + "Warning: failed to get compiler predefines\n" + "cmd: %s\n" + "status: %d" % (e.cmd, e.returncode), + file=sys.stderr + ) + return defines - defines = {} lines = stdout.decode("utf-8").replace("\r\n", "\n").split("\n") for line in lines: if (line or "").startswith("#define "): @@ -499,7 +516,7 @@ def GetFlavor(params): if "flavor" in params: return params["flavor"] - defines = GetCrossCompilerPredefines() + defines = GetCompilerPredefines() if "__EMSCRIPTEN__" in defines: return "emscripten" if "__wasm__" in defines: @@ -566,7 +583,8 @@ def uniquer(seq, idfun=lambda x: x): # Based on http://code.activestate.com/recipes/576694/. -class OrderedSet(MutableSet): +class OrderedSet(MutableSet): # noqa: PLW1641 + # TODO (cclauss): Fix eq-without-hash ruff rule PLW1641 def __init__(self, iterable=None): self.end = end = [] end += [None, end, end] # sentinel node for doubly linked list diff --git a/tools/gyp/pylib/gyp/common_test.py b/tools/gyp/pylib/gyp/common_test.py index bd7172afaf3697..d25e621ab52640 100755 --- a/tools/gyp/pylib/gyp/common_test.py +++ b/tools/gyp/pylib/gyp/common_test.py @@ -7,6 +7,7 @@ """Unit tests for the common.py file.""" import os +import subprocess import sys import unittest from unittest.mock import MagicMock, patch @@ -85,22 +86,34 @@ def decode(self, encoding): @patch("os.close") @patch("os.unlink") @patch("tempfile.mkstemp") - def test_GetCrossCompilerPredefines(self, mock_mkstemp, mock_unlink, mock_close): + def test_GetCompilerPredefines(self, mock_mkstemp, mock_unlink, mock_close): mock_close.return_value = None mock_unlink.return_value = None mock_mkstemp.return_value = (0, "temp.c") - def mock_run(env, defines_stdout, expected_cmd): + def mock_run(env, defines_stdout, expected_cmd, throws=False): with patch("subprocess.run") as mock_run: - mock_process = MagicMock() - mock_process.returncode = 0 - mock_process.stdout = TestGetFlavor.MockCommunicate(defines_stdout) - mock_run.return_value = mock_process expected_input = "temp.c" if sys.platform == "win32" else "/dev/null" + if throws: + mock_run.side_effect = subprocess.CalledProcessError( + returncode=1, + cmd=[ + *expected_cmd, + "-dM", "-E", "-x", "c", expected_input + ] + ) + else: + mock_process = MagicMock() + mock_process.returncode = 0 + mock_process.stdout = TestGetFlavor.MockCommunicate(defines_stdout) + mock_run.return_value = mock_process with patch.dict(os.environ, env): - defines = gyp.common.GetCrossCompilerPredefines() + try: + defines = gyp.common.GetCompilerPredefines() + except Exception as e: + self.fail(f"GetCompilerPredefines raised an exception: {e}") flavor = gyp.common.GetFlavor({}) - if env.get("CC_target"): + if env.get("CC_target") or env.get("CC"): mock_run.assert_called_with( [ *expected_cmd, @@ -110,6 +123,9 @@ def mock_run(env, defines_stdout, expected_cmd): capture_output=True, check=True) return [defines, flavor] + [defines0, _] = mock_run({ "CC": "cl.exe" }, "", ["cl.exe"], True) + assert defines0 == {} + [defines1, _] = mock_run({}, "", []) assert defines1 == {} diff --git a/tools/gyp/pylib/gyp/generator/android.py b/tools/gyp/pylib/gyp/generator/android.py index 5ebe58bb556d80..cc02298e4e3438 100644 --- a/tools/gyp/pylib/gyp/generator/android.py +++ b/tools/gyp/pylib/gyp/generator/android.py @@ -900,8 +900,7 @@ def WriteTarget( if self.type != "none": self.WriteTargetFlags(spec, configs, link_deps) - settings = spec.get("aosp_build_settings", {}) - if settings: + if settings := spec.get("aosp_build_settings", {}): self.WriteLn("### Set directly by aosp_build_settings.") for k, v in settings.items(): if isinstance(v, list): diff --git a/tools/gyp/pylib/gyp/generator/cmake.py b/tools/gyp/pylib/gyp/generator/cmake.py index e69103e1b9ba3f..db8cc6e026f372 100644 --- a/tools/gyp/pylib/gyp/generator/cmake.py +++ b/tools/gyp/pylib/gyp/generator/cmake.py @@ -810,8 +810,7 @@ def WriteTarget( # link directories to targets defined after it is called. # As a result, link_directories must come before the target definition. # CMake unfortunately has no means of removing entries from LINK_DIRECTORIES. - library_dirs = config.get("library_dirs") - if library_dirs is not None: + if (library_dirs := config.get("library_dirs")) is not None: output.write("link_directories(") for library_dir in library_dirs: output.write(" ") @@ -1295,8 +1294,7 @@ def CallGenerateOutputForConfig(arglist): def GenerateOutput(target_list, target_dicts, data, params): - user_config = params.get("generator_flags", {}).get("config", None) - if user_config: + if user_config := params.get("generator_flags", {}).get("config", None): GenerateOutputForConfig(target_list, target_dicts, data, params, user_config) else: config_names = target_dicts[target_list[0]]["configurations"] diff --git a/tools/gyp/pylib/gyp/generator/eclipse.py b/tools/gyp/pylib/gyp/generator/eclipse.py index ed6daa91bac3e7..be7ecd8b3b03be 100644 --- a/tools/gyp/pylib/gyp/generator/eclipse.py +++ b/tools/gyp/pylib/gyp/generator/eclipse.py @@ -451,8 +451,7 @@ def GenerateOutput(target_list, target_dicts, data, params): if params["options"].generator_output: raise NotImplementedError("--generator_output not implemented for eclipse") - user_config = params.get("generator_flags", {}).get("config", None) - if user_config: + if user_config := params.get("generator_flags", {}).get("config", None): GenerateOutputForConfig(target_list, target_dicts, data, params, user_config) else: config_names = target_dicts[target_list[0]]["configurations"] diff --git a/tools/gyp/pylib/gyp/generator/make.py b/tools/gyp/pylib/gyp/generator/make.py index e860479069abaa..7118492e77f763 100644 --- a/tools/gyp/pylib/gyp/generator/make.py +++ b/tools/gyp/pylib/gyp/generator/make.py @@ -78,7 +78,7 @@ def CalculateVariables(default_variables, params): # Copy additional generator configuration data from Xcode, which is shared # by the Mac Make generator. - import gyp.generator.xcode as xcode_generator + import gyp.generator.xcode as xcode_generator # noqa: PLC0415 global generator_additional_non_configuration_keys generator_additional_non_configuration_keys = getattr( @@ -1465,8 +1465,7 @@ def WriteSources( order_only=True, ) - pchdeps = precompiled_header.GetObjDependencies(compilable, objs) - if pchdeps: + if pchdeps := precompiled_header.GetObjDependencies(compilable, objs): self.WriteLn("# Dependencies from obj files to their precompiled headers") for source, obj, gch in pchdeps: self.WriteLn(f"{obj}: {gch}") @@ -1600,8 +1599,7 @@ def ComputeOutputBasename(self, spec): target_prefix = spec.get("product_prefix", target_prefix) target = spec.get("product_name", target) - product_ext = spec.get("product_extension") - if product_ext: + if product_ext := spec.get("product_extension"): target_ext = "." + product_ext return target_prefix + target + target_ext @@ -2383,7 +2381,7 @@ def WriteAutoRegenerationRule(params, root_makefile, makefile_name, build_files) % { "makefile_name": makefile_name, "deps": replace_sep( - " ".join(SourceifyAndQuoteSpaces(bf) for bf in build_files) + " ".join(sorted(SourceifyAndQuoteSpaces(bf) for bf in build_files)) ), "cmd": replace_sep(gyp.common.EncodePOSIXShellList( [gyp_binary, "-fmake"] + gyp.RegenerateFlags(options) + build_files_args diff --git a/tools/gyp/pylib/gyp/generator/msvs.py b/tools/gyp/pylib/gyp/generator/msvs.py index b4aea2e69a1939..baf504215099c3 100644 --- a/tools/gyp/pylib/gyp/generator/msvs.py +++ b/tools/gyp/pylib/gyp/generator/msvs.py @@ -1364,8 +1364,7 @@ def _GetOutputTargetExt(spec): Returns: A string with the extension, or None """ - target_extension = spec.get("product_extension") - if target_extension: + if target_extension := spec.get("product_extension"): return "." + target_extension return None @@ -3166,8 +3165,7 @@ def _GetMSBuildAttributes(spec, config, build_file): "windows_driver": "Link", "static_library": "Lib", } - msbuild_tool = msbuild_tool_map.get(spec["type"]) - if msbuild_tool: + if msbuild_tool := msbuild_tool_map.get(spec["type"]): msbuild_settings = config["finalized_msbuild_settings"] out_file = msbuild_settings[msbuild_tool].get("OutputFile") if out_file: @@ -3184,8 +3182,7 @@ def _GetMSBuildConfigurationGlobalProperties(spec, configurations, build_file): # there are actions. # TODO(jeanluc) Handle the equivalent of setting 'CYGWIN=nontsec'. new_paths = [] - cygwin_dirs = spec.get("msvs_cygwin_dirs", ["."])[0] - if cygwin_dirs: + if cygwin_dirs := spec.get("msvs_cygwin_dirs", ["."])[0]: cyg_path = "$(MSBuildProjectDirectory)\\%s\\bin\\" % _FixPath(cygwin_dirs) new_paths.append(cyg_path) # TODO(jeanluc) Change the convention to have both a cygwin_dir and a @@ -3370,7 +3367,6 @@ def _FinalizeMSBuildSettings(spec, configuration): prebuild = configuration.get("msvs_prebuild") postbuild = configuration.get("msvs_postbuild") def_file = _GetModuleDefinition(spec) - precompiled_header = configuration.get("msvs_precompiled_header") # Add the information to the appropriate tool # TODO(jeanluc) We could optimize and generate these settings only if @@ -3408,7 +3404,7 @@ def _FinalizeMSBuildSettings(spec, configuration): msbuild_settings, "ClCompile", "DisableSpecificWarnings", disabled_warnings ) # Turn on precompiled headers if appropriate. - if precompiled_header: + if precompiled_header := configuration.get("msvs_precompiled_header"): # While MSVC works with just file name eg. "v8_pch.h", ClangCL requires # the full path eg. "tools/msvs/pch/v8_pch.h" to find the file. # P.S. Only ClangCL defines msbuild_toolset, for MSVC it is None. diff --git a/tools/gyp/pylib/gyp/generator/ninja.py b/tools/gyp/pylib/gyp/generator/ninja.py index b7ac823d1490d6..d5dfa1a1182c09 100644 --- a/tools/gyp/pylib/gyp/generator/ninja.py +++ b/tools/gyp/pylib/gyp/generator/ninja.py @@ -5,6 +5,7 @@ import collections import copy +import ctypes import hashlib import json import multiprocessing @@ -263,8 +264,7 @@ def ExpandSpecial(self, path, product_dir=None): dir. """ - PRODUCT_DIR = "$!PRODUCT_DIR" - if PRODUCT_DIR in path: + if (PRODUCT_DIR := "$!PRODUCT_DIR") in path: if product_dir: path = path.replace(PRODUCT_DIR, product_dir) else: @@ -272,8 +272,7 @@ def ExpandSpecial(self, path, product_dir=None): path = path.replace(PRODUCT_DIR + "\\", "") path = path.replace(PRODUCT_DIR, ".") - INTERMEDIATE_DIR = "$!INTERMEDIATE_DIR" - if INTERMEDIATE_DIR in path: + if (INTERMEDIATE_DIR := "$!INTERMEDIATE_DIR") in path: int_dir = self.GypPathToUniqueOutput("gen") # GypPathToUniqueOutput generates a path relative to the product dir, # so insert product_dir in front if it is provided. @@ -1995,7 +1994,7 @@ def CalculateVariables(default_variables, params): # Copy additional generator configuration data from Xcode, which is shared # by the Mac Ninja generator. - import gyp.generator.xcode as xcode_generator + import gyp.generator.xcode as xcode_generator # noqa: PLC0415 generator_additional_non_configuration_keys = getattr( xcode_generator, "generator_additional_non_configuration_keys", [] @@ -2018,7 +2017,7 @@ def CalculateVariables(default_variables, params): # Copy additional generator configuration data from VS, which is shared # by the Windows Ninja generator. - import gyp.generator.msvs as msvs_generator + import gyp.generator.msvs as msvs_generator # noqa: PLC0415 generator_additional_non_configuration_keys = getattr( msvs_generator, "generator_additional_non_configuration_keys", [] @@ -2075,21 +2074,17 @@ def OpenOutput(path, mode="w"): def CommandWithWrapper(cmd, wrappers, prog): - wrapper = wrappers.get(cmd, "") - if wrapper: + if wrapper := wrappers.get(cmd, ""): return wrapper + " " + prog return prog def GetDefaultConcurrentLinks(): """Returns a best-guess for a number of concurrent links.""" - pool_size = int(os.environ.get("GYP_LINK_CONCURRENCY") or 0) - if pool_size: + if pool_size := int(os.environ.get("GYP_LINK_CONCURRENCY") or 0): return pool_size if sys.platform in ("win32", "cygwin"): - import ctypes - class MEMORYSTATUSEX(ctypes.Structure): _fields_ = [ ("dwLength", ctypes.c_ulong), @@ -2305,8 +2300,7 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params, config_name key_prefix = re.sub(r"\.HOST$", ".host", key_prefix) wrappers[key_prefix] = os.path.join(build_to_root, value) - mac_toolchain_dir = generator_flags.get("mac_toolchain_dir", None) - if mac_toolchain_dir: + if mac_toolchain_dir := generator_flags.get("mac_toolchain_dir", None): wrappers["LINK"] = "export DEVELOPER_DIR='%s' &&" % mac_toolchain_dir if flavor == "win": diff --git a/tools/gyp/pylib/gyp/mac_tool.py b/tools/gyp/pylib/gyp/mac_tool.py index 70aab4f1787f44..58fb9c7398acad 100755 --- a/tools/gyp/pylib/gyp/mac_tool.py +++ b/tools/gyp/pylib/gyp/mac_tool.py @@ -25,8 +25,7 @@ def main(args): executor = MacTool() - exit_code = executor.Dispatch(args) - if exit_code is not None: + if (exit_code := executor.Dispatch(args)) is not None: sys.exit(exit_code) @@ -142,7 +141,7 @@ def _CopyStringsFile(self, source, dest): # CFPropertyListCreateFromXMLData(): Old-style plist parser: missing # semicolon in dictionary. # on invalid files. Do the same kind of validation. - import CoreFoundation + import CoreFoundation # noqa: PLC0415 with open(source, "rb") as in_file: s = in_file.read() diff --git a/tools/gyp/pylib/gyp/msvs_emulation.py b/tools/gyp/pylib/gyp/msvs_emulation.py index ace0cae5ebff23..f8b3b87d943d79 100644 --- a/tools/gyp/pylib/gyp/msvs_emulation.py +++ b/tools/gyp/pylib/gyp/msvs_emulation.py @@ -247,9 +247,7 @@ def GetExtension(self): the target type. """ ext = self.spec.get("product_extension", None) - if ext: - return ext - return gyp.MSVSUtil.TARGET_TYPE_EXT.get(self.spec["type"], "") + return ext or gyp.MSVSUtil.TARGET_TYPE_EXT.get(self.spec["type"], "") def GetVSMacroEnv(self, base_to_build=None, config=None): """Get a dict of variables mapping internal VS macro names to their gyp @@ -625,8 +623,7 @@ def GetDefFile(self, gyp_to_build_path): def _GetDefFileAsLdflags(self, ldflags, gyp_to_build_path): """.def files get implicitly converted to a ModuleDefinitionFile for the linker in the VS generator. Emulate that behaviour here.""" - def_file = self.GetDefFile(gyp_to_build_path) - if def_file: + if def_file := self.GetDefFile(gyp_to_build_path): ldflags.append('/DEF:"%s"' % def_file) def GetPGDName(self, config, expand_special): @@ -674,14 +671,11 @@ def GetLdflags( ) ld("DelayLoadDLLs", prefix="/DELAYLOAD:") ld("TreatLinkerWarningAsErrors", prefix="/WX", map={"true": "", "false": ":NO"}) - out = self.GetOutputName(config, expand_special) - if out: + if out := self.GetOutputName(config, expand_special): ldflags.append("/OUT:" + out) - pdb = self.GetPDBName(config, expand_special, output_name + ".pdb") - if pdb: + if pdb := self.GetPDBName(config, expand_special, output_name + ".pdb"): ldflags.append("/PDB:" + pdb) - pgd = self.GetPGDName(config, expand_special) - if pgd: + if pgd := self.GetPGDName(config, expand_special): ldflags.append("/PGD:" + pgd) map_file = self.GetMapFileName(config, expand_special) ld("GenerateMapFile", map={"true": "/MAP:" + map_file if map_file else "/MAP"}) diff --git a/tools/gyp/pylib/gyp/win_tool.py b/tools/gyp/pylib/gyp/win_tool.py index 7e647f40a84c54..3004f533ca9fe3 100755 --- a/tools/gyp/pylib/gyp/win_tool.py +++ b/tools/gyp/pylib/gyp/win_tool.py @@ -27,8 +27,7 @@ def main(args): executor = WinTool() - exit_code = executor.Dispatch(args) - if exit_code is not None: + if (exit_code := executor.Dispatch(args)) is not None: sys.exit(exit_code) diff --git a/tools/gyp/pylib/gyp/xcode_emulation.py b/tools/gyp/pylib/gyp/xcode_emulation.py index 85a63dfd7ae0e2..0746865dc84b72 100644 --- a/tools/gyp/pylib/gyp/xcode_emulation.py +++ b/tools/gyp/pylib/gyp/xcode_emulation.py @@ -1350,8 +1350,7 @@ def _DefaultSdkRoot(self): if xcode_version < "0500": return "" default_sdk_path = self._XcodeSdkPath("") - default_sdk_root = XcodeSettings._sdk_root_cache.get(default_sdk_path) - if default_sdk_root: + if default_sdk_root := XcodeSettings._sdk_root_cache.get(default_sdk_path): return default_sdk_root try: all_sdks = GetStdout(["xcodebuild", "-showsdks"]) @@ -1787,11 +1786,9 @@ def _GetXcodeEnv( env["INFOPLIST_PATH"] = xcode_settings.GetBundlePlistPath() env["WRAPPER_NAME"] = xcode_settings.GetWrapperName() - install_name = xcode_settings.GetInstallName() - if install_name: + if install_name := xcode_settings.GetInstallName(): env["LD_DYLIB_INSTALL_NAME"] = install_name - install_name_base = xcode_settings.GetInstallNameBase() - if install_name_base: + if install_name_base := xcode_settings.GetInstallNameBase(): env["DYLIB_INSTALL_NAME_BASE"] = install_name_base xcode_version, _ = XcodeVersion() if xcode_version >= "0500" and not env.get("SDKROOT"): diff --git a/tools/gyp/pylib/gyp/xcode_ninja.py b/tools/gyp/pylib/gyp/xcode_ninja.py index cac1af56f7bfb7..ae3079d85a48cb 100644 --- a/tools/gyp/pylib/gyp/xcode_ninja.py +++ b/tools/gyp/pylib/gyp/xcode_ninja.py @@ -70,12 +70,11 @@ def _TargetFromSpec(old_spec, params): target_name = old_spec.get("target_name") product_name = old_spec.get("product_name", target_name) - product_extension = old_spec.get("product_extension") ninja_target = {} ninja_target["target_name"] = target_name ninja_target["product_name"] = product_name - if product_extension: + if product_extension := old_spec.get("product_extension"): ninja_target["product_extension"] = product_extension ninja_target["toolset"] = old_spec.get("toolset") ninja_target["default_configuration"] = old_spec.get("default_configuration") diff --git a/tools/gyp/pylib/gyp/xcodeproj_file.py b/tools/gyp/pylib/gyp/xcodeproj_file.py index be17ef946dce35..0376693d95a073 100644 --- a/tools/gyp/pylib/gyp/xcodeproj_file.py +++ b/tools/gyp/pylib/gyp/xcodeproj_file.py @@ -183,8 +183,7 @@ def SourceTreeAndPathFromPath(input_path): 'path' (None, 'path') """ - source_group_match = _path_leading_variable.match(input_path) - if source_group_match: + if source_group_match := _path_leading_variable.match(input_path): source_tree = source_group_match.group(1) output_path = source_group_match.group(3) # This may be None. else: @@ -390,8 +389,7 @@ def Comment(self): def Hashables(self): hashables = [self.__class__.__name__] - name = self.Name() - if name is not None: + if (name := self.Name()) is not None: hashables.append(name) hashables.extend(self._hashables) @@ -1051,8 +1049,7 @@ def Hashables(self): # including paths with a sourceTree, they'll still inherit their parents' # hashables, even though the paths aren't relative to their parents. This # is not expected to be much of a problem in practice. - path = self.PathFromSourceTreeAndPath() - if path is not None: + if (path := self.PathFromSourceTreeAndPath()) is not None: components = path.split(posixpath.sep) for component in components: hashables.append(self.__class__.__name__ + ".path") @@ -2109,8 +2106,7 @@ def SetDestination(self, path): specifically, "$(DIR)/path". """ - path_tree_match = self.path_tree_re.search(path) - if path_tree_match: + if path_tree_match := self.path_tree_re.search(path): path_tree = path_tree_match.group(1) if path_tree in self.path_tree_first_to_subfolder: subfolder = self.path_tree_first_to_subfolder[path_tree] diff --git a/tools/gyp/pylib/packaging/_elffile.py b/tools/gyp/pylib/packaging/_elffile.py index 6fb19b30bb53c1..cb33e10556ba1b 100644 --- a/tools/gyp/pylib/packaging/_elffile.py +++ b/tools/gyp/pylib/packaging/_elffile.py @@ -48,8 +48,7 @@ def __init__(self, f: IO[bytes]) -> None: ident = self._read("16B") except struct.error: raise ELFInvalid("unable to parse identification") - magic = bytes(ident[:4]) - if magic != b"\x7fELF": + if (magic := bytes(ident[:4])) != b"\x7fELF": raise ELFInvalid(f"invalid magic: {magic!r}") self.capacity = ident[4] # Format for program header (bitness). diff --git a/tools/gyp/pylib/packaging/markers.py b/tools/gyp/pylib/packaging/markers.py index 8b98fca7233be6..7e4d150208eec4 100644 --- a/tools/gyp/pylib/packaging/markers.py +++ b/tools/gyp/pylib/packaging/markers.py @@ -166,8 +166,7 @@ def _evaluate_markers(markers: MarkerList, environment: Dict[str, str]) -> bool: def format_full_version(info: "sys._version_info") -> str: version = "{0.major}.{0.minor}.{0.micro}".format(info) - kind = info.releaselevel - if kind != "final": + if (kind := info.releaselevel) != "final": version += kind[0] + str(info.serial) return version diff --git a/tools/gyp/pylib/packaging/metadata.py b/tools/gyp/pylib/packaging/metadata.py index 23bb564f3d5ff8..43f5c5b30df979 100644 --- a/tools/gyp/pylib/packaging/metadata.py +++ b/tools/gyp/pylib/packaging/metadata.py @@ -591,8 +591,7 @@ def _process_description_content_type(self, value: str) -> str: f"{{field}} must be one of {list(content_types)}, not {value!r}" ) - charset = parameters.get("charset", "UTF-8") - if charset != "UTF-8": + if (charset := parameters.get("charset", "UTF-8")) != "UTF-8": raise self._invalid_metadata( f"{{field}} can only specify the UTF-8 charset, not {list(charset)}" ) diff --git a/tools/gyp/pyproject.toml b/tools/gyp/pyproject.toml index 537308731fe542..62fb2bf8cadf76 100644 --- a/tools/gyp/pyproject.toml +++ b/tools/gyp/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "gyp-next" -version = "0.20.0" +version = "0.20.2" authors = [ { name="Node.js contributors", email="ryzokuken@disroot.org" }, ] @@ -39,7 +39,6 @@ gyp = "gyp:script_main" [tool.ruff] extend-exclude = ["pylib/packaging"] line-length = 88 -target-version = "py37" [tool.ruff.lint] select = [ diff --git a/tools/gyp/test_gyp.py b/tools/gyp/test_gyp.py index b7bb956b8ed585..8e910a2b76290d 100755 --- a/tools/gyp/test_gyp.py +++ b/tools/gyp/test_gyp.py @@ -148,13 +148,13 @@ def print_configuration_info(): print("Test configuration:") if sys.platform == "darwin": sys.path.append(os.path.abspath("test/lib")) - import TestMac + import TestMac # noqa: PLC0415 print(f" Mac {platform.mac_ver()[0]} {platform.mac_ver()[2]}") print(f" Xcode {TestMac.Xcode.Version()}") elif sys.platform == "win32": sys.path.append(os.path.abspath("pylib")) - import gyp.MSVSVersion + import gyp.MSVSVersion # noqa: PLC0415 print(" Win %s %s\n" % platform.win32_ver()[0:2]) print(" MSVS %s" % gyp.MSVSVersion.SelectVisualStudioVersion().Description()) diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp index 7244328701911e..32f00097bc5804 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -637,11 +637,6 @@ '