diff --git a/.clang-format b/.clang-format index 3a2a56671..95cada69c 100644 --- a/.clang-format +++ b/.clang-format @@ -4,13 +4,16 @@ Language: Cpp AccessModifierOffset: -1 AlignAfterOpenBracket: Align +AlignArrayOfStructures: None AlignConsecutiveAssignments: true AlignConsecutiveDeclarations: false AlignEscapedNewlines: Left -AlignOperands: true -AlignTrailingComments: true +AlignOperands: AlignAfterOperator +AlignTrailingComments: + Kind: Always + OverEmptyLines: 2 AllowAllParametersOfDeclarationOnNextLine: true -AllowShortBlocksOnASingleLine: true +AllowShortBlocksOnASingleLine: true AllowShortCaseLabelsOnASingleLine: true AllowShortFunctionsOnASingleLine: All AllowShortIfStatementsOnASingleLine: true @@ -20,8 +23,9 @@ AlwaysBreakAfterDefinitionReturnType: None AlwaysBreakAfterReturnType: None AlwaysBreakBeforeMultilineStrings: true AlwaysBreakTemplateDeclarations: Yes -BinPackArguments: false +BinPackArguments: false BinPackParameters: false +BitFieldColonSpacing: After BraceWrapping: AfterClass: false AfterControlStatement: false @@ -39,6 +43,8 @@ BraceWrapping: SplitEmptyFunction: false SplitEmptyRecord: false SplitEmptyNamespace: false +BreakArrays: false +BreakAfterAttributes: Leave BreakBeforeBinaryOperators: None BreakBeforeBraces: Custom BreakBeforeInheritanceComma: false @@ -56,7 +62,7 @@ ConstructorInitializerAllOnOneLineOrOnePerLine: true ConstructorInitializerIndentWidth: 2 ContinuationIndentWidth: 2 Cpp11BracedListStyle: true -DerivePointerAlignment: true +DerivePointerAlignment: false DisableFormat: false ExperimentalAutoDetectBinPacking: false FixNamespaceComments: true @@ -79,7 +85,7 @@ IndentCaseLabels: true IndentPPDirectives: None IndentWidth: 2 IndentWrappedFunctionNames: false -JavaScriptWrapImports: true +InsertNewlineAtEOF: true KeepEmptyLinesAtTheStartOfBlocks: false MacroBlockBegin: '' MacroBlockEnd: '' @@ -98,6 +104,7 @@ PenaltyBreakTemplateDeclaration: 10 PenaltyExcessCharacter: 1000000 PenaltyReturnTypeOnItsOwnLine: 200 PointerAlignment: Left +ReferenceAlignment: Left RawStringFormats: - Language: Cpp Delimiters: @@ -127,24 +134,30 @@ RawStringFormats: BasedOnStyle: google # Enabling comment reflow causes doxygen comments to be messed up in their formats! ReflowComments: true +RemoveBracesLLVM: false SortIncludes: true SortUsingDeclarations: true SpaceAfterCStyleCast: false SpaceAfterTemplateKeyword: true +SpaceAroundPointerQualifiers: Default SpaceBeforeAssignmentOperators: true +SpaceBeforeCaseColon: false SpaceBeforeCpp11BracedList: false SpaceBeforeCtorInitializerColon: true SpaceBeforeInheritanceColon: true SpaceBeforeParens: ControlStatements SpaceBeforeRangeBasedForLoopColon: true +SpaceBeforeSquareBrackets: false +SpaceInEmptyBlock: false SpaceInEmptyParentheses: false SpacesBeforeTrailingComments: 2 -SpacesInAngles: false +SpacesInAngles: Never +SpacesInParens: Never SpacesInContainerLiterals: true SpacesInCStyleCastParentheses: false SpacesInParentheses: false SpacesInSquareBrackets: false -Standard: Cpp11 +Standard: c++17 StatementMacros: - Q_UNUSED - QT_REQUIRE_VERSION @@ -156,45 +169,45 @@ UseTab: Never # https://clang.llvm.org/docs/ClangFormatStyleOptions.html Language: JavaScript ######################################################### -# +# # Additions or modifications to the above C++ settings -# +# ######################################################### AccessModifierOffset: 0 +AlignArrayOfStructures: None AllowAllArgumentsOnNextLine: true AlignConsecutiveBitFields: true AllowShortEnumsOnASingleLine: false AllowShortLambdasOnASingleLine: All -BitFieldColonSpacing: After BreakStringLiterals: false InsertTrailingCommas: None IndentCaseBlocks: false JavaScriptQuotes: Single JavaScriptWrapImports: true -PointerAlignment: Middle SpaceAfterCStyleCast: true SpaceAfterLogicalNot: false -SpaceAroundPointerQualifiers: Both SpaceBeforeCpp11BracedList: true -SpaceBeforeSquareBrackets: false SpaceBeforeCtorInitializerColon: false +SpaceBeforeJsonColon: false SpaceBeforeInheritanceColon: false SpaceBeforeRangeBasedForLoopColon: false SpacesInConditionalStatement: false SpacesInContainerLiterals: false ######################################################### -# +# # Begin previous C++ settings -# +# ######################################################### AlignAfterOpenBracket: Align AlignConsecutiveAssignments: true AlignConsecutiveDeclarations: false AlignEscapedNewlines: Left -AlignOperands: true -AlignTrailingComments: true +AlignOperands: AlignAfterOperator +AlignTrailingComments: + Kind: Always + OverEmptyLines: 2 AllowAllParametersOfDeclarationOnNextLine: true -AllowShortBlocksOnASingleLine: true +AllowShortBlocksOnASingleLine: true AllowShortCaseLabelsOnASingleLine: true AllowShortFunctionsOnASingleLine: All AllowShortIfStatementsOnASingleLine: true @@ -204,8 +217,9 @@ AlwaysBreakAfterDefinitionReturnType: None AlwaysBreakAfterReturnType: None AlwaysBreakBeforeMultilineStrings: true AlwaysBreakTemplateDeclarations: Yes -BinPackArguments: false +BinPackArguments: false BinPackParameters: false +BitFieldColonSpacing: After BraceWrapping: AfterClass: false AfterControlStatement: false @@ -223,6 +237,8 @@ BraceWrapping: SplitEmptyFunction: false SplitEmptyRecord: false SplitEmptyNamespace: false +BreakArrays: false +BreakAfterAttributes: Leave BreakBeforeBinaryOperators: None BreakBeforeBraces: Custom BreakBeforeInheritanceComma: false @@ -239,7 +255,7 @@ ConstructorInitializerAllOnOneLineOrOnePerLine: true ConstructorInitializerIndentWidth: 2 ContinuationIndentWidth: 2 Cpp11BracedListStyle: true -DerivePointerAlignment: true +DerivePointerAlignment: false DisableFormat: false ExperimentalAutoDetectBinPacking: false FixNamespaceComments: true @@ -262,7 +278,7 @@ IndentCaseLabels: true IndentPPDirectives: None IndentWidth: 2 IndentWrappedFunctionNames: false -JavaScriptWrapImports: true +InsertNewlineAtEOF: true KeepEmptyLinesAtTheStartOfBlocks: false MacroBlockBegin: '' MacroBlockEnd: '' @@ -280,6 +296,8 @@ PenaltyBreakString: 1000 PenaltyBreakTemplateDeclaration: 10 PenaltyExcessCharacter: 1000000 PenaltyReturnTypeOnItsOwnLine: 200 +PointerAlignment: Left +ReferenceAlignment: Left RawStringFormats: - Language: JavaScript Delimiters: @@ -314,18 +332,24 @@ RawStringFormats: BasedOnStyle: google # Enabling comment reflow causes doxygen comments to be messed up in their formats! ReflowComments: true +RemoveBracesLLVM: false SortIncludes: true SortUsingDeclarations: true SpaceAfterTemplateKeyword: true +SpaceAroundPointerQualifiers: Default SpaceBeforeAssignmentOperators: true +SpaceBeforeCaseColon: false SpaceBeforeParens: ControlStatements +SpaceBeforeSquareBrackets: false +SpaceInEmptyBlock: false SpaceInEmptyParentheses: false SpacesBeforeTrailingComments: 2 -SpacesInAngles: false +SpacesInAngles: Never +SpacesInParens: Never SpacesInCStyleCastParentheses: false SpacesInParentheses: false SpacesInSquareBrackets: false -Standard: Cpp11 +Standard: c++17 StatementMacros: - Q_UNUSED - QT_REQUIRE_VERSION diff --git a/.clangd b/.clangd new file mode 100644 index 000000000..01efbbc87 --- /dev/null +++ b/.clangd @@ -0,0 +1,73 @@ +# https://clangd.llvm.org/config + +# Apply a config conditionally to all C files +If: + PathMatch: .*\.(c|h)$ + +--- + +# Apply a config conditionally to all C++ files +If: + PathMatch: .*\.(c|h)pp + +--- + +# Apply a config conditionally to all CUDA files +If: + PathMatch: .*\.cuh? + +Diagnostics: + Suppress: + - "variadic_device_fn" + - "attributes_not_allowed" + +CompileFlags: + Add: + - "-x" + - "cuda" + # No error on unknown CUDA versions + - "-Wno-unknown-cuda-version" + # Allow variadic CUDA functions + - "-Xclang=-fcuda-allow-variadic-functions" + +--- + +# Tweak the clangd parse settings for all files +Hover: + ShowAKA: Yes + +InlayHints: + Enabled: No + +CompileFlags: + Add: + # report all errors + - "-ferror-limit=0" + - "-fmacro-backtrace-limit=0" + - "-ftemplate-backtrace-limit=0" + # Skip the CUDA version check + - "--no-cuda-version-check" + Remove: + # remove gcc's -fcoroutines + - -fcoroutines + # remove nvc++ flags unknown to clang + - "-gpu=*" + - "-stdpar*" + # remove nvcc flags unknown to clang + - "-arch*" + - "-gencode*" + - "--generate-code*" + - "-ccbin*" + - "-t=*" + - "--threads*" + - "-Xptxas*" + - "-Xcudafe*" + - "-Xfatbin*" + - "-Xcompiler*" + - "--diag-suppress*" + - "--diag_suppress*" + - "--compiler-options*" + - "--expt-extended-lambda" + - "--expt-relaxed-constexpr" + - "-forward-unknown-to-host-compiler" + - "-Werror=cross-execution-space-call" diff --git a/.eslintrc.js b/.eslintrc.js index 104f75c11..b4e3e96df 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -8,9 +8,7 @@ module.exports = { 'parser': '@typescript-eslint/parser', 'parserOptions': { 'project': [ - 'tsconfig.json', - 'modules/**/*/tsconfig.json', - 'modules/**/*/test/tsconfig.json', + 'tsconfig.json' ], 'sourceType': 'module' }, @@ -23,6 +21,7 @@ module.exports = { // "prefer-const": "off", // "prefer-rest-params": "off", 'semi': ['error', 'always'], + '@typescript-eslint/unbound-method': 'off', '@typescript-eslint/ban-ts-comment': 'off', '@typescript-eslint/no-unsafe-call': 'off', '@typescript-eslint/no-var-requires': 'off', diff --git a/.gitignore b/.gitignore index 75b752414..1e682a164 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,13 @@ **/z-* **/*.log -**/doc -**/lib -**/build +**/doc/ +**/lib/ +**/build/ **/.cache **/.clangd **/.ccache -**/__pycache__ -**/node_modules +**/__pycache__/ +**/node_modules/ **/compile_commands.json /dev/.ssh/* @@ -35,3 +35,5 @@ internal/* **/.next/ **/_next/ **/out/ + +!/.clangd diff --git a/dev/dockerfiles/devel/main.Dockerfile b/dev/dockerfiles/devel/main.Dockerfile index 59d9f980b..0db2c52ed 100644 --- a/dev/dockerfiles/devel/main.Dockerfile +++ b/dev/dockerfiles/devel/main.Dockerfile @@ -137,9 +137,9 @@ ONBUILD ARG ADDITIONAL_GROUPS="--groups sudo,video" FROM compilers as main-amd64 -ONBUILD ARG LLDB_VERSION=12 -ONBUILD ARG CLANGD_VERSION=12 -ONBUILD ARG CLANG_FORMAT_VERSION=12 +ONBUILD ARG LLDB_VERSION=17 +ONBUILD ARG CLANGD_VERSION=17 +ONBUILD ARG CLANG_FORMAT_VERSION=17 # Install dependencies and dev tools (llnode etc.) ONBUILD RUN export DEBIAN_FRONTEND=noninteractive \ @@ -187,11 +187,7 @@ deb-src http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -c && update-alternatives --set lldb /usr/bin/lldb-${LLDB_VERSION} \ \ # Globally install llnode - && mkdir -p /usr/local/lib/llnode \ - && wget -O - https://github.com/trxcllnt/llnode/archive/refs/heads/use-llvm-project-monorepo.tar.gz \ - | tar -C /usr/local/lib/llnode -xzf - --strip-components=1 \ - && npm pack --pack-destination /usr/local/lib/llnode /usr/local/lib/llnode \ - && npm install --location=global --unsafe-perm --no-audit --no-fund --no-update-notifier /usr/local/lib/llnode/llnode-*.tgz \ + && npm install --location global --unsafe-perm --no-audit --no-fund --no-update-notifier llnode \ && echo "llnode: $(which -a llnode)" \ && echo "llnode version: $(llnode --version)" \ \ diff --git a/docs/develop-on-bare-metal.md b/docs/develop-on-bare-metal.md index c954fc037..b63877b03 100644 --- a/docs/develop-on-bare-metal.md +++ b/docs/develop-on-bare-metal.md @@ -20,7 +20,7 @@ The following dependencies are necessary to build any of the `node-rapids` nativ * [CMake v3.20.2+](https://cmake.org/) (recommend either the [apt repository](https://apt.kitware.com/) or self-installing shell script). * `gcc-9` toolchain (available in Ubuntu via the official toolchain PPA `ppa:ubuntu-toolchain-r/test`) * ```txt - ninja-build sccache jq zlib1g-dev liblz4-dev clang-format-12 clangd-12 lldb-12 + ninja-build sccache jq zlib1g-dev liblz4-dev clang-format-17 clangd-17 lldb-17 ``` ### Additional per-module dependencies diff --git a/modules/core/bin/install-deps/debian.sh b/modules/core/bin/install-deps/debian.sh index 0dc68b984..412829b16 100755 --- a/modules/core/bin/install-deps/debian.sh +++ b/modules/core/bin/install-deps/debian.sh @@ -50,11 +50,11 @@ install_vscode() { install_clangd() { INSTALLED_CLANGD=1 - APT_DEPS="${APT_DEPS:+$APT_DEPS }clangd-12 clang-format-12" + APT_DEPS="${APT_DEPS:+$APT_DEPS }clangd-17 clang-format-17" if [ ! -d "/etc/apt/sources.list.d/llvm.list" ]; then curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - - echo "deb http://apt.llvm.org/$OS_RELEASE/ llvm-toolchain-$OS_RELEASE-12 main -deb-src http://apt.llvm.org/$OS_RELEASE/ llvm-toolchain-$OS_RELEASE-12 main + echo "deb http://apt.llvm.org/$OS_RELEASE/ llvm-toolchain-$OS_RELEASE-17 main +deb-src http://apt.llvm.org/$OS_RELEASE/ llvm-toolchain-$OS_RELEASE-17 main " | sudo tee /etc/apt/sources.list.d/llvm.list fi } @@ -101,7 +101,7 @@ if [ -n "$APT_DEPS" ]; then sudo apt update sudo apt install -y $APT_DEPS; if [ -n "$INSTALLED_CLANGD" ]; then - sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-12 100 + sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-17 100 sudo update-alternatives --set clangd /usr/bin/clangd fi fi diff --git a/modules/core/include/nv_node/utilities/args.hpp b/modules/core/include/nv_node/utilities/args.hpp index 057651889..2e91cb392 100644 --- a/modules/core/include/nv_node/utilities/args.hpp +++ b/modules/core/include/nv_node/utilities/args.hpp @@ -51,7 +51,7 @@ struct CallbackArgs { NapiToCPP const operator[](size_t i) const { return info_->operator[](i); } inline Napi::CallbackInfo const& info() const { return *info_; } - inline operator Napi::CallbackInfo const &() const { return *info_; } + inline operator Napi::CallbackInfo const&() const { return *info_; } private: bool owns_info_{false}; diff --git a/modules/core/include/nv_node/utilities/cpp_to_napi.hpp b/modules/core/include/nv_node/utilities/cpp_to_napi.hpp index 68755aa67..756893564 100644 --- a/modules/core/include/nv_node/utilities/cpp_to_napi.hpp +++ b/modules/core/include/nv_node/utilities/cpp_to_napi.hpp @@ -246,16 +246,16 @@ struct CPPToNapi { if (std::is_same() || std::is_same()) { return Napi::Uint16Array::New(Env(), len, buf, 0); } - if (std::is_same()) { // + if (std::is_same()) { // return Napi::Int32Array::New(Env(), len, buf, 0); } if (std::is_same()) { // return Napi::Uint32Array::New(Env(), len, buf, 0); } - if (std::is_same()) { // + if (std::is_same()) { // return Napi::Float32Array::New(Env(), len, buf, 0); } - if (std::is_same()) { // + if (std::is_same()) { // return Napi::Float64Array::New(Env(), len, buf, 0); } NAPI_THROW(std::runtime_error{"Unknown TypedArray type"}, env.Undefined()); diff --git a/modules/core/include/nv_node/utilities/napi_to_cpp.hpp b/modules/core/include/nv_node/utilities/napi_to_cpp.hpp index 1537e8743..ffe1abf66 100644 --- a/modules/core/include/nv_node/utilities/napi_to_cpp.hpp +++ b/modules/core/include/nv_node/utilities/napi_to_cpp.hpp @@ -258,10 +258,10 @@ struct NapiToCPP { // // Pointers // - inline operator void*() const { // + inline operator void*() const { // return static_cast(as_span().data()); } - inline operator void const *() const { // + inline operator void const*() const { // return static_cast(as_span().data()); } template diff --git a/modules/cuda/src/buffer.ts b/modules/cuda/src/buffer.ts index 66e3ec6b6..066017fb5 100644 --- a/modules/cuda/src/buffer.ts +++ b/modules/cuda/src/buffer.ts @@ -575,10 +575,10 @@ function toHDView( TypedArray: TypedArrayConstructor): T|MemoryViewOf { if (source instanceof MemoryView) { return (source.TypedArray === TypedArray) - // If source is already the desired type, return it - ? source as MemoryViewOf - // If source is another type of MemoryView, wrap in the desired type - : toMemoryView(source, TypedArray); + // If source is already the desired type, return it + ? source as MemoryViewOf + // If source is another type of MemoryView, wrap in the desired type + : toMemoryView(source, TypedArray); } else if (isMemoryLike(source)) { // If source is MemoryLike, wrap it in a MemoryView of the desired type return toMemoryView(source, TypedArray); diff --git a/modules/cuda/src/math.cpp b/modules/cuda/src/math.cpp index bcf994568..4f570447d 100644 --- a/modules/cuda/src/math.cpp +++ b/modules/cuda/src/math.cpp @@ -20,60 +20,60 @@ namespace nv { -Napi::Value math_abs(CallbackArgs const &info) { +Napi::Value math_abs(CallbackArgs const& info) { return nv::math::dispatch(nv::math::calc_abs{}, info); } -Napi::Value math_acos(CallbackArgs const &info) { +Napi::Value math_acos(CallbackArgs const& info) { return nv::math::dispatch(nv::math::calc_acos{}, info); } -Napi::Value math_asin(CallbackArgs const &info) { +Napi::Value math_asin(CallbackArgs const& info) { return nv::math::dispatch(nv::math::calc_asin{}, info); } -Napi::Value math_atan(CallbackArgs const &info) { +Napi::Value math_atan(CallbackArgs const& info) { return nv::math::dispatch(nv::math::calc_atan{}, info); } -Napi::Value math_atan2(CallbackArgs const &info) { +Napi::Value math_atan2(CallbackArgs const& info) { return nv::math::dispatch(nv::math::calc_atan2{}, info); } -Napi::Value math_ceil(CallbackArgs const &info) { +Napi::Value math_ceil(CallbackArgs const& info) { return nv::math::dispatch(nv::math::calc_ceil{}, info); } -Napi::Value math_cos(CallbackArgs const &info) { +Napi::Value math_cos(CallbackArgs const& info) { return nv::math::dispatch(nv::math::calc_cos{}, info); } -Napi::Value math_exp(CallbackArgs const &info) { +Napi::Value math_exp(CallbackArgs const& info) { return nv::math::dispatch(nv::math::calc_exp{}, info); } -Napi::Value math_floor(CallbackArgs const &info) { +Napi::Value math_floor(CallbackArgs const& info) { return nv::math::dispatch(nv::math::calc_floor{}, info); } -Napi::Value math_log(CallbackArgs const &info) { +Napi::Value math_log(CallbackArgs const& info) { return nv::math::dispatch(nv::math::calc_log{}, info); } -Napi::Value math_max(CallbackArgs const &info) { +Napi::Value math_max(CallbackArgs const& info) { return nv::math::dispatch(nv::math::calc_max{}, info); } -Napi::Value math_min(CallbackArgs const &info) { +Napi::Value math_min(CallbackArgs const& info) { return nv::math::dispatch(nv::math::calc_min{}, info); } -Napi::Value math_pow(CallbackArgs const &info) { +Napi::Value math_pow(CallbackArgs const& info) { return nv::math::dispatch(nv::math::calc_pow{}, info); } -Napi::Value math_round(CallbackArgs const &info) { +Napi::Value math_round(CallbackArgs const& info) { return nv::math::dispatch(nv::math::calc_round{}, info); } -Napi::Value math_sin(CallbackArgs const &info) { +Napi::Value math_sin(CallbackArgs const& info) { return nv::math::dispatch(nv::math::calc_sin{}, info); } -Napi::Value math_sqrt(CallbackArgs const &info) { +Napi::Value math_sqrt(CallbackArgs const& info) { return nv::math::dispatch(nv::math::calc_sqrt{}, info); } -Napi::Value math_tan(CallbackArgs const &info) { +Napi::Value math_tan(CallbackArgs const& info) { return nv::math::dispatch(nv::math::calc_tan{}, info); } namespace math { -Napi::Object initModule(Napi::Env const &env, +Napi::Object initModule(Napi::Env const& env, Napi::Object exports, Napi::Object driver, Napi::Object runtime) { diff --git a/modules/cuda/src/node_cuda.ts b/modules/cuda/src/node_cuda.ts index e99ddc275..450862fae 100644 --- a/modules/cuda/src/node_cuda.ts +++ b/modules/cuda/src/node_cuda.ts @@ -50,8 +50,7 @@ export declare namespace Math { export declare namespace driver { /** @ignore */ - export enum PointerAttributes - { + export enum PointerAttributes { CONTEXT, MEMORY_TYPE, DEVICE_POINTER, @@ -72,8 +71,7 @@ export declare namespace runtime { * Flags to register a graphics resource * @ignore */ - export enum GraphicsRegisterFlags - { + export enum GraphicsRegisterFlags { NONE, READ_ONLY, WRITE_DISCARD, @@ -100,8 +98,7 @@ export declare namespace runtime { * CUDAArray channel format kind * @ignore */ -export declare enum ChannelFormatKind -{ +export declare enum ChannelFormatKind { /** Signed channel format */ SIGNED, /** Unsigned channel format */ @@ -146,8 +143,7 @@ export declare class CUDAArray { * interacts with the OS scheduler when waiting for results from the GPU. * Only one of the scheduling flags can be set when creating a context. */ -export declare enum DeviceFlags -{ +export declare enum DeviceFlags { /** * Uses a heuristic based on the number of active CUDA contexts in the * process `C` and the number of logical processors in the system `P`. diff --git a/modules/cuda/src/util.ts b/modules/cuda/src/util.ts index a4ae1e7a7..3c352612f 100644 --- a/modules/cuda/src/util.ts +++ b/modules/cuda/src/util.ts @@ -36,7 +36,7 @@ export const isIterable = (x: any): x is Iterable => { return isObject(x) && isFunction(x[Symbol.iterator]);}; /** @ignore */ -export const isAsyncIterable = (x: any): +export const isAsyncIterable = (x: any): x is AsyncIterable => { return isObject(x) && isFunction(x[Symbol.asyncIterator]);}; /** @ignore */ @@ -61,7 +61,7 @@ export const isArrayBufferLike = (x: any): x is ArrayBufferLike => { export const isArrayBufferView = ArrayBuffer.isView; /** @ignore */ -export const isIteratorResult = (x: any): +export const isIteratorResult = (x: any): x is IteratorResult => { return isObject(x) && ('done' in x) && ('value' in x);}; /** diff --git a/modules/cuda/src/visit_struct/visit_struct.hpp b/modules/cuda/src/visit_struct/visit_struct.hpp index 112d3d3f3..e60f6f46d 100644 --- a/modules/cuda/src/visit_struct/visit_struct.hpp +++ b/modules/cuda/src/visit_struct/visit_struct.hpp @@ -93,7 +93,7 @@ struct type_c { template struct accessor { template - VISIT_STRUCT_CONSTEXPR auto operator()(T &&t) const -> decltype(std::forward(t).*ptr) { + VISIT_STRUCT_CONSTEXPR auto operator()(T&& t) const -> decltype(std::forward(t).*ptr) { return std::forward(t).*ptr; } }; @@ -109,20 +109,20 @@ VISIT_STRUCT_CONSTEXPR std::size_t field_count() { } template -VISIT_STRUCT_CONSTEXPR std::size_t field_count(S &&) { +VISIT_STRUCT_CONSTEXPR std::size_t field_count(S&&) { return field_count(); } // apply_visitor (one struct instance) template -VISIT_STRUCT_CXX14_CONSTEXPR auto apply_visitor(V &&v, S &&s) -> +VISIT_STRUCT_CXX14_CONSTEXPR auto apply_visitor(V&& v, S&& s) -> typename std::enable_if>::value>::type { traits::visitable>::apply(std::forward(v), std::forward(s)); } // apply_visitor (two struct instances) template -VISIT_STRUCT_CXX14_CONSTEXPR auto apply_visitor(V &&v, S1 &&s1, S2 &&s2) -> typename std::enable_if< +VISIT_STRUCT_CXX14_CONSTEXPR auto apply_visitor(V&& v, S1&& s1, S2&& s2) -> typename std::enable_if< traits::is_visitable::type>>::value>::type { using common_S = typename traits::common_type::type; traits::visitable>::apply( @@ -131,14 +131,14 @@ VISIT_STRUCT_CXX14_CONSTEXPR auto apply_visitor(V &&v, S1 &&s1, S2 &&s2) -> type // for_each (Alternate syntax for apply_visitor, reverses order of arguments) template -VISIT_STRUCT_CXX14_CONSTEXPR auto for_each(S &&s, V &&v) -> +VISIT_STRUCT_CXX14_CONSTEXPR auto for_each(S&& s, V&& v) -> typename std::enable_if>::value>::type { traits::visitable>::apply(std::forward(v), std::forward(s)); } // for_each with two structure instances template -VISIT_STRUCT_CXX14_CONSTEXPR auto for_each(S1 &&s1, S2 &&s2, V &&v) -> typename std::enable_if< +VISIT_STRUCT_CXX14_CONSTEXPR auto for_each(S1&& s1, S2&& s2, V&& v) -> typename std::enable_if< traits::is_visitable::type>>::value>::type { using common_S = typename traits::common_type::type; traits::visitable>::apply( @@ -147,21 +147,21 @@ VISIT_STRUCT_CXX14_CONSTEXPR auto for_each(S1 &&s1, S2 &&s2, V &&v) -> typename // Visit the types (visit_struct::type_c<...>) of the registered members template -VISIT_STRUCT_CXX14_CONSTEXPR auto visit_types(V &&v) -> +VISIT_STRUCT_CXX14_CONSTEXPR auto visit_types(V&& v) -> typename std::enable_if>::value>::type { traits::visitable>::visit_types(std::forward(v)); } // Visit the member pointers (&S::a) of the registered members template -VISIT_STRUCT_CXX14_CONSTEXPR auto visit_pointers(V &&v) -> +VISIT_STRUCT_CXX14_CONSTEXPR auto visit_pointers(V&& v) -> typename std::enable_if>::value>::type { traits::visitable>::visit_pointers(std::forward(v)); } // Visit the accessors (function objects) of the registered members template -VISIT_STRUCT_CXX14_CONSTEXPR auto visit_accessors(V &&v) -> +VISIT_STRUCT_CXX14_CONSTEXPR auto visit_accessors(V&& v) -> typename std::enable_if>::value>::type { traits::visitable>::visit_accessors(std::forward(v)); } @@ -169,14 +169,14 @@ VISIT_STRUCT_CXX14_CONSTEXPR auto visit_accessors(V &&v) -> // Apply visitor (with no instances) // This calls visit_pointers, for backwards compat reasons template -VISIT_STRUCT_CXX14_CONSTEXPR auto apply_visitor(V &&v) -> +VISIT_STRUCT_CXX14_CONSTEXPR auto apply_visitor(V&& v) -> typename std::enable_if>::value>::type { visit_struct::visit_pointers(std::forward(v)); } // Get value by index (like std::get for tuples) template -VISIT_STRUCT_CONSTEXPR auto get(S &&s) -> +VISIT_STRUCT_CONSTEXPR auto get(S&& s) -> typename std::enable_if>::value, decltype(traits::visitable>::get_value( std::integral_constant{}, std::forward(s)))>::type { @@ -194,7 +194,7 @@ VISIT_STRUCT_CONSTEXPR auto get_name() -> } template -VISIT_STRUCT_CONSTEXPR auto get_name(S &&) -> decltype(get_name()) { +VISIT_STRUCT_CONSTEXPR auto get_name(S&&) -> decltype(get_name()) { return get_name(); } @@ -208,7 +208,7 @@ VISIT_STRUCT_CONSTEXPR auto get_pointer() -> } template -VISIT_STRUCT_CONSTEXPR auto get_pointer(S &&) -> decltype(get_pointer()) { +VISIT_STRUCT_CONSTEXPR auto get_pointer(S&&) -> decltype(get_pointer()) { return get_pointer(); } @@ -222,7 +222,7 @@ VISIT_STRUCT_CONSTEXPR auto get_accessor() -> } template -VISIT_STRUCT_CONSTEXPR auto get_accessor(S &&) -> decltype(get_accessor()) { +VISIT_STRUCT_CONSTEXPR auto get_accessor(S&&) -> decltype(get_accessor()) { return get_accessor(); } @@ -246,7 +246,7 @@ VISIT_STRUCT_CONSTEXPR auto get_name() -> } template -VISIT_STRUCT_CONSTEXPR auto get_name(S &&) -> decltype(get_name()) { +VISIT_STRUCT_CONSTEXPR auto get_name(S&&) -> decltype(get_name()) { return get_name(); } @@ -3426,34 +3426,32 @@ static VISIT_STRUCT_CONSTEXPR const int max_visitable_members = 75; std::forward(visitor)( \ #MEMBER_NAME, std::forward(s1).MEMBER_NAME, std::forward(s2).MEMBER_NAME); -#define VISIT_STRUCT_MAKE_GETTERS(MEMBER_NAME) \ - template \ - static VISIT_STRUCT_CONSTEXPR auto get_value( \ - std::integral_constant, S &&s) \ - ->decltype((std::forward(s).MEMBER_NAME)) { \ - return std::forward(s).MEMBER_NAME; \ - } \ - \ - static VISIT_STRUCT_CONSTEXPR auto get_name( \ - std::integral_constant) \ - ->decltype(#MEMBER_NAME) { \ - return #MEMBER_NAME; \ - } \ - \ - static VISIT_STRUCT_CONSTEXPR auto get_pointer( \ - std::integral_constant) \ - ->decltype(&this_type::MEMBER_NAME) { \ - return &this_type::MEMBER_NAME; \ - } \ - \ - static VISIT_STRUCT_CONSTEXPR auto get_accessor( \ - std::integral_constant) \ - ->visit_struct::accessor { \ - return {}; \ - } \ - \ - static auto type_at(std::integral_constant) \ - ->visit_struct::type_c; +#define VISIT_STRUCT_MAKE_GETTERS(MEMBER_NAME) \ + template \ + static VISIT_STRUCT_CONSTEXPR auto get_value( \ + std::integral_constant, S&& s) \ + -> decltype((std::forward(s).MEMBER_NAME)) { \ + return std::forward(s).MEMBER_NAME; \ + } \ + \ + static VISIT_STRUCT_CONSTEXPR auto get_name( \ + std::integral_constant) -> decltype(#MEMBER_NAME) { \ + return #MEMBER_NAME; \ + } \ + \ + static VISIT_STRUCT_CONSTEXPR auto get_pointer( \ + std::integral_constant) -> decltype(&this_type::MEMBER_NAME) { \ + return &this_type::MEMBER_NAME; \ + } \ + \ + static VISIT_STRUCT_CONSTEXPR auto get_accessor( \ + std::integral_constant) \ + -> visit_struct::accessor { \ + return {}; \ + } \ + \ + static auto type_at(std::integral_constant) \ + -> visit_struct::type_c; // This macro specializes the trait, provides "apply" method which does the work. // Below, template parameter S should always be the same as STRUCT_NAME modulo const and reference. @@ -3485,27 +3483,27 @@ static VISIT_STRUCT_CONSTEXPR const int max_visitable_members = 75; 0 VISIT_STRUCT_PP_MAP(VISIT_STRUCT_FIELD_COUNT, __VA_ARGS__); \ \ template \ - VISIT_STRUCT_CXX14_CONSTEXPR static void apply(V &&visitor, S &&struct_instance) { \ + VISIT_STRUCT_CXX14_CONSTEXPR static void apply(V&& visitor, S&& struct_instance) { \ VISIT_STRUCT_PP_MAP(VISIT_STRUCT_MEMBER_HELPER, __VA_ARGS__) \ } \ \ template \ - VISIT_STRUCT_CXX14_CONSTEXPR static void apply(V &&visitor, S1 &&s1, S2 &&s2) { \ + VISIT_STRUCT_CXX14_CONSTEXPR static void apply(V&& visitor, S1&& s1, S2&& s2) { \ VISIT_STRUCT_PP_MAP(VISIT_STRUCT_MEMBER_HELPER_PAIR, __VA_ARGS__) \ } \ \ template \ - VISIT_STRUCT_CXX14_CONSTEXPR static void visit_pointers(V &&visitor) { \ + VISIT_STRUCT_CXX14_CONSTEXPR static void visit_pointers(V&& visitor) { \ VISIT_STRUCT_PP_MAP(VISIT_STRUCT_MEMBER_HELPER_PTR, __VA_ARGS__) \ } \ \ template \ - VISIT_STRUCT_CXX14_CONSTEXPR static void visit_types(V &&visitor) { \ + VISIT_STRUCT_CXX14_CONSTEXPR static void visit_types(V&& visitor) { \ VISIT_STRUCT_PP_MAP(VISIT_STRUCT_MEMBER_HELPER_TYPE, __VA_ARGS__) \ } \ \ template \ - VISIT_STRUCT_CXX14_CONSTEXPR static void visit_accessors(V &&visitor) { \ + VISIT_STRUCT_CXX14_CONSTEXPR static void visit_accessors(V&& visitor) { \ VISIT_STRUCT_PP_MAP(VISIT_STRUCT_MEMBER_HELPER_ACC, __VA_ARGS__) \ } \ \ diff --git a/modules/cudf/src/column.cpp b/modules/cudf/src/column.cpp index 3cbaebc1b..76bcbf3bd 100644 --- a/modules/cudf/src/column.cpp +++ b/modules/cudf/src/column.cpp @@ -226,7 +226,7 @@ Column::Column(CallbackArgs const& args) : EnvLocalObjectWrap(args) { type_ = Napi::Persistent(props.Get("type").As()); auto mask = Column::IsInstance(props) ? props.Get("mask").As() - : props.Has("nullMask") ? props.Get("nullMask").As() + : props.Has("nullMask") ? props.Get("nullMask").As() : env.Null(); auto has_length = props.Has("length") && props.Get("length").IsNumber(); diff --git a/modules/cudf/src/data_frame.ts b/modules/cudf/src/data_frame.ts index d2b2df1aa..d75fdca5e 100644 --- a/modules/cudf/src/data_frame.ts +++ b/modules/cudf/src/data_frame.ts @@ -506,7 +506,7 @@ export class DataFrame { return this.drop(names).assign( // eslint-disable-next-line @typescript-eslint/no-non-null-assertion names.reduce((xs, x) => ({...xs, [`${nameMap[x]!}`]: this.get(x)}), - {} as SeriesMap<{[K in keyof P as `${NonNullable}`]: T[string & K]}>)); + {} as SeriesMap<{[K in keyof P as `${NonNullable < P[K] >}`]: T[string & K]}>)); } /** @@ -569,8 +569,8 @@ export class DataFrame { cast(dataTypes: R, memoryResource?: MemoryResource) { const names = this.names; const types = !(dataTypes instanceof arrow.DataType) - ? dataTypes - : names.reduce((types, name) => ({...types, [name]: dataTypes}), {} as R); + ? dataTypes + : names.reduce((types, name) => ({...types, [name]: dataTypes}), {} as R); return new DataFrame(names.reduce( (columns, name) => ({ ...columns, @@ -2282,7 +2282,7 @@ export class DataFrame { const table = scope(() => { const spec = {ascending: true, null_order: nullsFirst ? 'before' : 'after'}; const by = subset.reduce((by, key) => Object.assign(by, {[key]: spec}), - {} as {[P in keyof T]: OrderSpec}); + {} as {[P in keyof T]: OrderSpec}); return this.sortValues(by).asTable().unique( column_indices, DuplicateKeepOption[keep], nullsEqual, memoryResource); }, [this]); diff --git a/modules/cudf/src/dataframe/concat.ts b/modules/cudf/src/dataframe/concat.ts index 5b168e161..e89c3304e 100644 --- a/modules/cudf/src/dataframe/concat.ts +++ b/modules/cudf/src/dataframe/concat.ts @@ -49,11 +49,11 @@ export function concat(firs * ] * ``` */ - const rows = dfs.map((df) => { // - return names.map((name) => { // - return df.has(name) // - ? df.get(name)._col as Column // - : null; + const rows = dfs.map((df) => { // + return names.map((name) => { // + return df.has(name) // + ? df.get(name)._col as Column // + : null; }); }); @@ -66,9 +66,9 @@ export function concat(firs const commonDtypes = names.map((_, colIdx) => { return rows.reduce((commonDtype: DataType|null, columns) => { const column = columns[colIdx]; - return !column ? commonDtype ///< If Column is null, return the latest common dtype - : !commonDtype ? column.type ///< If this is the first non-null Column, use its dtype - : findCommonType(commonDtype, column.type); ///< find the common dtype + return !column ? commonDtype ///< If Column is null, return the latest common dtype + : !commonDtype ? column.type ///< If this is the first non-null Column, use its dtype + : findCommonType(commonDtype, column.type); ///< find the common dtype }, null)!; }); @@ -91,7 +91,7 @@ export function concat(firs // 2. Cast non-null Columns to the common dtype const columns = rows[rowIdx].map((column, colIdx) => { const commonDtype = commonDtypes[colIdx]; - if (column === null) { // 1. + if (column === null) { // 1. return makeEmptyColumn(commonDtype); } else if (!compareTypes(column.type, commonDtype)) { // 2. return column.cast(commonDtype); diff --git a/modules/cudf/src/dataframe/join.ts b/modules/cudf/src/dataframe/join.ts index 903d99674..61f3bcc17 100644 --- a/modules/cudf/src/dataframe/join.ts +++ b/modules/cudf/src/dataframe/join.ts @@ -210,9 +210,9 @@ function mergeResults< function getColumns( lhs: DataFrame, rhsNames: readonly string[], suffix: string) { return lhs.names.reduce((cols, name) => { - const newName = on.includes(name as TOn) ? name - : rhsNames.includes(name) ? `${name}${suffix}` - : name; + const newName = on.includes(name as TOn) ? name + : rhsNames.includes(name) ? `${name}${suffix}` + : name; cols[newName] = lhs.get(name)._col; return cols; }, {}) as ColumnsMap<{ diff --git a/modules/cudf/src/groupby.ts b/modules/cudf/src/groupby.ts index ad5ccae4d..dd77b8498 100644 --- a/modules/cudf/src/groupby.ts +++ b/modules/cudf/src/groupby.ts @@ -40,7 +40,7 @@ export interface GroupByConstructor { export interface GroupBy { _getGroups(values?: Table, - memoryResource?: MemoryResource): // + memoryResource?: MemoryResource): // {keys: Table, offsets: Int32Array, values?: Table}; _argmax(values: Table, memoryResource?: MemoryResource): // @@ -49,19 +49,19 @@ export interface GroupBy { _argmin(values: Table, memoryResource?: MemoryResource): // {keys: Table, cols: Column[]}; - _count(values: Table, memoryResource?: MemoryResource): // + _count(values: Table, memoryResource?: MemoryResource): // {keys: Table, cols: Column[]}; - _max(values: Table, memoryResource?: MemoryResource): // + _max(values: Table, memoryResource?: MemoryResource): // {keys: Table, cols: Column[]}; - _mean(values: Table, memoryResource?: MemoryResource): // + _mean(values: Table, memoryResource?: MemoryResource): // {keys: Table, cols: Column[]}; _median(values: Table, memoryResource?: MemoryResource): // {keys: Table, cols: Column[]}; - _min(values: Table, memoryResource?: MemoryResource): // + _min(values: Table, memoryResource?: MemoryResource): // {keys: Table, cols: Column[]}; _nth(values: Table, memoryResource?: MemoryResource, n?: number, include_nulls?: boolean): diff --git a/modules/cudf/src/node_cudf/utilities/scalar_to_value.hpp b/modules/cudf/src/node_cudf/utilities/scalar_to_value.hpp index 6e052966f..ffab6628b 100644 --- a/modules/cudf/src/node_cudf/utilities/scalar_to_value.hpp +++ b/modules/cudf/src/node_cudf/utilities/scalar_to_value.hpp @@ -37,146 +37,146 @@ struct get_scalar_value { inline std::enable_if_t, Napi::Value> operator()( std::unique_ptr const& scalar, cudaStream_t stream = 0) { return scalar->is_valid(stream) - ? Napi::Number::New(env, - static_cast*>(scalar.get())->value(stream)) - : env.Null(); + ? Napi::Number::New(env, + static_cast*>(scalar.get())->value(stream)) + : env.Null(); } template inline std::enable_if_t, Napi::Value> operator()( std::unique_ptr const& scalar, cudaStream_t stream = 0) { return scalar->is_valid(stream) - ? Napi::Number::New(env, - static_cast*>(scalar.get())->value(stream)) - : env.Null(); + ? Napi::Number::New(env, + static_cast*>(scalar.get())->value(stream)) + : env.Null(); } template inline std::enable_if_t, Napi::Value> operator()( std::unique_ptr const& scalar, cudaStream_t stream = 0) { return scalar->is_valid(stream) - ? Napi::Number::New(env, - static_cast*>(scalar.get())->value(stream)) - : env.Null(); + ? Napi::Number::New(env, + static_cast*>(scalar.get())->value(stream)) + : env.Null(); } template inline std::enable_if_t, Napi::Value> operator()( std::unique_ptr const& scalar, cudaStream_t stream = 0) { return scalar->is_valid(stream) - ? Napi::BigInt::New(env, - static_cast*>(scalar.get())->value(stream)) - : env.Null(); + ? Napi::BigInt::New(env, + static_cast*>(scalar.get())->value(stream)) + : env.Null(); } template inline std::enable_if_t, Napi::Value> operator()( std::unique_ptr const& scalar, cudaStream_t stream = 0) { return scalar->is_valid(stream) - ? Napi::Number::New(env, - static_cast*>(scalar.get())->value(stream)) - : env.Null(); + ? Napi::Number::New(env, + static_cast*>(scalar.get())->value(stream)) + : env.Null(); } template inline std::enable_if_t, Napi::Value> operator()( std::unique_ptr const& scalar, cudaStream_t stream = 0) { return scalar->is_valid(stream) - ? Napi::Number::New(env, - static_cast*>(scalar.get())->value(stream)) - : env.Null(); + ? Napi::Number::New(env, + static_cast*>(scalar.get())->value(stream)) + : env.Null(); } template inline std::enable_if_t, Napi::Value> operator()( std::unique_ptr const& scalar, cudaStream_t stream = 0) { return scalar->is_valid(stream) - ? Napi::Number::New(env, - static_cast*>(scalar.get())->value(stream)) - : env.Null(); + ? Napi::Number::New(env, + static_cast*>(scalar.get())->value(stream)) + : env.Null(); } template inline std::enable_if_t, Napi::Value> operator()( std::unique_ptr const& scalar, cudaStream_t stream = 0) { return scalar->is_valid(stream) - ? Napi::BigInt::New(env, - static_cast*>(scalar.get())->value(stream)) - : env.Null(); + ? Napi::BigInt::New(env, + static_cast*>(scalar.get())->value(stream)) + : env.Null(); } template inline std::enable_if_t(), Napi::Value> operator()( std::unique_ptr const& scalar, cudaStream_t stream = 0) { return scalar->is_valid(stream) - ? Napi::Number::New(env, - static_cast*>(scalar.get())->value(stream)) - : env.Null(); + ? Napi::Number::New(env, + static_cast*>(scalar.get())->value(stream)) + : env.Null(); } template inline std::enable_if_t, Napi::Value> operator()( std::unique_ptr const& scalar, cudaStream_t stream = 0) { return scalar->is_valid(stream) - ? Napi::Boolean::New( - env, static_cast*>(scalar.get())->value(stream)) - : env.Null(); + ? Napi::Boolean::New( + env, static_cast*>(scalar.get())->value(stream)) + : env.Null(); } template inline std::enable_if_t, Napi::Value> operator()( std::unique_ptr const& scalar, cudaStream_t stream = 0) { return scalar->is_valid(stream) - ? Napi::Value::From(env, - static_cast(scalar.get())->to_string(stream)) - : env.Null(); + ? Napi::Value::From(env, + static_cast(scalar.get())->to_string(stream)) + : env.Null(); } template inline std::enable_if_t(), Napi::Value> operator()( std::unique_ptr const& scalar, cudaStream_t stream = 0) { return scalar->is_valid(stream) - ? Napi::Value::From( - env, static_cast*>(scalar.get())->value(stream)) - : env.Null(); + ? Napi::Value::From(env, + static_cast*>(scalar.get())->value(stream)) + : env.Null(); } template inline std::enable_if_t(), Napi::Value> operator()( std::unique_ptr const& scalar, cudaStream_t stream = 0) { return scalar->is_valid(stream) - ? Napi::Value::From( - env, static_cast*>(scalar.get())->value(stream)) - : env.Null(); + ? Napi::Value::From(env, + static_cast*>(scalar.get())->value(stream)) + : env.Null(); } template inline std::enable_if_t, Napi::Value> operator()( std::unique_ptr const& scalar, cudaStream_t stream = 0) { return scalar->is_valid(stream) - ? Napi::Value::From( - env, static_cast*>(scalar.get())->value(stream)) - : env.Null(); + ? Napi::Value::From( + env, static_cast*>(scalar.get())->value(stream)) + : env.Null(); } template inline std::enable_if_t, Napi::Value> operator()( std::unique_ptr const& scalar, cudaStream_t stream = 0) { return scalar->is_valid(stream) - ? Napi::Value::From( - env, static_cast*>(scalar.get())->value(stream)) - : env.Null(); + ? Napi::Value::From( + env, static_cast*>(scalar.get())->value(stream)) + : env.Null(); } template inline std::enable_if_t, Napi::Value> operator()( std::unique_ptr const& scalar, cudaStream_t stream = 0) { return scalar->is_valid(stream) - ? Column::New(env, - std::make_unique( - // The list_scalar's column_view is copied here because the underlying - // column cannot be moved. - static_cast(scalar.get())->view(), - stream)) - : env.Null(); + ? Column::New(env, + std::make_unique( + // The list_scalar's column_view is copied here because the underlying + // column cannot be moved. + static_cast(scalar.get())->view(), + stream)) + : env.Null(); } template inline std::enable_if_t, Napi::Value> operator()( std::unique_ptr const& scalar, cudaStream_t stream = 0) { return scalar->is_valid(stream) - ? Table::New(env, - std::make_unique( - // The struct_scalar's table_view is copied here because the underlying - // table cannot be moved. - static_cast(scalar.get())->view(), - stream)) - : env.Null(); + ? Table::New(env, + std::make_unique( + // The struct_scalar's table_view is copied here because the underlying + // table cannot be moved. + static_cast(scalar.get())->view(), + stream)) + : env.Null(); } template inline std::enable_if_t() || // diff --git a/modules/cudf/src/series.ts b/modules/cudf/src/series.ts index 81c900268..cb8d4e3e6 100644 --- a/modules/cudf/src/series.ts +++ b/modules/cudf/src/series.ts @@ -155,8 +155,8 @@ export type Series = { [arrow.Type.Binary]: never, [arrow.Type.Utf8]: StringSeries, [arrow.Type.Bool]: Bool8Series, - [arrow.Type.Decimal]: never, // TODO - [arrow.Type.Date]: never, // TODO + [arrow.Type.Decimal]: never, // TODO + [arrow.Type.Date]: never, // TODO [arrow.Type.DateDay]: TimestampDaySeries, [arrow.Type.DateMillisecond]: TimestampMillisecondSeries, [arrow.Type.Time]: never, // TODO @@ -174,12 +174,12 @@ export type Series = { [arrow.Type.IntervalYearMonth]: never, // TODO [arrow.Type.List]: ListSeries<(T extends List ? T['valueType'] : any)>, [arrow.Type.Struct]: StructSeries<(T extends Struct ? T['dataTypes'] : any)>, - [arrow.Type.Union]: never, // TODO - [arrow.Type.DenseUnion]: never, // TODO - [arrow.Type.SparseUnion]: never, // TODO - [arrow.Type.FixedSizeBinary]: never, // TODO - [arrow.Type.FixedSizeList]: never, // TODO - [arrow.Type.Map]: never, // TODO + [arrow.Type.Union]: never, // TODO + [arrow.Type.DenseUnion]: never, // TODO + [arrow.Type.SparseUnion]: never, // TODO + [arrow.Type.FixedSizeBinary]: never, // TODO + [arrow.Type.FixedSizeList]: never, // TODO + [arrow.Type.Map]: never, // TODO [arrow.Type.Dictionary]: CategoricalSeries<(T extends arrow.Dictionary ? T['valueType'] : any)> }[T['TType']]; diff --git a/modules/cudf/src/series/integral.ts b/modules/cudf/src/series/integral.ts index 75cd2418a..c2004e20e 100644 --- a/modules/cudf/src/series/integral.ts +++ b/modules/cudf/src/series/integral.ts @@ -39,7 +39,6 @@ import { Uint8, Utf8String } from '../types/dtypes'; - import {CommonType} from '../types/mappings'; import {Float64Series} from './float'; @@ -93,8 +92,8 @@ abstract class IntSeries extends NumericSeries { default: break; } return rhs instanceof Scalar - ? Series.new(this._col.bitwiseAnd(rhs, memoryResource)) - : Series.new(this._col.bitwiseAnd(rhs._col as Column, memoryResource)); + ? Series.new(this._col.bitwiseAnd(rhs, memoryResource)) + : Series.new(this._col.bitwiseAnd(rhs._col as Column, memoryResource)); } /** @@ -117,8 +116,8 @@ abstract class IntSeries extends NumericSeries { default: break; } return rhs instanceof Scalar - ? Series.new(this._col.bitwiseOr(rhs, memoryResource)) - : Series.new(this._col.bitwiseOr(rhs._col as Column, memoryResource)); + ? Series.new(this._col.bitwiseOr(rhs, memoryResource)) + : Series.new(this._col.bitwiseOr(rhs._col as Column, memoryResource)); } /** @@ -141,8 +140,8 @@ abstract class IntSeries extends NumericSeries { default: break; } return rhs instanceof Scalar - ? Series.new(this._col.bitwiseXor(rhs, memoryResource)) - : Series.new(this._col.bitwiseXor(rhs._col as Column, memoryResource)); + ? Series.new(this._col.bitwiseXor(rhs, memoryResource)) + : Series.new(this._col.bitwiseXor(rhs._col as Column, memoryResource)); } /** @@ -165,8 +164,8 @@ abstract class IntSeries extends NumericSeries { default: break; } return rhs instanceof Scalar - ? Series.new(this._col.shiftLeft(rhs, memoryResource)) - : Series.new(this._col.shiftLeft(rhs._col as Column, memoryResource)); + ? Series.new(this._col.shiftLeft(rhs, memoryResource)) + : Series.new(this._col.shiftLeft(rhs._col as Column, memoryResource)); } /** @@ -190,8 +189,8 @@ abstract class IntSeries extends NumericSeries { default: break; } return rhs instanceof Scalar - ? Series.new(this._col.shiftRight(rhs, memoryResource)) - : Series.new(this._col.shiftRight(rhs._col as Column, memoryResource)); + ? Series.new(this._col.shiftRight(rhs, memoryResource)) + : Series.new(this._col.shiftRight(rhs._col as Column, memoryResource)); } /** @@ -215,8 +214,8 @@ abstract class IntSeries extends NumericSeries { default: break; } return rhs instanceof Scalar - ? Series.new(this._col.shiftRightUnsigned(rhs, memoryResource)) - : Series.new(this._col.shiftRightUnsigned(rhs._col as Column, memoryResource)); + ? Series.new(this._col.shiftRightUnsigned(rhs, memoryResource)) + : Series.new(this._col.shiftRightUnsigned(rhs._col as Column, memoryResource)); } /** diff --git a/modules/cudf/src/series/struct.ts b/modules/cudf/src/series/struct.ts index d7135daf6..a0c2089b1 100644 --- a/modules/cudf/src/series/struct.ts +++ b/modules/cudf/src/series/struct.ts @@ -13,6 +13,7 @@ // limitations under the License. import {MemoryResource} from '@rapidsai/rmm'; + import {Series} from '../series'; import {Struct, Utf8String} from '../types/dtypes'; import {TypeMap} from '../types/mappings'; @@ -22,6 +23,7 @@ import {TypeMap} from '../types/mappings'; */ export class StructSeries extends Series> { /** @ignore */ + // eslint-disable-next-line @typescript-eslint/no-unused-vars _castAsString(_memoryResource?: MemoryResource): Series { return Series.new(this.toArray().map((x) => JSON.stringify(x))); } @@ -70,8 +72,8 @@ export class StructSeries extends Series> { getValue(index: number) { const value = this._col.getValue(index); return value === null - ? null - : this.type.children.reduce( - (xs, f, i) => ({...xs, [f.name]: value.getColumnByIndex(i).getValue(0)}), {}); + ? null + : this.type.children.reduce( + (xs, f, i) => ({...xs, [f.name]: value.getColumnByIndex(i).getValue(0)}), {}); } } diff --git a/modules/cudf/src/table.ts b/modules/cudf/src/table.ts index 550c778bb..cb29b264e 100644 --- a/modules/cudf/src/table.ts +++ b/modules/cudf/src/table.ts @@ -19,8 +19,7 @@ import {Field} from 'apache-arrow'; import CUDF from './addon'; import {Column} from './column'; import {Scalar} from './scalar'; -import {ReadCSVOptions} from './types/csv'; -import {TableWriteCSVOptions} from './types/csv'; +import {ReadCSVOptions, TableWriteCSVOptions} from './types/csv'; import {Bool8, DataType, IndexType, Int32} from './types/dtypes'; import {DuplicateKeepOption} from './types/enums'; import {TypeMap} from './types/mappings'; diff --git a/modules/cudf/src/table/read_csv.cpp b/modules/cudf/src/table/read_csv.cpp index 9e76b3ea9..dfd086f2d 100644 --- a/modules/cudf/src/table/read_csv.cpp +++ b/modules/cudf/src/table/read_csv.cpp @@ -239,8 +239,8 @@ Napi::Value Table::read_csv(Napi::CallbackInfo const& info) { NODE_CUDF_EXPECT(sources.IsArray(), "readCSV expects an Array of paths or buffers", env); try { return (options.Get("sourceType").ToString().Utf8Value() == "files") - ? read_csv_files(options, NapiToCPP{sources}) - : read_csv_strings(options, NapiToCPP{sources}); + ? read_csv_files(options, NapiToCPP{sources}) + : read_csv_strings(options, NapiToCPP{sources}); } catch (std::exception const& e) { throw Napi::Error::New(env, e.what()); } } diff --git a/modules/cudf/src/table/read_orc.cpp b/modules/cudf/src/table/read_orc.cpp index ee5cbbad6..55e15f631 100644 --- a/modules/cudf/src/table/read_orc.cpp +++ b/modules/cudf/src/table/read_orc.cpp @@ -107,8 +107,8 @@ Napi::Value Table::read_orc(Napi::CallbackInfo const& info) { NODE_CUDF_EXPECT(sources.IsArray(), "readORC expects an Array of paths or buffers", env); try { return (options.Get("sourceType").ToString().Utf8Value() == "files") - ? read_orc_files(options, NapiToCPP{sources}) - : read_orc_sources(options, NapiToCPP{sources}); + ? read_orc_files(options, NapiToCPP{sources}) + : read_orc_sources(options, NapiToCPP{sources}); } catch (std::exception const& e) { throw Napi::Error::New(env, e.what()); } } diff --git a/modules/cudf/src/table/read_parquet.cpp b/modules/cudf/src/table/read_parquet.cpp index 08195c9b8..722cb38a0 100644 --- a/modules/cudf/src/table/read_parquet.cpp +++ b/modules/cudf/src/table/read_parquet.cpp @@ -107,8 +107,8 @@ Napi::Value Table::read_parquet(Napi::CallbackInfo const& info) { NODE_CUDF_EXPECT(sources.IsArray(), "readParquet expects an Array of paths or buffers", env); try { return (options.Get("sourceType").ToString().Utf8Value() == "files") - ? read_parquet_files(options, NapiToCPP{sources}) - : read_parquet_sources(options, NapiToCPP{sources}); + ? read_parquet_files(options, NapiToCPP{sources}) + : read_parquet_sources(options, NapiToCPP{sources}); } catch (std::exception const& e) { throw Napi::Error::New(env, e.what()); } } diff --git a/modules/cudf/src/table/write_csv.cpp b/modules/cudf/src/table/write_csv.cpp index 858abf02c..ae04852b3 100644 --- a/modules/cudf/src/table/write_csv.cpp +++ b/modules/cudf/src/table/write_csv.cpp @@ -41,8 +41,8 @@ cudf::io::table_metadata make_csv_writer_metadata(Napi::Object const& options, if (bool_opt("header", true)) { Napi::Array column_names = napi_opt("columnNames").IsArray() - ? napi_opt("columnNames").As() - : Napi::Array::New(env, table.num_columns()); + ? napi_opt("columnNames").As() + : Napi::Array::New(env, table.num_columns()); metadata.column_names.reserve(table.num_columns()); for (auto i = 0u; i < column_names.Length(); ++i) { auto name = column_names.Has(i) ? column_names.Get(i) : env.Null(); diff --git a/modules/cudf/src/types/dtypes.ts b/modules/cudf/src/types/dtypes.ts index 1f5204bea..a17248c6f 100644 --- a/modules/cudf/src/types/dtypes.ts +++ b/modules/cudf/src/types/dtypes.ts @@ -16,6 +16,7 @@ import * as arrow from 'apache-arrow'; import {Column} from '../column'; import {Table} from '../table'; + import {TypeMap} from './mappings'; export type FloatingPoint = Float32|Float64; diff --git a/modules/cudf/src/types/enums.ts b/modules/cudf/src/types/enums.ts index 5c5348058..37116572e 100644 --- a/modules/cudf/src/types/enums.ts +++ b/modules/cudf/src/types/enums.ts @@ -15,14 +15,12 @@ /** * @summary The desired order of null compared to other elements for a column. */ -export enum NullOrder -{ +export enum NullOrder { after, before } -export enum DuplicateKeepOption -{ +export enum DuplicateKeepOption { any, // Keeps an unspecified occurrence. first, // Keeps first duplicate row and unique rows. last, // Keeps last duplicate row and unique rows. diff --git a/modules/cudf/src/types/mappings.ts b/modules/cudf/src/types/mappings.ts index 5e480c9e7..6e5c40b73 100644 --- a/modules/cudf/src/types/mappings.ts +++ b/modules/cudf/src/types/mappings.ts @@ -43,8 +43,7 @@ import { Utf8String } from './dtypes'; -export enum Interpolation -{ +export enum Interpolation { linear, ///< Linear interpolation between i and j lower, ///< Lower data point (i) higher, ///< Higher data point (j) diff --git a/modules/cudf/src/utilities/metadata.cpp b/modules/cudf/src/utilities/metadata.cpp index 19af0ad80..436c9043f 100644 --- a/modules/cudf/src/utilities/metadata.cpp +++ b/modules/cudf/src/utilities/metadata.cpp @@ -30,8 +30,8 @@ cudf::io::table_input_metadata make_writer_columns_metadata(Napi::Object const& auto null_value = str_opt("nullValue", "N/A"); cudf::io::table_input_metadata metadata{}; Napi::Array column_names = napi_opt("columnNames").IsArray() - ? napi_opt("columnNames").As() - : Napi::Array::New(env, table.num_columns()); + ? napi_opt("columnNames").As() + : Napi::Array::New(env, table.num_columns()); metadata.column_metadata.reserve(table.num_columns()); for (uint32_t i = 0; i < column_names.Length(); ++i) { auto name = column_names.Has(i) ? column_names.Get(i) : env.Null(); diff --git a/modules/cudf/test/cudf-column-tests.ts b/modules/cudf/test/cudf-column-tests.ts index 1222ea1f1..d7f516141 100644 --- a/modules/cudf/test/cudf-column-tests.ts +++ b/modules/cudf/test/cudf-column-tests.ts @@ -282,25 +282,26 @@ describe('Column.replaceSlice', () => { describe('Column.setNullMask', () => { const arange = (length: number) => Array.from({length}, (_, i) => i); - const makeTestColumn = (length: number) => + const makeTestColumn = (length: number) => new Column({type: new Int32, length, data: arange(length)}); - const validateSetNullMask = (col: Column, length: number, expectedNullCount: number, newNullMask: any, ...args: [any?]) => { - expect(col.length).toBe(length); - expect(col.nullCount).toBe(0); - - col.setNullMask(newNullMask, ...args); - - expect(col.length).toBe(length); - expect(col.nullCount).toBe(expectedNullCount); - expect(col.hasNulls).toBe(expectedNullCount > 0); - expect(col.nullable).toBe(newNullMask != null); - if (newNullMask == null) { - expect(col.mask.byteLength).toBe(0); - } else { - expect(col.mask.byteLength).toBe((((length >> 3) + 63) & ~63) || 64); - } - }; + const validateSetNullMask = + (col: Column, length: number, expectedNullCount: number, newNullMask: any, ...args: [any?]) => { + expect(col.length).toBe(length); + expect(col.nullCount).toBe(0); + + col.setNullMask(newNullMask, ...args); + + expect(col.length).toBe(length); + expect(col.nullCount).toBe(expectedNullCount); + expect(col.hasNulls).toBe(expectedNullCount > 0); + expect(col.nullable).toBe(newNullMask != null); + if (newNullMask == null) { + expect(col.mask.byteLength).toBe(0); + } else { + expect(col.mask.byteLength).toBe((((length >> 3) + 63) & ~63) || 64); + } + }; test('recomputes nullCount (all null)', () => { validateSetNullMask(makeTestColumn(4), 4, 4, new Uint8Buffer(64).buffer); }); diff --git a/modules/cudf/test/cudf-groupby-tests.ts b/modules/cudf/test/cudf-groupby-tests.ts index d47b89cf3..41835f89b 100644 --- a/modules/cudf/test/cudf-groupby-tests.ts +++ b/modules/cudf/test/cudf-groupby-tests.ts @@ -58,7 +58,7 @@ function basicAggCompare => // (x && typeof x === 'object' && typeof x[Symbol.iterator]); - const unwrap = (xs: any[]): any[][] => // + const unwrap = (xs: any[]): any[][] => // xs.map((ys) => isIterable(ys) ? unwrap([...ys]) : ys); const actual_rb_lists = unwrap([...rb]); diff --git a/modules/cudf/test/cudf-scope-test.ts b/modules/cudf/test/cudf-scope-test.ts index 93e876d19..62f8cc904 100644 --- a/modules/cudf/test/cudf-scope-test.ts +++ b/modules/cudf/test/cudf-scope-test.ts @@ -36,7 +36,7 @@ test('basic disposes promise', async () => { }); const resolver = async () => promise; - const result = await resolver(); + const result = await resolver(); expect(test._col.disposed).toBe(true); expect(result._col.disposed).toBe(false); diff --git a/modules/cudf/test/dataframe/arrow-tests.ts b/modules/cudf/test/dataframe/arrow-tests.ts index 468a507a4..ed8ba875b 100644 --- a/modules/cudf/test/dataframe/arrow-tests.ts +++ b/modules/cudf/test/dataframe/arrow-tests.ts @@ -33,8 +33,8 @@ test(`fromArrow works from host memory`, () => { }); const serialized_table = arrow.tableToIPC(table); // Uint8Array const df = DataFrame.fromArrow<{ - ints: Int32, // - floats: Float64, // + ints: Int32, // + floats: Float64, // points: Struct<{ x: Float64, y: Float64, diff --git a/modules/cugraph/src/hypergraph.ts b/modules/cugraph/src/hypergraph.ts index ca656a9ae..cb7128308 100644 --- a/modules/cugraph/src/hypergraph.ts +++ b/modules/cugraph/src/hypergraph.ts @@ -12,8 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {Categorical, DataFrame, Int32, Series, StringSeries, Utf8String} from '@rapidsai/cudf'; -import {TypeMap} from '@rapidsai/cudf'; +import { + Categorical, + DataFrame, + Int32, + Series, + StringSeries, + TypeMap, + Utf8String +} from '@rapidsai/cudf'; + import {Graph} from './graph'; export type HypergraphBaseProps = { @@ -91,8 +99,7 @@ export type HypergraphReturn = { * ``eventId`` to a row's unique ID, ``skip`` to all non-categorical columns (or ``columns`` to all * categorical columns), and ``categories`` to group columns with the same kinds of values. */ -export function -hypergraph(values: DataFrame, { +export function hypergraph(values: DataFrame, { columns = values.names, dropNulls = true, categories = {}, diff --git a/modules/cugraph/src/layout/force_atlas2.cpp b/modules/cugraph/src/layout/force_atlas2.cpp index 912dbcf42..b0ddd01ec 100644 --- a/modules/cugraph/src/layout/force_atlas2.cpp +++ b/modules/cugraph/src/layout/force_atlas2.cpp @@ -23,28 +23,28 @@ namespace nv { namespace { -int get_int(NapiToCPP const &opt, int const default_val) { +int get_int(NapiToCPP const& opt, int const default_val) { return opt.IsNumber() ? opt.operator int() : default_val; } -bool get_bool(NapiToCPP const &opt, bool const default_val) { +bool get_bool(NapiToCPP const& opt, bool const default_val) { return opt.IsBoolean() ? opt.operator bool() : default_val; } -float get_float(NapiToCPP const &opt, float const default_val) { +float get_float(NapiToCPP const& opt, float const default_val) { return opt.IsNumber() ? opt.operator float() : default_val; } } // namespace -Napi::Value Graph::force_atlas2(Napi::CallbackInfo const &info) { +Napi::Value Graph::force_atlas2(Napi::CallbackInfo const& info) { auto env = info.Env(); CallbackArgs const args{info}; NapiToCPP::Object options = args[0]; auto mr = MemoryResource::IsInstance(options.Get("memoryResource")) - ? MemoryResource::wrapper_t(options.Get("memoryResource")) - : MemoryResource::Current(env); + ? MemoryResource::wrapper_t(options.Get("memoryResource")) + : MemoryResource::Current(env); auto max_iter = get_int(options.Get("numIterations"), 1); auto outbound_attraction = get_bool(options.Get("outboundAttraction"), true); @@ -59,25 +59,25 @@ Napi::Value Graph::force_atlas2(Napi::CallbackInfo const &info) { auto verbose = get_bool(options.Get("verbose"), false); size_t positions_offset{0}; - float *x_positions{nullptr}; - float *y_positions{nullptr}; + float* x_positions{nullptr}; + float* y_positions{nullptr}; Napi::Object positions; bool positions_is_device_memory_wrapper{false}; - auto is_device_memory = [&](Napi::Value const &data) -> bool { + auto is_device_memory = [&](Napi::Value const& data) -> bool { return data.IsObject() and // data.As().Has("ptr") and // data.As().Get("ptr").IsNumber(); }; - auto is_device_memory_wrapper = [&](Napi::Value const &data) -> bool { + auto is_device_memory_wrapper = [&](Napi::Value const& data) -> bool { return data.IsObject() and // data.As().Has("buffer") and // data.As().Get("buffer").IsObject() and // is_device_memory(data.As().Get("buffer")); }; - auto get_device_memory_ptr = [&](Napi::Object const &buffer) -> float * { - return reinterpret_cast(buffer.Get("ptr").ToNumber().Int64Value()) + positions_offset; + auto get_device_memory_ptr = [&](Napi::Object const& buffer) -> float* { + return reinterpret_cast(buffer.Get("ptr").ToNumber().Int64Value()) + positions_offset; }; if (options.Has("positions") && options.Get("positions").IsObject()) { @@ -130,7 +130,7 @@ Napi::Value Graph::force_atlas2(Napi::CallbackInfo const &info) { strong_gravity_mode, gravity, verbose); - } catch (std::exception const &e) { throw Napi::Error::New(info.Env(), e.what()); } + } catch (std::exception const& e) { throw Napi::Error::New(info.Env(), e.what()); } return positions_is_device_memory_wrapper ? options.Get("positions").As() : positions; diff --git a/modules/cugraph/test/hypergraph-tests.ts b/modules/cugraph/test/hypergraph-tests.ts index fb56ca90a..294683b92 100644 --- a/modules/cugraph/test/hypergraph-tests.ts +++ b/modules/cugraph/test/hypergraph-tests.ts @@ -193,7 +193,9 @@ test('drop_edge_attrs', () => { 'event_id::2', ]); - expect([...edges.get('edge_type')]).toEqual(['a1', 'a1', 'a1', 'id', 'id', 'id', '🙈', '🙈', '🙈']); + expect([ + ...edges.get('edge_type') + ]).toEqual(['a1', 'a1', 'a1', 'id', 'id', 'id', '🙈', '🙈', '🙈']); expect([...edges.get('attrib_id')]).toEqual([ 'a1::1', diff --git a/modules/cuml/src/mappings.ts b/modules/cuml/src/mappings.ts index 0456e9b74..f2f4d4e0d 100644 --- a/modules/cuml/src/mappings.ts +++ b/modules/cuml/src/mappings.ts @@ -11,14 +11,12 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -export enum MetricType -{ +export enum MetricType { CATEGORICAL, EUCLIDEAN } -export enum CUMLLogLevels -{ +export enum CUMLLogLevels { CUML_LEVEL_OFF, CUML_LEVEL_CRITICAL, CUML_LEVEL_ERROR, diff --git a/modules/cuml/src/umap.cpp b/modules/cuml/src/umap.cpp index de4cc29cd..dab763051 100644 --- a/modules/cuml/src/umap.cpp +++ b/modules/cuml/src/umap.cpp @@ -85,8 +85,8 @@ ML::UMAPParams update_params(NapiToCPP::Object props) { params.init = get_int(props.Get("init"), 1); params.target_n_neighbors = get_int(props.Get("targetNNeighbors"), 1); params.target_metric = (get_int(props.Get("targetMetric"), 0) == 0) - ? ML::UMAPParams::MetricType::CATEGORICAL - : ML::UMAPParams::MetricType::EUCLIDEAN; + ? ML::UMAPParams::MetricType::CATEGORICAL + : ML::UMAPParams::MetricType::EUCLIDEAN; params.target_weight = get_float(props.Get("targetWeight"), 0.5); params.random_state = get_int(props.Get("randomState"), 0); return params; diff --git a/modules/glfw/src/glfw.ts b/modules/glfw/src/glfw.ts index c5c8d3f77..8873f72eb 100644 --- a/modules/glfw/src/glfw.ts +++ b/modules/glfw/src/glfw.ts @@ -104,119 +104,119 @@ export const REPEAT = GLFW.REPEAT; export const RELEASE = GLFW.RELEASE; // export const init: () => void = GLFW.init; -export const terminate: () => void = GLFW.terminate; +export const terminate: () => void = GLFW.terminate; export const initHint: (hint: number, value: number|boolean) => void = GLFW.initHint; -export const getVersion: () => GLFWVersion = GLFW.getVersion; -export const getVersionString: () => string = GLFW.getVersionString; -export const getError: () => Error | undefined = GLFW.getError; -export const getMonitors: () => GLFWmonitor[] = GLFW.getMonitors; -export const getPrimaryMonitor: () => GLFWmonitor = GLFW.getPrimaryMonitor; +export const getVersion: () => GLFWVersion = GLFW.getVersion; +export const getVersionString: () => string = GLFW.getVersionString; +export const getError: () => Error | undefined = GLFW.getError; +export const getMonitors: () => GLFWmonitor[] = GLFW.getMonitors; +export const getPrimaryMonitor: () => GLFWmonitor = GLFW.getPrimaryMonitor; export const getMonitorPos: (monitor: GLFWmonitor) => GLFWPosition = GLFW.getMonitorPos; export const getMonitorWorkarea: (monitor: GLFWmonitor) => GLFWPositionAndSize = GLFW.getMonitorWorkarea; export const getMonitorPhysicalSize: (monitor: GLFWmonitor) => GLFWSize = GLFW.getMonitorPhysicalSize; export const getMonitorContentScale: - (monitor: GLFWmonitor) => GLFWScale = GLFW.getMonitorContentScale; -export const getMonitorName: (monitor: GLFWmonitor) => string = GLFW.getMonitorName; + (monitor: GLFWmonitor) => GLFWScale = GLFW.getMonitorContentScale; +export const getMonitorName: (monitor: GLFWmonitor) => string = GLFW.getMonitorName; export const getVideoModes: (monitor: GLFWmonitor) => GLFWvidmode[] = GLFW.getVideoModes; -export const getVideoMode: (monitor: GLFWmonitor) => GLFWvidmode = GLFW.getVideoMode; +export const getVideoMode: (monitor: GLFWmonitor) => GLFWvidmode = GLFW.getVideoMode; export const setGamma: (monitor: GLFWmonitor, gamma: number) => void = GLFW.setGamma; -export const getGammaRamp: (monitor: GLFWmonitor) => GLFWgammaramp = GLFW.getGammaRamp; +export const getGammaRamp: (monitor: GLFWmonitor) => GLFWgammaramp = GLFW.getGammaRamp; export const setGammaRamp: (monitor: GLFWmonitor, rapi: GLFWgammaramp) => void = GLFW.setGammaRamp; -export const defaultWindowHints: () => void = GLFW.defaultWindowHints; +export const defaultWindowHints: () => void = GLFW.defaultWindowHints; export const windowHint: (hint: GLFWWindowAttribute, - value: number|boolean) => void = GLFW.windowHint; + value: number|boolean) => void = GLFW.windowHint; export const windowHintString: (hint: string, - value: number|boolean) => void = GLFW.windowHintString; + value: number|boolean) => void = GLFW.windowHintString; export const createWindow: (width: number, height: number, title: string, monitor?: GLFWmonitor|null, - root?: GLFWwindow|null) => GLFWwindow = GLFW.createWindow; + root?: GLFWwindow|null) => GLFWwindow = GLFW.createWindow; export const reparentWindow: (child: GLFWwindow, parent: GLFWParentWindow, targetX: number, - targetY: number) => void = GLFW.reparentWindow; -export const destroyWindow: (window: GLFWwindow) => void = GLFW.destroyWindow; -export const windowShouldClose: (window: GLFWwindow) => boolean = GLFW.windowShouldClose; + targetY: number) => void = GLFW.reparentWindow; +export const destroyWindow: (window: GLFWwindow) => void = GLFW.destroyWindow; +export const windowShouldClose: (window: GLFWwindow) => boolean = GLFW.windowShouldClose; export const setWindowShouldClose: (window: GLFWwindow, - shouldClose: boolean) => void = GLFW.setWindowShouldClose; + shouldClose: boolean) => void = GLFW.setWindowShouldClose; export const setWindowTitle: (window: GLFWwindow, title: string) => void = GLFW.setWindowTitle; export const setWindowIcon: (window: GLFWwindow, icon: GLFWimage) => void = GLFW.setWindowIcon; -export const getWindowPos: (window: GLFWwindow) => GLFWPosition = GLFW.getWindowPos; +export const getWindowPos: (window: GLFWwindow) => GLFWPosition = GLFW.getWindowPos; export const setWindowPos: (window: GLFWwindow, position: GLFWPosition) => void = GLFW.setWindowPos; -export const getWindowSize: (window: GLFWwindow) => GLFWSize = GLFW.getWindowSize; +export const getWindowSize: (window: GLFWwindow) => GLFWSize = GLFW.getWindowSize; export const setWindowSizeLimits: (window: GLFWwindow, limits: GLFWSizeLimits) => void = GLFW.setWindowSizeLimits; export const setWindowAspectRatio: - (window: GLFWwindow, num: number, denom: number) => void = GLFW.setWindowAspectRatio; + (window: GLFWwindow, num: number, denom: number) => void = GLFW.setWindowAspectRatio; export const setWindowSize: (window: GLFWwindow, size: GLFWSize) => void = GLFW.setWindowSize; export const getFramebufferSize: (window: GLFWwindow) => GLFWSize = GLFW.getFramebufferSize; export const getWindowFrameSize: (window: GLFWwindow) => GLFWRect = GLFW.getWindowFrameSize; export const getWindowContentScale: (window: GLFWwindow) => GLFWScale = GLFW.getWindowContentScale; -export const getWindowOpacity: (window: GLFWwindow) => number = GLFW.getWindowOpacity; +export const getWindowOpacity: (window: GLFWwindow) => number = GLFW.getWindowOpacity; export const setWindowOpacity: (window: GLFWwindow, - opacity: number) => void = GLFW.setWindowOpacity; -export const iconifyWindow: (window: GLFWwindow) => void = GLFW.iconifyWindow; -export const restoreWindow: (window: GLFWwindow) => void = GLFW.restoreWindow; -export const maximizeWindow: (window: GLFWwindow) => void = GLFW.maximizeWindow; -export const showWindow: (window: GLFWwindow) => void = GLFW.showWindow; -export const hideWindow: (window: GLFWwindow) => void = GLFW.hideWindow; -export const focusWindow: (window: GLFWwindow) => void = GLFW.focusWindow; + opacity: number) => void = GLFW.setWindowOpacity; +export const iconifyWindow: (window: GLFWwindow) => void = GLFW.iconifyWindow; +export const restoreWindow: (window: GLFWwindow) => void = GLFW.restoreWindow; +export const maximizeWindow: (window: GLFWwindow) => void = GLFW.maximizeWindow; +export const showWindow: (window: GLFWwindow) => void = GLFW.showWindow; +export const hideWindow: (window: GLFWwindow) => void = GLFW.hideWindow; +export const focusWindow: (window: GLFWwindow) => void = GLFW.focusWindow; export const requestWindowAttention: (window: GLFWwindow) => void = GLFW.requestWindowAttention; -export const getWindowMonitor: (window: GLFWwindow) => GLFWmonitor = GLFW.getWindowMonitor; +export const getWindowMonitor: (window: GLFWwindow) => GLFWmonitor = GLFW.getWindowMonitor; export const setWindowMonitor: (window: GLFWwindow, - monitor: GLFWmonitor) => void = GLFW.setWindowMonitor; + monitor: GLFWmonitor) => void = GLFW.setWindowMonitor; export const getWindowAttrib: (window: GLFWwindow, attribute: GLFWWindowAttribute) => void = GLFW.getWindowAttrib; export const setWindowAttrib: (window: GLFWwindow, attribute: GLFWWindowAttribute, - value: number|boolean) => void = GLFW.setWindowAttrib; -export const pollEvents: () => void = GLFW.pollEvents; -export const waitEvents: () => void = GLFW.waitEvents; -export const waitEventsTimeout: (timeout: number) => void = GLFW.waitEventsTimeout; -export const postEmptyEvent: () => void = GLFW.postEmptyEvent; + value: number|boolean) => void = GLFW.setWindowAttrib; +export const pollEvents: () => void = GLFW.pollEvents; +export const waitEvents: () => void = GLFW.waitEvents; +export const waitEventsTimeout: (timeout: number) => void = GLFW.waitEventsTimeout; +export const postEmptyEvent: () => void = GLFW.postEmptyEvent; export const getInputMode: (window: GLFWwindow, mode: number) => number = GLFW.getInputMode; export const setInputMode: (window: GLFWwindow, mode: number, value: number|boolean) => void = GLFW.setInputMode; -export const rawMouseMotionSupported: () => boolean = GLFW.rawMouseMotionSupported; -export const getKeyName: (key: number, scancode: number) => string = GLFW.getKeyName; -export const getKeyScancode: (key: number) => number = GLFW.getKeyScancode; -export const getKey: (window: GLFWwindow, key: number) => void = GLFW.getKey; +export const rawMouseMotionSupported: () => boolean = GLFW.rawMouseMotionSupported; +export const getKeyName: (key: number, scancode: number) => string = GLFW.getKeyName; +export const getKeyScancode: (key: number) => number = GLFW.getKeyScancode; +export const getKey: (window: GLFWwindow, key: number) => void = GLFW.getKey; export const getMouseButton: (window: GLFWwindow, button: number) => number = GLFW.getMouseButton; -export const getCursorPos: (window: GLFWwindow) => GLFWPosition = GLFW.getCursorPos; +export const getCursorPos: (window: GLFWwindow) => GLFWPosition = GLFW.getCursorPos; export const setCursorPos: (window: GLFWwindow, position: GLFWPosition) => void = GLFW.setCursorPos; export const createCursor: - (image: GLFWimage, x: number, y: number) => GLFWcursor = GLFW.createCursor; -export const createStandardCursor: (shape: number) => GLFWcursor = GLFW.createStandardCursor; -export const destroyCursor: (cursor: GLFWcursor) => void = GLFW.destroyCursor; + (image: GLFWimage, x: number, y: number) => GLFWcursor = GLFW.createCursor; +export const createStandardCursor: (shape: number) => GLFWcursor = GLFW.createStandardCursor; +export const destroyCursor: (cursor: GLFWcursor) => void = GLFW.destroyCursor; export const setCursor: (window: GLFWwindow, cursor: GLFWcursor) => void = GLFW.setCursor; -export const joystickPresent: (joystickId: number) => boolean = GLFW.joystickPresent; +export const joystickPresent: (joystickId: number) => boolean = GLFW.joystickPresent; export const getJoystickAxes: (joystickId: number) => number[] = GLFW.getJoystickAxes; export const getJoystickButtons: (joystickId: number) => number[] = GLFW.getJoystickButtons; -export const getJoystickHats: (joystickId: number) => number[] = GLFW.getJoystickHats; -export const getJoystickName: (joystickId: number) => string = GLFW.getJoystickName; -export const getJoystickGUID: (joystickId: number) => string = GLFW.getJoystickGUID; +export const getJoystickHats: (joystickId: number) => number[] = GLFW.getJoystickHats; +export const getJoystickName: (joystickId: number) => string = GLFW.getJoystickName; +export const getJoystickGUID: (joystickId: number) => string = GLFW.getJoystickGUID; export const joystickIsGamepad: (joystickId: number) => boolean = GLFW.joystickIsGamepad; -export const updateGamepadMappings: (mappings: string) => void = GLFW.updateGamepadMappings; +export const updateGamepadMappings: (mappings: string) => void = GLFW.updateGamepadMappings; export const getGamepadName: (joystickId: number) => string = GLFW.getGamepadName; export const getGamepadState: (joystickId: number) => GLFWgamepadstate = GLFW.getGamepadState; export const setClipboardString: (window: GLFWwindow, - value: string) => void = GLFW.setClipboardString; -export const getClipboardString: (window: GLFWwindow) => string = GLFW.getClipboardString; -export const getTime: () => number = GLFW.getTime; -export const setTime: (time: number) => void = GLFW.setTime; -export const getTimerValue: () => number = GLFW.getTimerValue; -export const getTimerFrequency: () => number = GLFW.getTimerFrequency; + value: string) => void = GLFW.setClipboardString; +export const getClipboardString: (window: GLFWwindow) => string = GLFW.getClipboardString; +export const getTime: () => number = GLFW.getTime; +export const setTime: (time: number) => void = GLFW.setTime; +export const getTimerValue: () => number = GLFW.getTimerValue; +export const getTimerFrequency: () => number = GLFW.getTimerFrequency; export const makeContextCurrent: (window: GLFWwindow) => void = GLFW.makeContextCurrent; -export const getCurrentContext: () => GLFWwindow = GLFW.getCurrentContext; -export const swapBuffers: (window: GLFWwindow) => void = GLFW.swapBuffers; -export const swapInterval: (interval: number) => void = GLFW.swapInterval; -export const extensionSupported: (extension: string) => boolean = GLFW.extensionSupported; -export const getProcAddress: (procname: string) => GLFWglproc = GLFW.getProcAddress; -export const vulkanSupported: () => boolean = GLFW.vulkanSupported; +export const getCurrentContext: () => GLFWwindow = GLFW.getCurrentContext; +export const swapBuffers: (window: GLFWwindow) => void = GLFW.swapBuffers; +export const swapInterval: (interval: number) => void = GLFW.swapInterval; +export const extensionSupported: (extension: string) => boolean = GLFW.extensionSupported; +export const getProcAddress: (procname: string) => GLFWglproc = GLFW.getProcAddress; +export const vulkanSupported: () => boolean = GLFW.vulkanSupported; export const getRequiredInstanceExtensions: () => string[] = GLFW.getRequiredInstanceExtensions; export const setErrorCallback: @@ -308,29 +308,25 @@ export const GLFWStandardCursor = { VRESIZE: glfw.createStandardCursor(GLFW.VRESIZE_CURSOR), }; -export enum GLFWClientAPI -{ +export enum GLFWClientAPI { NONE = GLFW.NO_API, OPENGL = GLFW.OPENGL_API, OPENGL_ES = GLFW.OPENGL_ES_API, } -export enum GLFWOpenGLProfile -{ +export enum GLFWOpenGLProfile { ANY = GLFW.OPENGL_ANY_PROFILE, CORE = GLFW.OPENGL_CORE_PROFILE, COMPAT = GLFW.OPENGL_COMPAT_PROFILE, } -export enum GLFWContextCreationAPI -{ +export enum GLFWContextCreationAPI { EGL = GLFW.EGL_CONTEXT_API, NATIVE = GLFW.NATIVE_CONTEXT_API, OSMESA = GLFW.OSMESA_CONTEXT_API, } -export enum GLFWWindowAttribute -{ +export enum GLFWWindowAttribute { FOCUSED = GLFW.FOCUSED, ICONIFIED = GLFW.ICONIFIED, RESIZABLE = GLFW.RESIZABLE, @@ -378,8 +374,7 @@ export enum GLFWWindowAttribute X11_INSTANCE_NAME = GLFW.X11_INSTANCE_NAME, } -export enum GLFWModifierKey -{ +export enum GLFWModifierKey { MOD_ALT = GLFW.MOD_ALT, MOD_SHIFT = GLFW.MOD_SHIFT, MOD_SUPER = GLFW.MOD_SUPER, @@ -388,8 +383,7 @@ export enum GLFWModifierKey MOD_CAPS_LOCK = GLFW.MOD_CAPS_LOCK, } -export enum GLFWMouseButton -{ +export enum GLFWMouseButton { MOUSE_BUTTON_1 = GLFW.MOUSE_BUTTON_1, MOUSE_BUTTON_2 = GLFW.MOUSE_BUTTON_2, MOUSE_BUTTON_3 = GLFW.MOUSE_BUTTON_3, @@ -404,8 +398,7 @@ export enum GLFWMouseButton MOUSE_BUTTON_MIDDLE = GLFW.MOUSE_BUTTON_MIDDLE, } -export enum GLFWInputMode -{ +export enum GLFWInputMode { CURSOR = GLFW.CURSOR, STICKY_KEYS = GLFW.STICKY_KEYS, STICKY_MOUSE_BUTTONS = GLFW.STICKY_MOUSE_BUTTONS, @@ -413,8 +406,7 @@ export enum GLFWInputMode RAW_MOUSE_MOTION = GLFW.RAW_MOUSE_MOTION, } -export enum GLFWKey -{ +export enum GLFWKey { KEY_UNKNOWN = GLFW.KEY_UNKNOWN, KEY_SPACE = GLFW.KEY_SPACE, KEY_APOSTROPHE = GLFW.KEY_APOSTROPHE, diff --git a/modules/glfw/src/index.ts b/modules/glfw/src/index.ts index 7d8fe1c03..f59406c6e 100644 --- a/modules/glfw/src/index.ts +++ b/modules/glfw/src/index.ts @@ -12,16 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. -export {GLFW, isHeadless} from './glfw'; -export {glfw} from './glfw'; -export {GLFWmonitor} from './glfw'; -export {GLFWKey} from './glfw'; -export {GLFWClientAPI} from './glfw'; -export {GLFWInputMode} from './glfw'; -export {GLFWStandardCursor} from './glfw'; -export {GLFWModifierKey} from './glfw'; -export {GLFWMouseButton} from './glfw'; -export {GLFWOpenGLProfile} from './glfw'; -export {GLFWWindowAttribute} from './glfw'; -export {GLFWContextCreationAPI} from './glfw'; +export { + GLFW, + glfw, + GLFWClientAPI, + GLFWContextCreationAPI, + GLFWInputMode, + GLFWKey, + GLFWModifierKey, + GLFWmonitor, + GLFWMouseButton, + GLFWOpenGLProfile, + GLFWStandardCursor, + GLFWWindowAttribute, + isHeadless +} from './glfw'; export {Monitor} from './monitor'; diff --git a/modules/glfw/src/monitor.ts b/modules/glfw/src/monitor.ts index 047f8610e..227c4329f 100644 --- a/modules/glfw/src/monitor.ts +++ b/modules/glfw/src/monitor.ts @@ -13,6 +13,7 @@ // limitations under the License. import {EventEmitter} from 'events'; + import {glfw, GLFWmonitor} from './glfw'; export class Monitor extends EventEmitter { diff --git a/modules/jsdom/src/index.ts b/modules/jsdom/src/index.ts index b3e5ddf32..f432bbcde 100644 --- a/modules/jsdom/src/index.ts +++ b/modules/jsdom/src/index.ts @@ -182,13 +182,13 @@ ${code}`; } function installUnhandledExceptionListeners() { - process.on('uncaughtException', (err: Error, origin: any) => { + process.on('uncaughtException' as any, (err: Error, origin: any) => { /* eslint-disable @typescript-eslint/restrict-template-expressions */ process.stderr.write(`Uncaught Exception\n` + (origin ? `Origin: ${origin}\n` : '') + `Exception: ${err && err.stack || err}\n`); }); - process.on('unhandledRejection', (err: Error, promise: any) => { + process.on('unhandledRejection' as any, (err: Error, promise: any) => { /* eslint-disable @typescript-eslint/restrict-template-expressions */ process.stderr.write(`Unhandled Promise Rejection\n` + (promise ? `Promise: ${promise}\n` : '') + diff --git a/modules/jsdom/src/polyfills/canvas.ts b/modules/jsdom/src/polyfills/canvas.ts index de645c22f..29b7d1267 100644 --- a/modules/jsdom/src/polyfills/canvas.ts +++ b/modules/jsdom/src/polyfills/canvas.ts @@ -69,7 +69,10 @@ export function installGetContext(window: jsdom.DOMWindow) { null; function getContext(contextId: 'webgl2', options?: WebGLContextAttributes): WebGL2RenderingContext|null; - function getContext(this: any, ...args: ['2d' | 'bitmaprenderer' | 'webgl' | 'webgl2' | 'experimental-webgl', RenderingContextSettings?]): RenderingContext | null { + function getContext(this: any, ...args: [ + '2d'|'bitmaprenderer'|'webgl'|'webgl2'|'experimental-webgl', + RenderingContextSettings? + ]): RenderingContext|null { const [type, settings = {}] = args; switch (type) { case 'webgl': diff --git a/modules/jsdom/src/polyfills/events/event.ts b/modules/jsdom/src/polyfills/events/event.ts index 280b7ca58..aea5b1394 100644 --- a/modules/jsdom/src/polyfills/events/event.ts +++ b/modules/jsdom/src/polyfills/events/event.ts @@ -45,9 +45,8 @@ type GLFWCallbackArgs = T extends(cb: (...args: infer any ? P : never; type SetWindowCallback = (ptr: number, cb: null|((...args: any) => void)) => void; -type WindowCallbackArgs = T extends(ptr: number, - cb: (...args: infer P) => void) => - any ? P : never; +type WindowCallbackArgs = + T extends(ptr: number, cb: (...args: infer P) => void) => any ? P : never; export function glfwCallbackAsObservable(setCallback: C) { type Args = GLFWCallbackArgs; diff --git a/modules/jsdom/src/polyfills/events/keyboard.ts b/modules/jsdom/src/polyfills/events/keyboard.ts index 8c9c5f353..3c18a7955 100644 --- a/modules/jsdom/src/polyfills/events/keyboard.ts +++ b/modules/jsdom/src/polyfills/events/keyboard.ts @@ -12,11 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {glfw, GLFWKey} from '@rapidsai/glfw'; -import {GLFWInputMode} from '@rapidsai/glfw'; +import {glfw, GLFWInputMode, GLFWKey} from '@rapidsai/glfw'; import {DOMWindow} from 'jsdom'; -import {Observable} from 'rxjs'; -import {merge as mergeObservables} from 'rxjs'; +import {merge as mergeObservables, Observable} from 'rxjs'; import {filter, flatMap, map, mergeAll, publish, refCount, withLatestFrom} from 'rxjs/operators'; import { diff --git a/modules/jsdom/src/polyfills/fetch.ts b/modules/jsdom/src/polyfills/fetch.ts index 36679945d..effe42552 100644 --- a/modules/jsdom/src/polyfills/fetch.ts +++ b/modules/jsdom/src/polyfills/fetch.ts @@ -27,13 +27,12 @@ export function installFetch(window: jsdom.DOMWindow) { window.jsdom.global.Headers = Headers; window.jsdom.global.Request = Request; window.jsdom.global.Response = Response; - window.jsdom.global.fetch = function fileAwareFetch(inp: string|Request, + window.jsdom.global.fetch = function fileAwareFetch(url: string|Request, options: RequestInit = {}) { - if (typeof inp !== 'string' && ((inp instanceof Request) || ('url' in inp))) { - return fetch(inp, options); + if (typeof url !== 'string' && ((url instanceof Request) || ('url' in url))) { + return fetch(url, options); } - let url = inp as string; const isDataURI = url && url.startsWith('data:'); const isFilePath = url && !isDataURI && !Url.parse(url).protocol; if (isFilePath) { @@ -45,7 +44,7 @@ export function installFetch(window: jsdom.DOMWindow) { .then((x) => new Response(x, { status: 200, headers: { - 'Content-Type': contentTypeFromPath(url), + 'Content-Type': contentTypeFromPath(url as string), } })); } diff --git a/modules/jsdom/src/polyfills/modules/require.ts b/modules/jsdom/src/polyfills/modules/require.ts index 48e9a3eef..49f577f93 100644 --- a/modules/jsdom/src/polyfills/modules/require.ts +++ b/modules/jsdom/src/polyfills/modules/require.ts @@ -157,8 +157,8 @@ export class ContextModule extends Module { public createDynamicImporter(require: Require = this._require, context = this._context) { return context === this._context // - ? this._cachedDynamicImporter - : createDynamicImporter(require, context, this._transform); + ? this._cachedDynamicImporter + : createDynamicImporter(require, context, this._transform); } } @@ -288,9 +288,9 @@ function findNearestContextModule(mod: Module) { */ function runScript(context: vm.Context, script: vm.Script) { return context.runVMScript - ? context.runVMScript(script) - : script.runInContext(context.getInternalVMContext ? context.getInternalVMContext() - : context); + ? context.runVMScript(script) + : script.runInContext(context.getInternalVMContext ? context.getInternalVMContext() + : context); } function isContext(context: any) { diff --git a/modules/jsdom/src/polyfills/modules/resolve.ts b/modules/jsdom/src/polyfills/modules/resolve.ts index 0d211357f..1aeba55c4 100644 --- a/modules/jsdom/src/polyfills/modules/resolve.ts +++ b/modules/jsdom/src/polyfills/modules/resolve.ts @@ -36,8 +36,8 @@ export function createResolve(resolvers?: ResolversMap): Resolver { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const resolveFilename = resolvers![resolverKey(request, parent)]; return resolveFilename // - ? resolveFilename(request, parent, isMain, options) - : (Module)._resolveFilename(request, parent, isMain, options); + ? resolveFilename(request, parent, isMain, options) + : (Module)._resolveFilename(request, parent, isMain, options); } function resolverKey(request: string, parent: Module) { diff --git a/modules/jsdom/src/polyfills/modules/transform.ts b/modules/jsdom/src/polyfills/modules/transform.ts index c7c11d1f0..2d351f051 100644 --- a/modules/jsdom/src/polyfills/modules/transform.ts +++ b/modules/jsdom/src/polyfills/modules/transform.ts @@ -103,7 +103,7 @@ function normalizeOptions(options: Partial) { } function supportSourceMaps(maps: any) { - let sourceMapsSupportInstalled = false; + let sourceMapsSupportInstalled = false; return () => { if (!sourceMapsSupportInstalled) { sourceMapSupport.install({ diff --git a/modules/jsdom/src/polyfills/object-url.ts b/modules/jsdom/src/polyfills/object-url.ts index b6cb73097..9fd0abb06 100644 --- a/modules/jsdom/src/polyfills/object-url.ts +++ b/modules/jsdom/src/polyfills/object-url.ts @@ -47,10 +47,11 @@ export function installObjectURL(tmpdir: string) { function revokeObjectURL(url: any) { if (map.has(url)) { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const p = map.get(url)!; map.delete(url); unlinkSync(p); } } - } + }; } diff --git a/modules/jsdom/src/polyfills/streams.ts b/modules/jsdom/src/polyfills/streams.ts index 9053d890d..319b3d847 100644 --- a/modules/jsdom/src/polyfills/streams.ts +++ b/modules/jsdom/src/polyfills/streams.ts @@ -15,7 +15,7 @@ import * as jsdom from 'jsdom'; export function installStreams(window: jsdom.DOMWindow) { - const streams = require('web-streams-polyfill'); + const streams = require('web-streams-polyfill'); window.jsdom.global.ReadableStream ??= streams.ReadableStream; window.jsdom.global.WritableStream ??= streams.WritableStream; window.jsdom.global.TransformStream ??= streams.TransformStream; diff --git a/modules/jsdom/src/resourceloader.ts b/modules/jsdom/src/resourceloader.ts index ee750c5af..1b51c7d80 100644 --- a/modules/jsdom/src/resourceloader.ts +++ b/modules/jsdom/src/resourceloader.ts @@ -42,7 +42,7 @@ export class ImageLoader extends jsdom.ResourceLoader { private _loadDataURL(url: string, options: jsdom.FetchOptions) { const {mediaType, encoding, contents} = parseDataURLPrefix(url); switch (mediaType) { - case 'image/webp': // + case 'image/webp': // return loadWebpDataUrl(webp, encoding, contents); case 'image/svg+xml': // return loadSVGDataUrl(this._svg2img, encoding, contents, options); diff --git a/modules/rmm/src/addon.ts b/modules/rmm/src/addon.ts index b1a75c720..70b5ce9b3 100644 --- a/modules/rmm/src/addon.ts +++ b/modules/rmm/src/addon.ts @@ -33,8 +33,7 @@ export type MemoryResource = import('./node_rmm').MemoryResource; export type setPerDeviceResource = typeof import('./node_rmm').setPerDeviceResource; -export const enum MemoryResourceType -{ +export const enum MemoryResourceType { /* ALIGNED_ADAPTOR = 0, */ /* ARENA = 1, */ BINNING = 2, diff --git a/modules/rmm/src/device_buffer.cpp b/modules/rmm/src/device_buffer.cpp index 5904fc642..c6efc909c 100644 --- a/modules/rmm/src/device_buffer.cpp +++ b/modules/rmm/src/device_buffer.cpp @@ -90,9 +90,9 @@ DeviceBuffer::DeviceBuffer(CallbackArgs const& args) : EnvLocalObjectWrap() - : arg0.IsNumber() ? Span(arg0.operator size_t()) - : Span(0); + auto input = arg0.IsObject() ? arg0.operator Span() + : arg0.IsNumber() ? Span(arg0.operator size_t()) + : Span(0); mr_ = Napi::Persistent( MemoryResource::IsInstance(arg1) ? arg1.ToObject() : MemoryResource::Current(env)); diff --git a/modules/rmm/src/node_rmm.ts b/modules/rmm/src/node_rmm.ts index 87c01f2f2..1bdace661 100644 --- a/modules/rmm/src/node_rmm.ts +++ b/modules/rmm/src/node_rmm.ts @@ -13,6 +13,7 @@ // limitations under the License. import {Memory} from '@rapidsai/cuda'; + import {MemoryResourceType} from './addon'; /** @ignore */ diff --git a/modules/sql/src/SQLTable.ts b/modules/sql/src/SQLTable.ts index 39ef21436..50c1e0ef9 100644 --- a/modules/sql/src/SQLTable.ts +++ b/modules/sql/src/SQLTable.ts @@ -13,6 +13,7 @@ // limitations under the License. import {arrowToCUDFType, DataFrame, DataType} from '@rapidsai/cudf'; + import {parseSchema} from './addon'; export interface ParsedSchema { diff --git a/modules/sql/src/cluster.ts b/modules/sql/src/cluster.ts index 4b8e61ef9..2a0caffe1 100644 --- a/modules/sql/src/cluster.ts +++ b/modules/sql/src/cluster.ts @@ -16,6 +16,7 @@ import {Device} from '@rapidsai/cuda'; import {arrowToCUDFType, DataFrame, Series} from '@rapidsai/cudf'; + import {ContextProps, parseSchema} from './addon'; import {LocalSQLWorker} from './cluster/local'; import {RemoteSQLWorker} from './cluster/remote'; diff --git a/modules/sql/src/cluster/remote.ts b/modules/sql/src/cluster/remote.ts index acac5bc1f..4dd2cacf4 100644 --- a/modules/sql/src/cluster/remote.ts +++ b/modules/sql/src/cluster/remote.ts @@ -20,7 +20,6 @@ import {nanoid} from 'nanoid'; import * as Path from 'path'; import {ContextProps} from '../addon'; - import {SQLCluster, Worker} from '../cluster'; const remoteWorkerPath = @@ -137,7 +136,7 @@ export class RemoteSQLWorker implements Worker { function promiseSubject() { let resolve = (_x: any) => {}; let reject = (_er: any) => {}; - const promise = new Promise((r1, r2) => { + const promise = new Promise((r1, r2) => { resolve = r1; reject = r2; }); diff --git a/modules/sql/src/context.ts b/modules/sql/src/context.ts index f3c406b84..f52951198 100644 --- a/modules/sql/src/context.ts +++ b/modules/sql/src/context.ts @@ -13,8 +13,8 @@ // limitations under the License. import {DataFrame, DataType} from '@rapidsai/cudf'; -import {UcpContext} from '.'; +import {UcpContext} from '.'; import { Context, ContextProps, diff --git a/modules/sql/src/rapidsai_sql.ts b/modules/sql/src/rapidsai_sql.ts index 010dad8e5..fce0fe3cf 100644 --- a/modules/sql/src/rapidsai_sql.ts +++ b/modules/sql/src/rapidsai_sql.ts @@ -13,8 +13,9 @@ // limitations under the License. import {DataFrame, Table} from '@rapidsai/cudf'; -import {ParsedSchema} from './SQLTable'; + import type {defaultContextConfigValues} from './config'; +import {ParsedSchema} from './SQLTable'; /** @ignore */ export declare const _cpp_exports: any; diff --git a/modules/webgl/src/webgl.ts b/modules/webgl/src/webgl.ts index c5d8aaf85..5d3d43d2b 100644 --- a/modules/webgl/src/webgl.ts +++ b/modules/webgl/src/webgl.ts @@ -76,7 +76,9 @@ function bufferData(this: WebGL2RenderingContext, usage: GLenum, srcOffset: GLuint, srcByteLength?: GLuint): void; -function bufferData(this: WebGL2RenderingContext, ...args: [GLenum, GLsizeiptr | BufferSource | null, GLenum, GLuint?, GLuint?]): void { +function bufferData( + this: WebGL2RenderingContext, + ...args: [GLenum, GLsizeiptr|BufferSource|null, GLenum, GLuint?, GLuint?]): void { let [target, src, usage, srcOffset, srcByteLength] = args; if (args.length > 3 && src !== null && typeof src !== 'number' && typeof srcOffset === 'number') { let BPM, arr = ArrayBuffer.isView(src) ? src : new Uint8Array(src); @@ -99,7 +101,9 @@ function bufferSubData(this: WebGL2RenderingContext, srcData: ArrayBufferView, srcOffset: GLuint, srcByteLength?: GLuint): void; -function bufferSubData(this: WebGL2RenderingContext, ...args: [GLenum, GLintptr, BufferSource | ArrayBufferView, GLuint?, GLuint?]): void { +function bufferSubData( + this: WebGL2RenderingContext, + ...args: [GLenum, GLintptr, BufferSource|ArrayBufferView, GLuint?, GLuint?]): void { let [target, dstByteOffset, src, srcOffset, srcByteLength] = args; if (args.length > 3 && src !== null && typeof src !== 'number' && typeof srcOffset === 'number') { let BPM, arr = ArrayBuffer.isView(src) ? src : new Uint8Array(src); @@ -197,7 +201,18 @@ function texImage2D(this: WebGL2RenderingContext, type: GLenum, srcData?: ArrayBufferView|null, srcOffset?: GLuint): void; -function texImage2D(this: WebGL2RenderingContext, ...args: [GLenum, GLint, GLint, GLsizei | GLenum, GLsizei | GLenum, GLint | TexImageSource, GLenum?, GLenum?, (GLintptr | TexImageSource | ArrayBufferView | null)?, GLsizei?]): void { +function texImage2D(this: WebGL2RenderingContext, ...args: [ + GLenum, + GLint, + GLint, + GLsizei|GLenum, + GLsizei|GLenum, + GLint|TexImageSource, + GLenum?, + GLenum?, + (GLintptr | TexImageSource | ArrayBufferView | null)?, + GLsizei? +]): void { let [target, level, internalformat, width, height, border, format, type, src, offset = 0] = args; switch (args.length) { case 6: { @@ -289,7 +304,18 @@ function texSubImage2D(this: WebGL2RenderingContext, type: GLenum, srcData?: ArrayBufferView|null, srcOffset?: GLuint): void; -function texSubImage2D(this: WebGL2RenderingContext, ...args: [GLenum, GLint, GLint, GLint, GLenum | GLsizei, GLenum | GLsizei, GLenum | TexImageSource, GLenum?, (GLintptr | TexImageSource | ArrayBufferView | null)?, GLuint?]): void { +function texSubImage2D(this: WebGL2RenderingContext, ...args: [ + GLenum, + GLint, + GLint, + GLint, + GLenum|GLsizei, + GLenum|GLsizei, + GLenum|TexImageSource, + GLenum?, + (GLintptr | TexImageSource | ArrayBufferView | null)?, + GLuint? +]): void { let [target, level, x, y, width, height, format, type, src, offset = 0] = args; switch (args.length) { case 7: { @@ -363,7 +389,16 @@ function readPixels(this: WebGL2RenderingContext, type: GLenum, dstData: ArrayBufferView, dstOffset: GLuint): void; -function readPixels(this: WebGL2RenderingContext, ...args: [GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, (ArrayBufferView | ArrayBuffer | GLintptr | null)?, GLuint?]): void { +function readPixels(this: WebGL2RenderingContext, ...args: [ + GLint, + GLint, + GLsizei, + GLsizei, + GLenum, + GLenum, + (ArrayBufferView | ArrayBuffer | GLintptr | null)?, + GLuint? +]): void { let [x, y, width, height, format, type, dst, offset = 0] = args; switch (args.length) { case 6: @@ -375,16 +410,18 @@ function readPixels(this: WebGL2RenderingContext, ...args: [GLint, GLint, GLsize } if (args[6] === null || args[6] === undefined || ArrayBuffer.isView(args[6]) || (args[6] instanceof ArrayBuffer)) { - [x, y, width, height, format, type, dst] = (args as [GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, (ArrayBufferView | null)?]); - dst = toArrayBufferViewSlice(dst, offset); - break; + [x, y, width, height, format, type, dst] = + (args as [GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, (ArrayBufferView | null)?]); + dst = toArrayBufferViewSlice(dst, offset); + break; } throw new TypeError('WebGLRenderingContext readPixels() invalid readPixels target'); } case 8: { - [x, y, width, height, format, type, dst, offset = 0] = (args as [GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, ArrayBufferView?, GLuint?]); - dst = toArrayBufferViewSlice(dst, offset); - break; + [x, y, width, height, format, type, dst, offset = 0] = + (args as [GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, ArrayBufferView?, GLuint?]); + dst = toArrayBufferViewSlice(dst, offset); + break; } default: throw new TypeError('WebGLRenderingContext readPixels() takes 6, 7, or 8 arguments'); } @@ -431,36 +468,36 @@ const gl_uniform1iv = OpenGLESRenderingContext.prototy OpenGLESRenderingContext.prototype.uniform1iv = uniform1iv; function uniform1iv( this: WebGL2RenderingContext, location: WebGLUniformLocation, value: Int32Array|number[]) { - return location ? gl_uniform1iv.call( - this, location, Array.isArray(value) ? new Int32Array(value) : value) - : undefined; + return location + ? gl_uniform1iv.call(this, location, Array.isArray(value) ? new Int32Array(value) : value) + : undefined; } const gl_uniform2iv = OpenGLESRenderingContext.prototype.uniform2iv; OpenGLESRenderingContext.prototype.uniform2iv = uniform2iv; function uniform2iv( this: WebGL2RenderingContext, location: WebGLUniformLocation, value: Int32Array|number[]) { - return location ? gl_uniform2iv.call( - this, location, Array.isArray(value) ? new Int32Array(value) : value) - : undefined; + return location + ? gl_uniform2iv.call(this, location, Array.isArray(value) ? new Int32Array(value) : value) + : undefined; } const gl_uniform3iv = OpenGLESRenderingContext.prototype.uniform3iv; OpenGLESRenderingContext.prototype.uniform3iv = uniform3iv; function uniform3iv( this: WebGL2RenderingContext, location: WebGLUniformLocation, value: Int32Array|number[]) { - return location ? gl_uniform3iv.call( - this, location, Array.isArray(value) ? new Int32Array(value) : value) - : undefined; + return location + ? gl_uniform3iv.call(this, location, Array.isArray(value) ? new Int32Array(value) : value) + : undefined; } const gl_uniform4iv = OpenGLESRenderingContext.prototype.uniform4iv; OpenGLESRenderingContext.prototype.uniform4iv = uniform4iv; function uniform4iv( this: WebGL2RenderingContext, location: WebGLUniformLocation, value: Int32Array|number[]) { - return location ? gl_uniform4iv.call( - this, location, Array.isArray(value) ? new Int32Array(value) : value) - : undefined; + return location + ? gl_uniform4iv.call(this, location, Array.isArray(value) ? new Int32Array(value) : value) + : undefined; } const gl_uniformMatrix2fv = OpenGLESRenderingContext.prototype.uniformMatrix2fv; diff --git a/node-rapids.code-workspace b/node-rapids.code-workspace index 0a43e2db1..27465161f 100644 --- a/node-rapids.code-workspace +++ b/node-rapids.code-workspace @@ -66,7 +66,7 @@ "twxs.cmake", "slevesque.shader", "ms-vscode.cpptools", - "xaver.clang-format", + "seaube.clangformat", "cschlosser.doxdocgen", "dbaeumer.vscode-eslint", "davidanson.vscode-markdownlint", @@ -97,9 +97,9 @@ "--completion-style=detailed", "--header-insertion-decorators" ], - // Configure the xaver.clang-format plugin + // Configure the seaube.clangformat plugin "clang-format.fallbackStyle": "Google", - "clang-format.executable": "clang-format-12", + "clang-format.executable": "clang-format-17", "clang-format.language.typescript.enable": true, "debug.terminal.clearBeforeReusing": true, // Configure ESLint plugin @@ -193,25 +193,25 @@ "editor.tabSize": 2, "editor.formatOnSave": true, "editor.formatOnSaveMode": "file", - "editor.defaultFormatter": "xaver.clang-format" + "editor.defaultFormatter": "seaube.clangformat" }, "[cpp]": { "editor.tabSize": 2, "editor.formatOnSave": true, "editor.formatOnSaveMode": "file", - "editor.defaultFormatter": "xaver.clang-format" + "editor.defaultFormatter": "seaube.clangformat" }, "[cuda]": { "editor.tabSize": 2, "editor.formatOnSave": true, "editor.formatOnSaveMode": "file", - "editor.defaultFormatter": "xaver.clang-format" + "editor.defaultFormatter": "seaube.clangformat" }, "[cuda-cpp]": { "editor.tabSize": 2, "editor.formatOnSave": true, "editor.formatOnSaveMode": "file", - "editor.defaultFormatter": "xaver.clang-format" + "editor.defaultFormatter": "seaube.clangformat" }, "[json]": { "editor.tabSize": 2, @@ -223,13 +223,13 @@ "editor.tabSize": 2, "editor.formatOnSave": true, "editor.formatOnSaveMode": "file", - "editor.defaultFormatter": "xaver.clang-format" + "editor.defaultFormatter": "seaube.clangformat" }, "[typescript]": { "editor.tabSize": 2, "editor.formatOnSave": true, "editor.formatOnSaveMode": "file", - "editor.defaultFormatter": "xaver.clang-format" + "editor.defaultFormatter": "seaube.clangformat" }, "[javascriptreact]": { "editor.tabSize": 2, diff --git a/package.json b/package.json index d1529319a..52b50c7d7 100644 --- a/package.json +++ b/package.json @@ -97,14 +97,14 @@ "modules/demo/sql/*" ], "dependencies": { - "@typescript-eslint/eslint-plugin": "5.30.0", - "@typescript-eslint/parser": "5.30.0", + "@typescript-eslint/eslint-plugin": "5.59.9", + "@typescript-eslint/parser": "5.59.9", "bufferutil": "4.0.6", "utf-8-validate": "5.0.9", "cmake-js": "7.2.1", "cross-env": "7.0.3", "dotenv": "8.2.0", - "eslint": "8.18.0", + "eslint": "8.42.0", "lerna": "3.22.1", "lint-staged": "10.5.1", "pre-git": "3.17.1", diff --git a/scripts/lint/linux.sh b/scripts/lint/linux.sh index 3d492163a..23f0f944c 100755 --- a/scripts/lint/linux.sh +++ b/scripts/lint/linux.sh @@ -3,42 +3,47 @@ set -Eeo pipefail args=""; -fix_arg=""; -JOBS="${JOBS:-}"; +fix_=""; +jobs="${JOBS:-${PARALLEL_LEVEL:-$(nproc --ignore=2)}}"; while [[ "$#" -gt 0 ]]; do case $1 in -j*) J="${1#-j}"; if [[ ${J} =~ ^[[:digit:]]+$ ]]; then - JOBS="${J}"; + jobs="${J}"; + else + jobs="$(nproc --ignore=2)"; fi;; - --fix) fix_arg="$1";; + --fix) fix_="$1";; *) args="${args:+$args }$1";; esac; shift; done -JOBS=${JOBS:-${PARALLEL_LEVEL:-$(nproc --ignore=2)}}; - tsc_files=""; cpp_files=""; -cmd_input="$(echo "$args" | tr ' ' '\n')"; -tsc_regex="^(\./)?modules/\w+?/(src|test)/.*?\.ts$"; -cpp_regex="^(\./)?modules/\w+?/(src|include)/.*?\.(h|cc?|cuh?|(c|h)pp)$"; +cmd_input="$(tr ' ' '\n' <<< "$args")"; +tsc_regex="^(\.\/)?modules\/\w+?\/(src|test)\/.*?\.ts$"; +cpp_regex="^(\.\/)?modules\/\w+?\/(src|include)\/.*?\.(h|cc?|cuh?|(c|h)pp)$"; -if [[ "$cmd_input" != "" ]]; then - tsc_files=$(echo "$cmd_input" | grep -xiE --color=never "$tsc_regex" || echo ""); - cpp_files=$(echo "$cmd_input" | grep -xiE --color=never "$cpp_regex" || echo ""); +if test -n "$(head -n1 <<< "$cmd_input")"; then + tsc_files="$(grep -Eiox --color=never "$tsc_regex" <<< "$cmd_input" || echo "")"; + cpp_files="$(grep -Eiox --color=never "$cpp_regex" <<< "$cmd_input" || echo "")"; else - tsc_files=$(find . -type f -regextype posix-extended -iregex "$tsc_regex" || echo ""); - cpp_files=$(find . -type f -regextype posix-extended -iregex "$cpp_regex" || echo ""); + tsc_files="$(find . -type f -regextype posix-extended -iregex "$tsc_regex" || echo "")"; + cpp_files="$(find . -type f -regextype posix-extended -iregex "$cpp_regex" || echo "")"; fi echo "Running clang-format..."; -time clang-format-12 -i $cpp_files $tsc_files; +time \ + xargs -d'\n' -t -n1 -I% -P$jobs \ + <<< "$(echo -e "$cpp_files\n$tsc_files")" \ + clang-format-17 -i %; echo ""; -echo "Running ESLint (on up to $JOBS cores)..."; -time echo $tsc_files | xargs -P$JOBS -n1 \ - node_modules/.bin/eslint --ignore-path .gitignore ${fix_arg}; +echo "Running ESLint (on up to $jobs cores)..."; +time \ + xargs -d'\n' -n1 -I% -P$jobs \ + <<< "$tsc_files" \ + node_modules/.bin/eslint --ignore-path .gitignore $fix_ %; echo ""; diff --git a/scripts/relink-bin-dirs/linux.sh b/scripts/relink-bin-dirs/linux.sh index d4cbff94f..7b675f1a6 100755 --- a/scripts/relink-bin-dirs/linux.sh +++ b/scripts/relink-bin-dirs/linux.sh @@ -7,20 +7,6 @@ BIN="$(realpath node_modules/.bin)" DIRS=$(lerna exec --scope "@rapidsai/*" "echo \$PWD") RAPIDS_CORE_PATH=$(lerna exec --scope "@rapidsai/core" "echo \$PWD" | head -n1) -if [ -L "$TOP/.cache" ]; then - OLD_CACHE_DIR="$(realpath -m "$TOP/.cache")" - # remove the top-level .cache symlink - rm -rf "$TOP/.cache" - # ensure the cache dirs exist (clangd index, etc.) - mkdir -p "$TOP"/.cache/{binary,clangd,source} - # if it exists, migrate the current bash history file - if [ -f "$OLD_CACHE_DIR/.eternal_bash_history" ]; then - cp "$OLD_CACHE_DIR/.eternal_bash_history" "$TOP/.cache/" - fi - # remove the old modules/.cache dir - rm -rf "$OLD_CACHE_DIR" -fi - # ensure the cache dirs exist (clangd index, etc.) mkdir -p "$TOP"/.cache/{binary,clangd,source} @@ -30,14 +16,18 @@ for DIR in $DIRS; do if [[ "$BIN" != $DIR/node_modules/.bin ]]; then rm -rf "$DIR/node_modules/.bin" ln -sf "$BIN" "$DIR/node_modules/.bin" - # copy the .env settings file - touch ".env" && cp ".env" "$DIR/.env" # copy the ESLint settings file (for the VSCode ESLint plugin) - cp ".eslintrc.js" "$DIR/.eslintrc.js" + # cp ".eslintrc.js" "$DIR/.eslintrc.js" # remove the local .cache symlink rm -rf "$DIR/.cache" # symlink to the shared top-level .cache dir ln -sf "$(realpath --relative-to="$DIR" "$TOP/.cache")" "$DIR/.cache" + # symlink to the shared .env settings file + touch ".env" && ln -sf "$(realpath --relative-to="$DIR" "$TOP/.env")" "$DIR/.env" + # symlink to the shared .clangd settings file + touch ".clangd" && ln -sf "$(realpath --relative-to="$DIR" "$TOP/.clangd")" "$DIR/.clangd" + # symlink to the shared .eslintrc.js settings file + touch ".eslintrc.js" && ln -sf "$(realpath --relative-to="$DIR" "$TOP/.eslintrc.js")" "$DIR/.eslintrc.js" fi; done diff --git a/tsconfig.json b/tsconfig.json index 116ab9b5a..fbd211d89 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,8 +1,9 @@ { "include": [ - "modules/*/src/**/*.ts", + "modules/**/*/src/**/*.ts", + "modules/**/*/test/**/*.ts", ], - "exclude": ["node_modules"], + "exclude": ["node_modules", "build/js"], "compilerOptions": { "baseUrl": "./", "paths": { diff --git a/yarn.lock b/yarn.lock index 1cae636a6..03818c9ce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1243,14 +1243,26 @@ resolved "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46" integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== -"@eslint/eslintrc@^1.3.0": - version "1.4.1" - resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz#af58772019a2d271b7e2d4c23ff4ddcba3ccfb3e" - integrity sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA== +"@eslint-community/eslint-utils@^4.2.0": + version "4.4.0" + resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" + integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== + dependencies: + eslint-visitor-keys "^3.3.0" + +"@eslint-community/regexpp@^4.4.0": + version "4.6.2" + resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz#1816b5f6948029c5eaacb0703b850ee0cb37d8f8" + integrity sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw== + +"@eslint/eslintrc@^2.0.3": + version "2.1.1" + resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.1.tgz#18d635e24ad35f7276e8a49d135c7d3ca6a46f93" + integrity sha512-9t7ZA7NGGK8ckelF0PQCfcxIUzs1Md5rrO6U/c+FIQNanea5UZC0wqKXH4vHBccmu4ZJgZ2idtPeW7+Q2npOEA== dependencies: ajv "^6.12.4" debug "^4.3.2" - espree "^9.4.0" + espree "^9.6.0" globals "^13.19.0" ignore "^5.2.0" import-fresh "^3.2.1" @@ -1258,6 +1270,11 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" +"@eslint/js@8.42.0": + version "8.42.0" + resolved "https://registry.npmjs.org/@eslint/js/-/js-8.42.0.tgz#484a1d638de2911e6f5a30c12f49c7e4a3270fb6" + integrity sha512-6SWlXpWU5AvId8Ac7zjzmIOqMOba/JWY8XZ4A7q7Gn1Vlfg/SFFIlrtHXt9nPn4op9ZPAkl91Jao+QQv3r/ukw== + "@evocateur/libnpmaccess@^3.1.2": version "3.1.2" resolved "https://registry.npmjs.org/@evocateur/libnpmaccess/-/libnpmaccess-3.1.2.tgz#ecf7f6ce6b004e9f942b098d92200be4a4b1c845" @@ -1466,14 +1483,19 @@ resolved "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz#8368869dcb735be2e7f5cb7647de78e167a251fb" integrity sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ== -"@humanwhocodes/config-array@^0.9.2": - version "0.9.5" - resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz#2cbaf9a89460da24b5ca6531b8bbfc23e1df50c7" - integrity sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw== +"@humanwhocodes/config-array@^0.11.10": + version "0.11.10" + resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz#5a3ffe32cc9306365fb3fd572596cd602d5e12d2" + integrity sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ== dependencies: "@humanwhocodes/object-schema" "^1.2.1" debug "^4.1.1" - minimatch "^3.0.4" + minimatch "^3.0.5" + +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== "@humanwhocodes/object-schema@^1.2.1": version "1.2.1" @@ -3019,7 +3041,7 @@ resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== -"@nodelib/fs.walk@^1.2.3": +"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": version "1.2.8" resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== @@ -3608,6 +3630,11 @@ resolved "https://registry.npmjs.org/@types/seedrandom/-/seedrandom-2.4.27.tgz#9db563937dd86915f69092bc43259d2f48578e41" integrity sha512-YvMLqFak/7rt//lPBtEHv3M4sRNA+HGxrhFZ+DQs9K2IkYJbNwVIb8avtJfhDiuaUBX/AW0jnjv48FV8h3u9bQ== +"@types/semver@^7.3.12": + version "7.5.0" + resolved "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz#591c1ce3a702c45ee15f47a42ade72c2fd78978a" + integrity sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw== + "@types/stack-utils@^2.0.0": version "2.0.1" resolved "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" @@ -3657,84 +3684,88 @@ resolved "https://registry.npmjs.org/@types/yoga-layout/-/yoga-layout-1.9.2.tgz#efaf9e991a7390dc081a0b679185979a83a9639a" integrity sha512-S9q47ByT2pPvD65IvrWp7qppVMpk9WGMbVq9wbWZOHg6tnXSD4vyhao6nOSBwwfDdV2p3Kx9evA9vI+XWTfDvw== -"@typescript-eslint/eslint-plugin@5.30.0": - version "5.30.0" - resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.0.tgz#524a11e15c09701733033c96943ecf33f55d9ca1" - integrity sha512-lvhRJ2pGe2V9MEU46ELTdiHgiAFZPKtLhiU5wlnaYpMc2+c1R8fh8i80ZAa665drvjHKUJyRRGg3gEm1If54ow== +"@typescript-eslint/eslint-plugin@5.59.9": + version "5.59.9" + resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.9.tgz#2604cfaf2b306e120044f901e20c8ed926debf15" + integrity sha512-4uQIBq1ffXd2YvF7MAvehWKW3zVv/w+mSfRAu+8cKbfj3nwzyqJLNcZJpQ/WZ1HLbJDiowwmQ6NO+63nCA+fqA== dependencies: - "@typescript-eslint/scope-manager" "5.30.0" - "@typescript-eslint/type-utils" "5.30.0" - "@typescript-eslint/utils" "5.30.0" + "@eslint-community/regexpp" "^4.4.0" + "@typescript-eslint/scope-manager" "5.59.9" + "@typescript-eslint/type-utils" "5.59.9" + "@typescript-eslint/utils" "5.59.9" debug "^4.3.4" - functional-red-black-tree "^1.0.1" + grapheme-splitter "^1.0.4" ignore "^5.2.0" - regexpp "^3.2.0" + natural-compare-lite "^1.4.0" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/parser@5.30.0": - version "5.30.0" - resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.30.0.tgz#a2184fb5f8ef2bf1db0ae61a43907e2e32aa1b8f" - integrity sha512-2oYYUws5o2liX6SrFQ5RB88+PuRymaM2EU02/9Ppoyu70vllPnHVO7ioxDdq/ypXHA277R04SVjxvwI8HmZpzA== +"@typescript-eslint/parser@5.59.9": + version "5.59.9" + resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.9.tgz#a85c47ccdd7e285697463da15200f9a8561dd5fa" + integrity sha512-FsPkRvBtcLQ/eVK1ivDiNYBjn3TGJdXy2fhXX+rc7czWl4ARwnpArwbihSOHI2Peg9WbtGHrbThfBUkZZGTtvQ== dependencies: - "@typescript-eslint/scope-manager" "5.30.0" - "@typescript-eslint/types" "5.30.0" - "@typescript-eslint/typescript-estree" "5.30.0" + "@typescript-eslint/scope-manager" "5.59.9" + "@typescript-eslint/types" "5.59.9" + "@typescript-eslint/typescript-estree" "5.59.9" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.30.0": - version "5.30.0" - resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.0.tgz#bf585ee801ab4ad84db2f840174e171a6bb002c7" - integrity sha512-3TZxvlQcK5fhTBw5solQucWSJvonXf5yua5nx8OqK94hxdrT7/6W3/CS42MLd/f1BmlmmbGEgQcTHHCktUX5bQ== +"@typescript-eslint/scope-manager@5.59.9": + version "5.59.9" + resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.9.tgz#eadce1f2733389cdb58c49770192c0f95470d2f4" + integrity sha512-8RA+E+w78z1+2dzvK/tGZ2cpGigBZ58VMEHDZtpE1v+LLjzrYGc8mMaTONSxKyEkz3IuXFM0IqYiGHlCsmlZxQ== dependencies: - "@typescript-eslint/types" "5.30.0" - "@typescript-eslint/visitor-keys" "5.30.0" + "@typescript-eslint/types" "5.59.9" + "@typescript-eslint/visitor-keys" "5.59.9" -"@typescript-eslint/type-utils@5.30.0": - version "5.30.0" - resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.30.0.tgz#98f3af926a5099153f092d4dad87148df21fbaae" - integrity sha512-GF8JZbZqSS+azehzlv/lmQQ3EU3VfWYzCczdZjJRxSEeXDQkqFhCBgFhallLDbPwQOEQ4MHpiPfkjKk7zlmeNg== +"@typescript-eslint/type-utils@5.59.9": + version "5.59.9" + resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.9.tgz#53bfaae2e901e6ac637ab0536d1754dfef4dafc2" + integrity sha512-ksEsT0/mEHg9e3qZu98AlSrONAQtrSTljL3ow9CGej8eRo7pe+yaC/mvTjptp23Xo/xIf2mLZKC6KPv4Sji26Q== dependencies: - "@typescript-eslint/utils" "5.30.0" + "@typescript-eslint/typescript-estree" "5.59.9" + "@typescript-eslint/utils" "5.59.9" debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/types@5.30.0": - version "5.30.0" - resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.0.tgz#db7d81d585a3da3801432a9c1d2fafbff125e110" - integrity sha512-vfqcBrsRNWw/LBXyncMF/KrUTYYzzygCSsVqlZ1qGu1QtGs6vMkt3US0VNSQ05grXi5Yadp3qv5XZdYLjpp8ag== +"@typescript-eslint/types@5.59.9": + version "5.59.9" + resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.9.tgz#3b4e7ae63718ce1b966e0ae620adc4099a6dcc52" + integrity sha512-uW8H5NRgTVneSVTfiCVffBb8AbwWSKg7qcA4Ot3JI3MPCJGsB4Db4BhvAODIIYE5mNj7Q+VJkK7JxmRhk2Lyjw== -"@typescript-eslint/typescript-estree@5.30.0": - version "5.30.0" - resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.0.tgz#4565ee8a6d2ac368996e20b2344ea0eab1a8f0bb" - integrity sha512-hDEawogreZB4n1zoqcrrtg/wPyyiCxmhPLpZ6kmWfKF5M5G0clRLaEexpuWr31fZ42F96SlD/5xCt1bT5Qm4Nw== +"@typescript-eslint/typescript-estree@5.59.9": + version "5.59.9" + resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.9.tgz#6bfea844e468427b5e72034d33c9fffc9557392b" + integrity sha512-pmM0/VQ7kUhd1QyIxgS+aRvMgw+ZljB3eDb+jYyp6d2bC0mQWLzUDF+DLwCTkQ3tlNyVsvZRXjFyV0LkU/aXjA== dependencies: - "@typescript-eslint/types" "5.30.0" - "@typescript-eslint/visitor-keys" "5.30.0" + "@typescript-eslint/types" "5.59.9" + "@typescript-eslint/visitor-keys" "5.59.9" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.30.0": - version "5.30.0" - resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.0.tgz#1dac771fead5eab40d31860716de219356f5f754" - integrity sha512-0bIgOgZflLKIcZsWvfklsaQTM3ZUbmtH0rJ1hKyV3raoUYyeZwcjQ8ZUJTzS7KnhNcsVT1Rxs7zeeMHEhGlltw== +"@typescript-eslint/utils@5.59.9": + version "5.59.9" + resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.9.tgz#adee890107b5ffe02cd46fdaa6c2125fb3c6c7c4" + integrity sha512-1PuMYsju/38I5Ggblaeb98TOoUvjhRvLpLa1DoTOFaLWqaXl/1iQ1eGurTXgBY58NUdtfTXKP5xBq7q9NDaLKg== dependencies: + "@eslint-community/eslint-utils" "^4.2.0" "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.30.0" - "@typescript-eslint/types" "5.30.0" - "@typescript-eslint/typescript-estree" "5.30.0" + "@types/semver" "^7.3.12" + "@typescript-eslint/scope-manager" "5.59.9" + "@typescript-eslint/types" "5.59.9" + "@typescript-eslint/typescript-estree" "5.59.9" eslint-scope "^5.1.1" - eslint-utils "^3.0.0" + semver "^7.3.7" -"@typescript-eslint/visitor-keys@5.30.0": - version "5.30.0" - resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.0.tgz#07721d23daca2ec4c2da7f1e660d41cd78bacac3" - integrity sha512-6WcIeRk2DQ3pHKxU1Ni0qMXJkjO/zLjBymlYBy/53qxe7yjEFSvzKLDToJjURUhSl2Fzhkl4SMXQoETauF74cw== +"@typescript-eslint/visitor-keys@5.59.9": + version "5.59.9" + resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.9.tgz#9f86ef8e95aca30fb5a705bb7430f95fc58b146d" + integrity sha512-bT7s0td97KMaLwpEBckbzj/YohnvXtqbe2XgqNvTl6RJVakY5mvENOTPvw5u66nljfZxthESpDozs86U+oLY8Q== dependencies: - "@typescript-eslint/types" "5.30.0" + "@typescript-eslint/types" "5.59.9" eslint-visitor-keys "^3.3.0" "@zkochan/cmd-shim@^3.1.0": @@ -6924,7 +6955,7 @@ eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-scope@^7.1.1: +eslint-scope@^7.2.0: version "7.2.2" resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== @@ -6932,51 +6963,45 @@ eslint-scope@^7.1.1: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" - integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== - dependencies: - eslint-visitor-keys "^2.0.0" - -eslint-visitor-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" - integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== - eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1: version "3.4.2" resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.2.tgz#8c2095440eca8c933bedcadf16fefa44dbe9ba5f" integrity sha512-8drBzUEyZ2llkpCA67iYrgEssKDUu68V8ChqqOfFupIaG/LCVPUT+CoGJpT77zJprs4T/W7p07LP7zAIMuweVw== -eslint@8.18.0: - version "8.18.0" - resolved "https://registry.npmjs.org/eslint/-/eslint-8.18.0.tgz#78d565d16c993d0b73968c523c0446b13da784fd" - integrity sha512-As1EfFMVk7Xc6/CvhssHUjsAQSkpfXvUGMFC3ce8JDe6WvqCgRrLOBQbVpsBFr1X1V+RACOadnzVvcUS5ni2bA== - dependencies: - "@eslint/eslintrc" "^1.3.0" - "@humanwhocodes/config-array" "^0.9.2" +eslint@8.42.0: + version "8.42.0" + resolved "https://registry.npmjs.org/eslint/-/eslint-8.42.0.tgz#7bebdc3a55f9ed7167251fe7259f75219cade291" + integrity sha512-ulg9Ms6E1WPf67PHaEY4/6E2tEn5/f7FXGzr3t9cBMugOmf1INYvuUwwh1aXQN4MfJ6a5K2iNwP3w4AColvI9A== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.4.0" + "@eslint/eslintrc" "^2.0.3" + "@eslint/js" "8.42.0" + "@humanwhocodes/config-array" "^0.11.10" + "@humanwhocodes/module-importer" "^1.0.1" + "@nodelib/fs.walk" "^1.2.8" ajv "^6.10.0" chalk "^4.0.0" cross-spawn "^7.0.2" debug "^4.3.2" doctrine "^3.0.0" escape-string-regexp "^4.0.0" - eslint-scope "^7.1.1" - eslint-utils "^3.0.0" - eslint-visitor-keys "^3.3.0" - espree "^9.3.2" - esquery "^1.4.0" + eslint-scope "^7.2.0" + eslint-visitor-keys "^3.4.1" + espree "^9.5.2" + esquery "^1.4.2" esutils "^2.0.2" fast-deep-equal "^3.1.3" file-entry-cache "^6.0.1" - functional-red-black-tree "^1.0.1" - glob-parent "^6.0.1" - globals "^13.15.0" + find-up "^5.0.0" + glob-parent "^6.0.2" + globals "^13.19.0" + graphemer "^1.4.0" ignore "^5.2.0" import-fresh "^3.0.0" imurmurhash "^0.1.4" is-glob "^4.0.0" + is-path-inside "^3.0.3" js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" @@ -6984,13 +7009,11 @@ eslint@8.18.0: minimatch "^3.1.2" natural-compare "^1.4.0" optionator "^0.9.1" - regexpp "^3.2.0" strip-ansi "^6.0.1" strip-json-comments "^3.1.0" text-table "^0.2.0" - v8-compile-cache "^2.0.3" -espree@^9.3.2, espree@^9.4.0: +espree@^9.5.2, espree@^9.6.0: version "9.6.1" resolved "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== @@ -7009,7 +7032,7 @@ esprima@~1.0.4: resolved "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz#9f557e08fc3b4d26ece9dd34f8fbf476b62585ad" integrity sha512-rp5dMKN8zEs9dfi9g0X1ClLmV//WRyk/R15mppFNICIFRG5P92VP7Z04p8pk++gABo9W2tY+kHyu6P1mEHgmTA== -esquery@^1.4.0: +esquery@^1.4.2: version "1.5.0" resolved "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== @@ -7659,6 +7682,14 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + findit@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/findit/-/findit-2.0.0.tgz#6509f0126af4c178551cfa99394e032e13a4d56e" @@ -7876,11 +7907,6 @@ function.prototype.name@^1.1.5: es-abstract "^1.19.0" functions-have-names "^1.2.2" -functional-red-black-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== - functions-have-names@^1.2.2, functions-have-names@^1.2.3: version "1.2.3" resolved "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" @@ -8164,7 +8190,7 @@ glob-parent@^5.0.0, glob-parent@^5.1.2, glob-parent@~5.1.0, glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" -glob-parent@^6.0.1: +glob-parent@^6.0.2: version "6.0.2" resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== @@ -8231,7 +8257,7 @@ globals@^11.1.0: resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^13.15.0, globals@^13.19.0: +globals@^13.19.0: version "13.20.0" resolved "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz#ea276a1e508ffd4f1612888f9d1bad1e2717bf82" integrity sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ== @@ -8283,6 +8309,16 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6 resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== +grapheme-splitter@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" + integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== + +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== + growly@^1.3.0: version "1.3.0" resolved "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" @@ -9183,6 +9219,11 @@ is-obj@^2.0.0: resolved "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== +is-path-inside@^3.0.3: + version "3.0.3" + resolved "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== + is-plain-obj@^1.0.0, is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" @@ -10313,6 +10354,13 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + lodash._reinterpolate@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" @@ -10773,7 +10821,7 @@ minimalistic-crypto-utils@^1.0.1: resolved "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== -minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: +minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -11049,6 +11097,11 @@ native-url@0.3.4: dependencies: querystring "^0.2.0" +natural-compare-lite@^1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" + integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -11644,7 +11697,7 @@ p-finally@^1.0.0: resolved "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" integrity sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow== -p-limit@3.1.0, p-limit@^3.1.0: +p-limit@3.1.0, p-limit@^3.0.2, p-limit@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== @@ -11686,6 +11739,13 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + p-map-series@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/p-map-series/-/p-map-series-1.0.0.tgz#bf98fe575705658a9e1351befb85ae4c1f07bdca" @@ -12982,11 +13042,6 @@ regexp.prototype.flags@^1.5.0: define-properties "^1.2.0" functions-have-names "^1.2.3" -regexpp@^3.2.0: - version "3.2.0" - resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" - integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== - regexpu-core@^5.3.1: version "5.3.2" resolved "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz#11a2b06884f3527aec3e93dbbf4a3b958a95546b" @@ -15316,11 +15371,6 @@ uuid@^8.3.0, uuid@^8.3.2: resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== -v8-compile-cache@^2.0.3: - version "2.3.0" - resolved "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" - integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== - v8-to-istanbul@^7.0.0: version "7.1.2" resolved "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.1.2.tgz#30898d1a7fa0c84d225a2c1434fb958f290883c1"