From bedb9555fa90460910e32676f95c633621ca9902 Mon Sep 17 00:00:00 2001 From: Gal Schlezinger Date: Wed, 16 Nov 2022 20:31:09 +0200 Subject: [PATCH] migrate e2e tests to nodejs (#849) resolves #848 --- .github/workflows/rust.yml | 136 +- e2e/__snapshots__/aliases.test.ts.snap | 269 ++ e2e/__snapshots__/basic.test.ts.snap | 284 ++ e2e/__snapshots__/current.test.ts.snap | 96 + e2e/__snapshots__/exec.test.ts.snap | 70 + .../existing-installation.test.ts.snap | 28 + e2e/__snapshots__/latest-lts.test.ts.snap | 32 + e2e/__snapshots__/log-level.test.ts.snap | 127 + e2e/__snapshots__/multishell.test.ts.snap | 67 + e2e/__snapshots__/nvmrc-lts.test.ts.snap | 32 + e2e/__snapshots__/uninstall.test.ts.snap | 46 + e2e/aliases.test.ts | 129 + e2e/basic.test.ts | 93 + e2e/current.test.ts | 47 + e2e/describe.ts | 15 + e2e/exec.test.ts | 42 + e2e/existing-installation.test.ts | 22 + e2e/latest-lts.test.ts | 19 + e2e/log-level.test.ts | 71 + e2e/multishell.test.ts | 27 + e2e/nvmrc-lts.test.ts | 24 + e2e/shellcode/get-stderr.ts | 3 + e2e/shellcode/script.ts | 170 ++ e2e/shellcode/shells/cmdCall.ts | 12 + e2e/shellcode/shells/cmdEnv.ts | 32 + e2e/shellcode/shells/expect-command-output.ts | 52 + e2e/shellcode/shells/index.ts | 100 + e2e/shellcode/shells/output-contains.ts | 24 + e2e/shellcode/shells/redirect-output.ts | 13 + e2e/shellcode/shells/sub-shell.ts | 20 + e2e/shellcode/shells/types.ts | 15 + e2e/shellcode/test-bin-dir.ts | 9 + e2e/shellcode/test-cwd.ts | 9 + e2e/shellcode/test-node-version.ts | 10 + e2e/shellcode/test-tmp-dir.ts | 15 + e2e/system-node.test.ts | 38 + e2e/uninstall.test.ts | 29 + package.json | 28 +- pnpm-lock.yaml | 2276 +++++++++++++++-- src/archive/zip.rs | 2 +- src/commands/env.rs | 2 +- src/commands/exec.rs | 2 +- src/commands/ls_local.rs | 2 +- src/commands/unalias.rs | 2 +- src/commands/use.rs | 4 +- tests/e2e.rs | 4 - tests/feature_tests/aliases.rs | 28 - tests/feature_tests/current.rs | 28 - tests/feature_tests/mod.rs | 254 -- ...2e__feature_tests__alias_system__Bash.snap | 17 - ...2e__feature_tests__alias_system__Fish.snap | 14 - ...ature_tests__alias_system__PowerShell.snap | 15 - ...e2e__feature_tests__alias_system__Zsh.snap | 15 - .../e2e__feature_tests__aliases__Bash.snap | 32 - .../e2e__feature_tests__aliases__Fish.snap | 29 - ...e__feature_tests__aliases__PowerShell.snap | 30 - .../e2e__feature_tests__aliases__Zsh.snap | 30 - .../e2e__feature_tests__basic__Bash.snap | 14 - .../e2e__feature_tests__basic__Fish.snap | 11 - ...e2e__feature_tests__basic__PowerShell.snap | 12 - .../e2e__feature_tests__basic__WinCmd.snap | 12 - .../e2e__feature_tests__basic__Zsh.snap | 12 - .../e2e__feature_tests__current__Bash.snap | 32 - .../e2e__feature_tests__current__Fish.snap | 29 - ...e__feature_tests__current__PowerShell.snap | 30 - .../e2e__feature_tests__current__WinCmd.snap | 33 - .../e2e__feature_tests__current__Zsh.snap | 30 - .../e2e__feature_tests__exec__Bash.snap | 26 - .../e2e__feature_tests__exec__Fish.snap | 23 - .../e2e__feature_tests__exec__PowerShell.snap | 24 - .../e2e__feature_tests__exec__WinCmd.snap | 26 - .../e2e__feature_tests__exec__Zsh.snap | 24 - ...re_tests__existing_installation__Bash.snap | 10 - ...re_tests__existing_installation__Fish.snap | 7 - ...ts__existing_installation__PowerShell.snap | 8 - ...ure_tests__existing_installation__Zsh.snap | 8 - .../e2e__feature_tests__latest_lts__Bash.snap | 11 - .../e2e__feature_tests__latest_lts__Fish.snap | 8 - ...feature_tests__latest_lts__PowerShell.snap | 9 - .../e2e__feature_tests__latest_lts__Zsh.snap | 9 - ...st_local_with_nothing_installed__Bash.snap | 9 - ...st_local_with_nothing_installed__Fish.snap | 6 - ...al_with_nothing_installed__PowerShell.snap | 7 - ..._local_with_nothing_installed__WinCmd.snap | 6 - ...ist_local_with_nothing_installed__Zsh.snap | 7 - ..._feature_tests__log_level_error__Bash.snap | 30 - ..._feature_tests__log_level_error__Fish.snap | 27 - ...re_tests__log_level_error__PowerShell.snap | 28 - ...__feature_tests__log_level_error__Zsh.snap | 28 - ..._feature_tests__log_level_quiet__Bash.snap | 22 - ..._feature_tests__log_level_quiet__Fish.snap | 19 - ...re_tests__log_level_quiet__PowerShell.snap | 20 - ...__feature_tests__log_level_quiet__Zsh.snap | 20 - ...eature_tests__matching_dotfiles__Bash.snap | 16 - ...eature_tests__matching_dotfiles__Fish.snap | 13 - ..._tests__matching_dotfiles__PowerShell.snap | 14 - ...ture_tests__matching_dotfiles__WinCmd.snap | 14 - ...feature_tests__matching_dotfiles__Zsh.snap | 14 - .../e2e__feature_tests__multishell__Bash.snap | 25 - .../e2e__feature_tests__multishell__Fish.snap | 20 - ...feature_tests__multishell__PowerShell.snap | 21 - .../e2e__feature_tests__multishell__Zsh.snap | 21 - .../e2e__feature_tests__nvmrc__Bash.snap | 15 - .../e2e__feature_tests__nvmrc__Fish.snap | 12 - ...e2e__feature_tests__nvmrc__PowerShell.snap | 13 - .../e2e__feature_tests__nvmrc__WinCmd.snap | 13 - .../e2e__feature_tests__nvmrc__Zsh.snap | 13 - ...__feature_tests__partial_semver__Bash.snap | 14 - ...__feature_tests__partial_semver__Fish.snap | 11 - ...ure_tests__partial_semver__PowerShell.snap | 12 - ...feature_tests__partial_semver__WinCmd.snap | 12 - ...e__feature_tests__partial_semver__Zsh.snap | 12 - ...e2e__feature_tests__system_node__Bash.snap | 15 - ...e2e__feature_tests__system_node__Fish.snap | 12 - ...eature_tests__system_node__PowerShell.snap | 13 - .../e2e__feature_tests__system_node__Zsh.snap | 13 - .../e2e__feature_tests__unalias__Bash.snap | 14 - .../e2e__feature_tests__unalias__Fish.snap | 11 - ...e__feature_tests__unalias__PowerShell.snap | 12 - .../e2e__feature_tests__unalias__Zsh.snap | 12 - ...e__feature_tests__unalias_error__Bash.snap | 9 - ...e__feature_tests__unalias_error__Fish.snap | 6 - ...ture_tests__unalias_error__PowerShell.snap | 7 - ...2e__feature_tests__unalias_error__Zsh.snap | 7 - .../e2e__feature_tests__uninstall__Bash.snap | 16 - .../e2e__feature_tests__uninstall__Fish.snap | 13 - ..._feature_tests__uninstall__PowerShell.snap | 14 - .../e2e__feature_tests__uninstall__Zsh.snap | 14 - ...s__use_alias_install_if_missing__Bash.snap | 11 - ...s__use_alias_install_if_missing__Fish.snap | 8 - ..._alias_install_if_missing__PowerShell.snap | 9 - ...ts__use_alias_install_if_missing__Zsh.snap | 9 - ..._tests__use_alias_not_installed__Bash.snap | 10 - ..._tests__use_alias_not_installed__Fish.snap | 7 - ...__use_alias_not_installed__PowerShell.snap | 8 - ...e_tests__use_alias_not_installed__Zsh.snap | 8 - ...e__feature_tests__use_nvmrc_lts__Bash.snap | 12 - ...e__feature_tests__use_nvmrc_lts__Fish.snap | 9 - ...ture_tests__use_nvmrc_lts__PowerShell.snap | 10 - ...2e__feature_tests__use_nvmrc_lts__Zsh.snap | 10 - ...sts__use_on_cd_dot_node_version__Bash.snap | 16 - ...sts__use_on_cd_dot_node_version__Fish.snap | 13 - ...se_on_cd_dot_node_version__PowerShell.snap | 14 - ...ests__use_on_cd_dot_node_version__Zsh.snap | 14 - ..._feature_tests__use_on_cd_nvmrc__Bash.snap | 16 - ..._feature_tests__use_on_cd_nvmrc__Fish.snap | 13 - ...re_tests__use_on_cd_nvmrc__PowerShell.snap | 14 - ...__feature_tests__use_on_cd_nvmrc__Zsh.snap | 14 - tests/feature_tests/uninstall.rs | 14 - tests/shellcode/call.rs | 25 - tests/shellcode/die_on_errors.rs | 43 - tests/shellcode/eval_fnm_env.rs | 63 - tests/shellcode/expect_command_output.rs | 128 - tests/shellcode/expression.rs | 21 - tests/shellcode/get_stderr.rs | 25 - tests/shellcode/ignore_errors.rs | 49 - tests/shellcode/line_separated_expressions.rs | 62 - tests/shellcode/mod.rs | 113 - tests/shellcode/nothing.rs | 19 - tests/shellcode/output_contains.rs | 65 - tests/shellcode/raw.rs | 13 - tests/shellcode/shell.rs | 112 - tests/shellcode/sub_shell.rs | 55 - tests/shellcode/test_node_version.rs | 12 - tests/shellcode/write_file.rs | 24 - tsconfig.json | 10 + 166 files changed, 4361 insertions(+), 2868 deletions(-) create mode 100644 e2e/__snapshots__/aliases.test.ts.snap create mode 100644 e2e/__snapshots__/basic.test.ts.snap create mode 100644 e2e/__snapshots__/current.test.ts.snap create mode 100644 e2e/__snapshots__/exec.test.ts.snap create mode 100644 e2e/__snapshots__/existing-installation.test.ts.snap create mode 100644 e2e/__snapshots__/latest-lts.test.ts.snap create mode 100644 e2e/__snapshots__/log-level.test.ts.snap create mode 100644 e2e/__snapshots__/multishell.test.ts.snap create mode 100644 e2e/__snapshots__/nvmrc-lts.test.ts.snap create mode 100644 e2e/__snapshots__/uninstall.test.ts.snap create mode 100644 e2e/aliases.test.ts create mode 100644 e2e/basic.test.ts create mode 100644 e2e/current.test.ts create mode 100644 e2e/describe.ts create mode 100644 e2e/exec.test.ts create mode 100644 e2e/existing-installation.test.ts create mode 100644 e2e/latest-lts.test.ts create mode 100644 e2e/log-level.test.ts create mode 100644 e2e/multishell.test.ts create mode 100644 e2e/nvmrc-lts.test.ts create mode 100644 e2e/shellcode/get-stderr.ts create mode 100644 e2e/shellcode/script.ts create mode 100644 e2e/shellcode/shells/cmdCall.ts create mode 100644 e2e/shellcode/shells/cmdEnv.ts create mode 100644 e2e/shellcode/shells/expect-command-output.ts create mode 100644 e2e/shellcode/shells/index.ts create mode 100644 e2e/shellcode/shells/output-contains.ts create mode 100644 e2e/shellcode/shells/redirect-output.ts create mode 100644 e2e/shellcode/shells/sub-shell.ts create mode 100644 e2e/shellcode/shells/types.ts create mode 100644 e2e/shellcode/test-bin-dir.ts create mode 100644 e2e/shellcode/test-cwd.ts create mode 100644 e2e/shellcode/test-node-version.ts create mode 100644 e2e/shellcode/test-tmp-dir.ts create mode 100644 e2e/system-node.test.ts create mode 100644 e2e/uninstall.test.ts delete mode 100644 tests/e2e.rs delete mode 100644 tests/feature_tests/aliases.rs delete mode 100644 tests/feature_tests/current.rs delete mode 100644 tests/feature_tests/mod.rs delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__alias_system__Bash.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__alias_system__Fish.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__alias_system__PowerShell.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__alias_system__Zsh.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__aliases__Bash.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__aliases__Fish.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__aliases__PowerShell.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__aliases__Zsh.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__basic__Bash.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__basic__Fish.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__basic__PowerShell.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__basic__WinCmd.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__basic__Zsh.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__current__Bash.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__current__Fish.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__current__PowerShell.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__current__WinCmd.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__current__Zsh.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__exec__Bash.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__exec__Fish.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__exec__PowerShell.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__exec__WinCmd.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__exec__Zsh.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__existing_installation__Bash.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__existing_installation__Fish.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__existing_installation__PowerShell.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__existing_installation__Zsh.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__latest_lts__Bash.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__latest_lts__Fish.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__latest_lts__PowerShell.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__latest_lts__Zsh.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__list_local_with_nothing_installed__Bash.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__list_local_with_nothing_installed__Fish.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__list_local_with_nothing_installed__PowerShell.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__list_local_with_nothing_installed__WinCmd.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__list_local_with_nothing_installed__Zsh.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__log_level_error__Bash.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__log_level_error__Fish.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__log_level_error__PowerShell.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__log_level_error__Zsh.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__log_level_quiet__Bash.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__log_level_quiet__Fish.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__log_level_quiet__PowerShell.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__log_level_quiet__Zsh.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__matching_dotfiles__Bash.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__matching_dotfiles__Fish.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__matching_dotfiles__PowerShell.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__matching_dotfiles__WinCmd.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__matching_dotfiles__Zsh.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__multishell__Bash.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__multishell__Fish.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__multishell__PowerShell.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__multishell__Zsh.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__nvmrc__Bash.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__nvmrc__Fish.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__nvmrc__PowerShell.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__nvmrc__WinCmd.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__nvmrc__Zsh.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__partial_semver__Bash.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__partial_semver__Fish.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__partial_semver__PowerShell.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__partial_semver__WinCmd.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__partial_semver__Zsh.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__system_node__Bash.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__system_node__Fish.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__system_node__PowerShell.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__system_node__Zsh.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__unalias__Bash.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__unalias__Fish.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__unalias__PowerShell.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__unalias__Zsh.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__unalias_error__Bash.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__unalias_error__Fish.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__unalias_error__PowerShell.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__unalias_error__Zsh.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__uninstall__Bash.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__uninstall__Fish.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__uninstall__PowerShell.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__uninstall__Zsh.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__use_alias_install_if_missing__Bash.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__use_alias_install_if_missing__Fish.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__use_alias_install_if_missing__PowerShell.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__use_alias_install_if_missing__Zsh.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__use_alias_not_installed__Bash.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__use_alias_not_installed__Fish.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__use_alias_not_installed__PowerShell.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__use_alias_not_installed__Zsh.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__use_nvmrc_lts__Bash.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__use_nvmrc_lts__Fish.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__use_nvmrc_lts__PowerShell.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__use_nvmrc_lts__Zsh.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_dot_node_version__Bash.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_dot_node_version__Fish.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_dot_node_version__PowerShell.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_dot_node_version__Zsh.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_nvmrc__Bash.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_nvmrc__Fish.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_nvmrc__PowerShell.snap delete mode 100644 tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_nvmrc__Zsh.snap delete mode 100644 tests/feature_tests/uninstall.rs delete mode 100644 tests/shellcode/call.rs delete mode 100644 tests/shellcode/die_on_errors.rs delete mode 100644 tests/shellcode/eval_fnm_env.rs delete mode 100644 tests/shellcode/expect_command_output.rs delete mode 100644 tests/shellcode/expression.rs delete mode 100644 tests/shellcode/get_stderr.rs delete mode 100644 tests/shellcode/ignore_errors.rs delete mode 100644 tests/shellcode/line_separated_expressions.rs delete mode 100644 tests/shellcode/mod.rs delete mode 100644 tests/shellcode/nothing.rs delete mode 100644 tests/shellcode/output_contains.rs delete mode 100644 tests/shellcode/raw.rs delete mode 100644 tests/shellcode/shell.rs delete mode 100644 tests/shellcode/sub_shell.rs delete mode 100644 tests/shellcode/test_node_version.rs delete mode 100644 tests/shellcode/write_file.rs create mode 100644 tsconfig.json diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index c025ebd..3162f61 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -6,6 +6,10 @@ on: branches: - master +concurrency: + group: ${{ github.head_ref }} + cancel-in-progress: true + jobs: fmt: runs-on: ubuntu-latest @@ -41,27 +45,7 @@ jobs: - uses: Swatinem/rust-cache@v1 - uses: actions/checkout@v3 - name: Run tests - run: cargo test -- --skip=feature_tests - - e2e_tests: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, macOS-latest, windows-latest] - steps: - - name: Install Fish and Zsh using brew - if: "startsWith(matrix.os, 'macOS')" - run: brew install fish zsh - - name: Install Fish and Zsh using apt - if: "startsWith(matrix.os, 'ubuntu')" - run: sudo apt-get install -y fish zsh - - uses: hecrj/setup-rust-action@v1 - with: - rust-version: stable - - uses: Swatinem/rust-cache@v1 - - uses: actions/checkout@v3 - - name: Run tests - run: cargo test -- feature_tests + run: cargo test build_release: runs-on: windows-latest @@ -103,6 +87,116 @@ jobs: name: fnm-macos path: target/release/fnm + e2e_macos: + runs-on: macos-latest + needs: [build_macos_release] + name: "e2e/macos" + steps: + - name: install necessary shells + run: brew install fish zsh bash + - uses: actions/checkout@v3 + - uses: actions/download-artifact@v3 + with: + name: fnm-macos + path: target/release + - name: mark binary as executable + run: chmod +x target/release/fnm + - uses: pnpm/action-setup@v2.2.2 + with: + run_install: false + - uses: actions/setup-node@v3 + with: + node-version: 16.x + cache: 'pnpm' + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + - run: pnpm install + - run: pnpm test + env: + FNM_TARGET_NAME: "release" + FORCE_COLOR: "1" + + e2e_windows: + runs-on: windows-latest + needs: [build_release] + name: "e2e/windows" + steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@v3 + with: + name: fnm-windows + path: target/release + - uses: pnpm/action-setup@v2.2.2 + with: + run_install: false + - uses: actions/setup-node@v3 + with: + node-version: 16.x + cache: 'pnpm' + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + - run: pnpm install + - run: pnpm test + env: + FNM_TARGET_NAME: "release" + FORCE_COLOR: "1" + + e2e_linux: + runs-on: ubuntu-latest + needs: [build_static_linux_binary] + name: "e2e/linux" + steps: + - name: install necessary shells + run: sudo apt-get update && sudo apt-get install -y fish zsh bash + - uses: actions/checkout@v3 + - uses: actions/download-artifact@v3 + with: + name: fnm-linux + path: target/release + - name: mark binary as executable + run: chmod +x target/release/fnm + - uses: pnpm/action-setup@v2.2.2 + with: + run_install: false + - uses: actions/setup-node@v3 + with: + node-version: 16.x + cache: 'pnpm' + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "::set-output name=pnpm_cache_dir::$(pnpm store path)" + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + - run: pnpm install + - run: pnpm test + env: + FNM_TARGET_NAME: "release" + FORCE_COLOR: "1" + build_static_linux_binary: name: "Build static Linux binary" runs-on: ubuntu-latest diff --git a/e2e/__snapshots__/aliases.test.ts.snap b/e2e/__snapshots__/aliases.test.ts.snap new file mode 100644 index 0000000..a78878f --- /dev/null +++ b/e2e/__snapshots__/aliases.test.ts.snap @@ -0,0 +1,269 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Bash aliasing versions: Bash 1`] = ` +"set -e +eval "$(fnm env)" +fnm install 6.11.3 +fnm install 8.11.3 +fnm alias 8.11 oldie +fnm alias 6 older +fnm default older +((fnm ls) | grep 8.11.3 || (echo "Expected output to contain 8.11.3" && exit 1)) | grep oldie || (echo "Expected output to contain oldie" && exit 1) +((fnm ls) | grep 6.11.3 || (echo "Expected output to contain 6.11.3" && exit 1)) | grep older || (echo "Expected output to contain older" && exit 1) +fnm use older +if [ "$(node --version)" != "v6.11.3" ]; then + echo "Expected node version to be v6.11.3. Got $(node --version)" + exit 1 +fi +fnm use oldie +if [ "$(node --version)" != "v8.11.3" ]; then + echo "Expected node version to be v8.11.3. Got $(node --version)" + exit 1 +fi +fnm use default +if [ "$(node --version)" != "v6.11.3" ]; then + echo "Expected node version to be v6.11.3. Got $(node --version)" + exit 1 +fi" +`; + +exports[`Bash allows to install an lts if version missing: Bash 1`] = ` +"set -e +eval "$(fnm env)" +fnm use --install-if-missing +(fnm ls) | grep lts-latest || (echo "Expected output to contain lts-latest" && exit 1)" +`; + +exports[`Bash can alias the system node: Bash 1`] = ` +"set -e +eval "$(fnm env)" +fnm alias system my_system +(fnm ls) | grep my_system || (echo "Expected output to contain my_system" && exit 1) +fnm alias system default +fnm alias my_system my_system2 +(fnm ls) | grep my_system2 || (echo "Expected output to contain my_system2" && exit 1) +(fnm use my_system) | grep 'Bypassing fnm' || (echo "Expected output to contain 'Bypassing fnm'" && exit 1) +fnm unalias my_system +(fnm use my_system 2>&1) | grep 'Requested version my_system is not currently installed' || (echo "Expected output to contain 'Requested version my_system is not currently installed'" && exit 1)" +`; + +exports[`Bash errors when alias is not found: Bash 1`] = ` +"set -e +eval "$(fnm env --log-level=error)" +(fnm use 2>&1) | grep 'Requested version lts-latest is not' || (echo "Expected output to contain 'Requested version lts-latest is not'" && exit 1)" +`; + +exports[`Bash unalias a version: Bash 1`] = ` +"set -e +eval "$(fnm env)" +fnm install 11.10.0 +fnm install 8.11.3 +fnm alias 8.11.3 version8 +(fnm ls) | grep version8 || (echo "Expected output to contain version8" && exit 1) +fnm unalias version8 +(fnm use version8 2>&1) | grep 'Requested version version8 is not currently installed' || (echo "Expected output to contain 'Requested version version8 is not currently installed'" && exit 1)" +`; + +exports[`Bash unalias errors if alias not found: Bash 1`] = ` +"set -e +eval "$(fnm env --log-level=error)" +(fnm unalias lts 2>&1) | grep 'Requested alias lts not found' || (echo "Expected output to contain 'Requested alias lts not found'" && exit 1)" +`; + +exports[`Fish aliasing versions: Fish 1`] = ` +"fnm env | source +fnm install 6.11.3 +fnm install 8.11.3 +fnm alias 8.11 oldie +fnm alias 6 older +fnm default older +begin; begin; fnm ls; end | grep 8.11.3; or echo "Expected output to contain 8.11.3" && exit 1; end | grep oldie; or echo "Expected output to contain oldie" && exit 1 +begin; begin; fnm ls; end | grep 6.11.3; or echo "Expected output to contain 6.11.3" && exit 1; end | grep older; or echo "Expected output to contain older" && exit 1 +fnm use older +set ____test____ (node --version) +if test "$____test____" != "v6.11.3" + echo "Expected node version to be v6.11.3. Got $____test____" + exit 1 +end +fnm use oldie +set ____test____ (node --version) +if test "$____test____" != "v8.11.3" + echo "Expected node version to be v8.11.3. Got $____test____" + exit 1 +end +fnm use default +set ____test____ (node --version) +if test "$____test____" != "v6.11.3" + echo "Expected node version to be v6.11.3. Got $____test____" + exit 1 +end" +`; + +exports[`Fish allows to install an lts if version missing: Fish 1`] = ` +"fnm env | source +fnm use --install-if-missing +begin; fnm ls; end | grep lts-latest; or echo "Expected output to contain lts-latest" && exit 1" +`; + +exports[`Fish can alias the system node: Fish 1`] = ` +"fnm env | source +fnm alias system my_system +begin; fnm ls; end | grep my_system; or echo "Expected output to contain my_system" && exit 1 +fnm alias system default +fnm alias my_system my_system2 +begin; fnm ls; end | grep my_system2; or echo "Expected output to contain my_system2" && exit 1 +begin; fnm use my_system; end | grep 'Bypassing fnm'; or echo "Expected output to contain 'Bypassing fnm'" && exit 1 +fnm unalias my_system +begin; fnm use my_system 2>&1; end | grep 'Requested version my_system is not currently installed'; or echo "Expected output to contain 'Requested version my_system is not currently installed'" && exit 1" +`; + +exports[`Fish errors when alias is not found: Fish 1`] = ` +"fnm env --log-level=error | source +begin; fnm use 2>&1; end | grep 'Requested version lts-latest is not'; or echo "Expected output to contain 'Requested version lts-latest is not'" && exit 1" +`; + +exports[`Fish unalias a version: Fish 1`] = ` +"fnm env | source +fnm install 11.10.0 +fnm install 8.11.3 +fnm alias 8.11.3 version8 +begin; fnm ls; end | grep version8; or echo "Expected output to contain version8" && exit 1 +fnm unalias version8 +begin; fnm use version8 2>&1; end | grep 'Requested version version8 is not currently installed'; or echo "Expected output to contain 'Requested version version8 is not currently installed'" && exit 1" +`; + +exports[`Fish unalias errors if alias not found: Fish 1`] = ` +"fnm env --log-level=error | source +begin; fnm unalias lts 2>&1; end | grep 'Requested alias lts not found'; or echo "Expected output to contain 'Requested alias lts not found'" && exit 1" +`; + +exports[`PowerShell aliasing versions: PowerShell 1`] = ` +"$ErrorActionPreference = "Stop" +fnm env | Out-String | Invoke-Expression +fnm install 6.11.3 +fnm install 8.11.3 +fnm alias 8.11 oldie +fnm alias 6 older +fnm default older +$($__out__ = $($($__out__ = $(fnm ls | Select-String 8.11.3); if ($__out__ -eq $null) { exit 1 } else { $__out__ }) | Select-String oldie); if ($__out__ -eq $null) { exit 1 } else { $__out__ }) +$($__out__ = $($($__out__ = $(fnm ls | Select-String 6.11.3); if ($__out__ -eq $null) { exit 1 } else { $__out__ }) | Select-String older); if ($__out__ -eq $null) { exit 1 } else { $__out__ }) +fnm use older +if ( "$(node --version)" -ne "v6.11.3" ) { echo "Expected node version to be v6.11.3. Got $(node --version)"; exit 1 } +fnm use oldie +if ( "$(node --version)" -ne "v8.11.3" ) { echo "Expected node version to be v8.11.3. Got $(node --version)"; exit 1 } +fnm use default +if ( "$(node --version)" -ne "v6.11.3" ) { echo "Expected node version to be v6.11.3. Got $(node --version)"; exit 1 }" +`; + +exports[`PowerShell allows to install an lts if version missing: PowerShell 1`] = ` +"$ErrorActionPreference = "Stop" +fnm env | Out-String | Invoke-Expression +fnm use --install-if-missing +$($__out__ = $(fnm ls | Select-String lts-latest); if ($__out__ -eq $null) { exit 1 } else { $__out__ })" +`; + +exports[`PowerShell can alias the system node: PowerShell 1`] = ` +"$ErrorActionPreference = "Stop" +fnm env | Out-String | Invoke-Expression +fnm alias system my_system +$($__out__ = $(fnm ls | Select-String my_system); if ($__out__ -eq $null) { exit 1 } else { $__out__ }) +fnm alias system default +fnm alias my_system my_system2 +$($__out__ = $(fnm ls | Select-String my_system2); if ($__out__ -eq $null) { exit 1 } else { $__out__ }) +$($__out__ = $(fnm use my_system | Select-String 'Bypassing fnm'); if ($__out__ -eq $null) { exit 1 } else { $__out__ }) +fnm unalias my_system +$($__out__ = $(fnm use my_system 2>&1 | Select-String 'Requested version my_system is not currently installed'); if ($__out__ -eq $null) { exit 1 } else { $__out__ })" +`; + +exports[`PowerShell errors when alias is not found: PowerShell 1`] = ` +"$ErrorActionPreference = "Stop" +fnm env --log-level=error | Out-String | Invoke-Expression +$($__out__ = $(fnm use 2>&1 | Select-String 'Requested version lts-latest is not'); if ($__out__ -eq $null) { exit 1 } else { $__out__ })" +`; + +exports[`PowerShell unalias a version: PowerShell 1`] = ` +"$ErrorActionPreference = "Stop" +fnm env | Out-String | Invoke-Expression +fnm install 11.10.0 +fnm install 8.11.3 +fnm alias 8.11.3 version8 +$($__out__ = $(fnm ls | Select-String version8); if ($__out__ -eq $null) { exit 1 } else { $__out__ }) +fnm unalias version8 +$($__out__ = $(fnm use version8 2>&1 | Select-String 'Requested version version8 is not currently installed'); if ($__out__ -eq $null) { exit 1 } else { $__out__ })" +`; + +exports[`PowerShell unalias errors if alias not found: PowerShell 1`] = ` +"$ErrorActionPreference = "Stop" +fnm env --log-level=error | Out-String | Invoke-Expression +$($__out__ = $(fnm unalias lts 2>&1 | Select-String 'Requested alias lts not found'); if ($__out__ -eq $null) { exit 1 } else { $__out__ })" +`; + +exports[`Zsh aliasing versions: Zsh 1`] = ` +"set -e +eval "$(fnm env)" +fnm install 6.11.3 +fnm install 8.11.3 +fnm alias 8.11 oldie +fnm alias 6 older +fnm default older +((fnm ls) | grep 8.11.3 || (echo "Expected output to contain 8.11.3" && exit 1)) | grep oldie || (echo "Expected output to contain oldie" && exit 1) +((fnm ls) | grep 6.11.3 || (echo "Expected output to contain 6.11.3" && exit 1)) | grep older || (echo "Expected output to contain older" && exit 1) +fnm use older +if [ "$(node --version)" != "v6.11.3" ]; then + echo "Expected node version to be v6.11.3. Got $(node --version)" + exit 1 +fi +fnm use oldie +if [ "$(node --version)" != "v8.11.3" ]; then + echo "Expected node version to be v8.11.3. Got $(node --version)" + exit 1 +fi +fnm use default +if [ "$(node --version)" != "v6.11.3" ]; then + echo "Expected node version to be v6.11.3. Got $(node --version)" + exit 1 +fi" +`; + +exports[`Zsh allows to install an lts if version missing: Zsh 1`] = ` +"set -e +eval "$(fnm env)" +fnm use --install-if-missing +(fnm ls) | grep lts-latest || (echo "Expected output to contain lts-latest" && exit 1)" +`; + +exports[`Zsh can alias the system node: Zsh 1`] = ` +"set -e +eval "$(fnm env)" +fnm alias system my_system +(fnm ls) | grep my_system || (echo "Expected output to contain my_system" && exit 1) +fnm alias system default +fnm alias my_system my_system2 +(fnm ls) | grep my_system2 || (echo "Expected output to contain my_system2" && exit 1) +(fnm use my_system) | grep 'Bypassing fnm' || (echo "Expected output to contain 'Bypassing fnm'" && exit 1) +fnm unalias my_system +(fnm use my_system 2>&1) | grep 'Requested version my_system is not currently installed' || (echo "Expected output to contain 'Requested version my_system is not currently installed'" && exit 1)" +`; + +exports[`Zsh errors when alias is not found: Zsh 1`] = ` +"set -e +eval "$(fnm env --log-level=error)" +(fnm use 2>&1) | grep 'Requested version lts-latest is not' || (echo "Expected output to contain 'Requested version lts-latest is not'" && exit 1)" +`; + +exports[`Zsh unalias a version: Zsh 1`] = ` +"set -e +eval "$(fnm env)" +fnm install 11.10.0 +fnm install 8.11.3 +fnm alias 8.11.3 version8 +(fnm ls) | grep version8 || (echo "Expected output to contain version8" && exit 1) +fnm unalias version8 +(fnm use version8 2>&1) | grep 'Requested version version8 is not currently installed' || (echo "Expected output to contain 'Requested version version8 is not currently installed'" && exit 1)" +`; + +exports[`Zsh unalias errors if alias not found: Zsh 1`] = ` +"set -e +eval "$(fnm env --log-level=error)" +(fnm unalias lts 2>&1) | grep 'Requested alias lts not found' || (echo "Expected output to contain 'Requested alias lts not found'" && exit 1)" +`; diff --git a/e2e/__snapshots__/basic.test.ts.snap b/e2e/__snapshots__/basic.test.ts.snap new file mode 100644 index 0000000..bfc43fc --- /dev/null +++ b/e2e/__snapshots__/basic.test.ts.snap @@ -0,0 +1,284 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Bash .node-version: Bash 1`] = ` +"set -e +eval "$(fnm env)" +fnm install +fnm use +if [ "$(node --version)" != "v8.11.3" ]; then + echo "Expected node version to be v8.11.3. Got $(node --version)" + exit 1 +fi" +`; + +exports[`Bash .nvmrc: Bash 1`] = ` +"set -e +eval "$(fnm env)" +fnm install +fnm use +if [ "$(node --version)" != "v8.11.3" ]; then + echo "Expected node version to be v8.11.3. Got $(node --version)" + exit 1 +fi" +`; + +exports[`Bash \`fnm ls\` with nothing installed: Bash 1`] = ` +"set -e +eval "$(fnm env)" +if [ "$(fnm ls)" != "* system" ]; then + echo "Expected fnm ls to be * system. Got $(fnm ls)" + exit 1 +fi" +`; + +exports[`Bash basic usage: Bash 1`] = ` +"set -e +eval "$(fnm env)" +fnm install v8.11.3 +fnm use v8.11.3 +if [ "$(node --version)" != "v8.11.3" ]; then + echo "Expected node version to be v8.11.3. Got $(node --version)" + exit 1 +fi" +`; + +exports[`Bash resolves partial semver: Bash 1`] = ` +"set -e +eval "$(fnm env)" +fnm install 6 +fnm use 6 +if [ "$(node --version)" != "v6.17.1" ]; then + echo "Expected node version to be v6.17.1. Got $(node --version)" + exit 1 +fi" +`; + +exports[`Bash use on cd: Bash 1`] = ` +"set -e +eval "$(fnm env --use-on-cd)" +fnm install v8.11.3 +fnm install v12.22.12 +cd subdir +if [ "$(node --version)" != "v12.22.12" ]; then + echo "Expected node version to be v12.22.12. Got $(node --version)" + exit 1 +fi" +`; + +exports[`Bash when .node-version and .nvmrc are in sync, it throws no error: Bash 1`] = ` +"set -e +eval "$(fnm env)" +fnm install +fnm use +if [ "$(node --version)" != "v11.10.0" ]; then + echo "Expected node version to be v11.10.0. Got $(node --version)" + exit 1 +fi" +`; + +exports[`Fish .node-version: Fish 1`] = ` +"fnm env | source +fnm install +fnm use +set ____test____ (node --version) +if test "$____test____" != "v8.11.3" + echo "Expected node version to be v8.11.3. Got $____test____" + exit 1 +end" +`; + +exports[`Fish .nvmrc: Fish 1`] = ` +"fnm env | source +fnm install +fnm use +set ____test____ (node --version) +if test "$____test____" != "v8.11.3" + echo "Expected node version to be v8.11.3. Got $____test____" + exit 1 +end" +`; + +exports[`Fish \`fnm ls\` with nothing installed: Fish 1`] = ` +"fnm env | source +set ____test____ (fnm ls) +if test "$____test____" != "* system" + echo "Expected fnm ls to be * system. Got $____test____" + exit 1 +end" +`; + +exports[`Fish basic usage: Fish 1`] = ` +"fnm env | source +fnm install v8.11.3 +fnm use v8.11.3 +set ____test____ (node --version) +if test "$____test____" != "v8.11.3" + echo "Expected node version to be v8.11.3. Got $____test____" + exit 1 +end" +`; + +exports[`Fish resolves partial semver: Fish 1`] = ` +"fnm env | source +fnm install 6 +fnm use 6 +set ____test____ (node --version) +if test "$____test____" != "v6.17.1" + echo "Expected node version to be v6.17.1. Got $____test____" + exit 1 +end" +`; + +exports[`Fish use on cd: Fish 1`] = ` +"fnm env --use-on-cd | source +fnm install v8.11.3 +fnm install v12.22.12 +cd subdir +set ____test____ (node --version) +if test "$____test____" != "v12.22.12" + echo "Expected node version to be v12.22.12. Got $____test____" + exit 1 +end" +`; + +exports[`Fish when .node-version and .nvmrc are in sync, it throws no error: Fish 1`] = ` +"fnm env | source +fnm install +fnm use +set ____test____ (node --version) +if test "$____test____" != "v11.10.0" + echo "Expected node version to be v11.10.0. Got $____test____" + exit 1 +end" +`; + +exports[`PowerShell .node-version: PowerShell 1`] = ` +"$ErrorActionPreference = "Stop" +fnm env | Out-String | Invoke-Expression +fnm install +fnm use +if ( "$(node --version)" -ne "v8.11.3" ) { echo "Expected node version to be v8.11.3. Got $(node --version)"; exit 1 }" +`; + +exports[`PowerShell .nvmrc: PowerShell 1`] = ` +"$ErrorActionPreference = "Stop" +fnm env | Out-String | Invoke-Expression +fnm install +fnm use +if ( "$(node --version)" -ne "v8.11.3" ) { echo "Expected node version to be v8.11.3. Got $(node --version)"; exit 1 }" +`; + +exports[`PowerShell \`fnm ls\` with nothing installed: PowerShell 1`] = ` +"$ErrorActionPreference = "Stop" +fnm env | Out-String | Invoke-Expression +if ( "$(fnm ls)" -ne "* system" ) { echo "Expected fnm ls to be * system. Got $(fnm ls)"; exit 1 }" +`; + +exports[`PowerShell basic usage: PowerShell 1`] = ` +"$ErrorActionPreference = "Stop" +fnm env | Out-String | Invoke-Expression +fnm install v8.11.3 +fnm use v8.11.3 +if ( "$(node --version)" -ne "v8.11.3" ) { echo "Expected node version to be v8.11.3. Got $(node --version)"; exit 1 }" +`; + +exports[`PowerShell resolves partial semver: PowerShell 1`] = ` +"$ErrorActionPreference = "Stop" +fnm env | Out-String | Invoke-Expression +fnm install 6 +fnm use 6 +if ( "$(node --version)" -ne "v6.17.1" ) { echo "Expected node version to be v6.17.1. Got $(node --version)"; exit 1 }" +`; + +exports[`PowerShell use on cd: PowerShell 1`] = ` +"$ErrorActionPreference = "Stop" +fnm env --use-on-cd | Out-String | Invoke-Expression +fnm install v8.11.3 +fnm install v12.22.12 +cd subdir +if ( "$(node --version)" -ne "v12.22.12" ) { echo "Expected node version to be v12.22.12. Got $(node --version)"; exit 1 }" +`; + +exports[`PowerShell when .node-version and .nvmrc are in sync, it throws no error: PowerShell 1`] = ` +"$ErrorActionPreference = "Stop" +fnm env | Out-String | Invoke-Expression +fnm install +fnm use +if ( "$(node --version)" -ne "v11.10.0" ) { echo "Expected node version to be v11.10.0. Got $(node --version)"; exit 1 }" +`; + +exports[`Zsh .node-version: Zsh 1`] = ` +"set -e +eval "$(fnm env)" +fnm install +fnm use +if [ "$(node --version)" != "v8.11.3" ]; then + echo "Expected node version to be v8.11.3. Got $(node --version)" + exit 1 +fi" +`; + +exports[`Zsh .nvmrc: Zsh 1`] = ` +"set -e +eval "$(fnm env)" +fnm install +fnm use +if [ "$(node --version)" != "v8.11.3" ]; then + echo "Expected node version to be v8.11.3. Got $(node --version)" + exit 1 +fi" +`; + +exports[`Zsh \`fnm ls\` with nothing installed: Zsh 1`] = ` +"set -e +eval "$(fnm env)" +if [ "$(fnm ls)" != "* system" ]; then + echo "Expected fnm ls to be * system. Got $(fnm ls)" + exit 1 +fi" +`; + +exports[`Zsh basic usage: Zsh 1`] = ` +"set -e +eval "$(fnm env)" +fnm install v8.11.3 +fnm use v8.11.3 +if [ "$(node --version)" != "v8.11.3" ]; then + echo "Expected node version to be v8.11.3. Got $(node --version)" + exit 1 +fi" +`; + +exports[`Zsh resolves partial semver: Zsh 1`] = ` +"set -e +eval "$(fnm env)" +fnm install 6 +fnm use 6 +if [ "$(node --version)" != "v6.17.1" ]; then + echo "Expected node version to be v6.17.1. Got $(node --version)" + exit 1 +fi" +`; + +exports[`Zsh use on cd: Zsh 1`] = ` +"set -e +eval "$(fnm env --use-on-cd)" +fnm install v8.11.3 +fnm install v12.22.12 +cd subdir +if [ "$(node --version)" != "v12.22.12" ]; then + echo "Expected node version to be v12.22.12. Got $(node --version)" + exit 1 +fi" +`; + +exports[`Zsh when .node-version and .nvmrc are in sync, it throws no error: Zsh 1`] = ` +"set -e +eval "$(fnm env)" +fnm install +fnm use +if [ "$(node --version)" != "v11.10.0" ]; then + echo "Expected node version to be v11.10.0. Got $(node --version)" + exit 1 +fi" +`; diff --git a/e2e/__snapshots__/current.test.ts.snap b/e2e/__snapshots__/current.test.ts.snap new file mode 100644 index 0000000..5ec9313 --- /dev/null +++ b/e2e/__snapshots__/current.test.ts.snap @@ -0,0 +1,96 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Bash current returns the current Node.js version set in fnm: Bash 1`] = ` +"set -e +eval "$(fnm env)" +if [ "$(fnm current)" != "none" ]; then + echo "Expected currently activated version to be none. Got $(fnm current)" + exit 1 +fi +fnm install v8.11.3 +fnm install v10.10.0 +fnm use v8.11.3 +if [ "$(fnm current)" != "v8.11.3" ]; then + echo "Expected currently activated version to be v8.11.3. Got $(fnm current)" + exit 1 +fi +fnm use v10.10.0 +if [ "$(fnm current)" != "v10.10.0" ]; then + echo "Expected currently activated version to be v10.10.0. Got $(fnm current)" + exit 1 +fi +fnm use system +if [ "$(fnm current)" != "system" ]; then + echo "Expected currently activated version to be system. Got $(fnm current)" + exit 1 +fi" +`; + +exports[`Fish current returns the current Node.js version set in fnm: Fish 1`] = ` +"fnm env | source +set ____test____ (fnm current) +if test "$____test____" != "none" + echo "Expected currently activated version to be none. Got $____test____" + exit 1 +end +fnm install v8.11.3 +fnm install v10.10.0 +fnm use v8.11.3 +set ____test____ (fnm current) +if test "$____test____" != "v8.11.3" + echo "Expected currently activated version to be v8.11.3. Got $____test____" + exit 1 +end +fnm use v10.10.0 +set ____test____ (fnm current) +if test "$____test____" != "v10.10.0" + echo "Expected currently activated version to be v10.10.0. Got $____test____" + exit 1 +end +fnm use system +set ____test____ (fnm current) +if test "$____test____" != "system" + echo "Expected currently activated version to be system. Got $____test____" + exit 1 +end" +`; + +exports[`PowerShell current returns the current Node.js version set in fnm: PowerShell 1`] = ` +"$ErrorActionPreference = "Stop" +fnm env | Out-String | Invoke-Expression +if ( "$(fnm current)" -ne "none" ) { echo "Expected currently activated version to be none. Got $(fnm current)"; exit 1 } +fnm install v8.11.3 +fnm install v10.10.0 +fnm use v8.11.3 +if ( "$(fnm current)" -ne "v8.11.3" ) { echo "Expected currently activated version to be v8.11.3. Got $(fnm current)"; exit 1 } +fnm use v10.10.0 +if ( "$(fnm current)" -ne "v10.10.0" ) { echo "Expected currently activated version to be v10.10.0. Got $(fnm current)"; exit 1 } +fnm use system +if ( "$(fnm current)" -ne "system" ) { echo "Expected currently activated version to be system. Got $(fnm current)"; exit 1 }" +`; + +exports[`Zsh current returns the current Node.js version set in fnm: Zsh 1`] = ` +"set -e +eval "$(fnm env)" +if [ "$(fnm current)" != "none" ]; then + echo "Expected currently activated version to be none. Got $(fnm current)" + exit 1 +fi +fnm install v8.11.3 +fnm install v10.10.0 +fnm use v8.11.3 +if [ "$(fnm current)" != "v8.11.3" ]; then + echo "Expected currently activated version to be v8.11.3. Got $(fnm current)" + exit 1 +fi +fnm use v10.10.0 +if [ "$(fnm current)" != "v10.10.0" ]; then + echo "Expected currently activated version to be v10.10.0. Got $(fnm current)" + exit 1 +fi +fnm use system +if [ "$(fnm current)" != "system" ]; then + echo "Expected currently activated version to be system. Got $(fnm current)" + exit 1 +fi" +`; diff --git a/e2e/__snapshots__/exec.test.ts.snap b/e2e/__snapshots__/exec.test.ts.snap new file mode 100644 index 0000000..1a2941f --- /dev/null +++ b/e2e/__snapshots__/exec.test.ts.snap @@ -0,0 +1,70 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Bash \`exec\` usage: Bash 1`] = ` +"set -e +fnm install +fnm install v6.10.0 +fnm install v10.10.0 +if [ "$(fnm exec -- node -v)" != "v8.10.0" ]; then + echo "Expected version file exec to be v8.10.0. Got $(fnm exec -- node -v)" + exit 1 +fi +if [ "$(fnm exec --using=6 -- node -v)" != "v6.10.0" ]; then + echo "Expected exec:6 node -v to be v6.10.0. Got $(fnm exec --using=6 -- node -v)" + exit 1 +fi +if [ "$(fnm exec --using=10 -- node -v)" != "v10.10.0" ]; then + echo "Expected exec:6 node -v to be v10.10.0. Got $(fnm exec --using=10 -- node -v)" + exit 1 +fi" +`; + +exports[`Fish \`exec\` usage: Fish 1`] = ` +"fnm install +fnm install v6.10.0 +fnm install v10.10.0 +set ____test____ (fnm exec -- node -v) +if test "$____test____" != "v8.10.0" + echo "Expected version file exec to be v8.10.0. Got $____test____" + exit 1 +end +set ____test____ (fnm exec --using=6 -- node -v) +if test "$____test____" != "v6.10.0" + echo "Expected exec:6 node -v to be v6.10.0. Got $____test____" + exit 1 +end +set ____test____ (fnm exec --using=10 -- node -v) +if test "$____test____" != "v10.10.0" + echo "Expected exec:6 node -v to be v10.10.0. Got $____test____" + exit 1 +end" +`; + +exports[`PowerShell \`exec\` usage: PowerShell 1`] = ` +"$ErrorActionPreference = "Stop" +fnm install +fnm install v6.10.0 +fnm install v10.10.0 +if ( "$(fnm exec -- node -v)" -ne "v8.10.0" ) { echo "Expected version file exec to be v8.10.0. Got $(fnm exec -- node -v)"; exit 1 } +if ( "$(fnm exec --using=6 -- node -v)" -ne "v6.10.0" ) { echo "Expected exec:6 node -v to be v6.10.0. Got $(fnm exec --using=6 -- node -v)"; exit 1 } +if ( "$(fnm exec --using=10 -- node -v)" -ne "v10.10.0" ) { echo "Expected exec:6 node -v to be v10.10.0. Got $(fnm exec --using=10 -- node -v)"; exit 1 }" +`; + +exports[`Zsh \`exec\` usage: Zsh 1`] = ` +"set -e +fnm install +fnm install v6.10.0 +fnm install v10.10.0 +if [ "$(fnm exec -- node -v)" != "v8.10.0" ]; then + echo "Expected version file exec to be v8.10.0. Got $(fnm exec -- node -v)" + exit 1 +fi +if [ "$(fnm exec --using=6 -- node -v)" != "v6.10.0" ]; then + echo "Expected exec:6 node -v to be v6.10.0. Got $(fnm exec --using=6 -- node -v)" + exit 1 +fi +if [ "$(fnm exec --using=10 -- node -v)" != "v10.10.0" ]; then + echo "Expected exec:6 node -v to be v10.10.0. Got $(fnm exec --using=10 -- node -v)" + exit 1 +fi" +`; diff --git a/e2e/__snapshots__/existing-installation.test.ts.snap b/e2e/__snapshots__/existing-installation.test.ts.snap new file mode 100644 index 0000000..ae785ac --- /dev/null +++ b/e2e/__snapshots__/existing-installation.test.ts.snap @@ -0,0 +1,28 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Bash warns about an existing installation: Bash 1`] = ` +"set -e +eval "$(fnm env)" +fnm install v8.11.3 +(fnm install v8.11.3 2>&1) | grep 'already installed' || (echo "Expected output to contain 'already installed'" && exit 1)" +`; + +exports[`Fish warns about an existing installation: Fish 1`] = ` +"fnm env | source +fnm install v8.11.3 +begin; fnm install v8.11.3 2>&1; end | grep 'already installed'; or echo "Expected output to contain 'already installed'" && exit 1" +`; + +exports[`PowerShell warns about an existing installation: PowerShell 1`] = ` +"$ErrorActionPreference = "Stop" +fnm env | Out-String | Invoke-Expression +fnm install v8.11.3 +$($__out__ = $(fnm install v8.11.3 2>&1 | Select-String 'already installed'); if ($__out__ -eq $null) { exit 1 } else { $__out__ })" +`; + +exports[`Zsh warns about an existing installation: Zsh 1`] = ` +"set -e +eval "$(fnm env)" +fnm install v8.11.3 +(fnm install v8.11.3 2>&1) | grep 'already installed' || (echo "Expected output to contain 'already installed'" && exit 1)" +`; diff --git a/e2e/__snapshots__/latest-lts.test.ts.snap b/e2e/__snapshots__/latest-lts.test.ts.snap new file mode 100644 index 0000000..b942df8 --- /dev/null +++ b/e2e/__snapshots__/latest-lts.test.ts.snap @@ -0,0 +1,32 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Bash installs latest lts: Bash 1`] = ` +"set -e +eval "$(fnm env)" +fnm install --lts +(fnm ls) | grep lts-latest || (echo "Expected output to contain lts-latest" && exit 1) +fnm use 'lts/*'" +`; + +exports[`Fish installs latest lts: Fish 1`] = ` +"fnm env | source +fnm install --lts +begin; fnm ls; end | grep lts-latest; or echo "Expected output to contain lts-latest" && exit 1 +fnm use 'lts/*'" +`; + +exports[`PowerShell installs latest lts: PowerShell 1`] = ` +"$ErrorActionPreference = "Stop" +fnm env | Out-String | Invoke-Expression +fnm install --lts +$($__out__ = $(fnm ls | Select-String lts-latest); if ($__out__ -eq $null) { exit 1 } else { $__out__ }) +fnm use 'lts/*'" +`; + +exports[`Zsh installs latest lts: Zsh 1`] = ` +"set -e +eval "$(fnm env)" +fnm install --lts +(fnm ls) | grep lts-latest || (echo "Expected output to contain lts-latest" && exit 1) +fnm use 'lts/*'" +`; diff --git a/e2e/__snapshots__/log-level.test.ts.snap b/e2e/__snapshots__/log-level.test.ts.snap new file mode 100644 index 0000000..97b607f --- /dev/null +++ b/e2e/__snapshots__/log-level.test.ts.snap @@ -0,0 +1,127 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Bash "quiet" log level: Bash 1`] = ` +"set -e +eval "$(fnm env --log-level=quiet)" +if [ "$(fnm install v8.11.3)" != "" ]; then + echo "Expected fnm install to be . Got $(fnm install v8.11.3)" + exit 1 +fi +if [ "$(fnm use v8.11.3)" != "" ]; then + echo "Expected fnm use to be . Got $(fnm use v8.11.3)" + exit 1 +fi +if [ "$(fnm alias v8.11.3 something)" != "" ]; then + echo "Expected fnm alias to be . Got $(fnm alias v8.11.3 something)" + exit 1 +fi" +`; + +exports[`Bash error log level: Bash 1`] = ` +"set -e +eval "$(fnm env --log-level=error)" +if [ "$(fnm install v8.11.3)" != "" ]; then + echo "Expected fnm install to be . Got $(fnm install v8.11.3)" + exit 1 +fi +if [ "$(fnm use v8.11.3)" != "" ]; then + echo "Expected fnm use to be . Got $(fnm use v8.11.3)" + exit 1 +fi +if [ "$(fnm alias v8.11.3 something)" != "" ]; then + echo "Expected fnm alias to be . Got $(fnm alias v8.11.3 something)" + exit 1 +fi +(fnm alias abcd efg 2>&1) | grep "find requested version" || (echo "Expected output to contain "find requested version"" && exit 1)" +`; + +exports[`Fish "quiet" log level: Fish 1`] = ` +"fnm env --log-level=quiet | source +set ____test____ (fnm install v8.11.3) +if test "$____test____" != "" + echo "Expected fnm install to be . Got $____test____" + exit 1 +end +set ____test____ (fnm use v8.11.3) +if test "$____test____" != "" + echo "Expected fnm use to be . Got $____test____" + exit 1 +end +set ____test____ (fnm alias v8.11.3 something) +if test "$____test____" != "" + echo "Expected fnm alias to be . Got $____test____" + exit 1 +end" +`; + +exports[`Fish error log level: Fish 1`] = ` +"fnm env --log-level=error | source +set ____test____ (fnm install v8.11.3) +if test "$____test____" != "" + echo "Expected fnm install to be . Got $____test____" + exit 1 +end +set ____test____ (fnm use v8.11.3) +if test "$____test____" != "" + echo "Expected fnm use to be . Got $____test____" + exit 1 +end +set ____test____ (fnm alias v8.11.3 something) +if test "$____test____" != "" + echo "Expected fnm alias to be . Got $____test____" + exit 1 +end +begin; fnm alias abcd efg 2>&1; end | grep "find requested version"; or echo "Expected output to contain "find requested version"" && exit 1" +`; + +exports[`PowerShell "quiet" log level: PowerShell 1`] = ` +"$ErrorActionPreference = "Stop" +fnm env --log-level=quiet | Out-String | Invoke-Expression +if ( "$(fnm install v8.11.3)" -ne "" ) { echo "Expected fnm install to be . Got $(fnm install v8.11.3)"; exit 1 } +if ( "$(fnm use v8.11.3)" -ne "" ) { echo "Expected fnm use to be . Got $(fnm use v8.11.3)"; exit 1 } +if ( "$(fnm alias v8.11.3 something)" -ne "" ) { echo "Expected fnm alias to be . Got $(fnm alias v8.11.3 something)"; exit 1 }" +`; + +exports[`PowerShell error log level: PowerShell 1`] = ` +"$ErrorActionPreference = "Stop" +fnm env --log-level=error | Out-String | Invoke-Expression +if ( "$(fnm install v8.11.3)" -ne "" ) { echo "Expected fnm install to be . Got $(fnm install v8.11.3)"; exit 1 } +if ( "$(fnm use v8.11.3)" -ne "" ) { echo "Expected fnm use to be . Got $(fnm use v8.11.3)"; exit 1 } +if ( "$(fnm alias v8.11.3 something)" -ne "" ) { echo "Expected fnm alias to be . Got $(fnm alias v8.11.3 something)"; exit 1 } +$($__out__ = $(fnm alias abcd efg 2>&1 | Select-String "find requested version"); if ($__out__ -eq $null) { exit 1 } else { $__out__ })" +`; + +exports[`Zsh "quiet" log level: Zsh 1`] = ` +"set -e +eval "$(fnm env --log-level=quiet)" +if [ "$(fnm install v8.11.3)" != "" ]; then + echo "Expected fnm install to be . Got $(fnm install v8.11.3)" + exit 1 +fi +if [ "$(fnm use v8.11.3)" != "" ]; then + echo "Expected fnm use to be . Got $(fnm use v8.11.3)" + exit 1 +fi +if [ "$(fnm alias v8.11.3 something)" != "" ]; then + echo "Expected fnm alias to be . Got $(fnm alias v8.11.3 something)" + exit 1 +fi" +`; + +exports[`Zsh error log level: Zsh 1`] = ` +"set -e +eval "$(fnm env --log-level=error)" +if [ "$(fnm install v8.11.3)" != "" ]; then + echo "Expected fnm install to be . Got $(fnm install v8.11.3)" + exit 1 +fi +if [ "$(fnm use v8.11.3)" != "" ]; then + echo "Expected fnm use to be . Got $(fnm use v8.11.3)" + exit 1 +fi +if [ "$(fnm alias v8.11.3 something)" != "" ]; then + echo "Expected fnm alias to be . Got $(fnm alias v8.11.3 something)" + exit 1 +fi +(fnm alias abcd efg 2>&1) | grep "find requested version" || (echo "Expected output to contain "find requested version"" && exit 1)" +`; diff --git a/e2e/__snapshots__/multishell.test.ts.snap b/e2e/__snapshots__/multishell.test.ts.snap new file mode 100644 index 0000000..b02e4b4 --- /dev/null +++ b/e2e/__snapshots__/multishell.test.ts.snap @@ -0,0 +1,67 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Bash multishell changes don't affect parent: Bash 1`] = ` +"set -e +eval "$(fnm env)" +fnm install v8.11.3 +fnm install v11.9.0 +echo 'set -e +eval "$(fnm env)" +fnm use v11 +if [ "$(node --version)" != "v11.9.0" ]; then + echo "Expected node version to be v11.9.0. Got $(node --version)" + exit 1 +fi' | bash +if [ "$(node --version)" != "v8.11.3" ]; then + echo "Expected node version to be v8.11.3. Got $(node --version)" + exit 1 +fi" +`; + +exports[`Fish multishell changes don't affect parent: Fish 1`] = ` +"fnm env | source +fnm install v8.11.3 +fnm install v11.9.0 +fish -c 'fnm env | source +fnm use v11 +set ____test____ (node --version) +if test "$____test____" != "v11.9.0" + echo "Expected node version to be v11.9.0. Got $____test____" + exit 1 +end' +set ____test____ (node --version) +if test "$____test____" != "v8.11.3" + echo "Expected node version to be v8.11.3. Got $____test____" + exit 1 +end" +`; + +exports[`PowerShell multishell changes don't affect parent: PowerShell 1`] = ` +"$ErrorActionPreference = "Stop" +fnm env | Out-String | Invoke-Expression +fnm install v8.11.3 +fnm install v11.9.0 +echo '$ErrorActionPreference = "Stop" +fnm env | Out-String | Invoke-Expression +fnm use v11 +if ( "$(node --version)" -ne "v11.9.0" ) { echo "Expected node version to be v11.9.0. Got $(node --version)"; exit 1 }' | pwsh -NoProfile +if ( "$(node --version)" -ne "v8.11.3" ) { echo "Expected node version to be v8.11.3. Got $(node --version)"; exit 1 }" +`; + +exports[`Zsh multishell changes don't affect parent: Zsh 1`] = ` +"set -e +eval "$(fnm env)" +fnm install v8.11.3 +fnm install v11.9.0 +echo 'set -e +eval "$(fnm env)" +fnm use v11 +if [ "$(node --version)" != "v11.9.0" ]; then + echo "Expected node version to be v11.9.0. Got $(node --version)" + exit 1 +fi' | zsh +if [ "$(node --version)" != "v8.11.3" ]; then + echo "Expected node version to be v8.11.3. Got $(node --version)" + exit 1 +fi" +`; diff --git a/e2e/__snapshots__/nvmrc-lts.test.ts.snap b/e2e/__snapshots__/nvmrc-lts.test.ts.snap new file mode 100644 index 0000000..ce1f2cb --- /dev/null +++ b/e2e/__snapshots__/nvmrc-lts.test.ts.snap @@ -0,0 +1,32 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Bash uses .nvmrc with lts definition: Bash 1`] = ` +"set -e +eval "$(fnm env)" +fnm install +fnm use +(fnm ls) | grep lts-dubnium || (echo "Expected output to contain lts-dubnium" && exit 1)" +`; + +exports[`Fish uses .nvmrc with lts definition: Fish 1`] = ` +"fnm env | source +fnm install +fnm use +begin; fnm ls; end | grep lts-dubnium; or echo "Expected output to contain lts-dubnium" && exit 1" +`; + +exports[`PowerShell uses .nvmrc with lts definition: PowerShell 1`] = ` +"$ErrorActionPreference = "Stop" +fnm env | Out-String | Invoke-Expression +fnm install +fnm use +$($__out__ = $(fnm ls | Select-String lts-dubnium); if ($__out__ -eq $null) { exit 1 } else { $__out__ })" +`; + +exports[`Zsh uses .nvmrc with lts definition: Zsh 1`] = ` +"set -e +eval "$(fnm env)" +fnm install +fnm use +(fnm ls) | grep lts-dubnium || (echo "Expected output to contain lts-dubnium" && exit 1)" +`; diff --git a/e2e/__snapshots__/uninstall.test.ts.snap b/e2e/__snapshots__/uninstall.test.ts.snap new file mode 100644 index 0000000..815d7ab --- /dev/null +++ b/e2e/__snapshots__/uninstall.test.ts.snap @@ -0,0 +1,46 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Bash uninstalls a version: Bash 1`] = ` +"set -e +fnm install 12.0.0 +fnm alias 12.0.0 hello +((fnm ls) | grep v12.0.0 || (echo "Expected output to contain v12.0.0" && exit 1)) | grep hello || (echo "Expected output to contain hello" && exit 1) +fnm uninstall hello +if [ "$(fnm ls)" != "* system" ]; then + echo "Expected fnm ls to be * system. Got $(fnm ls)" + exit 1 +fi" +`; + +exports[`Fish uninstalls a version: Fish 1`] = ` +"fnm install 12.0.0 +fnm alias 12.0.0 hello +begin; begin; fnm ls; end | grep v12.0.0; or echo "Expected output to contain v12.0.0" && exit 1; end | grep hello; or echo "Expected output to contain hello" && exit 1 +fnm uninstall hello +set ____test____ (fnm ls) +if test "$____test____" != "* system" + echo "Expected fnm ls to be * system. Got $____test____" + exit 1 +end" +`; + +exports[`PowerShell uninstalls a version: PowerShell 1`] = ` +"$ErrorActionPreference = "Stop" +fnm install 12.0.0 +fnm alias 12.0.0 hello +$($__out__ = $($($__out__ = $(fnm ls | Select-String v12.0.0); if ($__out__ -eq $null) { exit 1 } else { $__out__ }) | Select-String hello); if ($__out__ -eq $null) { exit 1 } else { $__out__ }) +fnm uninstall hello +if ( "$(fnm ls)" -ne "* system" ) { echo "Expected fnm ls to be * system. Got $(fnm ls)"; exit 1 }" +`; + +exports[`Zsh uninstalls a version: Zsh 1`] = ` +"set -e +fnm install 12.0.0 +fnm alias 12.0.0 hello +((fnm ls) | grep v12.0.0 || (echo "Expected output to contain v12.0.0" && exit 1)) | grep hello || (echo "Expected output to contain hello" && exit 1) +fnm uninstall hello +if [ "$(fnm ls)" != "* system" ]; then + echo "Expected fnm ls to be * system. Got $(fnm ls)" + exit 1 +fi" +`; diff --git a/e2e/aliases.test.ts b/e2e/aliases.test.ts new file mode 100644 index 0000000..2cde619 --- /dev/null +++ b/e2e/aliases.test.ts @@ -0,0 +1,129 @@ +import { script } from "./shellcode/script" +import { Bash, Fish, PowerShell, Zsh } from "./shellcode/shells" +import describe from "./describe" +import { writeFile } from "node:fs/promises" +import path from "node:path" +import testCwd from "./shellcode/test-cwd" +import getStderr from "./shellcode/get-stderr" +import testNodeVersion from "./shellcode/test-node-version" + +for (const shell of [Bash, Zsh, Fish, PowerShell]) { + describe(shell, () => { + test(`allows to install an lts if version missing`, async () => { + await writeFile(path.join(testCwd(), ".node-version"), "lts/*") + await script(shell) + .then(shell.env({})) + .then(shell.call("fnm", ["use", "--install-if-missing"])) + .then( + shell.scriptOutputContains(shell.call("fnm", ["ls"]), "lts-latest") + ) + .takeSnapshot(shell) + .execute(shell) + }) + + test(`errors when alias is not found`, async () => { + await writeFile(path.join(testCwd(), ".node-version"), "lts/*") + await script(shell) + .then(shell.env({ logLevel: "error" })) + .then( + shell.scriptOutputContains( + getStderr(shell.call("fnm", ["use"])), + "'Requested version lts-latest is not'" + ) + ) + .takeSnapshot(shell) + .execute(shell) + }) + + test(`unalias a version`, async () => { + await script(shell) + .then(shell.env({})) + .then(shell.call("fnm", ["install", "11.10.0"])) + .then(shell.call("fnm", ["install", "8.11.3"])) + .then(shell.call("fnm", ["alias", "8.11.3", "version8"])) + .then(shell.scriptOutputContains(shell.call("fnm", ["ls"]), "version8")) + .then(shell.call("fnm", ["unalias", "version8"])) + .then( + shell.scriptOutputContains( + getStderr(shell.call("fnm", ["use", "version8"])), + "'Requested version version8 is not currently installed'" + ) + ) + .takeSnapshot(shell) + .execute(shell) + }) + + test(`unalias errors if alias not found`, async () => { + await script(shell) + .then(shell.env({ logLevel: "error" })) + .then( + shell.scriptOutputContains( + getStderr(shell.call("fnm", ["unalias", "lts"])), + "'Requested alias lts not found'" + ) + ) + .takeSnapshot(shell) + .execute(shell) + }) + + test(`can alias the system node`, async () => { + await script(shell) + .then(shell.env({})) + .then(shell.call("fnm", ["alias", "system", "my_system"])) + .then( + shell.scriptOutputContains(shell.call("fnm", ["ls"]), "my_system") + ) + .then(shell.call("fnm", ["alias", "system", "default"])) + .then(shell.call("fnm", ["alias", "my_system", "my_system2"])) + .then( + shell.scriptOutputContains(shell.call("fnm", ["ls"]), "my_system2") + ) + .then( + shell.scriptOutputContains( + shell.call("fnm", ["use", "my_system"]), + "'Bypassing fnm'" + ) + ) + .then(shell.call("fnm", ["unalias", "my_system"])) + .then( + shell.scriptOutputContains( + getStderr(shell.call("fnm", ["use", "my_system"])), + "'Requested version my_system is not currently installed'" + ) + ) + .takeSnapshot(shell) + .execute(shell) + }) + + test(`aliasing versions`, async () => { + const installedVersions = shell.call("fnm", ["ls"]) + await script(shell) + .then(shell.env({})) + .then(shell.call("fnm", ["install", "6.11.3"])) + .then(shell.call("fnm", ["install", "8.11.3"])) + .then(shell.call("fnm", ["alias", "8.11", "oldie"])) + .then(shell.call("fnm", ["alias", "6", "older"])) + .then(shell.call("fnm", ["default", "older"])) + .then( + shell.scriptOutputContains( + shell.scriptOutputContains(installedVersions, "8.11.3"), + "oldie" + ) + ) + .then( + shell.scriptOutputContains( + shell.scriptOutputContains(installedVersions, "6.11.3"), + "older" + ) + ) + .then(shell.call("fnm", ["use", "older"])) + .then(testNodeVersion(shell, "v6.11.3")) + .then(shell.call("fnm", ["use", "oldie"])) + .then(testNodeVersion(shell, "v8.11.3")) + .then(shell.call("fnm", ["use", "default"])) + .then(testNodeVersion(shell, "v6.11.3")) + .takeSnapshot(shell) + .execute(shell) + }) + }) +} diff --git a/e2e/basic.test.ts b/e2e/basic.test.ts new file mode 100644 index 0000000..260a284 --- /dev/null +++ b/e2e/basic.test.ts @@ -0,0 +1,93 @@ +import { writeFile, mkdir } from "node:fs/promises" +import { join } from "node:path" +import { script } from "./shellcode/script" +import { Bash, Fish, PowerShell, WinCmd, Zsh } from "./shellcode/shells" +import testCwd from "./shellcode/test-cwd" +import testNodeVersion from "./shellcode/test-node-version" +import describe from "./describe" + +for (const shell of [Bash, Zsh, Fish, PowerShell, WinCmd]) { + describe(shell, () => { + test(`basic usage`, async () => { + await script(shell) + .then(shell.env({})) + .then(shell.call("fnm", ["install", "v8.11.3"])) + .then(shell.call("fnm", ["use", "v8.11.3"])) + .then(testNodeVersion(shell, "v8.11.3")) + .takeSnapshot(shell) + .execute(shell) + }) + + test(`.nvmrc`, async () => { + await writeFile(join(testCwd(), ".nvmrc"), "v8.11.3") + await script(shell) + .then(shell.env({})) + .then(shell.call("fnm", ["install"])) + .then(shell.call("fnm", ["use"])) + .then(testNodeVersion(shell, "v8.11.3")) + .takeSnapshot(shell) + .execute(shell) + }) + + test(`.node-version`, async () => { + await writeFile(join(testCwd(), ".node-version"), "v8.11.3") + await script(shell) + .then(shell.env({})) + .then(shell.call("fnm", ["install"])) + .then(shell.call("fnm", ["use"])) + .then(testNodeVersion(shell, "v8.11.3")) + .takeSnapshot(shell) + .execute(shell) + }) + + test(`use on cd`, async () => { + await mkdir(join(testCwd(), "subdir"), { recursive: true }) + await writeFile(join(testCwd(), "subdir", ".node-version"), "v12.22.12") + await script(shell) + .then(shell.env({ useOnCd: true })) + .then(shell.call("fnm", ["install", "v8.11.3"])) + .then(shell.call("fnm", ["install", "v12.22.12"])) + .then(shell.call("cd", ["subdir"])) + .then(testNodeVersion(shell, "v12.22.12")) + .takeSnapshot(shell) + .execute(shell) + }) + + test(`resolves partial semver`, async () => { + await script(shell) + .then(shell.env({})) + .then(shell.call("fnm", ["install", "6"])) + .then(shell.call("fnm", ["use", "6"])) + .then(testNodeVersion(shell, "v6.17.1")) + .takeSnapshot(shell) + .execute(shell) + }) + + test("`fnm ls` with nothing installed", async () => { + await script(shell) + .then(shell.env({})) + .then( + shell.hasCommandOutput( + shell.call("fnm", ["ls"]), + "* system", + "fnm ls" + ) + ) + .takeSnapshot(shell) + .execute(shell) + }) + + test(`when .node-version and .nvmrc are in sync, it throws no error`, async () => { + await writeFile(join(testCwd(), ".nvmrc"), "v11.10.0") + await writeFile(join(testCwd(), ".node-version"), "v11.10.0") + + await script(shell) + .then(shell.env({})) + .then(shell.call("fnm", ["install"])) + .then(shell.call("fnm", ["use"])) + .then(testNodeVersion(shell, "v11.10.0")) + .takeSnapshot(shell) + .execute(shell) + }) + }) +} diff --git a/e2e/current.test.ts b/e2e/current.test.ts new file mode 100644 index 0000000..e1fc99d --- /dev/null +++ b/e2e/current.test.ts @@ -0,0 +1,47 @@ +import { script } from "./shellcode/script" +import { Bash, Fish, PowerShell, WinCmd, Zsh } from "./shellcode/shells" +import describe from "./describe" + +for (const shell of [Bash, Zsh, Fish, PowerShell, WinCmd]) { + describe(shell, () => { + test(`current returns the current Node.js version set in fnm`, async () => { + await script(shell) + .then(shell.env({})) + .then( + shell.hasCommandOutput( + shell.call("fnm", ["current"]), + "none", + "currently activated version" + ) + ) + .then(shell.call("fnm", ["install", "v8.11.3"])) + .then(shell.call("fnm", ["install", "v10.10.0"])) + .then(shell.call("fnm", ["use", "v8.11.3"])) + .then( + shell.hasCommandOutput( + shell.call("fnm", ["current"]), + "v8.11.3", + "currently activated version" + ) + ) + .then(shell.call("fnm", ["use", "v10.10.0"])) + .then( + shell.hasCommandOutput( + shell.call("fnm", ["current"]), + "v10.10.0", + "currently activated version" + ) + ) + .then(shell.call("fnm", ["use", "system"])) + .then( + shell.hasCommandOutput( + shell.call("fnm", ["current"]), + "system", + "currently activated version" + ) + ) + .takeSnapshot(shell) + .execute(shell) + }) + }) +} diff --git a/e2e/describe.ts b/e2e/describe.ts new file mode 100644 index 0000000..1e3e78a --- /dev/null +++ b/e2e/describe.ts @@ -0,0 +1,15 @@ +import { WinCmd } from "./shellcode/shells" +import { Shell } from "./shellcode/shells/types" + +export default function describe( + shell: Pick, + fn: () => void +): void { + if (shell === WinCmd) { + // wincmd tests do not work right now and I don't have a Windows machine to fix it + // maybe in the future when I have some time to spin a VM to check what's happening. + return globalThis.describe.skip("WinCmd", fn) + } + + globalThis.describe(shell.name(), fn) +} diff --git a/e2e/exec.test.ts b/e2e/exec.test.ts new file mode 100644 index 0000000..148df60 --- /dev/null +++ b/e2e/exec.test.ts @@ -0,0 +1,42 @@ +import { script } from "./shellcode/script" +import { Bash, Fish, PowerShell, WinCmd, Zsh } from "./shellcode/shells" +import testCwd from "./shellcode/test-cwd" +import fs from "node:fs/promises" +import path from "node:path" +import describe from "./describe" + +for (const shell of [Bash, Zsh, Fish, PowerShell, WinCmd]) { + describe(shell, () => { + test("`exec` usage", async () => { + await fs.writeFile(path.join(testCwd(), ".nvmrc"), "v8.10.0") + + await script(shell) + .then(shell.call("fnm", ["install"])) + .then(shell.call("fnm", ["install", "v6.10.0"])) + .then(shell.call("fnm", ["install", "v10.10.0"])) + .then( + shell.hasCommandOutput( + shell.call("fnm", ["exec", "--", "node", "-v"]), + "v8.10.0", + "version file exec" + ) + ) + .then( + shell.hasCommandOutput( + shell.call("fnm", ["exec", "--using=6", "--", "node", "-v"]), + "v6.10.0", + "exec:6 node -v" + ) + ) + .then( + shell.hasCommandOutput( + shell.call("fnm", ["exec", "--using=10", "--", "node", "-v"]), + "v10.10.0", + "exec:6 node -v" + ) + ) + .takeSnapshot(shell) + .execute(shell) + }) + }) +} diff --git a/e2e/existing-installation.test.ts b/e2e/existing-installation.test.ts new file mode 100644 index 0000000..d129d7d --- /dev/null +++ b/e2e/existing-installation.test.ts @@ -0,0 +1,22 @@ +import getStderr from "./shellcode/get-stderr" +import { script } from "./shellcode/script" +import { Bash, Fish, PowerShell, Zsh } from "./shellcode/shells" +import describe from "./describe" + +for (const shell of [Bash, Zsh, Fish, PowerShell]) { + describe(shell, () => { + test(`warns about an existing installation`, async () => { + await script(shell) + .then(shell.env({})) + .then(shell.call("fnm", ["install", "v8.11.3"])) + .then( + shell.scriptOutputContains( + getStderr(shell.call("fnm", ["install", "v8.11.3"])), + "'already installed'" + ) + ) + .takeSnapshot(shell) + .execute(shell) + }) + }) +} diff --git a/e2e/latest-lts.test.ts b/e2e/latest-lts.test.ts new file mode 100644 index 0000000..75df43a --- /dev/null +++ b/e2e/latest-lts.test.ts @@ -0,0 +1,19 @@ +import { script } from "./shellcode/script" +import { Bash, Fish, PowerShell, Zsh } from "./shellcode/shells" +import describe from "./describe" + +for (const shell of [Bash, Zsh, Fish, PowerShell]) { + describe(shell, () => { + test(`installs latest lts`, async () => { + await script(shell) + .then(shell.env({})) + .then(shell.call("fnm", ["install", "--lts"])) + .then( + shell.scriptOutputContains(shell.call("fnm", ["ls"]), "lts-latest") + ) + .then(shell.call("fnm", ["use", "'lts/*'"])) + .takeSnapshot(shell) + .execute(shell) + }) + }) +} diff --git a/e2e/log-level.test.ts b/e2e/log-level.test.ts new file mode 100644 index 0000000..ee658e8 --- /dev/null +++ b/e2e/log-level.test.ts @@ -0,0 +1,71 @@ +import { script } from "./shellcode/script" +import { Bash, Fish, PowerShell, Zsh } from "./shellcode/shells" +import describe from "./describe" +import getStderr from "./shellcode/get-stderr" + +for (const shell of [Bash, Zsh, Fish, PowerShell]) { + describe(shell, () => { + test(`"quiet" log level`, async () => { + await script(shell) + .then(shell.env({ logLevel: "quiet" })) + .then( + shell.hasCommandOutput( + shell.call("fnm", ["install", "v8.11.3"]), + "", + "fnm install" + ) + ) + .then( + shell.hasCommandOutput( + shell.call("fnm", ["use", "v8.11.3"]), + "", + "fnm use" + ) + ) + .then( + shell.hasCommandOutput( + shell.call("fnm", ["alias", "v8.11.3", "something"]), + "", + "fnm alias" + ) + ) + .takeSnapshot(shell) + .execute(shell) + }) + + test("error log level", async () => { + await script(shell) + .then(shell.env({ logLevel: "error" })) + .then( + shell.hasCommandOutput( + shell.call("fnm", ["install", "v8.11.3"]), + "", + "fnm install" + ) + ) + .then( + shell.hasCommandOutput( + shell.call("fnm", ["use", "v8.11.3"]), + "", + "fnm use" + ) + ) + .then( + shell.hasCommandOutput( + shell.call("fnm", ["alias", "v8.11.3", "something"]), + "", + "fnm alias" + ) + ) + .then( + shell.scriptOutputContains( + getStderr(shell.call("fnm", ["alias", "abcd", "efg"])), + `"find requested version"` + ) + ) + + .takeSnapshot(shell) + .execute(shell) + }) + }) +} diff --git a/e2e/multishell.test.ts b/e2e/multishell.test.ts new file mode 100644 index 0000000..89447c8 --- /dev/null +++ b/e2e/multishell.test.ts @@ -0,0 +1,27 @@ +import { script } from "./shellcode/script" +import { Bash, Fish, PowerShell, Zsh } from "./shellcode/shells" +import testNodeVersion from "./shellcode/test-node-version" +import describe from "./describe" + +for (const shell of [Bash, Zsh, Fish, PowerShell]) { + describe(shell, () => { + test(`multishell changes don't affect parent`, async () => { + await script(shell) + .then(shell.env({})) + .then(shell.call("fnm", ["install", "v8.11.3"])) + .then(shell.call("fnm", ["install", "v11.9.0"])) + .then( + shell.inSubShell( + script(shell) + .then(shell.env({})) + .then(shell.call("fnm", ["use", "v11"])) + .then(testNodeVersion(shell, "v11.9.0")) + .asLine() + ) + ) + .then(testNodeVersion(shell, "v8.11.3")) + .takeSnapshot(shell) + .execute(shell) + }) + }) +} diff --git a/e2e/nvmrc-lts.test.ts b/e2e/nvmrc-lts.test.ts new file mode 100644 index 0000000..6c38151 --- /dev/null +++ b/e2e/nvmrc-lts.test.ts @@ -0,0 +1,24 @@ +import { script } from "./shellcode/script" +import { Bash, Fish, PowerShell, Zsh } from "./shellcode/shells" +import fs from "node:fs/promises" +import path from "node:path" +import describe from "./describe" +import testCwd from "./shellcode/test-cwd" + +for (const shell of [Bash, Fish, PowerShell, Zsh]) { + describe(shell, () => { + test(`uses .nvmrc with lts definition`, async () => { + await fs.writeFile(path.join(testCwd(), ".nvmrc"), `lts/dubnium`) + + await script(shell) + .then(shell.env({})) + .then(shell.call("fnm", ["install"])) + .then(shell.call("fnm", ["use"])) + .then( + shell.scriptOutputContains(shell.call("fnm", ["ls"]), "lts-dubnium") + ) + .takeSnapshot(shell) + .execute(shell) + }) + }) +} diff --git a/e2e/shellcode/get-stderr.ts b/e2e/shellcode/get-stderr.ts new file mode 100644 index 0000000..4271901 --- /dev/null +++ b/e2e/shellcode/get-stderr.ts @@ -0,0 +1,3 @@ +export default function getStderr(script: string): string { + return `${script} 2>&1` +} diff --git a/e2e/shellcode/script.ts b/e2e/shellcode/script.ts new file mode 100644 index 0000000..e3e092e --- /dev/null +++ b/e2e/shellcode/script.ts @@ -0,0 +1,170 @@ +import { ScriptLine, Shell } from "./shells/types" +import execa from "execa" +import testTmpDir from "./test-tmp-dir" +import { Writable } from "node:stream" +import dedent from "ts-dedent" +import testCwd from "./test-cwd" +import path, { join } from "node:path" +import { writeFile } from "node:fs/promises" +import chalk from "chalk" +import testBinDir from "./test-bin-dir" + +class Script { + constructor( + private readonly config: { + fnmDir: string + }, + private readonly lines: ScriptLine[] + ) {} + then(line: ScriptLine): Script { + return new Script(this.config, [...this.lines, line]) + } + + takeSnapshot(shell: Pick): this { + const script = this.lines.join("\n") + expect(script).toMatchSnapshot(shell.name()) + + return this + } + + async execute( + shell: Pick< + Shell, + "binaryName" | "launchArgs" | "currentlySupported" | "forceFile" + > + ): Promise { + if (!shell.currentlySupported()) { + return + } + + const args = [...shell.launchArgs()] + + if (shell.forceFile) { + const filename = join(testTmpDir(), "script") + await writeFile(filename, [...this.lines, "exit 0"].join("\n")) + args.push(filename) + } + + const child = execa(shell.binaryName(), args, { + stdio: [shell.forceFile ? "ignore" : "pipe", "pipe", "pipe"], + cwd: testCwd(), + env: { + ...removeAllFnmEnvVars(process.env), + PATH: [testBinDir(), fnmTargetDir(), process.env.PATH] + .filter(Boolean) + .join(path.delimiter), + FNM_DIR: this.config.fnmDir, + }, + extendEnv: false, + reject: false, + }) + + if (child.stdin) { + const childStdin = child.stdin + + for (const line of this.lines) { + await write(childStdin, `${line}\n`) + } + + await write(childStdin, "exit 0\n") + } + + const { stdout, stderr } = streamOutputsAndBuffer(child) + + const finished = await child + + if (finished.failed) { + console.error( + dedent` + Script failed. + code ${finished.exitCode} + signal ${finished.signal} + + stdout: + ${padAllLines(stdout.join(""), 2)} + + stderr: + ${padAllLines(stderr.join(""), 2)} + ` + ) + + throw new Error( + `Script failed on ${testCwd()} with code ${finished.exitCode}` + ) + } + } + + asLine(): ScriptLine { + return this.lines.join("\n") + } +} + +function streamOutputsAndBuffer(child: execa.ExecaChildProcess) { + const stdout: string[] = [] + const stderr: string[] = [] + const testName = expect.getState().currentTestName ?? "unknown" + const testPath = expect.getState().testPath ?? "unknown" + + const stdoutPrefix = chalk.yellow.dim(`[stdout] ${testPath}/${testName}: `) + const stderrPrefix = chalk.red.dim(`[stderr] ${testPath}/${testName}: `) + + if (child.stdout) { + child.stdout.on("data", (data) => { + const line = data.toString().trim() + if (line) { + process.stdout.write(`${stdoutPrefix}${line}\n`) + } + stdout.push(data.toString()) + }) + } + + if (child.stderr) { + child.stderr.on("data", (data) => { + const line = data.toString().trim() + if (line) { + process.stdout.write(`${stderrPrefix}${line}\n`) + } + stderr.push(data.toString()) + }) + } + + return { stdout, stderr } +} + +function padAllLines(text: string, padding: number): string { + return text + .split("\n") + .map((line) => " ".repeat(padding) + line) + .join("\n") +} + +function write(writable: Writable, text: string): Promise { + return new Promise((resolve, reject) => { + writable.write(text, (err) => { + if (err) return reject(err) + return resolve() + }) + }) +} + +export function script(shell: Pick): Script { + const fnmDir = `${testTmpDir()}/fnm` + return new Script({ fnmDir }, shell.dieOnErrors ? [shell.dieOnErrors()] : []) +} + +function removeAllFnmEnvVars(obj: NodeJS.ProcessEnv): NodeJS.ProcessEnv { + const result: NodeJS.ProcessEnv = {} + for (const [key, value] of Object.entries(obj)) { + if (!key.startsWith("FNM_")) { + result[key] = value + } + } + return result +} + +function fnmTargetDir(): string { + return path.resolve( + __dirname, + `../../target/${process.env.FNM_TARGET_NAME ?? "debug"}` + ) +} diff --git a/e2e/shellcode/shells/cmdCall.ts b/e2e/shellcode/shells/cmdCall.ts new file mode 100644 index 0000000..2024a1d --- /dev/null +++ b/e2e/shellcode/shells/cmdCall.ts @@ -0,0 +1,12 @@ +import { define, ScriptLine } from "./types" + +export type HasCall = { + call: (binary: string, args: string[]) => ScriptLine +} + +export const cmdCall = { + all: define({ + call: (binary: string, args: string[]) => + `${binary} ${args.join(" ")}` as ScriptLine, + }), +} diff --git a/e2e/shellcode/shells/cmdEnv.ts b/e2e/shellcode/shells/cmdEnv.ts new file mode 100644 index 0000000..f196e9f --- /dev/null +++ b/e2e/shellcode/shells/cmdEnv.ts @@ -0,0 +1,32 @@ +import { ScriptLine, define } from "./types" + +type EnvConfig = { useOnCd: boolean; logLevel: string } +export type HasEnv = { env(cfg: Partial): ScriptLine } + +function stringify(envConfig: Partial = {}) { + const { useOnCd, logLevel } = envConfig + return [ + `fnm env`, + useOnCd && "--use-on-cd", + logLevel && `--log-level=${logLevel}`, + ] + .filter(Boolean) + .join(" ") +} + +export const cmdEnv = { + bash: define({ + env: (envConfig) => `eval "$(${stringify(envConfig)})"`, + }), + fish: define({ + env: (envConfig) => `${stringify(envConfig)} | source`, + }), + powershell: define({ + env: (envConfig) => + `${stringify(envConfig)} | Out-String | Invoke-Expression`, + }), + wincmd: define({ + env: (envConfig) => + `FOR /f "tokens=*" %i IN ('${stringify(envConfig)}') DO CALL %i`, + }), +} diff --git a/e2e/shellcode/shells/expect-command-output.ts b/e2e/shellcode/shells/expect-command-output.ts new file mode 100644 index 0000000..cf3bfb2 --- /dev/null +++ b/e2e/shellcode/shells/expect-command-output.ts @@ -0,0 +1,52 @@ +import dedent from "ts-dedent" +import { define, ScriptLine } from "./types" + +export type HasExpectCommandOutput = { + hasCommandOutput( + script: ScriptLine, + output: string, + message: string + ): ScriptLine +} + +export const cmdExpectCommandOutput = { + bash: define({ + hasCommandOutput(script, output, message) { + return dedent` + if [ "$(${script})" != "${output}" ]; then + echo "Expected ${message} to be ${output}. Got $(${script})" + exit 1 + fi + ` + }, + }), + fish: define({ + hasCommandOutput(script, output, message) { + return dedent` + set ____test____ (${script}) + if test "$____test____" != "${output}" + echo "Expected ${message} to be ${output}. Got $____test____" + exit 1 + end + ` + }, + }), + powershell: define({ + hasCommandOutput(script, output, message) { + return dedent` + if ( "$(${script})" -ne "${output}" ) { echo "Expected ${message} to be ${output}. Got $(${script})"; exit 1 } + ` + }, + }), + wincmd: define({ + hasCommandOutput(script, output, message) { + return dedent` + ${script} | findstr ${output} + if %errorlevel% neq 0 ( + echo Expected ${message} to be ${output} + exit 1 + ) + ` + }, + }), +} diff --git a/e2e/shellcode/shells/index.ts b/e2e/shellcode/shells/index.ts new file mode 100644 index 0000000..a9a84f9 --- /dev/null +++ b/e2e/shellcode/shells/index.ts @@ -0,0 +1,100 @@ +import { cmdCall } from "./cmdCall" +import { cmdEnv } from "./cmdEnv" +import { cmdExpectCommandOutput } from "./expect-command-output" +import { cmdHasOutputContains } from "./output-contains" +import { redirectOutput } from "./redirect-output" +import { cmdInSubShell } from "./sub-shell" +import { define, Shell } from "./types" + +export const Bash = { + ...define({ + binaryName: () => "bash", + currentlySupported: () => true, + name: () => "Bash", + launchArgs: () => ["-i"], + escapeText: (x) => x, + dieOnErrors: () => `set -e`, + }), + ...cmdEnv.bash, + ...cmdCall.all, + ...redirectOutput.bash, + ...cmdExpectCommandOutput.bash, + ...cmdHasOutputContains.bash, + ...cmdInSubShell.bash, +} + +export const Zsh = { + ...define({ + binaryName: () => "zsh", + currentlySupported: () => process.platform !== "win32", + name: () => "Zsh", + launchArgs: () => [], + escapeText: (x) => x, + dieOnErrors: () => `set -e`, + }), + ...cmdEnv.bash, + ...cmdCall.all, + ...cmdExpectCommandOutput.bash, + ...cmdHasOutputContains.bash, + ...cmdInSubShell.zsh, +} + +export const Fish = { + ...define({ + binaryName: () => "fish", + currentlySupported: () => process.platform !== "win32", + name: () => "Fish", + launchArgs: () => [], + escapeText: (x) => x, + forceFile: true, + }), + ...cmdEnv.fish, + ...cmdCall.all, + ...redirectOutput.bash, + ...cmdExpectCommandOutput.fish, + ...cmdHasOutputContains.fish, + ...cmdInSubShell.fish, +} + +export const PowerShell = { + ...define({ + binaryName: () => { + if (process.platform === "win32") { + return "powershell.exe" + } else { + return "pwsh" + } + }, + forceFile: true, + currentlySupported: () => true, + name: () => "PowerShell", + launchArgs: () => ["-NoProfile"], + escapeText: (x) => x, + dieOnErrors: () => `$ErrorActionPreference = "Stop"`, + }), + ...cmdEnv.powershell, + ...cmdCall.all, + ...cmdExpectCommandOutput.powershell, + ...cmdHasOutputContains.powershell, + ...cmdInSubShell.powershell, +} + +export const WinCmd = { + ...define({ + binaryName: () => "cmd.exe", + currentlySupported: () => process.platform === "win32", + name: () => "Windows Command Prompt", + launchArgs: () => [], + escapeText: (str) => + str + .replace(/\r/g, "") + .replace(/\n/g, "^\n\n") + .replace(/\%/g, "%%") + .replace(/\|/g, "^|") + .replace(/\(/g, "^(") + .replace(/\)/g, "^)"), + }), + ...cmdEnv.wincmd, + ...cmdCall.all, + ...cmdExpectCommandOutput.wincmd, +} diff --git a/e2e/shellcode/shells/output-contains.ts b/e2e/shellcode/shells/output-contains.ts new file mode 100644 index 0000000..ee8bf1c --- /dev/null +++ b/e2e/shellcode/shells/output-contains.ts @@ -0,0 +1,24 @@ +import { define, ScriptLine } from "./types" + +export type HasOutputContains = { + scriptOutputContains(script: ScriptLine, substring: string): ScriptLine +} + +export const cmdHasOutputContains = { + bash: define({ + scriptOutputContains: (script, substring) => { + return `(${script}) | grep ${substring} || (echo "Expected output to contain ${substring}" && exit 1)` + }, + }), + fish: define({ + scriptOutputContains: (script, substring) => { + return `begin; ${script}; end | grep ${substring}; or echo "Expected output to contain ${substring}" && exit 1` + }, + }), + powershell: define({ + scriptOutputContains: (script, substring) => { + const inner: string = `${script} | Select-String ${substring}` + return `$($__out__ = $(${inner}); if ($__out__ -eq $null) { exit 1 } else { $__out__ })` + }, + }), +} diff --git a/e2e/shellcode/shells/redirect-output.ts b/e2e/shellcode/shells/redirect-output.ts new file mode 100644 index 0000000..473bad6 --- /dev/null +++ b/e2e/shellcode/shells/redirect-output.ts @@ -0,0 +1,13 @@ +import { ScriptLine, define } from "./types" + +type RedirectOutputOpts = { output: string } +export type HasRedirectOutput = { + redirectOutput(childCommand: ScriptLine, opts: RedirectOutputOpts): string +} + +export const redirectOutput = { + bash: define({ + redirectOutput: (childCommand, opts) => + `(${childCommand}) > ${opts.output}`, + }), +} diff --git a/e2e/shellcode/shells/sub-shell.ts b/e2e/shellcode/shells/sub-shell.ts new file mode 100644 index 0000000..d46da77 --- /dev/null +++ b/e2e/shellcode/shells/sub-shell.ts @@ -0,0 +1,20 @@ +import { ScriptLine, define } from "./types" +import quote from "shell-escape" + +type HasInSubShell = { inSubShell: (script: ScriptLine) => ScriptLine } + +export const cmdInSubShell = { + bash: define({ + inSubShell: (script) => `echo ${quote([script])} | bash`, + }), + zsh: define({ + inSubShell: (script) => `echo ${quote([script])} | zsh`, + }), + fish: define({ + inSubShell: (script) => `fish -c ${quote([script])}`, + }), + powershell: define({ + inSubShell: (script) => + `echo '${script.replace(/'/g, "\\'")}' | pwsh -NoProfile`, + }), +} diff --git a/e2e/shellcode/shells/types.ts b/e2e/shellcode/shells/types.ts new file mode 100644 index 0000000..65c1d14 --- /dev/null +++ b/e2e/shellcode/shells/types.ts @@ -0,0 +1,15 @@ +export type Shell = { + escapeText(str: string): string + binaryName(): string + currentlySupported(): boolean + name(): string + launchArgs(): string[] + dieOnErrors?(): string + forceFile?: true +} + +export type ScriptLine = string + +export function define(s: S): S { + return s +} diff --git a/e2e/shellcode/test-bin-dir.ts b/e2e/shellcode/test-bin-dir.ts new file mode 100644 index 0000000..cd6c505 --- /dev/null +++ b/e2e/shellcode/test-bin-dir.ts @@ -0,0 +1,9 @@ +import { mkdirSync } from "node:fs" +import path from "node:path" +import testTmpDir from "./test-tmp-dir" + +export default function testBinDir() { + const dir = path.join(testTmpDir(), "bin") + mkdirSync(dir, { recursive: true }) + return dir +} diff --git a/e2e/shellcode/test-cwd.ts b/e2e/shellcode/test-cwd.ts new file mode 100644 index 0000000..63d881c --- /dev/null +++ b/e2e/shellcode/test-cwd.ts @@ -0,0 +1,9 @@ +import { mkdirSync } from "node:fs" +import path from "node:path" +import testTmpDir from "./test-tmp-dir" + +export default function testCwd() { + const dir = path.join(testTmpDir(), "cwd") + mkdirSync(dir, { recursive: true }) + return dir +} diff --git a/e2e/shellcode/test-node-version.ts b/e2e/shellcode/test-node-version.ts new file mode 100644 index 0000000..0d4a83e --- /dev/null +++ b/e2e/shellcode/test-node-version.ts @@ -0,0 +1,10 @@ +import { HasCall } from "./shells/cmdCall" +import { ScriptLine } from "./shells/types" +import { HasExpectCommandOutput } from "./shells/expect-command-output" + +export default function testNodeVersion< + S extends HasCall & HasExpectCommandOutput +>(shell: S, version: string): ScriptLine { + const nodeVersion = shell.call("node", ["--version"]) + return shell.hasCommandOutput(nodeVersion, version, "node version") +} diff --git a/e2e/shellcode/test-tmp-dir.ts b/e2e/shellcode/test-tmp-dir.ts new file mode 100644 index 0000000..3c56c3a --- /dev/null +++ b/e2e/shellcode/test-tmp-dir.ts @@ -0,0 +1,15 @@ +import { mkdirSync, rmSync } from "node:fs" +import { tmpdir } from "node:os" +import { join } from "node:path" + +export default function testTmpDir(): string { + const testName = (expect.getState().currentTestName ?? "unknown") + .toLowerCase() + .replace(/[^a-z0-9]/gi, "_") + .replace(/_+/g, "_") + const tmpDir = join(tmpdir(), `shellcode/${testName}`) + mkdirSync(tmpDir, { recursive: true }) + rmSync(join(tmpDir, "fnm/aliases"), { recursive: true, force: true }) + + return tmpDir +} diff --git a/e2e/system-node.test.ts b/e2e/system-node.test.ts new file mode 100644 index 0000000..01c5764 --- /dev/null +++ b/e2e/system-node.test.ts @@ -0,0 +1,38 @@ +import { script } from "./shellcode/script" +import { Bash, Fish, PowerShell, WinCmd, Zsh } from "./shellcode/shells" +import fs from "node:fs/promises" +import path from "node:path" +import describe from "./describe" +import testNodeVersion from "./shellcode/test-node-version" +import testBinDir from "./shellcode/test-bin-dir" + +for (const shell of [Bash, Fish, PowerShell, WinCmd, Zsh]) { + describe(shell, () => { + // latest bash breaks this as it seems. gotta find a solution. + const t = process.platform === "darwin" && shell === Bash ? test.skip : test + + t(`switches to system node`, async () => { + const customNode = path.join(testBinDir(), "node") + + if ( + process.platform === "win32" && + [WinCmd, PowerShell].includes(shell) + ) { + await fs.writeFile(customNode + ".cmd", '@echo "custom node"') + } else { + await fs.writeFile(customNode, `#!/bin/bash\n\necho "custom"\n`) + // set executable + await fs.chmod(customNode, 0o766) + } + + await script(shell) + .then(shell.env({})) + .then(shell.call("fnm", ["install", "v10.10.0"])) + .then(shell.call("fnm", ["use", "v10"])) + .then(testNodeVersion(shell, "v10.10.0")) + .then(shell.call("fnm", ["use", "system"])) + .then(testNodeVersion(shell, "custom")) + .execute(shell) + }) + }) +} diff --git a/e2e/uninstall.test.ts b/e2e/uninstall.test.ts new file mode 100644 index 0000000..fcee483 --- /dev/null +++ b/e2e/uninstall.test.ts @@ -0,0 +1,29 @@ +import { script } from "./shellcode/script" +import { Bash, Fish, PowerShell, Zsh } from "./shellcode/shells" +import describe from "./describe" + +for (const shell of [Bash, Zsh, Fish, PowerShell]) { + describe(shell, () => { + test(`uninstalls a version`, async () => { + await script(shell) + .then(shell.call("fnm", ["install", "12.0.0"])) + .then(shell.call("fnm", ["alias", "12.0.0", "hello"])) + .then( + shell.scriptOutputContains( + shell.scriptOutputContains(shell.call("fnm", ["ls"]), "v12.0.0"), + "hello" + ) + ) + .then(shell.call("fnm", ["uninstall", "hello"])) + .then( + shell.hasCommandOutput( + shell.call("fnm", ["ls"]), + "* system", + "fnm ls" + ) + ) + .takeSnapshot(shell) + .execute(shell) + }) + }) +} diff --git a/package.json b/package.json index 11f5165..b99208e 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "packageManager": "pnpm@7.13.2", "license": "GPLv3", "scripts": { + "test": "jest --runInBand", "version:prepare": "changeset version && ./.ci/prepare-version.js", "generate-command-docs": "./.ci/print-command-docs.js" }, @@ -22,12 +23,37 @@ "devDependencies": { "@changesets/cli": "2.25.0", "@svitejs/changesets-changelog-github-compact": "0.1.1", + "@swc-node/jest": "^1.5.5", + "@swc/core": "^1.3.17", + "@types/jest": "^29.2.3", + "@types/node": "^18.11.9", + "@types/shell-escape": "^0.2.1", + "chalk": "4", "cmd-ts": "0.11.0", "execa": "5.1.1", + "jest": "^29.3.1", "lerna-changelog": "2.2.0", + "p-retry": "^4", "prettier": "2.7.1", "pv": "1.0.1", + "shell-escape": "^0.2.0", "svg-term-cli": "2.1.1", - "toml": "3.0.0" + "toml": "3.0.0", + "ts-dedent": "^2.2.0", + "typescript": "^4.8.4" + }, + "prettier": { + "semi": false + }, + "jest": { + "transform": { + "^.+\\.ts$": "@swc-node/jest" + }, + "testEnvironment": "node", + "moduleFileExtensions": [ + "ts", + "js" + ], + "testTimeout": 120000 } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1808c88..5103d12 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3,27 +3,57 @@ lockfileVersion: 5.4 specifiers: '@changesets/cli': 2.25.0 '@svitejs/changesets-changelog-github-compact': 0.1.1 + '@swc-node/jest': ^1.5.5 + '@swc/core': ^1.3.17 + '@types/jest': ^29.2.3 + '@types/node': ^18.11.9 + '@types/shell-escape': ^0.2.1 + chalk: '4' cmd-ts: 0.11.0 execa: 5.1.1 + jest: ^29.3.1 lerna-changelog: 2.2.0 + p-retry: ^4 prettier: 2.7.1 pv: 1.0.1 + shell-escape: ^0.2.0 svg-term-cli: 2.1.1 toml: 3.0.0 + ts-dedent: ^2.2.0 + typescript: ^4.8.4 devDependencies: '@changesets/cli': 2.25.0 '@svitejs/changesets-changelog-github-compact': 0.1.1 + '@swc-node/jest': 1.5.5_ndsvmk6usi2zctqgdwwiwj3k5q + '@swc/core': 1.3.17 + '@types/jest': 29.2.3 + '@types/node': 18.11.9 + '@types/shell-escape': 0.2.1 + chalk: 4.1.2 cmd-ts: 0.11.0 execa: 5.1.1 + jest: 29.3.1_@types+node@18.11.9 lerna-changelog: 2.2.0 + p-retry: 4.6.2 prettier: 2.7.1 pv: 1.0.1 + shell-escape: 0.2.0 svg-term-cli: 2.1.1 toml: 3.0.0 + ts-dedent: 2.2.0 + typescript: 4.8.4 packages: + /@ampproject/remapping/2.2.0: + resolution: {integrity: sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==} + engines: {node: '>=6.0.0'} + dependencies: + '@jridgewell/gen-mapping': 0.1.1 + '@jridgewell/trace-mapping': 0.3.17 + dev: true + /@babel/code-frame/7.18.6: resolution: {integrity: sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==} engines: {node: '>=6.9.0'} @@ -31,31 +61,346 @@ packages: '@babel/highlight': 7.18.6 dev: true + /@babel/compat-data/7.20.1: + resolution: {integrity: sha512-EWZ4mE2diW3QALKvDMiXnbZpRvlj+nayZ112nK93SnhqOtpdsbVD4W+2tEoT3YNBAG9RBR0ISY758ZkOgsn6pQ==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/core/7.20.2: + resolution: {integrity: sha512-w7DbG8DtMrJcFOi4VrLm+8QM4az8Mo+PuLBKLp2zrYRCow8W/f9xiXm5sN53C8HksCyDQwCKha9JiDoIyPjT2g==} + engines: {node: '>=6.9.0'} + dependencies: + '@ampproject/remapping': 2.2.0 + '@babel/code-frame': 7.18.6 + '@babel/generator': 7.20.4 + '@babel/helper-compilation-targets': 7.20.0_@babel+core@7.20.2 + '@babel/helper-module-transforms': 7.20.2 + '@babel/helpers': 7.20.1 + '@babel/parser': 7.20.3 + '@babel/template': 7.18.10 + '@babel/traverse': 7.20.1 + '@babel/types': 7.20.2 + convert-source-map: 1.9.0 + debug: 4.3.4 + gensync: 1.0.0-beta.2 + json5: 2.2.1 + semver: 6.3.0 + transitivePeerDependencies: + - supports-color + dev: true + + /@babel/generator/7.20.4: + resolution: {integrity: sha512-luCf7yk/cm7yab6CAW1aiFnmEfBJplb/JojV56MYEK7ziWfGmFlTfmL9Ehwfy4gFhbjBfWO1wj7/TuSbVNEEtA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.20.2 + '@jridgewell/gen-mapping': 0.3.2 + jsesc: 2.5.2 + dev: true + + /@babel/helper-compilation-targets/7.20.0_@babel+core@7.20.2: + resolution: {integrity: sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/compat-data': 7.20.1 + '@babel/core': 7.20.2 + '@babel/helper-validator-option': 7.18.6 + browserslist: 4.21.4 + semver: 6.3.0 + dev: true + + /@babel/helper-environment-visitor/7.18.9: + resolution: {integrity: sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/helper-function-name/7.19.0: + resolution: {integrity: sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/template': 7.18.10 + '@babel/types': 7.20.2 + dev: true + + /@babel/helper-hoist-variables/7.18.6: + resolution: {integrity: sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.20.2 + dev: true + + /@babel/helper-module-imports/7.18.6: + resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.20.2 + dev: true + + /@babel/helper-module-transforms/7.20.2: + resolution: {integrity: sha512-zvBKyJXRbmK07XhMuujYoJ48B5yvvmM6+wcpv6Ivj4Yg6qO7NOZOSnvZN9CRl1zz1Z4cKf8YejmCMh8clOoOeA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-environment-visitor': 7.18.9 + '@babel/helper-module-imports': 7.18.6 + '@babel/helper-simple-access': 7.20.2 + '@babel/helper-split-export-declaration': 7.18.6 + '@babel/helper-validator-identifier': 7.19.1 + '@babel/template': 7.18.10 + '@babel/traverse': 7.20.1 + '@babel/types': 7.20.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@babel/helper-plugin-utils/7.20.2: + resolution: {integrity: sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/helper-simple-access/7.20.2: + resolution: {integrity: sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.20.2 + dev: true + + /@babel/helper-split-export-declaration/7.18.6: + resolution: {integrity: sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.20.2 + dev: true + + /@babel/helper-string-parser/7.19.4: + resolution: {integrity: sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/helper-validator-identifier/7.18.6: + resolution: {integrity: sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==} + engines: {node: '>=6.9.0'} + dev: true + /@babel/helper-validator-identifier/7.19.1: resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==} engines: {node: '>=6.9.0'} dev: true + /@babel/helper-validator-option/7.18.6: + resolution: {integrity: sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/helpers/7.20.1: + resolution: {integrity: sha512-J77mUVaDTUJFZ5BpP6mMn6OIl3rEWymk2ZxDBQJUG3P+PbmyMcF3bYWvz0ma69Af1oobDqT/iAsvzhB58xhQUg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/template': 7.18.10 + '@babel/traverse': 7.20.1 + '@babel/types': 7.20.2 + transitivePeerDependencies: + - supports-color + dev: true + /@babel/highlight/7.18.6: resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/helper-validator-identifier': 7.19.1 + '@babel/helper-validator-identifier': 7.18.6 chalk: 2.4.2 js-tokens: 4.0.0 dev: true - /@babel/runtime/7.19.4: - resolution: {integrity: sha512-EXpLCrk55f+cYqmHsSR+yD/0gAIMxxA9QK9lnQWzhMCvt+YmoBN7Zx94s++Kv0+unHk39vxNO8t+CMA2WSS3wA==} + /@babel/parser/7.20.3: + resolution: {integrity: sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg==} + engines: {node: '>=6.0.0'} + hasBin: true + dependencies: + '@babel/types': 7.20.2 + dev: true + + /@babel/plugin-syntax-async-generators/7.8.4_@babel+core@7.20.2: + resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.20.2 + '@babel/helper-plugin-utils': 7.20.2 + dev: true + + /@babel/plugin-syntax-bigint/7.8.3_@babel+core@7.20.2: + resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.20.2 + '@babel/helper-plugin-utils': 7.20.2 + dev: true + + /@babel/plugin-syntax-class-properties/7.12.13_@babel+core@7.20.2: + resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.20.2 + '@babel/helper-plugin-utils': 7.20.2 + dev: true + + /@babel/plugin-syntax-import-meta/7.10.4_@babel+core@7.20.2: + resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.20.2 + '@babel/helper-plugin-utils': 7.20.2 + dev: true + + /@babel/plugin-syntax-json-strings/7.8.3_@babel+core@7.20.2: + resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.20.2 + '@babel/helper-plugin-utils': 7.20.2 + dev: true + + /@babel/plugin-syntax-jsx/7.18.6_@babel+core@7.20.2: + resolution: {integrity: sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.20.2 + '@babel/helper-plugin-utils': 7.20.2 + dev: true + + /@babel/plugin-syntax-logical-assignment-operators/7.10.4_@babel+core@7.20.2: + resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.20.2 + '@babel/helper-plugin-utils': 7.20.2 + dev: true + + /@babel/plugin-syntax-nullish-coalescing-operator/7.8.3_@babel+core@7.20.2: + resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.20.2 + '@babel/helper-plugin-utils': 7.20.2 + dev: true + + /@babel/plugin-syntax-numeric-separator/7.10.4_@babel+core@7.20.2: + resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.20.2 + '@babel/helper-plugin-utils': 7.20.2 + dev: true + + /@babel/plugin-syntax-object-rest-spread/7.8.3_@babel+core@7.20.2: + resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.20.2 + '@babel/helper-plugin-utils': 7.20.2 + dev: true + + /@babel/plugin-syntax-optional-catch-binding/7.8.3_@babel+core@7.20.2: + resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.20.2 + '@babel/helper-plugin-utils': 7.20.2 + dev: true + + /@babel/plugin-syntax-optional-chaining/7.8.3_@babel+core@7.20.2: + resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.20.2 + '@babel/helper-plugin-utils': 7.20.2 + dev: true + + /@babel/plugin-syntax-top-level-await/7.14.5_@babel+core@7.20.2: + resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.20.2 + '@babel/helper-plugin-utils': 7.20.2 + dev: true + + /@babel/plugin-syntax-typescript/7.20.0_@babel+core@7.20.2: + resolution: {integrity: sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.20.2 + '@babel/helper-plugin-utils': 7.20.2 + dev: true + + /@babel/runtime/7.18.6: + resolution: {integrity: sha512-t9wi7/AW6XtKahAe20Yw0/mMljKq0B1r2fPdvaAdV/KPDZewFXdaaa6K7lxmZBZ8FBNpCiAT6iHPmd6QO9bKfQ==} + engines: {node: '>=6.9.0'} + dependencies: + regenerator-runtime: 0.13.9 + dev: true + + /@babel/template/7.18.10: + resolution: {integrity: sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.18.6 + '@babel/parser': 7.20.3 + '@babel/types': 7.20.2 + dev: true + + /@babel/traverse/7.20.1: + resolution: {integrity: sha512-d3tN8fkVJwFLkHkBN479SOsw4DMZnz8cdbL/gvuDuzy3TS6Nfw80HuQqhw1pITbIruHyh7d1fMA47kWzmcUEGA==} engines: {node: '>=6.9.0'} dependencies: - regenerator-runtime: 0.13.10 + '@babel/code-frame': 7.18.6 + '@babel/generator': 7.20.4 + '@babel/helper-environment-visitor': 7.18.9 + '@babel/helper-function-name': 7.19.0 + '@babel/helper-hoist-variables': 7.18.6 + '@babel/helper-split-export-declaration': 7.18.6 + '@babel/parser': 7.20.3 + '@babel/types': 7.20.2 + debug: 4.3.4 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + dev: true + + /@babel/types/7.20.2: + resolution: {integrity: sha512-FnnvsNWgZCr232sqtXggapvlkk/tuwR/qhGzcmxI0GXLCjmPYQPzio2FbdlWuY6y1sHFfQKk+rRbUZ9VStQMog==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-string-parser': 7.19.4 + '@babel/helper-validator-identifier': 7.19.1 + to-fast-properties: 2.0.0 + dev: true + + /@bcoe/v8-coverage/0.2.3: + resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true /@changesets/apply-release-plan/6.1.1: resolution: {integrity: sha512-LaQiP/Wf0zMVR0HNrLQAjz3rsNsr0d/RlnP6Ef4oi8VafOwnY1EoWdK4kssuUJGgNgDyHpomS50dm8CU3D7k7g==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.18.6 '@changesets/config': 2.2.0 '@changesets/get-version-range-type': 0.3.2 '@changesets/git': 1.5.0 @@ -73,7 +418,7 @@ packages: /@changesets/assemble-release-plan/5.2.2: resolution: {integrity: sha512-B1qxErQd85AeZgZFZw2bDKyOfdXHhG+X5S+W3Da2yCem8l/pRy4G/S7iOpEcMwg6lH8q2ZhgbZZwZ817D+aLuQ==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.18.6 '@changesets/errors': 0.1.4 '@changesets/get-dependents-graph': 1.3.4 '@changesets/types': 5.2.0 @@ -91,7 +436,7 @@ packages: resolution: {integrity: sha512-Svu5KD2enurVHGEEzCRlaojrHjVYgF9srmMP9VQSy9c1TspX6C9lDPpulsSNIjYY9BuU/oiWpjBgR7RI9eQiAA==} hasBin: true dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.18.6 '@changesets/apply-release-plan': 6.1.1 '@changesets/assemble-release-plan': 5.2.2 '@changesets/changelog-git': 0.1.13 @@ -166,7 +511,7 @@ packages: /@changesets/get-release-plan/3.0.15: resolution: {integrity: sha512-W1tFwxE178/en+zSj/Nqbc3mvz88mcdqUMJhRzN1jDYqN3QI4ifVaRF9mcWUU+KI0gyYEtYR65tour690PqTcA==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.18.6 '@changesets/assemble-release-plan': 5.2.2 '@changesets/config': 2.2.0 '@changesets/pre': 1.0.13 @@ -182,7 +527,7 @@ packages: /@changesets/git/1.5.0: resolution: {integrity: sha512-Xo8AT2G7rQJSwV87c8PwMm6BAc98BnufRMsML7m7Iw8Or18WFvFmxqG5aOL5PBvhgq9KrKvaeIBNIymracSuHg==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.18.6 '@changesets/errors': 0.1.4 '@changesets/types': 5.2.0 '@manypkg/get-packages': 1.1.3 @@ -206,7 +551,7 @@ packages: /@changesets/pre/1.0.13: resolution: {integrity: sha512-jrZc766+kGZHDukjKhpBXhBJjVQMied4Fu076y9guY1D3H622NOw8AQaLV3oQsDtKBTrT2AUFjt9Z2Y9Qx+GfA==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.18.6 '@changesets/errors': 0.1.4 '@changesets/types': 5.2.0 '@manypkg/get-packages': 1.1.3 @@ -216,7 +561,7 @@ packages: /@changesets/read/0.5.8: resolution: {integrity: sha512-eYaNfxemgX7f7ELC58e7yqQICW5FB7V+bd1lKt7g57mxUrTveYME+JPaBPpYx02nP53XI6CQp6YxnR9NfmFPKw==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.18.6 '@changesets/git': 1.5.0 '@changesets/logger': 0.0.5 '@changesets/parse': 0.3.15 @@ -237,7 +582,7 @@ packages: /@changesets/write/0.2.1: resolution: {integrity: sha512-KUd49nt2fnYdGixIqTi1yVE1nAoZYUMdtB3jBfp77IMqjZ65hrmZE5HdccDlTeClZN0420ffpnfET3zzeY8pdw==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.18.6 '@changesets/types': 5.2.0 fs-extra: 7.0.1 human-id: 1.0.2 @@ -248,10 +593,277 @@ packages: resolution: {integrity: sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==} dev: true + /@istanbuljs/load-nyc-config/1.1.0: + resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} + engines: {node: '>=8'} + dependencies: + camelcase: 5.3.1 + find-up: 4.1.0 + get-package-type: 0.1.0 + js-yaml: 3.14.1 + resolve-from: 5.0.0 + dev: true + + /@istanbuljs/schema/0.1.3: + resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} + engines: {node: '>=8'} + dev: true + + /@jest/console/29.3.1: + resolution: {integrity: sha512-IRE6GD47KwcqA09RIWrabKdHPiKDGgtAL31xDxbi/RjQMsr+lY+ppxmHwY0dUEV3qvvxZzoe5Hl0RXZJOjQNUg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/types': 29.3.1 + '@types/node': 18.11.9 + chalk: 4.1.2 + jest-message-util: 29.3.1 + jest-util: 29.3.1 + slash: 3.0.0 + dev: true + + /@jest/core/29.3.1: + resolution: {integrity: sha512-0ohVjjRex985w5MmO5L3u5GR1O30DexhBSpuwx2P+9ftyqHdJXnk7IUWiP80oHMvt7ubHCJHxV0a0vlKVuZirw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + dependencies: + '@jest/console': 29.3.1 + '@jest/reporters': 29.3.1 + '@jest/test-result': 29.3.1 + '@jest/transform': 29.3.1 + '@jest/types': 29.3.1 + '@types/node': 18.11.9 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + ci-info: 3.3.2 + exit: 0.1.2 + graceful-fs: 4.2.10 + jest-changed-files: 29.2.0 + jest-config: 29.3.1_@types+node@18.11.9 + jest-haste-map: 29.3.1 + jest-message-util: 29.3.1 + jest-regex-util: 29.2.0 + jest-resolve: 29.3.1 + jest-resolve-dependencies: 29.3.1 + jest-runner: 29.3.1 + jest-runtime: 29.3.1 + jest-snapshot: 29.3.1 + jest-util: 29.3.1 + jest-validate: 29.3.1 + jest-watcher: 29.3.1 + micromatch: 4.0.5 + pretty-format: 29.3.1 + slash: 3.0.0 + strip-ansi: 6.0.1 + transitivePeerDependencies: + - supports-color + - ts-node + dev: true + + /@jest/environment/29.3.1: + resolution: {integrity: sha512-pMmvfOPmoa1c1QpfFW0nXYtNLpofqo4BrCIk6f2kW4JFeNlHV2t3vd+3iDLf31e2ot2Mec0uqZfmI+U0K2CFag==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/fake-timers': 29.3.1 + '@jest/types': 29.3.1 + '@types/node': 18.11.9 + jest-mock: 29.3.1 + dev: true + + /@jest/expect-utils/29.3.1: + resolution: {integrity: sha512-wlrznINZI5sMjwvUoLVk617ll/UYfGIZNxmbU+Pa7wmkL4vYzhV9R2pwVqUh4NWWuLQWkI8+8mOkxs//prKQ3g==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + jest-get-type: 29.2.0 + dev: true + + /@jest/expect/29.3.1: + resolution: {integrity: sha512-QivM7GlSHSsIAWzgfyP8dgeExPRZ9BIe2LsdPyEhCGkZkoyA+kGsoIzbKAfZCvvRzfZioKwPtCZIt5SaoxYCvg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + expect: 29.3.1 + jest-snapshot: 29.3.1 + transitivePeerDependencies: + - supports-color + dev: true + + /@jest/fake-timers/29.3.1: + resolution: {integrity: sha512-iHTL/XpnDlFki9Tq0Q1GGuVeQ8BHZGIYsvCO5eN/O/oJaRzofG9Xndd9HuSDBI/0ZS79pg0iwn07OMTQ7ngF2A==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/types': 29.3.1 + '@sinonjs/fake-timers': 9.1.2 + '@types/node': 18.11.9 + jest-message-util: 29.3.1 + jest-mock: 29.3.1 + jest-util: 29.3.1 + dev: true + + /@jest/globals/29.3.1: + resolution: {integrity: sha512-cTicd134vOcwO59OPaB6AmdHQMCtWOe+/DitpTZVxWgMJ+YvXL1HNAmPyiGbSHmF/mXVBkvlm8YYtQhyHPnV6Q==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/environment': 29.3.1 + '@jest/expect': 29.3.1 + '@jest/types': 29.3.1 + jest-mock: 29.3.1 + transitivePeerDependencies: + - supports-color + dev: true + + /@jest/reporters/29.3.1: + resolution: {integrity: sha512-GhBu3YFuDrcAYW/UESz1JphEAbvUjaY2vShRZRoRY1mxpCMB3yGSJ4j9n0GxVlEOdCf7qjvUfBCrTUUqhVfbRA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + dependencies: + '@bcoe/v8-coverage': 0.2.3 + '@jest/console': 29.3.1 + '@jest/test-result': 29.3.1 + '@jest/transform': 29.3.1 + '@jest/types': 29.3.1 + '@jridgewell/trace-mapping': 0.3.17 + '@types/node': 18.11.9 + chalk: 4.1.2 + collect-v8-coverage: 1.0.1 + exit: 0.1.2 + glob: 7.2.3 + graceful-fs: 4.2.10 + istanbul-lib-coverage: 3.2.0 + istanbul-lib-instrument: 5.2.1 + istanbul-lib-report: 3.0.0 + istanbul-lib-source-maps: 4.0.1 + istanbul-reports: 3.1.5 + jest-message-util: 29.3.1 + jest-util: 29.3.1 + jest-worker: 29.3.1 + slash: 3.0.0 + string-length: 4.0.2 + strip-ansi: 6.0.1 + v8-to-istanbul: 9.0.1 + transitivePeerDependencies: + - supports-color + dev: true + + /@jest/schemas/29.0.0: + resolution: {integrity: sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@sinclair/typebox': 0.24.51 + dev: true + + /@jest/source-map/29.2.0: + resolution: {integrity: sha512-1NX9/7zzI0nqa6+kgpSdKPK+WU1p+SJk3TloWZf5MzPbxri9UEeXX5bWZAPCzbQcyuAzubcdUHA7hcNznmRqWQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jridgewell/trace-mapping': 0.3.17 + callsites: 3.1.0 + graceful-fs: 4.2.10 + dev: true + + /@jest/test-result/29.3.1: + resolution: {integrity: sha512-qeLa6qc0ddB0kuOZyZIhfN5q0e2htngokyTWsGriedsDhItisW7SDYZ7ceOe57Ii03sL988/03wAcBh3TChMGw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/console': 29.3.1 + '@jest/types': 29.3.1 + '@types/istanbul-lib-coverage': 2.0.4 + collect-v8-coverage: 1.0.1 + dev: true + + /@jest/test-sequencer/29.3.1: + resolution: {integrity: sha512-IqYvLbieTv20ArgKoAMyhLHNrVHJfzO6ARZAbQRlY4UGWfdDnLlZEF0BvKOMd77uIiIjSZRwq3Jb3Fa3I8+2UA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/test-result': 29.3.1 + graceful-fs: 4.2.10 + jest-haste-map: 29.3.1 + slash: 3.0.0 + dev: true + + /@jest/transform/29.3.1: + resolution: {integrity: sha512-8wmCFBTVGYqFNLWfcOWoVuMuKYPUBTnTMDkdvFtAYELwDOl9RGwOsvQWGPFxDJ8AWY9xM/8xCXdqmPK3+Q5Lug==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@babel/core': 7.20.2 + '@jest/types': 29.3.1 + '@jridgewell/trace-mapping': 0.3.17 + babel-plugin-istanbul: 6.1.1 + chalk: 4.1.2 + convert-source-map: 2.0.0 + fast-json-stable-stringify: 2.1.0 + graceful-fs: 4.2.10 + jest-haste-map: 29.3.1 + jest-regex-util: 29.2.0 + jest-util: 29.3.1 + micromatch: 4.0.5 + pirates: 4.0.5 + slash: 3.0.0 + write-file-atomic: 4.0.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@jest/types/29.3.1: + resolution: {integrity: sha512-d0S0jmmTpjnhCmNpApgX3jrUZgZ22ivKJRvL2lli5hpCRoNnp1f85r2/wpKfXuYu8E7Jjh1hGfhPyup1NM5AmA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/schemas': 29.0.0 + '@types/istanbul-lib-coverage': 2.0.4 + '@types/istanbul-reports': 3.0.1 + '@types/node': 18.11.9 + '@types/yargs': 17.0.13 + chalk: 4.1.2 + dev: true + + /@jridgewell/gen-mapping/0.1.1: + resolution: {integrity: sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==} + engines: {node: '>=6.0.0'} + dependencies: + '@jridgewell/set-array': 1.1.2 + '@jridgewell/sourcemap-codec': 1.4.14 + dev: true + + /@jridgewell/gen-mapping/0.3.2: + resolution: {integrity: sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==} + engines: {node: '>=6.0.0'} + dependencies: + '@jridgewell/set-array': 1.1.2 + '@jridgewell/sourcemap-codec': 1.4.14 + '@jridgewell/trace-mapping': 0.3.17 + dev: true + + /@jridgewell/resolve-uri/3.1.0: + resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} + engines: {node: '>=6.0.0'} + dev: true + + /@jridgewell/set-array/1.1.2: + resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} + engines: {node: '>=6.0.0'} + dev: true + + /@jridgewell/sourcemap-codec/1.4.14: + resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} + dev: true + + /@jridgewell/trace-mapping/0.3.17: + resolution: {integrity: sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==} + dependencies: + '@jridgewell/resolve-uri': 3.1.0 + '@jridgewell/sourcemap-codec': 1.4.14 + dev: true + /@manypkg/find-root/1.1.0: resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.18.6 '@types/node': 12.20.55 find-up: 4.1.0 fs-extra: 8.1.0 @@ -260,7 +872,7 @@ packages: /@manypkg/get-packages/1.1.3: resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} dependencies: - '@babel/runtime': 7.19.4 + '@babel/runtime': 7.18.6 '@changesets/types': 4.1.0 '@manypkg/find-root': 1.1.0 fs-extra: 8.1.0 @@ -295,6 +907,142 @@ packages: rimraf: 2.7.1 dev: true + /@node-rs/xxhash-android-arm-eabi/1.2.1: + resolution: {integrity: sha512-wvx3/7zBlsUnwWS9ZHBuPqubKaotMNDcyyroEMt5ZV+28/hF4HjNZQgOk6uHdOdlMKAXThqc6AHzwGOK1XXYmw==} + engines: {node: '>= 12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@node-rs/xxhash-android-arm64/1.2.1: + resolution: {integrity: sha512-97Hrljvg+J4VxZH5WBqTwIsWrkNCub4aj2mW878svOVYV1qQFU0D4LuJGX8qE0WFTrmL0ycMEH2WIk4CIV5dMg==} + engines: {node: '>= 12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@node-rs/xxhash-darwin-arm64/1.2.1: + resolution: {integrity: sha512-TtfW7Zo1AYQcIMYBI46VQtNkS6scXRnPp/f+9b7+xzEZ72SIpaDKE/33EjrXBNm2ARYRxCpTtL4jN0IHECYe3g==} + engines: {node: '>= 12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@node-rs/xxhash-darwin-x64/1.2.1: + resolution: {integrity: sha512-EEy3bPzvi1TStTMxalvIyNia6j9vlICTjnwRhGpShfIMg6XR6OUzda9JojozF53YhHH4oPAzUtUGA2SM5wU8mg==} + engines: {node: '>= 12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@node-rs/xxhash-freebsd-x64/1.2.1: + resolution: {integrity: sha512-FYBrXV15HXnDEbzIJ0veY5H0C3NqU8kVJOvX7pAFK2kGqspq92BGfBS8j1BOxEFZ6pyQwMQgfOhRI/bsdrb7Zg==} + engines: {node: '>= 12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@node-rs/xxhash-linux-arm-gnueabihf/1.2.1: + resolution: {integrity: sha512-h58lDRP3T+kNjH4GCfnCB50b7d9XuVLogN3+wRWZI0yDE1AlTZBfK/00IwSvREcRjHqc5crsS9Zh3SuxIjID2g==} + engines: {node: '>= 12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@node-rs/xxhash-linux-arm64-gnu/1.2.1: + resolution: {integrity: sha512-OLReGi3amHkIU8zPxmDXyJHsUNR2XOPBwd9bzJcuxNM0wSP0g3EMs9VUHmlhh/DiomTduu6A90WzrmuCGaYUAA==} + engines: {node: '>= 12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@node-rs/xxhash-linux-arm64-musl/1.2.1: + resolution: {integrity: sha512-Rc22qQALjoTkdY2JnoJZn6bzHQQyNcvysU1kznAqwg9pPOD4bU++of1sS7II8o/ihe1g/qz4RKfyG+qUPjy/WQ==} + engines: {node: '>= 12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@node-rs/xxhash-linux-x64-gnu/1.2.1: + resolution: {integrity: sha512-MM0dfHxEe4uHuUFyM12pXiuie7fAq2LH7+PrXb8FqaGHqxF4aaIZE0gTMNDmrCsJy91tun85/TCu1vQEJ0g+Bw==} + engines: {node: '>= 12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@node-rs/xxhash-linux-x64-musl/1.2.1: + resolution: {integrity: sha512-mD3DEGqnxi39cMDIi5ZqcEUl4/eOcM4qGY/XFSFpUN7oUG4vnf/8U5mwzvAjU+nHWaq9ubteePA1GOXiATvv6w==} + engines: {node: '>= 12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@node-rs/xxhash-win32-arm64-msvc/1.2.1: + resolution: {integrity: sha512-90A9Ux4ozMSmss3Pn+A3TTYSw8uzGSBIPrRw+mIn/rVKBMfMfkKKNL+xjIXw1lkL9s2kG/1aGMBRTeuOeG9xtA==} + engines: {node: '>= 12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@node-rs/xxhash-win32-ia32-msvc/1.2.1: + resolution: {integrity: sha512-zhpg4pV71e6vDmOSLwFCNKiodtcNHUg76d5npvkWhJa0T/ykMHGWUbaFnpQzLwGD5Sq4mDHrQ7h6lxYA4j/6eQ==} + engines: {node: '>= 12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@node-rs/xxhash-win32-x64-msvc/1.2.1: + resolution: {integrity: sha512-KkZKyppIM2HJA3oZQ4nsPLwQ5HbELCZt+epLAH3/0H3QN9zqbzoCn6b140hg0lX+KT6YT0otGMbnlnvD2qpswQ==} + engines: {node: '>= 12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@node-rs/xxhash/1.2.1: + resolution: {integrity: sha512-Yyur0X8LFgzxcRWro1wAGVCZK8kcpDhnRKUUeW21OTpoHzDwN8zZSm43bF76xMQF1SyfWr17aSG6G0o8D1hTJA==} + engines: {node: '>= 12'} + optionalDependencies: + '@node-rs/xxhash-android-arm-eabi': 1.2.1 + '@node-rs/xxhash-android-arm64': 1.2.1 + '@node-rs/xxhash-darwin-arm64': 1.2.1 + '@node-rs/xxhash-darwin-x64': 1.2.1 + '@node-rs/xxhash-freebsd-x64': 1.2.1 + '@node-rs/xxhash-linux-arm-gnueabihf': 1.2.1 + '@node-rs/xxhash-linux-arm64-gnu': 1.2.1 + '@node-rs/xxhash-linux-arm64-musl': 1.2.1 + '@node-rs/xxhash-linux-x64-gnu': 1.2.1 + '@node-rs/xxhash-linux-x64-musl': 1.2.1 + '@node-rs/xxhash-win32-arm64-msvc': 1.2.1 + '@node-rs/xxhash-win32-ia32-msvc': 1.2.1 + '@node-rs/xxhash-win32-x64-msvc': 1.2.1 + dev: true + /@nodelib/fs.scandir/2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -320,7 +1068,7 @@ packages: resolution: {integrity: sha512-8KG5RD0GVP4ydEzRn/I4BNDuxDtqVbOdm8675T49OIG/NGhaK0pjPX7ZcDlvKYbA+ulvVK3ztfcF4uBdOxuJbQ==} dependencies: '@gar/promisify': 1.1.3 - semver: 7.3.8 + semver: 7.3.7 dev: true /@npmcli/move-file/1.1.2: @@ -331,6 +1079,22 @@ packages: rimraf: 3.0.2 dev: true + /@sinclair/typebox/0.24.51: + resolution: {integrity: sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA==} + dev: true + + /@sinonjs/commons/1.8.5: + resolution: {integrity: sha512-rTpCA0wG1wUxglBSFdMMY0oTrKYvgf4fNgv/sXbfCVAdf+FnPBdKJR/7XbpTCwbCrvCbdPYnlWaUUYz4V2fPDA==} + dependencies: + type-detect: 4.0.8 + dev: true + + /@sinonjs/fake-timers/9.1.2: + resolution: {integrity: sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==} + dependencies: + '@sinonjs/commons': 1.8.5 + dev: true + /@stiligita/constants/1.0.0-0: resolution: {integrity: sha512-lDrQuFkKRiG/YHa71hWLOiRpiAvsG9stTb3yizjNBV27QRi5TqLjrM1WEkprvrjeZpiEjXNXH3Kz7Jnng7JTCQ==} dev: true @@ -417,22 +1181,213 @@ packages: - encoding dev: true + /@swc-node/core/1.9.1_@swc+core@1.3.17: + resolution: {integrity: sha512-Mh4T/PmQOpPtqw1BNvU38uWzsXbd5RJji17YBXnj7JDDE5KlTR9sSo2RKxWKDVtHbdcD1S+CtyZXA93aEWlfGQ==} + engines: {node: '>= 10'} + peerDependencies: + '@swc/core': '>= 1.3' + dependencies: + '@swc/core': 1.3.17 + dev: true + + /@swc-node/jest/1.5.5_ndsvmk6usi2zctqgdwwiwj3k5q: + resolution: {integrity: sha512-DUf0XMk5xuwt4x+BiZ++KlPxa0H9lvjhFdXU2c8lsu+UztGRUAUtI5nhNTqjS9PXw0zzf3gEFP7M8hNUo52YhQ==} + peerDependencies: + '@swc/core': '>= 1.3' + dependencies: + '@node-rs/xxhash': 1.2.1 + '@swc-node/core': 1.9.1_@swc+core@1.3.17 + '@swc-node/register': 1.5.4_ndsvmk6usi2zctqgdwwiwj3k5q + '@swc/core': 1.3.17 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + + /@swc-node/register/1.5.4_ndsvmk6usi2zctqgdwwiwj3k5q: + resolution: {integrity: sha512-cM5/A63bO6qLUFC4gcBnOlQO5yd8ObSdFUIp7sXf11Oq5mPVAnJy2DqjbWMUsqUaHuNk+lOIt76ie4DEseUIyA==} + peerDependencies: + '@swc/core': '>= 1.3' + typescript: '>= 4.3' + dependencies: + '@swc-node/core': 1.9.1_@swc+core@1.3.17 + '@swc-node/sourcemap-support': 0.2.2 + '@swc/core': 1.3.17 + colorette: 2.0.19 + debug: 4.3.4 + pirates: 4.0.5 + tslib: 2.4.1 + typescript: 4.8.4 + transitivePeerDependencies: + - supports-color + dev: true + + /@swc-node/sourcemap-support/0.2.2: + resolution: {integrity: sha512-PA4p7nC5LwPdEVcQXFxMTpfvizYPeMoB55nIIx+yC3FiLnyPgC2hcpUitPy5h8RRGdCZ/Mvb2ryEcVYS8nI6YA==} + dependencies: + source-map-support: 0.5.21 + tslib: 2.4.1 + dev: true + + /@swc/core-darwin-arm64/1.3.17: + resolution: {integrity: sha512-l82ub46GSRRpPpvR9NkHqqskPKQAkpRAKMZNzBrY01GLzUj63XH8uAv+3N1Htpq835iekWJjGZXYONCZ1eHlcQ==} + engines: {node: '>=10'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@swc/core-darwin-x64/1.3.17: + resolution: {integrity: sha512-pBVrF1Ac5t6v9wd5Jqdfve7d0G3ELnjHzaEmCxV0W3ma7/pfHiGv7ZPGnXTclt0+IrMisrVoY5LM+xG1Hv+91Q==} + engines: {node: '>=10'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@swc/core-linux-arm-gnueabihf/1.3.17: + resolution: {integrity: sha512-argIcltgNEssehO7PzXuNYbV7ubVd6YW13FhB9uNWEp/1HGSzIJEnJ4tISbZe9NA9jwI3IALAiE3vDdTdGf/XA==} + engines: {node: '>=10'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@swc/core-linux-arm64-gnu/1.3.17: + resolution: {integrity: sha512-bH0YSJd3thV1/kY5lHkeXTEcbx0HYFpIqCGJbeDvzpg38FEFSFiUw9+0VX6Yf3FKPq1DcGK/eAKYC7LeZfAzvg==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@swc/core-linux-arm64-musl/1.3.17: + resolution: {integrity: sha512-sV5rfpPADmOg5YfTXLLGAzeTUjjgix29kra44EKa25Qyuwu/52OkoW4olF86qwvcQrRySWwga95EeClRhIX/zA==} + engines: {node: '>=10'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@swc/core-linux-x64-gnu/1.3.17: + resolution: {integrity: sha512-KbPdQSLgSjTutFsCGzjTzMCzZBiem4dEByiKxkrQmt87kLX4wLlPCy0Gppcaa6jExRcvy5co/vlf9TknuKcy4A==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@swc/core-linux-x64-musl/1.3.17: + resolution: {integrity: sha512-NDUbaJ0MbklioadPhkzQDOP8eazOn1lJmNmcmg9zNUR7GZsek1CMmJkyJ3ETXZ5gbIfVQ1hPkPm23P9vQBtCdQ==} + engines: {node: '>=10'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@swc/core-win32-arm64-msvc/1.3.17: + resolution: {integrity: sha512-fmpGG1iuKcMSDSO2ZHETlYTRel5hTwyuJ4AYbUX3/YzAE4iEnV1PI/n54wrWIdKONsPt3Pcj/UyRD3A6/ZS8rQ==} + engines: {node: '>=10'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@swc/core-win32-ia32-msvc/1.3.17: + resolution: {integrity: sha512-hmQovtwsKnb4D+NAKN2HYjTyNE3iXakBrQNSo1u+/KeMU+D6/+XCSdzrg7ob4olqf4yq52FXPPkLYwyDDHRO/g==} + engines: {node: '>=10'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@swc/core-win32-x64-msvc/1.3.17: + resolution: {integrity: sha512-wl+L7300uFr74WWw+b+mIx9NzMQB8+LCapFc01LqDgFyUFT6HSIIM9/s3zzy5Xh8UpgnkbS0/7rMl+zC1V+nFw==} + engines: {node: '>=10'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@swc/core/1.3.17: + resolution: {integrity: sha512-wcjmxJqwpo9mQqnyUChyIIxC3nw2xRK07zGMS2zbcId31J+wer5PMbgy0qEqzZEeIswUmL8lBO4whM+wSAmVqA==} + engines: {node: '>=10'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@swc/core-darwin-arm64': 1.3.17 + '@swc/core-darwin-x64': 1.3.17 + '@swc/core-linux-arm-gnueabihf': 1.3.17 + '@swc/core-linux-arm64-gnu': 1.3.17 + '@swc/core-linux-arm64-musl': 1.3.17 + '@swc/core-linux-x64-gnu': 1.3.17 + '@swc/core-linux-x64-musl': 1.3.17 + '@swc/core-win32-arm64-msvc': 1.3.17 + '@swc/core-win32-ia32-msvc': 1.3.17 + '@swc/core-win32-x64-msvc': 1.3.17 + dev: true + /@tootallnate/once/1.1.2: resolution: {integrity: sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==} engines: {node: '>= 6'} dev: true - /@types/glob/8.0.0: - resolution: {integrity: sha512-l6NQsDDyQUVeoTynNpC9uRvCUint/gSUXQA2euwmTuWGvPY5LSDUu6tkCtJB2SvGQlJQzLaKqcGZP4//7EDveA==} + /@types/babel__core/7.1.20: + resolution: {integrity: sha512-PVb6Bg2QuscZ30FvOU7z4guG6c926D9YRvOxEaelzndpMsvP+YM74Q/dAFASpg2l6+XLalxSGxcq/lrgYWZtyQ==} dependencies: - '@types/minimatch': 5.1.2 - '@types/node': 8.10.66 + '@babel/parser': 7.20.3 + '@babel/types': 7.20.2 + '@types/babel__generator': 7.6.4 + '@types/babel__template': 7.4.1 + '@types/babel__traverse': 7.18.2 + dev: true + + /@types/babel__generator/7.6.4: + resolution: {integrity: sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==} + dependencies: + '@babel/types': 7.20.2 + dev: true + + /@types/babel__template/7.4.1: + resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==} + dependencies: + '@babel/parser': 7.20.3 + '@babel/types': 7.20.2 + dev: true + + /@types/babel__traverse/7.18.2: + resolution: {integrity: sha512-FcFaxOr2V5KZCviw1TnutEMVUVsGt4D2hP1TAfXZAMKuHYW3xQhe3jTxNPWutgCJ3/X1c5yX8ZoGVEItxKbwBg==} + dependencies: + '@babel/types': 7.20.2 + dev: true + + /@types/glob/7.2.0: + resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} + dependencies: + '@types/minimatch': 3.0.5 + '@types/node': 18.11.9 dev: true /@types/globby/6.1.0: resolution: {integrity: sha512-j3XSDNoK4LO5T+ZviQD6PqfEjm07QFEacOTbJR3hnLWuWX0ZMLJl9oRPgj1PyrfGbXhfHFkksC9QZ9HFltJyrw==} dependencies: - '@types/glob': 8.0.0 + '@types/glob': 7.2.0 + dev: true + + /@types/graceful-fs/4.1.5: + resolution: {integrity: sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==} + dependencies: + '@types/node': 18.11.9 dev: true /@types/ini/1.3.31: @@ -442,19 +1397,42 @@ packages: /@types/is-ci/3.0.0: resolution: {integrity: sha512-Q0Op0hdWbYd1iahB+IFNQcWXFq4O0Q5MwQP7uN0souuQ4rPg1vEYcnIOfr1gY+M+6rc8FGoRaBO1mOOvL29sEQ==} dependencies: - ci-info: 3.5.0 + ci-info: 3.3.2 + dev: true + + /@types/istanbul-lib-coverage/2.0.4: + resolution: {integrity: sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==} + dev: true + + /@types/istanbul-lib-report/3.0.0: + resolution: {integrity: sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==} + dependencies: + '@types/istanbul-lib-coverage': 2.0.4 + dev: true + + /@types/istanbul-reports/3.0.1: + resolution: {integrity: sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==} + dependencies: + '@types/istanbul-lib-report': 3.0.0 dev: true /@types/jest/21.1.10: resolution: {integrity: sha512-qDyqzbcyNgW2RgWbl606xCYQ+5fK9khOW5+Hl3wH7RggVES0dB6GcZvpmPs/XIty5qpu1xYCwpiK+iRkJ3xFBw==} dev: true - /@types/lodash/4.14.186: - resolution: {integrity: sha512-eHcVlLXP0c2FlMPm56ITode2AgLMSa6aJ05JTTbYbI+7EMkCEE5qk2E41d5g2lCVTqRe0GnnRFurmlCsDODrPw==} + /@types/jest/29.2.3: + resolution: {integrity: sha512-6XwoEbmatfyoCjWRX7z0fKMmgYKe9+/HrviJ5k0X/tjJWHGAezZOfYaxqQKuzG/TvQyr+ktjm4jgbk0s4/oF2w==} + dependencies: + expect: 29.3.1 + pretty-format: 29.3.1 + dev: true + + /@types/lodash/4.14.182: + resolution: {integrity: sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q==} dev: true - /@types/minimatch/5.1.2: - resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} + /@types/minimatch/3.0.5: + resolution: {integrity: sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==} dev: true /@types/minimist/1.2.2: @@ -465,6 +1443,10 @@ packages: resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} dev: true + /@types/node/18.11.9: + resolution: {integrity: sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==} + dev: true + /@types/node/8.10.66: resolution: {integrity: sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==} dev: true @@ -473,14 +1455,40 @@ packages: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} dev: true + /@types/prettier/2.7.1: + resolution: {integrity: sha512-ri0UmynRRvZiiUJdiz38MmIblKK+oH30MztdBVR95dv/Ubw6neWSb8u1XpRb72L4qsZOhz+L+z9JD40SJmfWow==} + dev: true + /@types/q/1.5.5: resolution: {integrity: sha512-L28j2FcJfSZOnL1WBjDYp2vUHCeIFlyYI/53EwD/rKUBQ7MtUUfbQWiyKJGpcnv4/WgrhWsFKrcPstcAt/J0tQ==} dev: true + /@types/retry/0.12.0: + resolution: {integrity: sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==} + dev: true + /@types/semver/6.2.3: resolution: {integrity: sha512-KQf+QAMWKMrtBMsB8/24w53tEsxllMj6TuA80TT/5igJalLI/zm0L3oXRbIAl4Ohfc85gyHX/jhMwsVkmhLU4A==} dev: true + /@types/shell-escape/0.2.1: + resolution: {integrity: sha512-95hZXmBvwtvsLMPefKT9xquUSAJXsVDUaipyUiYoYi3ZdLhZ3w30w230Ugs96IdoJQb5ECvj0D82Jj/op00qWQ==} + dev: true + + /@types/stack-utils/2.0.1: + resolution: {integrity: sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==} + dev: true + + /@types/yargs-parser/21.0.0: + resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} + dev: true + + /@types/yargs/17.0.13: + resolution: {integrity: sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg==} + dependencies: + '@types/yargs-parser': 21.0.0 + dev: true + /abcq/1.0.2: resolution: {integrity: sha512-Fjk/LXe1aHL7zQcjqDoKhYuIdB3iyv1S3/YJNPe6D0QjJuKXKq+N6ei5kVZtsr0Rp6ueTmhW4yZlLQaIKptyFg==} dependencies: @@ -528,6 +1536,13 @@ packages: engines: {node: '>=6'} dev: true + /ansi-escapes/4.3.2: + resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} + engines: {node: '>=8'} + dependencies: + type-fest: 0.21.3 + dev: true + /ansi-regex/5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} @@ -547,6 +1562,11 @@ packages: color-convert: 2.0.1 dev: true + /ansi-styles/5.2.0: + resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} + engines: {node: '>=10'} + dev: true + /ansi-to-rgb/1.0.0: resolution: {integrity: sha512-Si3NA3kWxKg12Aj+IVElMbYZ1l0OC0g+goa6Xn0sA2vp8GMiGp6AnVbMvwNQjkEB6WSb4SVyGflxuoTaNucQIw==} dev: true @@ -555,6 +1575,14 @@ packages: resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} dev: true + /anymatch/3.1.2: + resolution: {integrity: sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==} + engines: {node: '>= 8'} + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.1 + dev: true + /argparse/1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} dependencies: @@ -577,7 +1605,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.4 + es-abstract: 1.20.1 es-shim-unscopables: 1.0.0 dev: true @@ -587,7 +1615,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.4 + es-abstract: 1.20.1 es-array-method-boxes-properly: 1.0.0 is-string: 1.0.7 dev: true @@ -597,6 +1625,78 @@ packages: engines: {node: '>=0.10.0'} dev: true + /babel-jest/29.3.1_@babel+core@7.20.2: + resolution: {integrity: sha512-aard+xnMoxgjwV70t0L6wkW/3HQQtV+O0PEimxKgzNqCJnbYmroPojdP2tqKSOAt8QAKV/uSZU8851M7B5+fcA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@babel/core': ^7.8.0 + dependencies: + '@babel/core': 7.20.2 + '@jest/transform': 29.3.1 + '@types/babel__core': 7.1.20 + babel-plugin-istanbul: 6.1.1 + babel-preset-jest: 29.2.0_@babel+core@7.20.2 + chalk: 4.1.2 + graceful-fs: 4.2.10 + slash: 3.0.0 + transitivePeerDependencies: + - supports-color + dev: true + + /babel-plugin-istanbul/6.1.1: + resolution: {integrity: sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==} + engines: {node: '>=8'} + dependencies: + '@babel/helper-plugin-utils': 7.20.2 + '@istanbuljs/load-nyc-config': 1.1.0 + '@istanbuljs/schema': 0.1.3 + istanbul-lib-instrument: 5.2.1 + test-exclude: 6.0.0 + transitivePeerDependencies: + - supports-color + dev: true + + /babel-plugin-jest-hoist/29.2.0: + resolution: {integrity: sha512-TnspP2WNiR3GLfCsUNHqeXw0RoQ2f9U5hQ5L3XFpwuO8htQmSrhh8qsB6vi5Yi8+kuynN1yjDjQsPfkebmB6ZA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@babel/template': 7.18.10 + '@babel/types': 7.20.2 + '@types/babel__core': 7.1.20 + '@types/babel__traverse': 7.18.2 + dev: true + + /babel-preset-current-node-syntax/1.0.1_@babel+core@7.20.2: + resolution: {integrity: sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.20.2 + '@babel/plugin-syntax-async-generators': 7.8.4_@babel+core@7.20.2 + '@babel/plugin-syntax-bigint': 7.8.3_@babel+core@7.20.2 + '@babel/plugin-syntax-class-properties': 7.12.13_@babel+core@7.20.2 + '@babel/plugin-syntax-import-meta': 7.10.4_@babel+core@7.20.2 + '@babel/plugin-syntax-json-strings': 7.8.3_@babel+core@7.20.2 + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4_@babel+core@7.20.2 + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3_@babel+core@7.20.2 + '@babel/plugin-syntax-numeric-separator': 7.10.4_@babel+core@7.20.2 + '@babel/plugin-syntax-object-rest-spread': 7.8.3_@babel+core@7.20.2 + '@babel/plugin-syntax-optional-catch-binding': 7.8.3_@babel+core@7.20.2 + '@babel/plugin-syntax-optional-chaining': 7.8.3_@babel+core@7.20.2 + '@babel/plugin-syntax-top-level-await': 7.14.5_@babel+core@7.20.2 + dev: true + + /babel-preset-jest/29.2.0_@babel+core@7.20.2: + resolution: {integrity: sha512-z9JmMJppMxNv8N7fNRHvhMg9cvIkMxQBXgFkane3yKVEvEOP+kB50lk8DFRvF9PGqbyXxlmebKWhuDORO8RgdA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/core': 7.20.2 + babel-plugin-jest-hoist: 29.2.0 + babel-preset-current-node-syntax: 1.0.1_@babel+core@7.20.2 + dev: true + /balanced-match/1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} dev: true @@ -647,6 +1747,27 @@ packages: wcwidth: 1.0.1 dev: true + /browserslist/4.21.4: + resolution: {integrity: sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + dependencies: + caniuse-lite: 1.0.30001431 + electron-to-chromium: 1.4.284 + node-releases: 2.0.6 + update-browserslist-db: 1.0.10_browserslist@4.21.4 + dev: true + + /bser/2.1.1: + resolution: {integrity: sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==} + dependencies: + node-int64: 0.4.0 + dev: true + + /buffer-from/1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + dev: true + /bytes/3.1.2: resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} engines: {node: '>= 0.8'} @@ -682,7 +1803,12 @@ packages: resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} dependencies: function-bind: 1.1.1 - get-intrinsic: 1.1.3 + get-intrinsic: 1.1.2 + dev: true + + /callsites/3.1.0: + resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} + engines: {node: '>=6'} dev: true /camelcase-keys/2.1.0: @@ -712,6 +1838,15 @@ packages: engines: {node: '>=6'} dev: true + /camelcase/6.3.0: + resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} + engines: {node: '>=10'} + dev: true + + /caniuse-lite/1.0.30001431: + resolution: {integrity: sha512-zBUoFU0ZcxpvSt9IU66dXVT/3ctO1cy4y9cscs1szkPlcWb6pasYM144GqrUygUbT+k7cmUCW61cvskjcv0enQ==} + dev: true + /chalk/2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} @@ -729,6 +1864,11 @@ packages: supports-color: 7.2.0 dev: true + /char-regex/1.0.2: + resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} + engines: {node: '>=10'} + dev: true + /chardet/0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} dev: true @@ -738,8 +1878,12 @@ packages: engines: {node: '>=10'} dev: true - /ci-info/3.5.0: - resolution: {integrity: sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==} + /ci-info/3.3.2: + resolution: {integrity: sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg==} + dev: true + + /cjs-module-lexer/1.2.2: + resolution: {integrity: sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==} dev: true /clean-stack/1.3.0: @@ -781,15 +1925,6 @@ packages: wrap-ansi: 7.0.0 dev: true - /cliui/8.0.1: - resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} - engines: {node: '>=12'} - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - dev: true - /clone/1.0.4: resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} engines: {node: '>=0.8'} @@ -806,6 +1941,11 @@ packages: - supports-color dev: true + /co/4.6.0: + resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} + engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} + dev: true + /coa/2.0.2: resolution: {integrity: sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA==} engines: {node: '>= 4.0'} @@ -815,6 +1955,10 @@ packages: q: 1.5.1 dev: true + /collect-v8-coverage/1.0.1: + resolution: {integrity: sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==} + dev: true + /color-convert/1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: @@ -850,6 +1994,10 @@ packages: color-string: 1.9.1 dev: true + /colorette/2.0.19: + resolution: {integrity: sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==} + dev: true + /command-exists/1.2.9: resolution: {integrity: sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==} dev: true @@ -858,6 +2006,14 @@ packages: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true + /convert-source-map/1.9.0: + resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} + dev: true + + /convert-source-map/2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + dev: true + /core-util-is/1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} dev: true @@ -991,8 +2147,17 @@ packages: engines: {node: '>=0.10.0'} dev: true - /defaults/1.0.4: - resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} + /dedent/0.7.0: + resolution: {integrity: sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==} + dev: true + + /deepmerge/4.2.2: + resolution: {integrity: sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==} + engines: {node: '>=0.10.0'} + dev: true + + /defaults/1.0.3: + resolution: {integrity: sha512-s82itHOnYrN0Ib8r+z7laQz3sdE+4FP3d9Q7VLO7U+KRT+CR0GsWuyHxzdAY82I7cXv0G/twrqomTJLOssO5HA==} dependencies: clone: 1.0.4 dev: true @@ -1015,10 +2180,20 @@ packages: engines: {node: '>=8'} dev: true + /detect-newline/3.1.0: + resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} + engines: {node: '>=8'} + dev: true + /didyoumean/1.2.2: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} dev: true + /diff-sequences/29.3.1: + resolution: {integrity: sha512-hlM3QR272NXCi4pq+N4Kok4kOp6EsgOM3ZSpJI7Da3UAs+Ttsi8MRmB6trM/lhyzUxGfOgnpkHtgqm5Q/CTcfQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dev: true + /dir-glob/3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -1053,12 +2228,22 @@ packages: engines: {node: '>=12'} dev: true + /electron-to-chromium/1.4.284: + resolution: {integrity: sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==} + dev: true + + /emittery/0.13.1: + resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==} + engines: {node: '>=12'} + dev: true + /emoji-regex/8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} dev: true /encoding/0.1.13: resolution: {integrity: sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==} + requiresBuild: true dependencies: iconv-lite: 0.6.3 dev: true @@ -1084,21 +2269,21 @@ packages: is-arrayish: 0.2.1 dev: true - /es-abstract/1.20.4: - resolution: {integrity: sha512-0UtvRN79eMe2L+UNEF1BwRe364sj/DXhQ/k5FmivgoSdpM90b8Jc0mDzKMGo7QS0BVbOP/bTwBKNnDc9rNzaPA==} + /es-abstract/1.20.1: + resolution: {integrity: sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 es-to-primitive: 1.2.1 function-bind: 1.1.1 function.prototype.name: 1.1.5 - get-intrinsic: 1.1.3 + get-intrinsic: 1.1.2 get-symbol-description: 1.0.0 has: 1.0.3 has-property-descriptors: 1.0.0 has-symbols: 1.0.3 internal-slot: 1.0.3 - is-callable: 1.2.7 + is-callable: 1.2.4 is-negative-zero: 2.0.2 is-regex: 1.1.4 is-shared-array-buffer: 1.0.2 @@ -1106,9 +2291,8 @@ packages: is-weakref: 1.0.2 object-inspect: 1.12.2 object-keys: 1.1.1 - object.assign: 4.1.4 + object.assign: 4.1.2 regexp.prototype.flags: 1.4.3 - safe-regex-test: 1.0.0 string.prototype.trimend: 1.0.5 string.prototype.trimstart: 1.0.5 unbox-primitive: 1.0.2 @@ -1128,7 +2312,7 @@ packages: resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} engines: {node: '>= 0.4'} dependencies: - is-callable: 1.2.7 + is-callable: 1.2.4 is-date-object: 1.0.5 is-symbol: 1.0.4 dev: true @@ -1143,6 +2327,11 @@ packages: engines: {node: '>=0.8.0'} dev: true + /escape-string-regexp/2.0.0: + resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} + engines: {node: '>=8'} + dev: true + /esprima/4.0.1: resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} engines: {node: '>=4'} @@ -1189,6 +2378,22 @@ packages: strip-final-newline: 2.0.0 dev: true + /exit/0.1.2: + resolution: {integrity: sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==} + engines: {node: '>= 0.8.0'} + dev: true + + /expect/29.3.1: + resolution: {integrity: sha512-gGb1yTgU30Q0O/tQq+z30KBWv24ApkMgFUpvKBkyLUBL68Wv8dHdJxTBZFl/iT8K/bqDHvUYRH6IIN3rToopPA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/expect-utils': 29.3.1 + jest-get-type: 29.2.0 + jest-matcher-utils: 29.3.1 + jest-message-util: 29.3.1 + jest-util: 29.3.1 + dev: true + /extendable-error/0.1.7: resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} dev: true @@ -1202,8 +2407,8 @@ packages: tmp: 0.0.33 dev: true - /fast-glob/3.2.12: - resolution: {integrity: sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==} + /fast-glob/3.2.11: + resolution: {integrity: sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==} engines: {node: '>=8.6.0'} dependencies: '@nodelib/fs.stat': 2.0.5 @@ -1213,12 +2418,22 @@ packages: micromatch: 4.0.5 dev: true + /fast-json-stable-stringify/2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + dev: true + /fastq/1.13.0: resolution: {integrity: sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==} dependencies: reusify: 1.0.4 dev: true + /fb-watchman/2.0.2: + resolution: {integrity: sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA==} + dependencies: + bser: 2.1.1 + dev: true + /fill-range/7.0.1: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} @@ -1286,6 +2501,14 @@ packages: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} dev: true + /fsevents/2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + /function-bind/1.1.1: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} dev: true @@ -1296,7 +2519,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.4 + es-abstract: 1.20.1 functions-have-names: 1.2.3 dev: true @@ -1304,19 +2527,29 @@ packages: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} dev: true + /gensync/1.0.0-beta.2: + resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} + engines: {node: '>=6.9.0'} + dev: true + /get-caller-file/2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} dev: true - /get-intrinsic/1.1.3: - resolution: {integrity: sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==} + /get-intrinsic/1.1.2: + resolution: {integrity: sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA==} dependencies: function-bind: 1.1.1 has: 1.0.3 has-symbols: 1.0.3 dev: true + /get-package-type/0.1.0: + resolution: {integrity: sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==} + engines: {node: '>=8.0.0'} + dev: true + /get-stdin/4.0.1: resolution: {integrity: sha512-F5aQMywwJ2n85s4hJPTT9RPxGmubonuB10MNYo17/xph174n2MIR33HRguhzVag10O/npM7SPk73LMZNP+FaWw==} engines: {node: '>=0.10.0'} @@ -1342,7 +2575,7 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.1.3 + get-intrinsic: 1.1.2 dev: true /glob-parent/5.1.2: @@ -1363,13 +2596,18 @@ packages: path-is-absolute: 1.0.1 dev: true + /globals/11.12.0: + resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} + engines: {node: '>=4'} + dev: true + /globby/11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} dependencies: array-union: 2.1.0 dir-glob: 3.0.1 - fast-glob: 3.2.12 + fast-glob: 3.2.11 ignore: 5.2.0 merge2: 1.4.1 slash: 3.0.0 @@ -1410,7 +2648,7 @@ packages: /has-property-descriptors/1.0.0: resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} dependencies: - get-intrinsic: 1.1.3 + get-intrinsic: 1.1.2 dev: true /has-symbols/1.0.3: @@ -1452,6 +2690,10 @@ packages: lru-cache: 6.0.0 dev: true + /html-escaper/2.0.2: + resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} + dev: true + /http-cache-semantics/4.1.0: resolution: {integrity: sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==} dev: true @@ -1511,6 +2753,15 @@ packages: engines: {node: '>= 4'} dev: true + /import-local/3.1.0: + resolution: {integrity: sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==} + engines: {node: '>=8'} + hasBin: true + dependencies: + pkg-dir: 4.2.0 + resolve-cwd: 3.0.0 + dev: true + /imurmurhash/0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} @@ -1556,13 +2807,13 @@ packages: resolution: {integrity: sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.1.3 + get-intrinsic: 1.1.2 has: 1.0.3 side-channel: 1.0.4 dev: true - /ip/2.0.0: - resolution: {integrity: sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==} + /ip/1.1.8: + resolution: {integrity: sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==} dev: true /is-arrayish/0.2.1: @@ -1587,8 +2838,8 @@ packages: has-tostringtag: 1.0.0 dev: true - /is-callable/1.2.7: - resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} + /is-callable/1.2.4: + resolution: {integrity: sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==} engines: {node: '>= 0.4'} dev: true @@ -1596,11 +2847,11 @@ packages: resolution: {integrity: sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==} hasBin: true dependencies: - ci-info: 3.5.0 + ci-info: 3.3.2 dev: true - /is-core-module/2.10.0: - resolution: {integrity: sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg==} + /is-core-module/2.9.0: + resolution: {integrity: sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A==} dependencies: has: 1.0.3 dev: true @@ -1627,105 +2878,565 @@ packages: engines: {node: '>=8'} dev: true - /is-glob/4.0.3: - resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} - engines: {node: '>=0.10.0'} + /is-generator-fn/2.1.0: + resolution: {integrity: sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==} + engines: {node: '>=6'} + dev: true + + /is-glob/4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + dependencies: + is-extglob: 2.1.1 + dev: true + + /is-lambda/1.0.1: + resolution: {integrity: sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==} + dev: true + + /is-negative-zero/2.0.2: + resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} + engines: {node: '>= 0.4'} + dev: true + + /is-number-object/1.0.7: + resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + dev: true + + /is-number/7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + dev: true + + /is-plain-obj/1.1.0: + resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} + engines: {node: '>=0.10.0'} + dev: true + + /is-regex/1.1.4: + resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + has-tostringtag: 1.0.0 + dev: true + + /is-shared-array-buffer/1.0.2: + resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} + dependencies: + call-bind: 1.0.2 + dev: true + + /is-stream/1.1.0: + resolution: {integrity: sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==} + engines: {node: '>=0.10.0'} + dev: true + + /is-stream/2.0.1: + resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} + engines: {node: '>=8'} + dev: true + + /is-string/1.0.7: + resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + dev: true + + /is-subdir/1.2.0: + resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} + engines: {node: '>=4'} + dependencies: + better-path-resolve: 1.0.0 + dev: true + + /is-symbol/1.0.4: + resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} + engines: {node: '>= 0.4'} + dependencies: + has-symbols: 1.0.3 + dev: true + + /is-utf8/0.2.1: + resolution: {integrity: sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==} + dev: true + + /is-weakref/1.0.2: + resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + dependencies: + call-bind: 1.0.2 + dev: true + + /is-windows/1.0.2: + resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} + engines: {node: '>=0.10.0'} + dev: true + + /isarray/1.0.0: + resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} + dev: true + + /isexe/2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + dev: true + + /istanbul-lib-coverage/3.2.0: + resolution: {integrity: sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==} + engines: {node: '>=8'} + dev: true + + /istanbul-lib-instrument/5.2.1: + resolution: {integrity: sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg==} + engines: {node: '>=8'} + dependencies: + '@babel/core': 7.20.2 + '@babel/parser': 7.20.3 + '@istanbuljs/schema': 0.1.3 + istanbul-lib-coverage: 3.2.0 + semver: 6.3.0 + transitivePeerDependencies: + - supports-color + dev: true + + /istanbul-lib-report/3.0.0: + resolution: {integrity: sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==} + engines: {node: '>=8'} + dependencies: + istanbul-lib-coverage: 3.2.0 + make-dir: 3.1.0 + supports-color: 7.2.0 + dev: true + + /istanbul-lib-source-maps/4.0.1: + resolution: {integrity: sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==} + engines: {node: '>=10'} + dependencies: + debug: 4.3.4 + istanbul-lib-coverage: 3.2.0 + source-map: 0.6.1 + transitivePeerDependencies: + - supports-color + dev: true + + /istanbul-reports/3.1.5: + resolution: {integrity: sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w==} + engines: {node: '>=8'} + dependencies: + html-escaper: 2.0.2 + istanbul-lib-report: 3.0.0 + dev: true + + /jest-changed-files/29.2.0: + resolution: {integrity: sha512-qPVmLLyBmvF5HJrY7krDisx6Voi8DmlV3GZYX0aFNbaQsZeoz1hfxcCMbqDGuQCxU1dJy9eYc2xscE8QrCCYaA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + execa: 5.1.1 + p-limit: 3.1.0 + dev: true + + /jest-circus/29.3.1: + resolution: {integrity: sha512-wpr26sEvwb3qQQbdlmei+gzp6yoSSoSL6GsLPxnuayZSMrSd5Ka7IjAvatpIernBvT2+Ic6RLTg+jSebScmasg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/environment': 29.3.1 + '@jest/expect': 29.3.1 + '@jest/test-result': 29.3.1 + '@jest/types': 29.3.1 + '@types/node': 18.11.9 + chalk: 4.1.2 + co: 4.6.0 + dedent: 0.7.0 + is-generator-fn: 2.1.0 + jest-each: 29.3.1 + jest-matcher-utils: 29.3.1 + jest-message-util: 29.3.1 + jest-runtime: 29.3.1 + jest-snapshot: 29.3.1 + jest-util: 29.3.1 + p-limit: 3.1.0 + pretty-format: 29.3.1 + slash: 3.0.0 + stack-utils: 2.0.6 + transitivePeerDependencies: + - supports-color + dev: true + + /jest-cli/29.3.1_@types+node@18.11.9: + resolution: {integrity: sha512-TO/ewvwyvPOiBBuWZ0gm04z3WWP8TIK8acgPzE4IxgsLKQgb377NYGrQLc3Wl/7ndWzIH2CDNNsUjGxwLL43VQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + hasBin: true + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + dependencies: + '@jest/core': 29.3.1 + '@jest/test-result': 29.3.1 + '@jest/types': 29.3.1 + chalk: 4.1.2 + exit: 0.1.2 + graceful-fs: 4.2.10 + import-local: 3.1.0 + jest-config: 29.3.1_@types+node@18.11.9 + jest-util: 29.3.1 + jest-validate: 29.3.1 + prompts: 2.4.2 + yargs: 17.5.1 + transitivePeerDependencies: + - '@types/node' + - supports-color + - ts-node + dev: true + + /jest-config/29.3.1_@types+node@18.11.9: + resolution: {integrity: sha512-y0tFHdj2WnTEhxmGUK1T7fgLen7YK4RtfvpLFBXfQkh2eMJAQq24Vx9472lvn5wg0MAO6B+iPfJfzdR9hJYalg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + peerDependencies: + '@types/node': '*' + ts-node: '>=9.0.0' + peerDependenciesMeta: + '@types/node': + optional: true + ts-node: + optional: true + dependencies: + '@babel/core': 7.20.2 + '@jest/test-sequencer': 29.3.1 + '@jest/types': 29.3.1 + '@types/node': 18.11.9 + babel-jest: 29.3.1_@babel+core@7.20.2 + chalk: 4.1.2 + ci-info: 3.3.2 + deepmerge: 4.2.2 + glob: 7.2.3 + graceful-fs: 4.2.10 + jest-circus: 29.3.1 + jest-environment-node: 29.3.1 + jest-get-type: 29.2.0 + jest-regex-util: 29.2.0 + jest-resolve: 29.3.1 + jest-runner: 29.3.1 + jest-util: 29.3.1 + jest-validate: 29.3.1 + micromatch: 4.0.5 + parse-json: 5.2.0 + pretty-format: 29.3.1 + slash: 3.0.0 + strip-json-comments: 3.1.1 + transitivePeerDependencies: + - supports-color + dev: true + + /jest-diff/29.3.1: + resolution: {integrity: sha512-vU8vyiO7568tmin2lA3r2DP8oRvzhvRcD4DjpXc6uGveQodyk7CKLhQlCSiwgx3g0pFaE88/KLZ0yaTWMc4Uiw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + chalk: 4.1.2 + diff-sequences: 29.3.1 + jest-get-type: 29.2.0 + pretty-format: 29.3.1 + dev: true + + /jest-docblock/29.2.0: + resolution: {integrity: sha512-bkxUsxTgWQGbXV5IENmfiIuqZhJcyvF7tU4zJ/7ioTutdz4ToB5Yx6JOFBpgI+TphRY4lhOyCWGNH/QFQh5T6A==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + detect-newline: 3.1.0 + dev: true + + /jest-each/29.3.1: + resolution: {integrity: sha512-qrZH7PmFB9rEzCSl00BWjZYuS1BSOH8lLuC0azQE9lQrAx3PWGKHTDudQiOSwIy5dGAJh7KA0ScYlCP7JxvFYA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/types': 29.3.1 + chalk: 4.1.2 + jest-get-type: 29.2.0 + jest-util: 29.3.1 + pretty-format: 29.3.1 + dev: true + + /jest-environment-node/29.3.1: + resolution: {integrity: sha512-xm2THL18Xf5sIHoU7OThBPtuH6Lerd+Y1NLYiZJlkE3hbE+7N7r8uvHIl/FkZ5ymKXJe/11SQuf3fv4v6rUMag==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - is-extglob: 2.1.1 + '@jest/environment': 29.3.1 + '@jest/fake-timers': 29.3.1 + '@jest/types': 29.3.1 + '@types/node': 18.11.9 + jest-mock: 29.3.1 + jest-util: 29.3.1 dev: true - /is-lambda/1.0.1: - resolution: {integrity: sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==} + /jest-get-type/29.2.0: + resolution: {integrity: sha512-uXNJlg8hKFEnDgFsrCjznB+sTxdkuqiCL6zMgA75qEbAJjJYTs9XPrvDctrEig2GDow22T/LvHgO57iJhXB/UA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true - /is-negative-zero/2.0.2: - resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} - engines: {node: '>= 0.4'} + /jest-haste-map/29.3.1: + resolution: {integrity: sha512-/FFtvoG1xjbbPXQLFef+WSU4yrc0fc0Dds6aRPBojUid7qlPqZvxdUBA03HW0fnVHXVCnCdkuoghYItKNzc/0A==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/types': 29.3.1 + '@types/graceful-fs': 4.1.5 + '@types/node': 18.11.9 + anymatch: 3.1.2 + fb-watchman: 2.0.2 + graceful-fs: 4.2.10 + jest-regex-util: 29.2.0 + jest-util: 29.3.1 + jest-worker: 29.3.1 + micromatch: 4.0.5 + walker: 1.0.8 + optionalDependencies: + fsevents: 2.3.2 dev: true - /is-number-object/1.0.7: - resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} - engines: {node: '>= 0.4'} + /jest-leak-detector/29.3.1: + resolution: {integrity: sha512-3DA/VVXj4zFOPagGkuqHnSQf1GZBmmlagpguxEERO6Pla2g84Q1MaVIB3YMxgUaFIaYag8ZnTyQgiZ35YEqAQA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - has-tostringtag: 1.0.0 + jest-get-type: 29.2.0 + pretty-format: 29.3.1 dev: true - /is-number/7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} + /jest-matcher-utils/29.3.1: + resolution: {integrity: sha512-fkRMZUAScup3txIKfMe3AIZZmPEjWEdsPJFK3AIy5qRohWqQFg1qrmKfYXR9qEkNc7OdAu2N4KPHibEmy4HPeQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + chalk: 4.1.2 + jest-diff: 29.3.1 + jest-get-type: 29.2.0 + pretty-format: 29.3.1 dev: true - /is-plain-obj/1.1.0: - resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} - engines: {node: '>=0.10.0'} + /jest-message-util/29.3.1: + resolution: {integrity: sha512-lMJTbgNcDm5z+6KDxWtqOFWlGQxD6XaYwBqHR8kmpkP+WWWG90I35kdtQHY67Ay5CSuydkTBbJG+tH9JShFCyA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@babel/code-frame': 7.18.6 + '@jest/types': 29.3.1 + '@types/stack-utils': 2.0.1 + chalk: 4.1.2 + graceful-fs: 4.2.10 + micromatch: 4.0.5 + pretty-format: 29.3.1 + slash: 3.0.0 + stack-utils: 2.0.6 dev: true - /is-regex/1.1.4: - resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} - engines: {node: '>= 0.4'} + /jest-mock/29.3.1: + resolution: {integrity: sha512-H8/qFDtDVMFvFP4X8NuOT3XRDzOUTz+FeACjufHzsOIBAxivLqkB1PoLCaJx9iPPQ8dZThHPp/G3WRWyMgA3JA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - call-bind: 1.0.2 - has-tostringtag: 1.0.0 + '@jest/types': 29.3.1 + '@types/node': 18.11.9 + jest-util: 29.3.1 dev: true - /is-shared-array-buffer/1.0.2: - resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} + /jest-pnp-resolver/1.2.2_jest-resolve@29.3.1: + resolution: {integrity: sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==} + engines: {node: '>=6'} + peerDependencies: + jest-resolve: '*' + peerDependenciesMeta: + jest-resolve: + optional: true dependencies: - call-bind: 1.0.2 + jest-resolve: 29.3.1 dev: true - /is-stream/1.1.0: - resolution: {integrity: sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==} - engines: {node: '>=0.10.0'} + /jest-regex-util/29.2.0: + resolution: {integrity: sha512-6yXn0kg2JXzH30cr2NlThF+70iuO/3irbaB4mh5WyqNIvLLP+B6sFdluO1/1RJmslyh/f9osnefECflHvTbwVA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dev: true - /is-stream/2.0.1: - resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} - engines: {node: '>=8'} + /jest-resolve-dependencies/29.3.1: + resolution: {integrity: sha512-Vk0cYq0byRw2WluNmNWGqPeRnZ3p3hHmjJMp2dyyZeYIfiBskwq4rpiuGFR6QGAdbj58WC7HN4hQHjf2mpvrLA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + jest-regex-util: 29.2.0 + jest-snapshot: 29.3.1 + transitivePeerDependencies: + - supports-color dev: true - /is-string/1.0.7: - resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} - engines: {node: '>= 0.4'} + /jest-resolve/29.3.1: + resolution: {integrity: sha512-amXJgH/Ng712w3Uz5gqzFBBjxV8WFLSmNjoreBGMqxgCz5cH7swmBZzgBaCIOsvb0NbpJ0vgaSFdJqMdT+rADw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - has-tostringtag: 1.0.0 + chalk: 4.1.2 + graceful-fs: 4.2.10 + jest-haste-map: 29.3.1 + jest-pnp-resolver: 1.2.2_jest-resolve@29.3.1 + jest-util: 29.3.1 + jest-validate: 29.3.1 + resolve: 1.22.1 + resolve.exports: 1.1.0 + slash: 3.0.0 dev: true - /is-subdir/1.2.0: - resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} - engines: {node: '>=4'} + /jest-runner/29.3.1: + resolution: {integrity: sha512-oFvcwRNrKMtE6u9+AQPMATxFcTySyKfLhvso7Sdk/rNpbhg4g2GAGCopiInk1OP4q6gz3n6MajW4+fnHWlU3bA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - better-path-resolve: 1.0.0 + '@jest/console': 29.3.1 + '@jest/environment': 29.3.1 + '@jest/test-result': 29.3.1 + '@jest/transform': 29.3.1 + '@jest/types': 29.3.1 + '@types/node': 18.11.9 + chalk: 4.1.2 + emittery: 0.13.1 + graceful-fs: 4.2.10 + jest-docblock: 29.2.0 + jest-environment-node: 29.3.1 + jest-haste-map: 29.3.1 + jest-leak-detector: 29.3.1 + jest-message-util: 29.3.1 + jest-resolve: 29.3.1 + jest-runtime: 29.3.1 + jest-util: 29.3.1 + jest-watcher: 29.3.1 + jest-worker: 29.3.1 + p-limit: 3.1.0 + source-map-support: 0.5.13 + transitivePeerDependencies: + - supports-color dev: true - /is-symbol/1.0.4: - resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} - engines: {node: '>= 0.4'} + /jest-runtime/29.3.1: + resolution: {integrity: sha512-jLzkIxIqXwBEOZx7wx9OO9sxoZmgT2NhmQKzHQm1xwR1kNW/dn0OjxR424VwHHf1SPN6Qwlb5pp1oGCeFTQ62A==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - has-symbols: 1.0.3 + '@jest/environment': 29.3.1 + '@jest/fake-timers': 29.3.1 + '@jest/globals': 29.3.1 + '@jest/source-map': 29.2.0 + '@jest/test-result': 29.3.1 + '@jest/transform': 29.3.1 + '@jest/types': 29.3.1 + '@types/node': 18.11.9 + chalk: 4.1.2 + cjs-module-lexer: 1.2.2 + collect-v8-coverage: 1.0.1 + glob: 7.2.3 + graceful-fs: 4.2.10 + jest-haste-map: 29.3.1 + jest-message-util: 29.3.1 + jest-mock: 29.3.1 + jest-regex-util: 29.2.0 + jest-resolve: 29.3.1 + jest-snapshot: 29.3.1 + jest-util: 29.3.1 + slash: 3.0.0 + strip-bom: 4.0.0 + transitivePeerDependencies: + - supports-color dev: true - /is-utf8/0.2.1: - resolution: {integrity: sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==} + /jest-snapshot/29.3.1: + resolution: {integrity: sha512-+3JOc+s28upYLI2OJM4PWRGK9AgpsMs/ekNryUV0yMBClT9B1DF2u2qay8YxcQd338PPYSFNb0lsar1B49sLDA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@babel/core': 7.20.2 + '@babel/generator': 7.20.4 + '@babel/plugin-syntax-jsx': 7.18.6_@babel+core@7.20.2 + '@babel/plugin-syntax-typescript': 7.20.0_@babel+core@7.20.2 + '@babel/traverse': 7.20.1 + '@babel/types': 7.20.2 + '@jest/expect-utils': 29.3.1 + '@jest/transform': 29.3.1 + '@jest/types': 29.3.1 + '@types/babel__traverse': 7.18.2 + '@types/prettier': 2.7.1 + babel-preset-current-node-syntax: 1.0.1_@babel+core@7.20.2 + chalk: 4.1.2 + expect: 29.3.1 + graceful-fs: 4.2.10 + jest-diff: 29.3.1 + jest-get-type: 29.2.0 + jest-haste-map: 29.3.1 + jest-matcher-utils: 29.3.1 + jest-message-util: 29.3.1 + jest-util: 29.3.1 + natural-compare: 1.4.0 + pretty-format: 29.3.1 + semver: 7.3.7 + transitivePeerDependencies: + - supports-color dev: true - /is-weakref/1.0.2: - resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + /jest-util/29.3.1: + resolution: {integrity: sha512-7YOVZaiX7RJLv76ZfHt4nbNEzzTRiMW/IiOG7ZOKmTXmoGBxUDefgMAxQubu6WPVqP5zSzAdZG0FfLcC7HOIFQ==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - call-bind: 1.0.2 + '@jest/types': 29.3.1 + '@types/node': 18.11.9 + chalk: 4.1.2 + ci-info: 3.3.2 + graceful-fs: 4.2.10 + picomatch: 2.3.1 dev: true - /is-windows/1.0.2: - resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} - engines: {node: '>=0.10.0'} + /jest-validate/29.3.1: + resolution: {integrity: sha512-N9Lr3oYR2Mpzuelp1F8negJR3YE+L1ebk1rYA5qYo9TTY3f9OWdptLoNSPP9itOCBIRBqjt/S5XHlzYglLN67g==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/types': 29.3.1 + camelcase: 6.3.0 + chalk: 4.1.2 + jest-get-type: 29.2.0 + leven: 3.1.0 + pretty-format: 29.3.1 dev: true - /isarray/1.0.0: - resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} + /jest-watcher/29.3.1: + resolution: {integrity: sha512-RspXG2BQFDsZSRKGCT/NiNa8RkQ1iKAjrO0//soTMWx/QUt+OcxMqMSBxz23PYGqUuWm2+m2mNNsmj0eIoOaFg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/test-result': 29.3.1 + '@jest/types': 29.3.1 + '@types/node': 18.11.9 + ansi-escapes: 4.3.2 + chalk: 4.1.2 + emittery: 0.13.1 + jest-util: 29.3.1 + string-length: 4.0.2 dev: true - /isexe/2.0.0: - resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + /jest-worker/29.3.1: + resolution: {integrity: sha512-lY4AnnmsEWeiXirAIA0c9SDPbuCBq8IYuDVL8PMm0MZ2PEs2yPvRA/J64QBXuZp7CYKrDM/rmNrc9/i3KJQncw==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@types/node': 18.11.9 + jest-util: 29.3.1 + merge-stream: 2.0.0 + supports-color: 8.1.1 + dev: true + + /jest/29.3.1_@types+node@18.11.9: + resolution: {integrity: sha512-6iWfL5DTT0Np6UYs/y5Niu7WIfNv/wRTtN5RSXt2DIEft3dx3zPuw/3WJQBCJfmEzvDiEKwoqMbGD9n49+qLSA==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + hasBin: true + peerDependencies: + node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 + peerDependenciesMeta: + node-notifier: + optional: true + dependencies: + '@jest/core': 29.3.1 + '@jest/types': 29.3.1 + import-local: 3.1.0 + jest-cli: 29.3.1_@types+node@18.11.9 + transitivePeerDependencies: + - '@types/node' + - supports-color + - ts-node dev: true /js-tokens/4.0.0: @@ -1740,10 +3451,22 @@ packages: esprima: 4.0.1 dev: true + /jsesc/2.5.2: + resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} + engines: {node: '>=4'} + hasBin: true + dev: true + /json-parse-even-better-errors/2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} dev: true + /json5/2.2.1: + resolution: {integrity: sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==} + engines: {node: '>=6'} + hasBin: true + dev: true + /jsonfile/4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} optionalDependencies: @@ -1755,6 +3478,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /kleur/3.0.3: + resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} + engines: {node: '>=6'} + dev: true + /kleur/4.1.5: resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} engines: {node: '>=6'} @@ -1772,12 +3500,17 @@ packages: make-fetch-happen: 9.1.0 p-map: 3.0.0 progress: 2.0.3 - yargs: 17.6.0 + yargs: 17.5.1 transitivePeerDependencies: - bluebird - supports-color dev: true + /leven/3.1.0: + resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} + engines: {node: '>=6'} + dev: true + /lines-and-columns/1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true @@ -1868,6 +3601,13 @@ packages: execa: 0.8.0 dev: true + /make-dir/3.1.0: + resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} + engines: {node: '>=8'} + dependencies: + semver: 6.3.0 + dev: true + /make-fetch-happen/9.1.0: resolution: {integrity: sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg==} engines: {node: '>= 10'} @@ -1893,6 +3633,12 @@ packages: - supports-color dev: true + /makeerror/1.0.12: + resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} + dependencies: + tmpl: 1.0.5 + dev: true + /map-obj/1.0.1: resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} engines: {node: '>=0.10.0'} @@ -1919,7 +3665,7 @@ packages: decamelize: 1.2.0 loud-rejection: 1.6.0 map-obj: 1.0.1 - minimist: 1.2.7 + minimist: 1.2.6 normalize-package-data: 2.5.0 object-assign: 4.1.1 read-pkg-up: 1.0.1 @@ -1986,8 +3732,8 @@ packages: kind-of: 6.0.3 dev: true - /minimist/1.2.7: - resolution: {integrity: sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==} + /minimist/1.2.6: + resolution: {integrity: sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==} dev: true /minipass-collect/1.0.2: @@ -2053,7 +3799,7 @@ packages: resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} hasBin: true dependencies: - minimist: 1.2.7 + minimist: 1.2.6 dev: true /mkdirp/1.0.4: @@ -2078,6 +3824,10 @@ packages: thenify-all: 1.6.0 dev: true + /natural-compare/1.4.0: + resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + dev: true + /negotiator/0.6.3: resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} engines: {node: '>= 0.6'} @@ -2102,6 +3852,14 @@ packages: whatwg-url: 5.0.0 dev: true + /node-int64/0.4.0: + resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==} + dev: true + + /node-releases/2.0.6: + resolution: {integrity: sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==} + dev: true + /normalize-package-data/2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: @@ -2111,6 +3869,11 @@ packages: validate-npm-package-license: 3.0.4 dev: true + /normalize-path/3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + dev: true + /npm-run-path/1.0.0: resolution: {integrity: sha512-PrGAi1SLlqNvKN5uGBjIgnrTb8fl0Jz0a3JJmeMcGnIBh7UE9Gc4zsAMlwDajOMg2b1OgP6UPvoLUboTmMZPFA==} engines: {node: '>=0.10.0'} @@ -2157,8 +3920,8 @@ packages: engines: {node: '>= 0.4'} dev: true - /object.assign/4.1.4: - resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==} + /object.assign/4.1.2: + resolution: {integrity: sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 @@ -2174,7 +3937,7 @@ packages: array.prototype.reduce: 1.0.4 call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.4 + es-abstract: 1.20.1 dev: true /object.values/1.1.5: @@ -2183,7 +3946,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.4 + es-abstract: 1.20.1 dev: true /once/1.4.0: @@ -2267,6 +4030,14 @@ packages: aggregate-error: 3.1.0 dev: true + /p-retry/4.6.2: + resolution: {integrity: sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==} + engines: {node: '>=8'} + dependencies: + '@types/retry': 0.12.0 + retry: 0.13.1 + dev: true + /p-try/2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} @@ -2353,6 +4124,10 @@ packages: engines: {node: '>=8'} dev: true + /picocolors/1.0.0: + resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + dev: true + /picomatch/2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} @@ -2380,6 +4155,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /pirates/4.0.5: + resolution: {integrity: sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==} + engines: {node: '>= 6'} + dev: true + /pkg-dir/4.2.0: resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} engines: {node: '>=8'} @@ -2411,6 +4191,15 @@ packages: hasBin: true dev: true + /pretty-format/29.3.1: + resolution: {integrity: sha512-FyLnmb1cYJV8biEIiRyzRFvs2lry7PPIvOqKVe1GCUEYg4YGmlx1qG9EJNMxArYm7piII4qb8UV1Pncq5dxmcg==} + engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + dependencies: + '@jest/schemas': 29.0.0 + ansi-styles: 5.2.0 + react-is: 18.2.0 + dev: true + /process-nextick-args/2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} dev: true @@ -2444,6 +4233,14 @@ packages: retry: 0.12.0 dev: true + /prompts/2.4.2: + resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} + engines: {node: '>= 6'} + dependencies: + kleur: 3.0.3 + sisteransi: 1.0.5 + dev: true + /prop-types/15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} dependencies: @@ -2461,7 +4258,7 @@ packages: hasBin: true dependencies: bytes: 3.1.2 - minimist: 1.2.7 + minimist: 1.2.6 progress-stream: 2.0.0 dev: true @@ -2495,6 +4292,10 @@ packages: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} dev: true + /react-is/18.2.0: + resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} + dev: true + /react/16.14.0: resolution: {integrity: sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==} engines: {node: '>=0.10.0'} @@ -2578,8 +4379,8 @@ packages: strip-indent: 3.0.0 dev: true - /regenerator-runtime/0.13.10: - resolution: {integrity: sha512-KepLsg4dU12hryUO7bp/axHAKvwGOCV0sGloQtpagJ12ai+ojVDqkeGSiRX1zlq+kjIMZ1t7gpze+26QqtdGqw==} + /regenerator-runtime/0.13.9: + resolution: {integrity: sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==} dev: true /regexp.prototype.flags/1.4.3: @@ -2612,6 +4413,13 @@ packages: resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} dev: true + /resolve-cwd/3.0.0: + resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==} + engines: {node: '>=8'} + dependencies: + resolve-from: 5.0.0 + dev: true + /resolve-from/4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -2622,11 +4430,16 @@ packages: engines: {node: '>=8'} dev: true + /resolve.exports/1.1.0: + resolution: {integrity: sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==} + engines: {node: '>=10'} + dev: true + /resolve/1.22.1: resolution: {integrity: sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==} hasBin: true dependencies: - is-core-module: 2.10.0 + is-core-module: 2.9.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 dev: true @@ -2636,6 +4449,11 @@ packages: engines: {node: '>= 4'} dev: true + /retry/0.13.1: + resolution: {integrity: sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==} + engines: {node: '>= 4'} + dev: true + /reusify/1.0.4: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} @@ -2665,14 +4483,6 @@ packages: resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} dev: true - /safe-regex-test/1.0.0: - resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} - dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.1.3 - is-regex: 1.1.4 - dev: true - /safer-buffer/2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} dev: true @@ -2693,8 +4503,13 @@ packages: hasBin: true dev: true - /semver/7.3.8: - resolution: {integrity: sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==} + /semver/6.3.0: + resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} + hasBin: true + dev: true + + /semver/7.3.7: + resolution: {integrity: sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==} engines: {node: '>=10'} hasBin: true dependencies: @@ -2729,11 +4544,15 @@ packages: engines: {node: '>=8'} dev: true + /shell-escape/0.2.0: + resolution: {integrity: sha512-uRRBT2MfEOyxuECseCZd28jC1AJ8hmqqneWQ4VWUTgCAFvb3wKU1jLqj6egC4Exrr88ogg3dp+zroH4wJuaXzw==} + dev: true + /side-channel/1.0.4: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} dependencies: call-bind: 1.0.2 - get-intrinsic: 1.1.3 + get-intrinsic: 1.1.2 object-inspect: 1.12.2 dev: true @@ -2747,6 +4566,10 @@ packages: is-arrayish: 0.3.2 dev: true + /sisteransi/1.0.5: + resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} + dev: true + /slash/3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} @@ -2776,19 +4599,33 @@ packages: dependencies: agent-base: 6.0.2 debug: 4.3.4 - socks: 2.7.1 + socks: 2.6.2 transitivePeerDependencies: - supports-color dev: true - /socks/2.7.1: - resolution: {integrity: sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==} + /socks/2.6.2: + resolution: {integrity: sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA==} engines: {node: '>= 10.13.0', npm: '>= 3.0.0'} dependencies: - ip: 2.0.0 + ip: 1.1.8 smart-buffer: 4.2.0 dev: true + /source-map-support/0.5.13: + resolution: {integrity: sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==} + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + dev: true + + /source-map-support/0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + dev: true + /source-map/0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} @@ -2805,7 +4642,7 @@ packages: resolution: {integrity: sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==} dependencies: spdx-expression-parse: 3.0.1 - spdx-license-ids: 3.0.12 + spdx-license-ids: 3.0.11 dev: true /spdx-exceptions/2.3.0: @@ -2816,11 +4653,11 @@ packages: resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} dependencies: spdx-exceptions: 2.3.0 - spdx-license-ids: 3.0.12 + spdx-license-ids: 3.0.11 dev: true - /spdx-license-ids/3.0.12: - resolution: {integrity: sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==} + /spdx-license-ids/3.0.11: + resolution: {integrity: sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==} dev: true /speedometer/1.0.0: @@ -2843,12 +4680,27 @@ packages: deprecated: 'Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility' dev: true + /stack-utils/2.0.6: + resolution: {integrity: sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==} + engines: {node: '>=10'} + dependencies: + escape-string-regexp: 2.0.0 + dev: true + /stream-transform/2.1.3: resolution: {integrity: sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ==} dependencies: mixme: 0.5.4 dev: true + /string-length/4.0.2: + resolution: {integrity: sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==} + engines: {node: '>=10'} + dependencies: + char-regex: 1.0.2 + strip-ansi: 6.0.1 + dev: true + /string-width/4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -2863,7 +4715,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.4 + es-abstract: 1.20.1 dev: true /string.prototype.trimstart/1.0.5: @@ -2871,7 +4723,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.4 + es-abstract: 1.20.1 dev: true /string_decoder/1.1.1: @@ -2899,6 +4751,11 @@ packages: engines: {node: '>=4'} dev: true + /strip-bom/4.0.0: + resolution: {integrity: sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==} + engines: {node: '>=8'} + dev: true + /strip-eof/1.0.0: resolution: {integrity: sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==} engines: {node: '>=0.10.0'} @@ -2924,6 +4781,11 @@ packages: min-indent: 1.0.1 dev: true + /strip-json-comments/3.1.1: + resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + engines: {node: '>=8'} + dev: true + /supports-color/5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -2938,6 +4800,13 @@ packages: has-flag: 4.0.0 dev: true + /supports-color/8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + dependencies: + has-flag: 4.0.0 + dev: true + /supports-preserve-symlinks-flag/1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} @@ -3047,7 +4916,7 @@ packages: '@types/globby': 6.1.0 '@types/ini': 1.3.31 '@types/jest': 21.1.10 - '@types/lodash': 4.14.186 + '@types/lodash': 4.14.182 '@types/node': 8.10.66 aggregate-error: 1.0.0 bplist-parser: 0.1.1 @@ -3070,6 +4939,15 @@ packages: resolution: {integrity: sha512-auu1piVOZjAQUb7aYmnk2uw/hUd9+WtWp1+3kGftWcnjVMZPAB88nhZo1tlIaxncBqblVUPFZwITdKOHY2eBmQ==} dev: true + /test-exclude/6.0.0: + resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} + engines: {node: '>=8'} + dependencies: + '@istanbuljs/schema': 0.1.3 + glob: 7.2.3 + minimatch: 3.1.2 + dev: true + /thenify-all/1.6.0: resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} engines: {node: '>=0.8'} @@ -3097,6 +4975,15 @@ packages: os-tmpdir: 1.0.2 dev: true + /tmpl/1.0.5: + resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} + dev: true + + /to-fast-properties/2.0.0: + resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} + engines: {node: '>=4'} + dev: true + /to-regex-range/5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -3122,10 +5009,19 @@ packages: engines: {node: '>=8'} dev: true + /ts-dedent/2.2.0: + resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} + engines: {node: '>=6.10'} + dev: true + /tslib/1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} dev: true + /tslib/2.4.1: + resolution: {integrity: sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==} + dev: true + /tty-table/4.1.6: resolution: {integrity: sha512-kRj5CBzOrakV4VRRY5kUWbNYvo/FpOsz65DzI5op9P+cHov3+IqPbo1JE1ZnQGkHdZgNFDsrEjrfqqy/Ply9fw==} engines: {node: '>=8.0.0'} @@ -3137,7 +5033,12 @@ packages: smartwrap: 2.0.2 strip-ansi: 6.0.1 wcwidth: 1.0.1 - yargs: 17.6.0 + yargs: 17.5.1 + dev: true + + /type-detect/4.0.8: + resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} + engines: {node: '>=4'} dev: true /type-fest/0.13.1: @@ -3145,6 +5046,11 @@ packages: engines: {node: '>=10'} dev: true + /type-fest/0.21.3: + resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} + engines: {node: '>=10'} + dev: true + /type-fest/0.6.0: resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} engines: {node: '>=8'} @@ -3155,6 +5061,12 @@ packages: engines: {node: '>=8'} dev: true + /typescript/4.8.4: + resolution: {integrity: sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: true + /unbox-primitive/1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} dependencies: @@ -3192,6 +5104,17 @@ packages: resolution: {integrity: sha512-vRCqFv6UhXpWxZPyGDh/F3ZpNv8/qo7w6iufLpQg9aKnQ71qM4B5KiI7Mia9COcjEhrO9LueHpMYjYzsWH3OIg==} dev: true + /update-browserslist-db/1.0.10_browserslist@4.21.4: + resolution: {integrity: sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + dependencies: + browserslist: 4.21.4 + escalade: 3.1.1 + picocolors: 1.0.0 + dev: true + /util-deprecate/1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} dev: true @@ -3200,7 +5123,7 @@ packages: resolution: {integrity: sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA==} dependencies: define-properties: 1.1.4 - es-abstract: 1.20.4 + es-abstract: 1.20.1 has-symbols: 1.0.3 object.getownpropertydescriptors: 2.1.4 dev: true @@ -3211,6 +5134,15 @@ packages: hasBin: true dev: true + /v8-to-istanbul/9.0.1: + resolution: {integrity: sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==} + engines: {node: '>=10.12.0'} + dependencies: + '@jridgewell/trace-mapping': 0.3.17 + '@types/istanbul-lib-coverage': 2.0.4 + convert-source-map: 1.9.0 + dev: true + /validate-npm-package-license/3.0.4: resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} dependencies: @@ -3218,10 +5150,16 @@ packages: spdx-expression-parse: 3.0.1 dev: true + /walker/1.0.8: + resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} + dependencies: + makeerror: 1.0.12 + dev: true + /wcwidth/1.0.1: resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} dependencies: - defaults: 1.0.4 + defaults: 1.0.3 dev: true /webidl-conversions/3.0.1: @@ -3294,6 +5232,14 @@ packages: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} dev: true + /write-file-atomic/4.0.2: + resolution: {integrity: sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + dependencies: + imurmurhash: 0.1.4 + signal-exit: 3.0.7 + dev: true + /xmlbuilder/8.2.2: resolution: {integrity: sha512-eKRAFz04jghooy8muekqzo8uCSVNeyRedbuJrp0fovbLIi7wlsYtdUn3vBAAPq2Y3/0xMz2WMEUQ8yhVVO9Stw==} engines: {node: '>=4.0'} @@ -3340,8 +5286,8 @@ packages: engines: {node: '>=10'} dev: true - /yargs-parser/21.1.1: - resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + /yargs-parser/21.0.1: + resolution: {integrity: sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==} engines: {node: '>=12'} dev: true @@ -3375,17 +5321,17 @@ packages: yargs-parser: 20.2.9 dev: true - /yargs/17.6.0: - resolution: {integrity: sha512-8H/wTDqlSwoSnScvV2N/JHfLWOKuh5MVla9hqLjK3nsfyy6Y4kDSYSvkU5YCUEPOSnRXfIyx3Sq+B/IWudTo4g==} + /yargs/17.5.1: + resolution: {integrity: sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==} engines: {node: '>=12'} dependencies: - cliui: 8.0.1 + cliui: 7.0.4 escalade: 3.1.1 get-caller-file: 2.0.5 require-directory: 2.1.1 string-width: 4.2.3 y18n: 5.0.8 - yargs-parser: 21.1.1 + yargs-parser: 21.0.1 dev: true /yocto-queue/0.1.0: diff --git a/src/archive/zip.rs b/src/archive/zip.rs index c6fb142..f9bb01e 100644 --- a/src/archive/zip.rs +++ b/src/archive/zip.rs @@ -58,7 +58,7 @@ impl Extract for Zip { ); if let Some(p) = outpath.parent() { if !p.exists() { - fs::create_dir_all(&p)?; + fs::create_dir_all(p)?; } } let mut outfile = fs::File::create(&outpath)?; diff --git a/src/commands/env.rs b/src/commands/env.rs index 623a3e3..dc3b47f 100644 --- a/src/commands/env.rs +++ b/src/commands/env.rs @@ -61,7 +61,7 @@ impl Command for Env { let shell: Box = self .shell - .or_else(&infer_shell) + .or_else(infer_shell) .ok_or(Error::CantInferShell)?; let multishell_path = make_symlink(config)?; let binary_path = if cfg!(windows) { diff --git a/src/commands/exec.rs b/src/commands/exec.rs index c7176c7..d23b1f0 100644 --- a/src/commands/exec.rs +++ b/src/commands/exec.rs @@ -69,7 +69,7 @@ impl Cmd for Exec { .map_err(|source| Error::CantAddPathToEnvironment { source })? }; - let exit_status = Command::new(&binary) + let exit_status = Command::new(binary) .args(arguments) .stdin(Stdio::inherit()) .stdout(Stdio::inherit()) diff --git a/src/commands/ls_local.rs b/src/commands/ls_local.rs index e0f003c..438a6cc 100644 --- a/src/commands/ls_local.rs +++ b/src/commands/ls_local.rs @@ -24,7 +24,7 @@ impl super::command::Command for LsLocal { for version in versions { let version_aliases = match aliases_hash.get(&version.v_str()) { - None => "".into(), + None => String::new(), Some(versions) => { let version_string = versions .iter() diff --git a/src/commands/unalias.rs b/src/commands/unalias.rs index 6cab4af..40fed89 100644 --- a/src/commands/unalias.rs +++ b/src/commands/unalias.rs @@ -24,7 +24,7 @@ impl Command for Unalias { requested_alias: self.requested_alias, })?; - remove_symlink_dir(&requested_version.path()) + remove_symlink_dir(requested_version.path()) .map_err(|source| Error::CantDeleteSymlink { source })?; Ok(()) diff --git a/src/commands/use.rs b/src/commands/use.rs index 28a353b..70375dd 100644 --- a/src/commands/use.rs +++ b/src/commands/use.rs @@ -150,8 +150,8 @@ fn install_new_version( /// /// This way, we can create a symlink if it is missing. fn replace_symlink(from: &std::path::Path, to: &std::path::Path) -> std::io::Result<()> { - let symlink_deletion_result = fs::remove_symlink_dir(&to); - match fs::symlink_dir(&from, &to) { + let symlink_deletion_result = fs::remove_symlink_dir(to); + match fs::symlink_dir(from, to) { ok @ Ok(_) => ok, err @ Err(_) => symlink_deletion_result.and(err), } diff --git a/tests/e2e.rs b/tests/e2e.rs deleted file mode 100644 index e36dc9f..0000000 --- a/tests/e2e.rs +++ /dev/null @@ -1,4 +0,0 @@ -#[macro_use] -mod shellcode; - -mod feature_tests; diff --git a/tests/feature_tests/aliases.rs b/tests/feature_tests/aliases.rs deleted file mode 100644 index 355832d..0000000 --- a/tests/feature_tests/aliases.rs +++ /dev/null @@ -1,28 +0,0 @@ -use crate::shellcode::*; - -fn installed_versions() -> Call { - Call::new("fnm", vec!["ls"]) -} - -test_shell!(Bash, Zsh, Fish, PowerShell; { - EvalFnmEnv::default() - .then(Call::new("fnm", vec!["install", "6.11.3"])) - .then(Call::new("fnm", vec!["install", "8.11.3"])) - .then(Call::new("fnm", vec!["alias", "8.11", "oldie"])) - .then(Call::new("fnm", vec!["alias", "6", "older"])) - .then(Call::new("fnm", vec!["default", "older"])) - .then(OutputContains::new( - OutputContains::new(installed_versions(), "8.11.3"), - "oldie", - )) - .then(OutputContains::new( - OutputContains::new(OutputContains::new(installed_versions(), "6.11.3"), "older"), - "default", - )) - .then(Call::new("fnm", vec!["use", "older"])) - .then(test_node_version("v6.11.3")) - .then(Call::new("fnm", vec!["use", "oldie"])) - .then(test_node_version("v8.11.3")) - .then(Call::new("fnm", vec!["use", "default"])) - .then(test_node_version("v6.11.3")) -}); diff --git a/tests/feature_tests/current.rs b/tests/feature_tests/current.rs deleted file mode 100644 index 88085ad..0000000 --- a/tests/feature_tests/current.rs +++ /dev/null @@ -1,28 +0,0 @@ -test_shell!(Bash, Zsh, Fish, PowerShell, WinCmd; { - EvalFnmEnv::default() - .then(ExpectCommandOutput::new( - Call::new("fnm", vec!["current"]), - "none", - "currently activated version", - )) - .then(Call::new("fnm", vec!["install", "v8.11.3"])) - .then(Call::new("fnm", vec!["install", "v10.10.0"])) - .then(Call::new("fnm", vec!["use", "v8.11.3"])) - .then(ExpectCommandOutput::new( - Call::new("fnm", vec!["current"]), - "v8.11.3", - "currently activated version", - )) - .then(Call::new("fnm", vec!["use", "v10.10.0"])) - .then(ExpectCommandOutput::new( - Call::new("fnm", vec!["current"]), - "v10.10.0", - "currently activated version", - )) - .then(Call::new("fnm", vec!["use", "system"])) - .then(ExpectCommandOutput::new( - Call::new("fnm", vec!["current"]), - "system", - "currently activated version", - )) -}); diff --git a/tests/feature_tests/mod.rs b/tests/feature_tests/mod.rs deleted file mode 100644 index f9a2796..0000000 --- a/tests/feature_tests/mod.rs +++ /dev/null @@ -1,254 +0,0 @@ -mod aliases; -mod current; -mod uninstall; - -use crate::shellcode::*; - -mod basic { - test_shell!(Zsh, Bash, Fish, PowerShell, WinCmd; { - EvalFnmEnv::default() - .then(Call::new("fnm", vec!["install", "v8.11.3"])) - .then(Call::new("fnm", vec!["use", "v8.11.3"])) - .then(test_node_version("v8.11.3")) - }); -} - -mod nvmrc { - test_shell!(Zsh, Bash, Fish, PowerShell, WinCmd; { - EvalFnmEnv::default() - .then(WriteFile::new(".nvmrc", "v8.11.3")) - .then(Call::new("fnm", vec!["install"])) - .then(Call::new("fnm", vec!["use"])) - .then(test_node_version("v8.11.3")) - }); -} - -mod multishell { - test_shell!(Zsh, Bash, Fish, PowerShell; { - EvalFnmEnv::default() - .then(Call::new("fnm", vec!["install", "v8.11.3"])) - .then(Call::new("fnm", vec!["install", "v11.9.0"])) - .then(Call::new("fnm", vec!["use", "v8.11.3"])) - .then(SubShell::new( - DieOnErrors - .then(EvalFnmEnv::default()) - .then(Call::new("fnm", vec!["use", "11"])) - .then(test_node_version("v11.9.0")), - )) - .then(test_node_version("v8.11.3")) - }); -} - -mod use_on_cd_nvmrc { - test_shell!(Zsh, Bash, Fish, PowerShell; { - EvalFnmEnv::default() - .use_on_cd(true) - .then(Call::new("mkdir", vec!["inner_path"])) - .then(WriteFile::new("inner_path/.nvmrc", "v8.11.3")) - .then(Call::new("fnm", vec!["install", "v8.11.3"])) - .then(Call::new("cd", vec!["inner_path"])) - .then(test_node_version("v8.11.3")) - }); -} - -mod use_on_cd_dot_node_version { - test_shell!(Zsh, Bash, Fish, PowerShell; { - EvalFnmEnv::default() - .use_on_cd(true) - .then(Call::new("mkdir", vec!["inner_path"])) - .then(WriteFile::new("inner_path/.node-version", "v8.11.3")) - .then(Call::new("fnm", vec!["install", "v8.11.3"])) - .then(Call::new("cd", vec!["inner_path"])) - .then(test_node_version("v8.11.3")) - }); -} - -// mod node_dist_mirror { -// test_shell!(Zsh, Bash, Fish, PowerShell, { -// EvalFnmEnv::default() -// .node_dist_mirror(Some("https://npm.taobao.org/mirrors/node")) -// .then(Call::new("fnm", vec!["install", "v8.11.3"])) -// .then(Call::new("fnm", vec!["use", "v8.11.3"])) -// .then(test_node_version("v8.11.3")) -// }); -// } - -mod exec { - test_shell!(Zsh, Bash, Fish, PowerShell, WinCmd; { - EvalFnmEnv::default() - .then(WriteFile::new(".nvmrc", "v8.10.0")) - .then(Call::new("fnm", vec!["install"])) - .then(Call::new("fnm", vec!["install", "v6.10.0"])) - .then(Call::new("fnm", vec!["install", "v10.10.0"])) - .then(ExpectCommandOutput::new( - Call::new("fnm", vec!["exec", "--", "node", "-v"]), - "v8.10.0", - "version file exec", - )) - .then(ExpectCommandOutput::new( - Call::new("fnm", vec!["exec", "--using=6", "--", "node", "-v"]), - "v6.10.0", - "exec:6 node -v", - )) - .then(ExpectCommandOutput::new( - Call::new("fnm", vec!["exec", "--using=10", "--", "node", "-v"]), - "v10.10.0", - "exec:6 node -v", - )) - }); -} - -mod existing_installation { - test_shell!(Bash, Zsh, Fish, PowerShell; { - EvalFnmEnv::default() - .then(Call::new("fnm", vec!["install", "v8.11.3"])) - .then(OutputContains::new( - IgnoreErrors::new(GetStderr::new(Call::new("fnm", vec!["install", "v8.11.3"]))), - "already installed", - )) - }); -} - -mod system_node { - test_shell!(Bash, Zsh, Fish, PowerShell; |path: &std::path::Path| { - use std::io::Write; - let custom_node_dir = path.join("bin"); - std::fs::create_dir(&custom_node_dir).unwrap(); - std::fs::write(custom_node_dir.join("node.cmd"), b"echo custom node").unwrap(); - let mut f = std::fs::File::create(custom_node_dir.join("node")).unwrap(); - #[cfg(unix)] - { - use std::os::unix::fs::PermissionsExt; - let mut permissions = f.metadata().unwrap().permissions(); - permissions.set_mode(0o766); - f.set_permissions(permissions).expect("Can't set file permissions"); - } - writeln!(f, "#!/bin/sh").expect("Can't write file"); - writeln!(f, r#"echo "custom node""#).expect("Can't write file"); - - EvalFnmEnv::default() - .then(Call::new("fnm", vec!["install", "10"])) - .then(Call::new("fnm", vec!["use", "10"])) - .then(Call::new("fnm", vec!["use", "system"])) - .then(test_node_version("custom node")) - }); -} - -mod use_nvmrc_lts { - test_shell!(Bash, Zsh, Fish, PowerShell; { - EvalFnmEnv::default() - .then(WriteFile::new(".nvmrc", "lts/dubnium")) - .then(Call::new("fnm", vec!["install"])) - .then(Call::new("fnm", vec!["use"])) - .then(OutputContains::new(Call::new("fnm", vec!["ls"]), "lts-dubnium")) - }); -} - -mod partial_semver { - test_shell!(Bash, Zsh, Fish, PowerShell, WinCmd; { - EvalFnmEnv::default() - .then(Call::new("fnm", vec!["install", "6"])) // unsupported version, no new versions should be issued - .then(Call::new("fnm", vec!["use", "6"])) - .then(test_node_version("v6.17.1")) - }); -} - -mod log_level_quiet { - test_shell!(Bash, Zsh, Fish, PowerShell; { - EvalFnmEnv::default() - .log_level(Some("quiet")) - .then(ExpectCommandOutput::new(Call::new("fnm", vec!["install", "v8.11.3"]), "", "fnm install")) - .then(ExpectCommandOutput::new(Call::new("fnm", vec!["use", "v8.11.3"]), "", "fnm use")) - .then(ExpectCommandOutput::new(Call::new("fnm", vec!["alias", "v8.11.3", "something"]), "", "fnm alias")) - }); -} - -mod log_level_error { - test_shell!(Bash, Zsh, Fish, PowerShell; { - EvalFnmEnv::default() - .log_level(Some("error")) - .then(ExpectCommandOutput::new(Call::new("fnm", vec!["install", "v8.11.3"]).then(Call::new("echo", vec!["empty"])), "empty", "fnm install")) - .then(ExpectCommandOutput::new(Call::new("fnm", vec!["use", "v8.11.3"]).then(Call::new("echo", vec!["empty"])), "empty", "fnm use")) - .then(ExpectCommandOutput::new(Call::new("fnm", vec!["alias", "v8.11.3", "something"]).then(Call::new("echo", vec!["empty"])), "empty", "fnm alias")) - .then(OutputContains::new(IgnoreErrors::new(GetStderr::new(Call::new("fnm", vec!["alias", "abcd", "efg"]))), "Can't find requested version")) - }); -} - -mod list_local_with_nothing_installed { - test_shell!(Bash, Zsh, Fish, PowerShell, WinCmd; { - EvalFnmEnv::default() - .then(Call::new("fnm", vec!["ls"])) - }); -} - -mod latest_lts { - test_shell!(Bash, Zsh, Fish, PowerShell; { - EvalFnmEnv::default() - .then(Call::new("fnm", vec!["install", "--lts"])) - .then(OutputContains::new(Call::new("fnm", vec!["ls"]), "lts-latest")) - .then(Call::new("fnm", vec!["use", "'lts/*'"])) - }); -} - -mod matching_dotfiles { - test_shell!(Bash, Zsh, Fish, PowerShell, WinCmd; { - EvalFnmEnv::default() - .then(WriteFile::new(".nvmrc", "11.10.0")) - .then(WriteFile::new(".node-version", "11.10.0")) - .then(Call::new("fnm", vec!["install"])) - .then(Call::new("fnm", vec!["use"])) - .then(test_node_version("v11.10.0")) - }); -} - -mod use_alias_install_if_missing { - test_shell!(Bash, Zsh, Fish, PowerShell; { - EvalFnmEnv::default() - .then(WriteFile::new(".node-version", "lts/*")) - .then(Call::new("fnm", vec!["use", "--install-if-missing"])) - .then(OutputContains::new(Call::new("fnm", vec!["ls"]), "lts-latest")) - }); -} - -mod use_alias_not_installed { - test_shell!(Bash, Zsh, Fish, PowerShell; { - EvalFnmEnv::default() - .log_level(Some("error")) - .then(WriteFile::new(".node-version", "lts/*")) - .then(OutputContains::new(IgnoreErrors::new(GetStderr::new(Call::new("fnm", vec!["use"]))),"Requested version lts-latest is not currently installed")) - }); -} - -mod unalias { - test_shell!(Bash, Zsh, Fish, PowerShell; { - EvalFnmEnv::default() - .then(Call::new("fnm", vec!["install", "11.10.0"])) - .then(Call::new("fnm", vec!["install", "8.11.3"])) - .then(Call::new("fnm", vec!["alias", "8.11.3", "version8"])) - .then(OutputContains::new(Call::new("fnm", vec!["ls"]), "version8")) - .then(Call::new("fnm", vec!["unalias", "version8"])) - .then(OutputContains::new(IgnoreErrors::new(GetStderr::new(Call::new("fnm", vec!["use", "version8"]))), "Requested version version8 is not currently installed")) - }); -} - -mod unalias_error { - test_shell!(Bash, Zsh, Fish, PowerShell; { - EvalFnmEnv::default() - .log_level(Some("error")) - .then(OutputContains::new(IgnoreErrors::new(GetStderr::new(Call::new("fnm", vec!["unalias", "lts"]))), "Requested alias lts not found")) - }); -} - -mod alias_system { - test_shell!(Bash, Zsh, Fish, PowerShell; { - EvalFnmEnv::default() - .then(Call::new("fnm", vec!["alias", "system", "my_system"])) - .then(OutputContains::new(Call::new("fnm", vec!["ls"]), "my_system")) - .then(Call::new("fnm", vec!["alias", "system", "default"])) - .then(Call::new("fnm", vec!["alias", "my_system", "my_system2"])) - .then(OutputContains::new(Call::new("fnm", vec!["ls"]), "my_system2")) - .then(OutputContains::new(Call::new("fnm", vec!["use", "my_system"]), "Bypassing fnm")) - .then(Call::new("fnm", vec!["unalias", "my_system"])) - .then(OutputContains::new(IgnoreErrors::new(GetStderr::new(Call::new("fnm", vec!["use", "my_system"]))), "Requested version my_system is not currently installed")) - }); -} diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__alias_system__Bash.snap b/tests/feature_tests/snapshots/e2e__feature_tests__alias_system__Bash.snap deleted file mode 100644 index ccb9d3b..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__alias_system__Bash.snap +++ /dev/null @@ -1,17 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" - ---- -set -e -shopt -s expand_aliases - -eval "$(fnm env)" -fnm alias system my_system -fnm ls | grep my_system -fnm alias system default -fnm alias my_system my_system2 -fnm ls | grep my_system2 -fnm use my_system | grep 'Bypassing fnm' -fnm unalias my_system -fnm use my_system 2>&1 | grep 'Requested version my_system is not currently installed' diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__alias_system__Fish.snap b/tests/feature_tests/snapshots/e2e__feature_tests__alias_system__Fish.snap deleted file mode 100644 index fe299c8..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__alias_system__Fish.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" - ---- -fnm env | source -fnm alias system my_system -fnm ls | grep my_system -fnm alias system default -fnm alias my_system my_system2 -fnm ls | grep my_system2 -fnm use my_system | grep 'Bypassing fnm' -fnm unalias my_system -fnm use my_system 2>&1 | grep 'Requested version my_system is not currently installed' diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__alias_system__PowerShell.snap b/tests/feature_tests/snapshots/e2e__feature_tests__alias_system__PowerShell.snap deleted file mode 100644 index 758c7cb..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__alias_system__PowerShell.snap +++ /dev/null @@ -1,15 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" - ---- -$ErrorActionPreference = "Stop" -fnm env | Out-String | Invoke-Expression -fnm alias system my_system -$($__out__ = $(fnm ls | Select-String 'my_system'); echo $__out__; if ($__out__ -eq $null){ exit 1 } else { $__out__ }) -fnm alias system default -fnm alias my_system my_system2 -$($__out__ = $(fnm ls | Select-String 'my_system2'); echo $__out__; if ($__out__ -eq $null){ exit 1 } else { $__out__ }) -$($__out__ = $(fnm use my_system | Select-String 'Bypassing fnm'); echo $__out__; if ($__out__ -eq $null){ exit 1 } else { $__out__ }) -fnm unalias my_system -$($__out__ = $($($_tmp_err_action = $ErrorActionPreference;$ErrorActionPreference = "Continue";fnm use my_system 2>&1;$ErrorActionPreference = $_tmp_err_action) | Select-String 'Requested version my_system is not currently installed'); echo $__out__; if ($__out__ -eq $null){ exit 1 } else { $__out__ }) diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__alias_system__Zsh.snap b/tests/feature_tests/snapshots/e2e__feature_tests__alias_system__Zsh.snap deleted file mode 100644 index 2eeccfb..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__alias_system__Zsh.snap +++ /dev/null @@ -1,15 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" - ---- -set -e -eval "$(fnm env)" -fnm alias system my_system -fnm ls | grep my_system -fnm alias system default -fnm alias my_system my_system2 -fnm ls | grep my_system2 -fnm use my_system | grep 'Bypassing fnm' -fnm unalias my_system -fnm use my_system 2>&1 | grep 'Requested version my_system is not currently installed' diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__aliases__Bash.snap b/tests/feature_tests/snapshots/e2e__feature_tests__aliases__Bash.snap deleted file mode 100644 index 29849d4..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__aliases__Bash.snap +++ /dev/null @@ -1,32 +0,0 @@ ---- -source: tests/feature_tests/aliases.rs -expression: "&source.trim()" ---- -set -e -shopt -s expand_aliases - -eval "$(fnm env)" -fnm install 6.11.3 -fnm install 8.11.3 -fnm alias 8.11 oldie -fnm alias 6 older -fnm default older -fnm ls | grep 8.11.3 | grep oldie -fnm ls | grep 6.11.3 | grep older | grep default -fnm use older -if [ "$(node -v)" != "v6.11.3" ]; then - echo 'Expected Node version to be "v6.11.3", Got: '"$(node -v)" - exit 1 -fi - -fnm use oldie -if [ "$(node -v)" != "v8.11.3" ]; then - echo 'Expected Node version to be "v8.11.3", Got: '"$(node -v)" - exit 1 -fi - -fnm use default -if [ "$(node -v)" != "v6.11.3" ]; then - echo 'Expected Node version to be "v6.11.3", Got: '"$(node -v)" - exit 1 -fi diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__aliases__Fish.snap b/tests/feature_tests/snapshots/e2e__feature_tests__aliases__Fish.snap deleted file mode 100644 index 20d99a8..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__aliases__Fish.snap +++ /dev/null @@ -1,29 +0,0 @@ ---- -source: tests/feature_tests/aliases.rs -expression: "&source.trim()" ---- -fnm env | source -fnm install 6.11.3 -fnm install 8.11.3 -fnm alias 8.11 oldie -fnm alias 6 older -fnm default older -fnm ls | grep 8.11.3 | grep oldie -fnm ls | grep 6.11.3 | grep older | grep default -fnm use older -if test (node -v) != "v6.11.3" - echo 'Expected Node version to be "v6.11.3", Got: '(node -v) - exit 1 -end - -fnm use oldie -if test (node -v) != "v8.11.3" - echo 'Expected Node version to be "v8.11.3", Got: '(node -v) - exit 1 -end - -fnm use default -if test (node -v) != "v6.11.3" - echo 'Expected Node version to be "v6.11.3", Got: '(node -v) - exit 1 -end diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__aliases__PowerShell.snap b/tests/feature_tests/snapshots/e2e__feature_tests__aliases__PowerShell.snap deleted file mode 100644 index bedf44c..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__aliases__PowerShell.snap +++ /dev/null @@ -1,30 +0,0 @@ ---- -source: tests/feature_tests/aliases.rs -expression: "&source.trim()" ---- -$ErrorActionPreference = "Stop" -fnm env | Out-String | Invoke-Expression -fnm install 6.11.3 -fnm install 8.11.3 -fnm alias 8.11 oldie -fnm alias 6 older -fnm default older -$($__out__ = $($($__out__ = $(fnm ls | Select-String '8.11.3'); echo $__out__; if ($__out__ -eq $null){ exit 1 } else { $__out__ }) | Select-String 'oldie'); echo $__out__; if ($__out__ -eq $null){ exit 1 } else { $__out__ }) -$($__out__ = $($($__out__ = $($($__out__ = $(fnm ls | Select-String '6.11.3'); echo $__out__; if ($__out__ -eq $null){ exit 1 } else { $__out__ }) | Select-String 'older'); echo $__out__; if ($__out__ -eq $null){ exit 1 } else { $__out__ }) | Select-String 'default'); echo $__out__; if ($__out__ -eq $null){ exit 1 } else { $__out__ }) -fnm use older -If ("$(node -v)" -ne "v6.11.3") { - Write-Output ('Expected Node version to be "v6.11.3", Got: ' + $(node -v)) - exit 1 -} - -fnm use oldie -If ("$(node -v)" -ne "v8.11.3") { - Write-Output ('Expected Node version to be "v8.11.3", Got: ' + $(node -v)) - exit 1 -} - -fnm use default -If ("$(node -v)" -ne "v6.11.3") { - Write-Output ('Expected Node version to be "v6.11.3", Got: ' + $(node -v)) - exit 1 -} diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__aliases__Zsh.snap b/tests/feature_tests/snapshots/e2e__feature_tests__aliases__Zsh.snap deleted file mode 100644 index 41236c6..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__aliases__Zsh.snap +++ /dev/null @@ -1,30 +0,0 @@ ---- -source: tests/feature_tests/aliases.rs -expression: "&source.trim()" ---- -set -e -eval "$(fnm env)" -fnm install 6.11.3 -fnm install 8.11.3 -fnm alias 8.11 oldie -fnm alias 6 older -fnm default older -fnm ls | grep 8.11.3 | grep oldie -fnm ls | grep 6.11.3 | grep older | grep default -fnm use older -if [ "$(node -v)" != "v6.11.3" ]; then - echo 'Expected Node version to be "v6.11.3", Got: '"$(node -v)" - exit 1 -fi - -fnm use oldie -if [ "$(node -v)" != "v8.11.3" ]; then - echo 'Expected Node version to be "v8.11.3", Got: '"$(node -v)" - exit 1 -fi - -fnm use default -if [ "$(node -v)" != "v6.11.3" ]; then - echo 'Expected Node version to be "v6.11.3", Got: '"$(node -v)" - exit 1 -fi diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__basic__Bash.snap b/tests/feature_tests/snapshots/e2e__feature_tests__basic__Bash.snap deleted file mode 100644 index d2b5b87..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__basic__Bash.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -shopt -s expand_aliases - -eval "$(fnm env)" -fnm install v8.11.3 -fnm use v8.11.3 -if [ "$(node -v)" != "v8.11.3" ]; then - echo 'Expected Node version to be "v8.11.3", Got: '"$(node -v)" - exit 1 -fi diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__basic__Fish.snap b/tests/feature_tests/snapshots/e2e__feature_tests__basic__Fish.snap deleted file mode 100644 index c8543d0..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__basic__Fish.snap +++ /dev/null @@ -1,11 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -fnm env | source -fnm install v8.11.3 -fnm use v8.11.3 -if test (node -v) != "v8.11.3" - echo 'Expected Node version to be "v8.11.3", Got: '(node -v) - exit 1 -end diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__basic__PowerShell.snap b/tests/feature_tests/snapshots/e2e__feature_tests__basic__PowerShell.snap deleted file mode 100644 index 4624f7d..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__basic__PowerShell.snap +++ /dev/null @@ -1,12 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -$ErrorActionPreference = "Stop" -fnm env | Out-String | Invoke-Expression -fnm install v8.11.3 -fnm use v8.11.3 -If ("$(node -v)" -ne "v8.11.3") { - Write-Output ('Expected Node version to be "v8.11.3", Got: ' + $(node -v)) - exit 1 -} diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__basic__WinCmd.snap b/tests/feature_tests/snapshots/e2e__feature_tests__basic__WinCmd.snap deleted file mode 100644 index 6fa2aeb..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__basic__WinCmd.snap +++ /dev/null @@ -1,12 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -FOR /f "tokens=*" %i IN ('fnm env') DO CALL %i -fnm install v8.11.3 -fnm use v8.11.3 -node -v | findstr v8.11.3 -if %errorlevel% neq 0 ( - echo Node version does not match "v8.11.3" - exit 1 -) diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__basic__Zsh.snap b/tests/feature_tests/snapshots/e2e__feature_tests__basic__Zsh.snap deleted file mode 100644 index 50a4478..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__basic__Zsh.snap +++ /dev/null @@ -1,12 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -eval "$(fnm env)" -fnm install v8.11.3 -fnm use v8.11.3 -if [ "$(node -v)" != "v8.11.3" ]; then - echo 'Expected Node version to be "v8.11.3", Got: '"$(node -v)" - exit 1 -fi diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__current__Bash.snap b/tests/feature_tests/snapshots/e2e__feature_tests__current__Bash.snap deleted file mode 100644 index caa1076..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__current__Bash.snap +++ /dev/null @@ -1,32 +0,0 @@ ---- -source: tests/feature_tests/current.rs -expression: "&source.trim()" ---- -set -e -shopt -s expand_aliases - -eval "$(fnm env)" -if [ "$(fnm current)" != "none" ]; then - echo 'Expected currently activated version to be "none", Got: '"$(fnm current)" - exit 1 -fi - -fnm install v8.11.3 -fnm install v10.10.0 -fnm use v8.11.3 -if [ "$(fnm current)" != "v8.11.3" ]; then - echo 'Expected currently activated version to be "v8.11.3", Got: '"$(fnm current)" - exit 1 -fi - -fnm use v10.10.0 -if [ "$(fnm current)" != "v10.10.0" ]; then - echo 'Expected currently activated version to be "v10.10.0", Got: '"$(fnm current)" - exit 1 -fi - -fnm use system -if [ "$(fnm current)" != "system" ]; then - echo 'Expected currently activated version to be "system", Got: '"$(fnm current)" - exit 1 -fi diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__current__Fish.snap b/tests/feature_tests/snapshots/e2e__feature_tests__current__Fish.snap deleted file mode 100644 index 12e87bd..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__current__Fish.snap +++ /dev/null @@ -1,29 +0,0 @@ ---- -source: tests/feature_tests/current.rs -expression: "&source.trim()" ---- -fnm env | source -if test (fnm current) != "none" - echo 'Expected currently activated version to be "none", Got: '(fnm current) - exit 1 -end - -fnm install v8.11.3 -fnm install v10.10.0 -fnm use v8.11.3 -if test (fnm current) != "v8.11.3" - echo 'Expected currently activated version to be "v8.11.3", Got: '(fnm current) - exit 1 -end - -fnm use v10.10.0 -if test (fnm current) != "v10.10.0" - echo 'Expected currently activated version to be "v10.10.0", Got: '(fnm current) - exit 1 -end - -fnm use system -if test (fnm current) != "system" - echo 'Expected currently activated version to be "system", Got: '(fnm current) - exit 1 -end diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__current__PowerShell.snap b/tests/feature_tests/snapshots/e2e__feature_tests__current__PowerShell.snap deleted file mode 100644 index d0968e5..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__current__PowerShell.snap +++ /dev/null @@ -1,30 +0,0 @@ ---- -source: tests/feature_tests/current.rs -expression: "&source.trim()" ---- -$ErrorActionPreference = "Stop" -fnm env | Out-String | Invoke-Expression -If ("$(fnm current)" -ne "none") { - Write-Output ('Expected currently activated version to be "none", Got: ' + $(fnm current)) - exit 1 -} - -fnm install v8.11.3 -fnm install v10.10.0 -fnm use v8.11.3 -If ("$(fnm current)" -ne "v8.11.3") { - Write-Output ('Expected currently activated version to be "v8.11.3", Got: ' + $(fnm current)) - exit 1 -} - -fnm use v10.10.0 -If ("$(fnm current)" -ne "v10.10.0") { - Write-Output ('Expected currently activated version to be "v10.10.0", Got: ' + $(fnm current)) - exit 1 -} - -fnm use system -If ("$(fnm current)" -ne "system") { - Write-Output ('Expected currently activated version to be "system", Got: ' + $(fnm current)) - exit 1 -} diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__current__WinCmd.snap b/tests/feature_tests/snapshots/e2e__feature_tests__current__WinCmd.snap deleted file mode 100644 index b8f32df..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__current__WinCmd.snap +++ /dev/null @@ -1,33 +0,0 @@ ---- -source: tests/feature_tests/current.rs -expression: "&source.trim()" ---- -FOR /f "tokens=*" %i IN ('fnm env') DO CALL %i -fnm current | findstr none -if %errorlevel% neq 0 ( - echo currently activated version does not match "none" - exit 1 -) - -fnm install v8.11.3 -fnm install v10.10.0 -fnm use v8.11.3 -fnm current | findstr v8.11.3 -if %errorlevel% neq 0 ( - echo currently activated version does not match "v8.11.3" - exit 1 -) - -fnm use v10.10.0 -fnm current | findstr v10.10.0 -if %errorlevel% neq 0 ( - echo currently activated version does not match "v10.10.0" - exit 1 -) - -fnm use system -fnm current | findstr system -if %errorlevel% neq 0 ( - echo currently activated version does not match "system" - exit 1 -) diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__current__Zsh.snap b/tests/feature_tests/snapshots/e2e__feature_tests__current__Zsh.snap deleted file mode 100644 index b8771ce..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__current__Zsh.snap +++ /dev/null @@ -1,30 +0,0 @@ ---- -source: tests/feature_tests/current.rs -expression: "&source.trim()" ---- -set -e -eval "$(fnm env)" -if [ "$(fnm current)" != "none" ]; then - echo 'Expected currently activated version to be "none", Got: '"$(fnm current)" - exit 1 -fi - -fnm install v8.11.3 -fnm install v10.10.0 -fnm use v8.11.3 -if [ "$(fnm current)" != "v8.11.3" ]; then - echo 'Expected currently activated version to be "v8.11.3", Got: '"$(fnm current)" - exit 1 -fi - -fnm use v10.10.0 -if [ "$(fnm current)" != "v10.10.0" ]; then - echo 'Expected currently activated version to be "v10.10.0", Got: '"$(fnm current)" - exit 1 -fi - -fnm use system -if [ "$(fnm current)" != "system" ]; then - echo 'Expected currently activated version to be "system", Got: '"$(fnm current)" - exit 1 -fi diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__exec__Bash.snap b/tests/feature_tests/snapshots/e2e__feature_tests__exec__Bash.snap deleted file mode 100644 index a148908..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__exec__Bash.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -shopt -s expand_aliases - -eval "$(fnm env)" -echo v8.10.0 > .nvmrc -fnm install -fnm install v6.10.0 -fnm install v10.10.0 -if [ "$(fnm exec -- node -v)" != "v8.10.0" ]; then - echo 'Expected version file exec to be "v8.10.0", Got: '"$(fnm exec -- node -v)" - exit 1 -fi - -if [ "$(fnm exec --using=6 -- node -v)" != "v6.10.0" ]; then - echo 'Expected exec:6 node -v to be "v6.10.0", Got: '"$(fnm exec --using=6 -- node -v)" - exit 1 -fi - -if [ "$(fnm exec --using=10 -- node -v)" != "v10.10.0" ]; then - echo 'Expected exec:6 node -v to be "v10.10.0", Got: '"$(fnm exec --using=10 -- node -v)" - exit 1 -fi diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__exec__Fish.snap b/tests/feature_tests/snapshots/e2e__feature_tests__exec__Fish.snap deleted file mode 100644 index efb51fb..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__exec__Fish.snap +++ /dev/null @@ -1,23 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -fnm env | source -echo v8.10.0 > .nvmrc -fnm install -fnm install v6.10.0 -fnm install v10.10.0 -if test (fnm exec -- node -v) != "v8.10.0" - echo 'Expected version file exec to be "v8.10.0", Got: '(fnm exec -- node -v) - exit 1 -end - -if test (fnm exec --using=6 -- node -v) != "v6.10.0" - echo 'Expected exec:6 node -v to be "v6.10.0", Got: '(fnm exec --using=6 -- node -v) - exit 1 -end - -if test (fnm exec --using=10 -- node -v) != "v10.10.0" - echo 'Expected exec:6 node -v to be "v10.10.0", Got: '(fnm exec --using=10 -- node -v) - exit 1 -end diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__exec__PowerShell.snap b/tests/feature_tests/snapshots/e2e__feature_tests__exec__PowerShell.snap deleted file mode 100644 index 6c00309..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__exec__PowerShell.snap +++ /dev/null @@ -1,24 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -$ErrorActionPreference = "Stop" -fnm env | Out-String | Invoke-Expression -echo 'v8.10.0' > '.nvmrc' -fnm install -fnm install v6.10.0 -fnm install v10.10.0 -If ("$(fnm exec -- node -v)" -ne "v8.10.0") { - Write-Output ('Expected version file exec to be "v8.10.0", Got: ' + $(fnm exec -- node -v)) - exit 1 -} - -If ("$(fnm exec --using=6 -- node -v)" -ne "v6.10.0") { - Write-Output ('Expected exec:6 node -v to be "v6.10.0", Got: ' + $(fnm exec --using=6 -- node -v)) - exit 1 -} - -If ("$(fnm exec --using=10 -- node -v)" -ne "v10.10.0") { - Write-Output ('Expected exec:6 node -v to be "v10.10.0", Got: ' + $(fnm exec --using=10 -- node -v)) - exit 1 -} diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__exec__WinCmd.snap b/tests/feature_tests/snapshots/e2e__feature_tests__exec__WinCmd.snap deleted file mode 100644 index 26e2609..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__exec__WinCmd.snap +++ /dev/null @@ -1,26 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -FOR /f "tokens=*" %i IN ('fnm env') DO CALL %i -echo v8.10.0 > .nvmrc -fnm install -fnm install v6.10.0 -fnm install v10.10.0 -fnm exec -- node -v | findstr v8.10.0 -if %errorlevel% neq 0 ( - echo version file exec does not match "v8.10.0" - exit 1 -) - -fnm exec --using=6 -- node -v | findstr v6.10.0 -if %errorlevel% neq 0 ( - echo exec:6 node -v does not match "v6.10.0" - exit 1 -) - -fnm exec --using=10 -- node -v | findstr v10.10.0 -if %errorlevel% neq 0 ( - echo exec:6 node -v does not match "v10.10.0" - exit 1 -) diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__exec__Zsh.snap b/tests/feature_tests/snapshots/e2e__feature_tests__exec__Zsh.snap deleted file mode 100644 index 61e262d..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__exec__Zsh.snap +++ /dev/null @@ -1,24 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -eval "$(fnm env)" -echo v8.10.0 > .nvmrc -fnm install -fnm install v6.10.0 -fnm install v10.10.0 -if [ "$(fnm exec -- node -v)" != "v8.10.0" ]; then - echo 'Expected version file exec to be "v8.10.0", Got: '"$(fnm exec -- node -v)" - exit 1 -fi - -if [ "$(fnm exec --using=6 -- node -v)" != "v6.10.0" ]; then - echo 'Expected exec:6 node -v to be "v6.10.0", Got: '"$(fnm exec --using=6 -- node -v)" - exit 1 -fi - -if [ "$(fnm exec --using=10 -- node -v)" != "v10.10.0" ]; then - echo 'Expected exec:6 node -v to be "v10.10.0", Got: '"$(fnm exec --using=10 -- node -v)" - exit 1 -fi diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__existing_installation__Bash.snap b/tests/feature_tests/snapshots/e2e__feature_tests__existing_installation__Bash.snap deleted file mode 100644 index 5faef8d..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__existing_installation__Bash.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -shopt -s expand_aliases - -eval "$(fnm env)" -fnm install v8.11.3 -fnm install v8.11.3 2>&1 | grep 'already installed' diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__existing_installation__Fish.snap b/tests/feature_tests/snapshots/e2e__feature_tests__existing_installation__Fish.snap deleted file mode 100644 index 180b0be..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__existing_installation__Fish.snap +++ /dev/null @@ -1,7 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -fnm env | source -fnm install v8.11.3 -fnm install v8.11.3 2>&1 | grep 'already installed' diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__existing_installation__PowerShell.snap b/tests/feature_tests/snapshots/e2e__feature_tests__existing_installation__PowerShell.snap deleted file mode 100644 index 839a04c..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__existing_installation__PowerShell.snap +++ /dev/null @@ -1,8 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -$ErrorActionPreference = "Stop" -fnm env | Out-String | Invoke-Expression -fnm install v8.11.3 -$($__out__ = $($($_tmp_err_action = $ErrorActionPreference;$ErrorActionPreference = "Continue";fnm install v8.11.3 2>&1;$ErrorActionPreference = $_tmp_err_action) | Select-String 'already installed'); echo $__out__; if ($__out__ -eq $null){ exit 1 } else { $__out__ }) diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__existing_installation__Zsh.snap b/tests/feature_tests/snapshots/e2e__feature_tests__existing_installation__Zsh.snap deleted file mode 100644 index a39f741..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__existing_installation__Zsh.snap +++ /dev/null @@ -1,8 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -eval "$(fnm env)" -fnm install v8.11.3 -fnm install v8.11.3 2>&1 | grep 'already installed' diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__latest_lts__Bash.snap b/tests/feature_tests/snapshots/e2e__feature_tests__latest_lts__Bash.snap deleted file mode 100644 index 1fc4ced..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__latest_lts__Bash.snap +++ /dev/null @@ -1,11 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -shopt -s expand_aliases - -eval "$(fnm env)" -fnm install --lts -fnm ls | grep lts-latest -fnm use 'lts/*' diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__latest_lts__Fish.snap b/tests/feature_tests/snapshots/e2e__feature_tests__latest_lts__Fish.snap deleted file mode 100644 index b5e9318..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__latest_lts__Fish.snap +++ /dev/null @@ -1,8 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -fnm env | source -fnm install --lts -fnm ls | grep lts-latest -fnm use 'lts/*' diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__latest_lts__PowerShell.snap b/tests/feature_tests/snapshots/e2e__feature_tests__latest_lts__PowerShell.snap deleted file mode 100644 index a603c53..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__latest_lts__PowerShell.snap +++ /dev/null @@ -1,9 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -$ErrorActionPreference = "Stop" -fnm env | Out-String | Invoke-Expression -fnm install --lts -$($__out__ = $(fnm ls | Select-String 'lts-latest'); echo $__out__; if ($__out__ -eq $null){ exit 1 } else { $__out__ }) -fnm use 'lts/*' diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__latest_lts__Zsh.snap b/tests/feature_tests/snapshots/e2e__feature_tests__latest_lts__Zsh.snap deleted file mode 100644 index fca57fd..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__latest_lts__Zsh.snap +++ /dev/null @@ -1,9 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -eval "$(fnm env)" -fnm install --lts -fnm ls | grep lts-latest -fnm use 'lts/*' diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__list_local_with_nothing_installed__Bash.snap b/tests/feature_tests/snapshots/e2e__feature_tests__list_local_with_nothing_installed__Bash.snap deleted file mode 100644 index 4f04428..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__list_local_with_nothing_installed__Bash.snap +++ /dev/null @@ -1,9 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -shopt -s expand_aliases - -eval "$(fnm env)" -fnm ls diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__list_local_with_nothing_installed__Fish.snap b/tests/feature_tests/snapshots/e2e__feature_tests__list_local_with_nothing_installed__Fish.snap deleted file mode 100644 index f7cf730..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__list_local_with_nothing_installed__Fish.snap +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -fnm env | source -fnm ls diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__list_local_with_nothing_installed__PowerShell.snap b/tests/feature_tests/snapshots/e2e__feature_tests__list_local_with_nothing_installed__PowerShell.snap deleted file mode 100644 index baac870..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__list_local_with_nothing_installed__PowerShell.snap +++ /dev/null @@ -1,7 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -$ErrorActionPreference = "Stop" -fnm env | Out-String | Invoke-Expression -fnm ls diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__list_local_with_nothing_installed__WinCmd.snap b/tests/feature_tests/snapshots/e2e__feature_tests__list_local_with_nothing_installed__WinCmd.snap deleted file mode 100644 index 8854265..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__list_local_with_nothing_installed__WinCmd.snap +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -FOR /f "tokens=*" %i IN ('fnm env') DO CALL %i -fnm ls diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__list_local_with_nothing_installed__Zsh.snap b/tests/feature_tests/snapshots/e2e__feature_tests__list_local_with_nothing_installed__Zsh.snap deleted file mode 100644 index 69486d7..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__list_local_with_nothing_installed__Zsh.snap +++ /dev/null @@ -1,7 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -eval "$(fnm env)" -fnm ls diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__log_level_error__Bash.snap b/tests/feature_tests/snapshots/e2e__feature_tests__log_level_error__Bash.snap deleted file mode 100644 index cb47e2d..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__log_level_error__Bash.snap +++ /dev/null @@ -1,30 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -shopt -s expand_aliases - -eval "$(fnm --log-level='error' env)" -if [ "$(fnm install v8.11.3 -echo empty)" != "empty" ]; then - echo 'Expected fnm install to be "empty", Got: '"$(fnm install v8.11.3 -echo empty)" - exit 1 -fi - -if [ "$(fnm use v8.11.3 -echo empty)" != "empty" ]; then - echo 'Expected fnm use to be "empty", Got: '"$(fnm use v8.11.3 -echo empty)" - exit 1 -fi - -if [ "$(fnm alias v8.11.3 something -echo empty)" != "empty" ]; then - echo 'Expected fnm alias to be "empty", Got: '"$(fnm alias v8.11.3 something -echo empty)" - exit 1 -fi - -fnm alias abcd efg 2>&1 | grep 'Can'\''t find requested version' diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__log_level_error__Fish.snap b/tests/feature_tests/snapshots/e2e__feature_tests__log_level_error__Fish.snap deleted file mode 100644 index bbf398d..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__log_level_error__Fish.snap +++ /dev/null @@ -1,27 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -fnm --log-level='error' env | source -if test (fnm install v8.11.3 -echo empty) != "empty" - echo 'Expected fnm install to be "empty", Got: '(fnm install v8.11.3 -echo empty) - exit 1 -end - -if test (fnm use v8.11.3 -echo empty) != "empty" - echo 'Expected fnm use to be "empty", Got: '(fnm use v8.11.3 -echo empty) - exit 1 -end - -if test (fnm alias v8.11.3 something -echo empty) != "empty" - echo 'Expected fnm alias to be "empty", Got: '(fnm alias v8.11.3 something -echo empty) - exit 1 -end - -fnm alias abcd efg 2>&1 | grep 'Can'\''t find requested version' diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__log_level_error__PowerShell.snap b/tests/feature_tests/snapshots/e2e__feature_tests__log_level_error__PowerShell.snap deleted file mode 100644 index fbf7920..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__log_level_error__PowerShell.snap +++ /dev/null @@ -1,28 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -$ErrorActionPreference = "Stop" -fnm --log-level='error' env | Out-String | Invoke-Expression -If ("$(fnm install v8.11.3 -echo empty)" -ne "empty") { - Write-Output ('Expected fnm install to be "empty", Got: ' + $(fnm install v8.11.3 -echo empty)) - exit 1 -} - -If ("$(fnm use v8.11.3 -echo empty)" -ne "empty") { - Write-Output ('Expected fnm use to be "empty", Got: ' + $(fnm use v8.11.3 -echo empty)) - exit 1 -} - -If ("$(fnm alias v8.11.3 something -echo empty)" -ne "empty") { - Write-Output ('Expected fnm alias to be "empty", Got: ' + $(fnm alias v8.11.3 something -echo empty)) - exit 1 -} - -$($__out__ = $($($_tmp_err_action = $ErrorActionPreference;$ErrorActionPreference = "Continue";fnm alias abcd efg 2>&1;$ErrorActionPreference = $_tmp_err_action) | Select-String 'Can''t find requested version'); echo $__out__; if ($__out__ -eq $null){ exit 1 } else { $__out__ }) diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__log_level_error__Zsh.snap b/tests/feature_tests/snapshots/e2e__feature_tests__log_level_error__Zsh.snap deleted file mode 100644 index db8f422..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__log_level_error__Zsh.snap +++ /dev/null @@ -1,28 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -eval "$(fnm --log-level='error' env)" -if [ "$(fnm install v8.11.3 -echo empty)" != "empty" ]; then - echo 'Expected fnm install to be "empty", Got: '"$(fnm install v8.11.3 -echo empty)" - exit 1 -fi - -if [ "$(fnm use v8.11.3 -echo empty)" != "empty" ]; then - echo 'Expected fnm use to be "empty", Got: '"$(fnm use v8.11.3 -echo empty)" - exit 1 -fi - -if [ "$(fnm alias v8.11.3 something -echo empty)" != "empty" ]; then - echo 'Expected fnm alias to be "empty", Got: '"$(fnm alias v8.11.3 something -echo empty)" - exit 1 -fi - -fnm alias abcd efg 2>&1 | grep 'Can'\''t find requested version' diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__log_level_quiet__Bash.snap b/tests/feature_tests/snapshots/e2e__feature_tests__log_level_quiet__Bash.snap deleted file mode 100644 index 9dc8725..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__log_level_quiet__Bash.snap +++ /dev/null @@ -1,22 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -shopt -s expand_aliases - -eval "$(fnm --log-level='quiet' env)" -if [ "$(fnm install v8.11.3)" != "" ]; then - echo 'Expected fnm install to be "", Got: '"$(fnm install v8.11.3)" - exit 1 -fi - -if [ "$(fnm use v8.11.3)" != "" ]; then - echo 'Expected fnm use to be "", Got: '"$(fnm use v8.11.3)" - exit 1 -fi - -if [ "$(fnm alias v8.11.3 something)" != "" ]; then - echo 'Expected fnm alias to be "", Got: '"$(fnm alias v8.11.3 something)" - exit 1 -fi diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__log_level_quiet__Fish.snap b/tests/feature_tests/snapshots/e2e__feature_tests__log_level_quiet__Fish.snap deleted file mode 100644 index 06896ec..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__log_level_quiet__Fish.snap +++ /dev/null @@ -1,19 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -fnm --log-level='quiet' env | source -if test (fnm install v8.11.3) != "" - echo 'Expected fnm install to be "", Got: '(fnm install v8.11.3) - exit 1 -end - -if test (fnm use v8.11.3) != "" - echo 'Expected fnm use to be "", Got: '(fnm use v8.11.3) - exit 1 -end - -if test (fnm alias v8.11.3 something) != "" - echo 'Expected fnm alias to be "", Got: '(fnm alias v8.11.3 something) - exit 1 -end diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__log_level_quiet__PowerShell.snap b/tests/feature_tests/snapshots/e2e__feature_tests__log_level_quiet__PowerShell.snap deleted file mode 100644 index d2e95d4..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__log_level_quiet__PowerShell.snap +++ /dev/null @@ -1,20 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -$ErrorActionPreference = "Stop" -fnm --log-level='quiet' env | Out-String | Invoke-Expression -If ("$(fnm install v8.11.3)" -ne "") { - Write-Output ('Expected fnm install to be "", Got: ' + $(fnm install v8.11.3)) - exit 1 -} - -If ("$(fnm use v8.11.3)" -ne "") { - Write-Output ('Expected fnm use to be "", Got: ' + $(fnm use v8.11.3)) - exit 1 -} - -If ("$(fnm alias v8.11.3 something)" -ne "") { - Write-Output ('Expected fnm alias to be "", Got: ' + $(fnm alias v8.11.3 something)) - exit 1 -} diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__log_level_quiet__Zsh.snap b/tests/feature_tests/snapshots/e2e__feature_tests__log_level_quiet__Zsh.snap deleted file mode 100644 index 530c483..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__log_level_quiet__Zsh.snap +++ /dev/null @@ -1,20 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -eval "$(fnm --log-level='quiet' env)" -if [ "$(fnm install v8.11.3)" != "" ]; then - echo 'Expected fnm install to be "", Got: '"$(fnm install v8.11.3)" - exit 1 -fi - -if [ "$(fnm use v8.11.3)" != "" ]; then - echo 'Expected fnm use to be "", Got: '"$(fnm use v8.11.3)" - exit 1 -fi - -if [ "$(fnm alias v8.11.3 something)" != "" ]; then - echo 'Expected fnm alias to be "", Got: '"$(fnm alias v8.11.3 something)" - exit 1 -fi diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__matching_dotfiles__Bash.snap b/tests/feature_tests/snapshots/e2e__feature_tests__matching_dotfiles__Bash.snap deleted file mode 100644 index 4ebfc98..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__matching_dotfiles__Bash.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -shopt -s expand_aliases - -eval "$(fnm env)" -echo 11.10.0 > .nvmrc -echo 11.10.0 > .node-version -fnm install -fnm use -if [ "$(node -v)" != "v11.10.0" ]; then - echo 'Expected Node version to be "v11.10.0", Got: '"$(node -v)" - exit 1 -fi diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__matching_dotfiles__Fish.snap b/tests/feature_tests/snapshots/e2e__feature_tests__matching_dotfiles__Fish.snap deleted file mode 100644 index 747f7ea..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__matching_dotfiles__Fish.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -fnm env | source -echo 11.10.0 > .nvmrc -echo 11.10.0 > .node-version -fnm install -fnm use -if test (node -v) != "v11.10.0" - echo 'Expected Node version to be "v11.10.0", Got: '(node -v) - exit 1 -end diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__matching_dotfiles__PowerShell.snap b/tests/feature_tests/snapshots/e2e__feature_tests__matching_dotfiles__PowerShell.snap deleted file mode 100644 index 0b8ad53..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__matching_dotfiles__PowerShell.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -$ErrorActionPreference = "Stop" -fnm env | Out-String | Invoke-Expression -echo '11.10.0' > '.nvmrc' -echo '11.10.0' > '.node-version' -fnm install -fnm use -If ("$(node -v)" -ne "v11.10.0") { - Write-Output ('Expected Node version to be "v11.10.0", Got: ' + $(node -v)) - exit 1 -} diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__matching_dotfiles__WinCmd.snap b/tests/feature_tests/snapshots/e2e__feature_tests__matching_dotfiles__WinCmd.snap deleted file mode 100644 index 497708d..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__matching_dotfiles__WinCmd.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -FOR /f "tokens=*" %i IN ('fnm env') DO CALL %i -echo 11.10.0 > .nvmrc -echo 11.10.0 > .node-version -fnm install -fnm use -node -v | findstr v11.10.0 -if %errorlevel% neq 0 ( - echo Node version does not match "v11.10.0" - exit 1 -) diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__matching_dotfiles__Zsh.snap b/tests/feature_tests/snapshots/e2e__feature_tests__matching_dotfiles__Zsh.snap deleted file mode 100644 index f584c91..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__matching_dotfiles__Zsh.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -eval "$(fnm env)" -echo 11.10.0 > .nvmrc -echo 11.10.0 > .node-version -fnm install -fnm use -if [ "$(node -v)" != "v11.10.0" ]; then - echo 'Expected Node version to be "v11.10.0", Got: '"$(node -v)" - exit 1 -fi diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__multishell__Bash.snap b/tests/feature_tests/snapshots/e2e__feature_tests__multishell__Bash.snap deleted file mode 100644 index 7d23095..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__multishell__Bash.snap +++ /dev/null @@ -1,25 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -shopt -s expand_aliases - -eval "$(fnm env)" -fnm install v8.11.3 -fnm install v11.9.0 -fnm use v8.11.3 -echo 'set -e -shopt -s expand_aliases - -eval "$(fnm env)" -fnm use 11 -if [ "$(node -v)" '\!'= "v11.9.0" ]; then - echo '\''Expected Node version to be "v11.9.0", Got: '\''"$(node -v)" - exit 1 -fi -' | bash -if [ "$(node -v)" != "v8.11.3" ]; then - echo 'Expected Node version to be "v8.11.3", Got: '"$(node -v)" - exit 1 -fi diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__multishell__Fish.snap b/tests/feature_tests/snapshots/e2e__feature_tests__multishell__Fish.snap deleted file mode 100644 index a68263f..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__multishell__Fish.snap +++ /dev/null @@ -1,20 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -fnm env | source -fnm install v8.11.3 -fnm install v11.9.0 -fnm use v8.11.3 -fish -c ' -fnm env | source -fnm use 11 -if test (node -v) '\!'= "v11.9.0" - echo '\''Expected Node version to be "v11.9.0", Got: '\''(node -v) - exit 1 -end -' -if test (node -v) != "v8.11.3" - echo 'Expected Node version to be "v8.11.3", Got: '(node -v) - exit 1 -end diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__multishell__PowerShell.snap b/tests/feature_tests/snapshots/e2e__feature_tests__multishell__PowerShell.snap deleted file mode 100644 index cdbe4bb..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__multishell__PowerShell.snap +++ /dev/null @@ -1,21 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -$ErrorActionPreference = "Stop" -fnm env | Out-String | Invoke-Expression -fnm install v8.11.3 -fnm install v11.9.0 -fnm use v8.11.3 -echo '$ErrorActionPreference = "Stop" -fnm env | Out-String | Invoke-Expression -fnm use 11 -If ("$(node -v)" -ne "v11.9.0") { - Write-Output (''Expected Node version to be "v11.9.0", Got: '' + $(node -v)) - exit 1 -} -' | powershell -NoProfile -If ("$(node -v)" -ne "v8.11.3") { - Write-Output ('Expected Node version to be "v8.11.3", Got: ' + $(node -v)) - exit 1 -} diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__multishell__Zsh.snap b/tests/feature_tests/snapshots/e2e__feature_tests__multishell__Zsh.snap deleted file mode 100644 index 9ad4501..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__multishell__Zsh.snap +++ /dev/null @@ -1,21 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -eval "$(fnm env)" -fnm install v8.11.3 -fnm install v11.9.0 -fnm use v8.11.3 -echo 'set -e -eval "$(fnm env)" -fnm use 11 -if [ "$(node -v)" '\!'= "v11.9.0" ]; then - echo '\''Expected Node version to be "v11.9.0", Got: '\''"$(node -v)" - exit 1 -fi -' | zsh -if [ "$(node -v)" != "v8.11.3" ]; then - echo 'Expected Node version to be "v8.11.3", Got: '"$(node -v)" - exit 1 -fi diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__nvmrc__Bash.snap b/tests/feature_tests/snapshots/e2e__feature_tests__nvmrc__Bash.snap deleted file mode 100644 index 13ae610..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__nvmrc__Bash.snap +++ /dev/null @@ -1,15 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -shopt -s expand_aliases - -eval "$(fnm env)" -echo v8.11.3 > .nvmrc -fnm install -fnm use -if [ "$(node -v)" != "v8.11.3" ]; then - echo 'Expected Node version to be "v8.11.3", Got: '"$(node -v)" - exit 1 -fi diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__nvmrc__Fish.snap b/tests/feature_tests/snapshots/e2e__feature_tests__nvmrc__Fish.snap deleted file mode 100644 index f28a420..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__nvmrc__Fish.snap +++ /dev/null @@ -1,12 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -fnm env | source -echo v8.11.3 > .nvmrc -fnm install -fnm use -if test (node -v) != "v8.11.3" - echo 'Expected Node version to be "v8.11.3", Got: '(node -v) - exit 1 -end diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__nvmrc__PowerShell.snap b/tests/feature_tests/snapshots/e2e__feature_tests__nvmrc__PowerShell.snap deleted file mode 100644 index dc23465..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__nvmrc__PowerShell.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -$ErrorActionPreference = "Stop" -fnm env | Out-String | Invoke-Expression -echo 'v8.11.3' > '.nvmrc' -fnm install -fnm use -If ("$(node -v)" -ne "v8.11.3") { - Write-Output ('Expected Node version to be "v8.11.3", Got: ' + $(node -v)) - exit 1 -} diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__nvmrc__WinCmd.snap b/tests/feature_tests/snapshots/e2e__feature_tests__nvmrc__WinCmd.snap deleted file mode 100644 index 7598be6..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__nvmrc__WinCmd.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -FOR /f "tokens=*" %i IN ('fnm env') DO CALL %i -echo v8.11.3 > .nvmrc -fnm install -fnm use -node -v | findstr v8.11.3 -if %errorlevel% neq 0 ( - echo Node version does not match "v8.11.3" - exit 1 -) diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__nvmrc__Zsh.snap b/tests/feature_tests/snapshots/e2e__feature_tests__nvmrc__Zsh.snap deleted file mode 100644 index 9c635cc..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__nvmrc__Zsh.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -eval "$(fnm env)" -echo v8.11.3 > .nvmrc -fnm install -fnm use -if [ "$(node -v)" != "v8.11.3" ]; then - echo 'Expected Node version to be "v8.11.3", Got: '"$(node -v)" - exit 1 -fi diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__partial_semver__Bash.snap b/tests/feature_tests/snapshots/e2e__feature_tests__partial_semver__Bash.snap deleted file mode 100644 index 620febd..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__partial_semver__Bash.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -shopt -s expand_aliases - -eval "$(fnm env)" -fnm install 6 -fnm use 6 -if [ "$(node -v)" != "v6.17.1" ]; then - echo 'Expected Node version to be "v6.17.1", Got: '"$(node -v)" - exit 1 -fi diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__partial_semver__Fish.snap b/tests/feature_tests/snapshots/e2e__feature_tests__partial_semver__Fish.snap deleted file mode 100644 index 92cd649..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__partial_semver__Fish.snap +++ /dev/null @@ -1,11 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -fnm env | source -fnm install 6 -fnm use 6 -if test (node -v) != "v6.17.1" - echo 'Expected Node version to be "v6.17.1", Got: '(node -v) - exit 1 -end diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__partial_semver__PowerShell.snap b/tests/feature_tests/snapshots/e2e__feature_tests__partial_semver__PowerShell.snap deleted file mode 100644 index 79fef08..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__partial_semver__PowerShell.snap +++ /dev/null @@ -1,12 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -$ErrorActionPreference = "Stop" -fnm env | Out-String | Invoke-Expression -fnm install 6 -fnm use 6 -If ("$(node -v)" -ne "v6.17.1") { - Write-Output ('Expected Node version to be "v6.17.1", Got: ' + $(node -v)) - exit 1 -} diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__partial_semver__WinCmd.snap b/tests/feature_tests/snapshots/e2e__feature_tests__partial_semver__WinCmd.snap deleted file mode 100644 index 41b8d78..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__partial_semver__WinCmd.snap +++ /dev/null @@ -1,12 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -FOR /f "tokens=*" %i IN ('fnm env') DO CALL %i -fnm install 6 -fnm use 6 -node -v | findstr v6.17.1 -if %errorlevel% neq 0 ( - echo Node version does not match "v6.17.1" - exit 1 -) diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__partial_semver__Zsh.snap b/tests/feature_tests/snapshots/e2e__feature_tests__partial_semver__Zsh.snap deleted file mode 100644 index 3d63b12..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__partial_semver__Zsh.snap +++ /dev/null @@ -1,12 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -eval "$(fnm env)" -fnm install 6 -fnm use 6 -if [ "$(node -v)" != "v6.17.1" ]; then - echo 'Expected Node version to be "v6.17.1", Got: '"$(node -v)" - exit 1 -fi diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__system_node__Bash.snap b/tests/feature_tests/snapshots/e2e__feature_tests__system_node__Bash.snap deleted file mode 100644 index 5ce4a34..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__system_node__Bash.snap +++ /dev/null @@ -1,15 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -shopt -s expand_aliases - -eval "$(fnm env)" -fnm install 10 -fnm use 10 -fnm use system -if [ "$(node -v)" != "custom node" ]; then - echo 'Expected Node version to be "custom node", Got: '"$(node -v)" - exit 1 -fi diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__system_node__Fish.snap b/tests/feature_tests/snapshots/e2e__feature_tests__system_node__Fish.snap deleted file mode 100644 index efc64b3..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__system_node__Fish.snap +++ /dev/null @@ -1,12 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -fnm env | source -fnm install 10 -fnm use 10 -fnm use system -if test (node -v) != "custom node" - echo 'Expected Node version to be "custom node", Got: '(node -v) - exit 1 -end diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__system_node__PowerShell.snap b/tests/feature_tests/snapshots/e2e__feature_tests__system_node__PowerShell.snap deleted file mode 100644 index f4b220e..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__system_node__PowerShell.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -$ErrorActionPreference = "Stop" -fnm env | Out-String | Invoke-Expression -fnm install 10 -fnm use 10 -fnm use system -If ("$(node -v)" -ne "custom node") { - Write-Output ('Expected Node version to be "custom node", Got: ' + $(node -v)) - exit 1 -} diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__system_node__Zsh.snap b/tests/feature_tests/snapshots/e2e__feature_tests__system_node__Zsh.snap deleted file mode 100644 index 64eaa3c..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__system_node__Zsh.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -eval "$(fnm env)" -fnm install 10 -fnm use 10 -fnm use system -if [ "$(node -v)" != "custom node" ]; then - echo 'Expected Node version to be "custom node", Got: '"$(node -v)" - exit 1 -fi diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__unalias__Bash.snap b/tests/feature_tests/snapshots/e2e__feature_tests__unalias__Bash.snap deleted file mode 100644 index 6a7724a..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__unalias__Bash.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -shopt -s expand_aliases - -eval "$(fnm env)" -fnm install 11.10.0 -fnm install 8.11.3 -fnm alias 8.11.3 version8 -fnm ls | grep version8 -fnm unalias version8 -fnm use version8 2>&1 | grep 'Requested version version8 is not currently installed' diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__unalias__Fish.snap b/tests/feature_tests/snapshots/e2e__feature_tests__unalias__Fish.snap deleted file mode 100644 index d9e72f1..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__unalias__Fish.snap +++ /dev/null @@ -1,11 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -fnm env | source -fnm install 11.10.0 -fnm install 8.11.3 -fnm alias 8.11.3 version8 -fnm ls | grep version8 -fnm unalias version8 -fnm use version8 2>&1 | grep 'Requested version version8 is not currently installed' diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__unalias__PowerShell.snap b/tests/feature_tests/snapshots/e2e__feature_tests__unalias__PowerShell.snap deleted file mode 100644 index d2e2788..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__unalias__PowerShell.snap +++ /dev/null @@ -1,12 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -$ErrorActionPreference = "Stop" -fnm env | Out-String | Invoke-Expression -fnm install 11.10.0 -fnm install 8.11.3 -fnm alias 8.11.3 version8 -$($__out__ = $(fnm ls | Select-String 'version8'); echo $__out__; if ($__out__ -eq $null){ exit 1 } else { $__out__ }) -fnm unalias version8 -$($__out__ = $($($_tmp_err_action = $ErrorActionPreference;$ErrorActionPreference = "Continue";fnm use version8 2>&1;$ErrorActionPreference = $_tmp_err_action) | Select-String 'Requested version version8 is not currently installed'); echo $__out__; if ($__out__ -eq $null){ exit 1 } else { $__out__ }) diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__unalias__Zsh.snap b/tests/feature_tests/snapshots/e2e__feature_tests__unalias__Zsh.snap deleted file mode 100644 index 6dab76a..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__unalias__Zsh.snap +++ /dev/null @@ -1,12 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -eval "$(fnm env)" -fnm install 11.10.0 -fnm install 8.11.3 -fnm alias 8.11.3 version8 -fnm ls | grep version8 -fnm unalias version8 -fnm use version8 2>&1 | grep 'Requested version version8 is not currently installed' diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__unalias_error__Bash.snap b/tests/feature_tests/snapshots/e2e__feature_tests__unalias_error__Bash.snap deleted file mode 100644 index 3e7a132..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__unalias_error__Bash.snap +++ /dev/null @@ -1,9 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -shopt -s expand_aliases - -eval "$(fnm --log-level='error' env)" -fnm unalias lts 2>&1 | grep 'Requested alias lts not found' diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__unalias_error__Fish.snap b/tests/feature_tests/snapshots/e2e__feature_tests__unalias_error__Fish.snap deleted file mode 100644 index 5eb06ec..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__unalias_error__Fish.snap +++ /dev/null @@ -1,6 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -fnm --log-level='error' env | source -fnm unalias lts 2>&1 | grep 'Requested alias lts not found' diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__unalias_error__PowerShell.snap b/tests/feature_tests/snapshots/e2e__feature_tests__unalias_error__PowerShell.snap deleted file mode 100644 index 4141c73..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__unalias_error__PowerShell.snap +++ /dev/null @@ -1,7 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -$ErrorActionPreference = "Stop" -fnm --log-level='error' env | Out-String | Invoke-Expression -$($__out__ = $($($_tmp_err_action = $ErrorActionPreference;$ErrorActionPreference = "Continue";fnm unalias lts 2>&1;$ErrorActionPreference = $_tmp_err_action) | Select-String 'Requested alias lts not found'); echo $__out__; if ($__out__ -eq $null){ exit 1 } else { $__out__ }) diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__unalias_error__Zsh.snap b/tests/feature_tests/snapshots/e2e__feature_tests__unalias_error__Zsh.snap deleted file mode 100644 index 53576ba..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__unalias_error__Zsh.snap +++ /dev/null @@ -1,7 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -eval "$(fnm --log-level='error' env)" -fnm unalias lts 2>&1 | grep 'Requested alias lts not found' diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__uninstall__Bash.snap b/tests/feature_tests/snapshots/e2e__feature_tests__uninstall__Bash.snap deleted file mode 100644 index b7211fc..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__uninstall__Bash.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: tests/feature_tests/uninstall.rs -expression: "&source.trim()" ---- -set -e -shopt -s expand_aliases - -eval "$(fnm env)" -fnm install 12.0.0 -fnm alias 12.0.0 hello -fnm ls | grep v12.0.0 | grep hello -fnm uninstall hello -if [ "$(fnm ls)" != "* system" ]; then - echo 'Expected fnm ls to be "* system", Got: '"$(fnm ls)" - exit 1 -fi diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__uninstall__Fish.snap b/tests/feature_tests/snapshots/e2e__feature_tests__uninstall__Fish.snap deleted file mode 100644 index 832672b..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__uninstall__Fish.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: tests/feature_tests/uninstall.rs -expression: "&source.trim()" ---- -fnm env | source -fnm install 12.0.0 -fnm alias 12.0.0 hello -fnm ls | grep v12.0.0 | grep hello -fnm uninstall hello -if test (fnm ls) != "* system" - echo 'Expected fnm ls to be "* system", Got: '(fnm ls) - exit 1 -end diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__uninstall__PowerShell.snap b/tests/feature_tests/snapshots/e2e__feature_tests__uninstall__PowerShell.snap deleted file mode 100644 index 4b72e44..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__uninstall__PowerShell.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: tests/feature_tests/uninstall.rs -expression: "&source.trim()" ---- -$ErrorActionPreference = "Stop" -fnm env | Out-String | Invoke-Expression -fnm install 12.0.0 -fnm alias 12.0.0 hello -$($__out__ = $($($__out__ = $(fnm ls | Select-String 'v12.0.0'); echo $__out__; if ($__out__ -eq $null){ exit 1 } else { $__out__ }) | Select-String 'hello'); echo $__out__; if ($__out__ -eq $null){ exit 1 } else { $__out__ }) -fnm uninstall hello -If ("$(fnm ls)" -ne "* system") { - Write-Output ('Expected fnm ls to be "* system", Got: ' + $(fnm ls)) - exit 1 -} diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__uninstall__Zsh.snap b/tests/feature_tests/snapshots/e2e__feature_tests__uninstall__Zsh.snap deleted file mode 100644 index a4939b1..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__uninstall__Zsh.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: tests/feature_tests/uninstall.rs -expression: "&source.trim()" ---- -set -e -eval "$(fnm env)" -fnm install 12.0.0 -fnm alias 12.0.0 hello -fnm ls | grep v12.0.0 | grep hello -fnm uninstall hello -if [ "$(fnm ls)" != "* system" ]; then - echo 'Expected fnm ls to be "* system", Got: '"$(fnm ls)" - exit 1 -fi diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__use_alias_install_if_missing__Bash.snap b/tests/feature_tests/snapshots/e2e__feature_tests__use_alias_install_if_missing__Bash.snap deleted file mode 100644 index 31cf2ef..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__use_alias_install_if_missing__Bash.snap +++ /dev/null @@ -1,11 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -shopt -s expand_aliases - -eval "$(fnm env)" -echo 'lts/*' > .node-version -fnm use --install-if-missing -fnm ls | grep lts-latest diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__use_alias_install_if_missing__Fish.snap b/tests/feature_tests/snapshots/e2e__feature_tests__use_alias_install_if_missing__Fish.snap deleted file mode 100644 index e088983..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__use_alias_install_if_missing__Fish.snap +++ /dev/null @@ -1,8 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -fnm env | source -echo 'lts/*' > .node-version -fnm use --install-if-missing -fnm ls | grep lts-latest diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__use_alias_install_if_missing__PowerShell.snap b/tests/feature_tests/snapshots/e2e__feature_tests__use_alias_install_if_missing__PowerShell.snap deleted file mode 100644 index 85d36b8..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__use_alias_install_if_missing__PowerShell.snap +++ /dev/null @@ -1,9 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -$ErrorActionPreference = "Stop" -fnm env | Out-String | Invoke-Expression -echo 'lts/*' > '.node-version' -fnm use --install-if-missing -$($__out__ = $(fnm ls | Select-String 'lts-latest'); echo $__out__; if ($__out__ -eq $null){ exit 1 } else { $__out__ }) diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__use_alias_install_if_missing__Zsh.snap b/tests/feature_tests/snapshots/e2e__feature_tests__use_alias_install_if_missing__Zsh.snap deleted file mode 100644 index 4b49db9..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__use_alias_install_if_missing__Zsh.snap +++ /dev/null @@ -1,9 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -eval "$(fnm env)" -echo 'lts/*' > .node-version -fnm use --install-if-missing -fnm ls | grep lts-latest diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__use_alias_not_installed__Bash.snap b/tests/feature_tests/snapshots/e2e__feature_tests__use_alias_not_installed__Bash.snap deleted file mode 100644 index 517e2b8..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__use_alias_not_installed__Bash.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -shopt -s expand_aliases - -eval "$(fnm --log-level='error' env)" -echo 'lts/*' > .node-version -fnm use 2>&1 | grep 'Requested version lts-latest is not currently installed' diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__use_alias_not_installed__Fish.snap b/tests/feature_tests/snapshots/e2e__feature_tests__use_alias_not_installed__Fish.snap deleted file mode 100644 index f5c6918..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__use_alias_not_installed__Fish.snap +++ /dev/null @@ -1,7 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -fnm --log-level='error' env | source -echo 'lts/*' > .node-version -fnm use 2>&1 | grep 'Requested version lts-latest is not currently installed' diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__use_alias_not_installed__PowerShell.snap b/tests/feature_tests/snapshots/e2e__feature_tests__use_alias_not_installed__PowerShell.snap deleted file mode 100644 index ffebbc6..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__use_alias_not_installed__PowerShell.snap +++ /dev/null @@ -1,8 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -$ErrorActionPreference = "Stop" -fnm --log-level='error' env | Out-String | Invoke-Expression -echo 'lts/*' > '.node-version' -$($__out__ = $($($_tmp_err_action = $ErrorActionPreference;$ErrorActionPreference = "Continue";fnm use 2>&1;$ErrorActionPreference = $_tmp_err_action) | Select-String 'Requested version lts-latest is not currently installed'); echo $__out__; if ($__out__ -eq $null){ exit 1 } else { $__out__ }) diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__use_alias_not_installed__Zsh.snap b/tests/feature_tests/snapshots/e2e__feature_tests__use_alias_not_installed__Zsh.snap deleted file mode 100644 index b34e2bf..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__use_alias_not_installed__Zsh.snap +++ /dev/null @@ -1,8 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -eval "$(fnm --log-level='error' env)" -echo 'lts/*' > .node-version -fnm use 2>&1 | grep 'Requested version lts-latest is not currently installed' diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__use_nvmrc_lts__Bash.snap b/tests/feature_tests/snapshots/e2e__feature_tests__use_nvmrc_lts__Bash.snap deleted file mode 100644 index fbcdf6c..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__use_nvmrc_lts__Bash.snap +++ /dev/null @@ -1,12 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -shopt -s expand_aliases - -eval "$(fnm env)" -echo lts/dubnium > .nvmrc -fnm install -fnm use -fnm ls | grep lts-dubnium diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__use_nvmrc_lts__Fish.snap b/tests/feature_tests/snapshots/e2e__feature_tests__use_nvmrc_lts__Fish.snap deleted file mode 100644 index 3be4a41..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__use_nvmrc_lts__Fish.snap +++ /dev/null @@ -1,9 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -fnm env | source -echo lts/dubnium > .nvmrc -fnm install -fnm use -fnm ls | grep lts-dubnium diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__use_nvmrc_lts__PowerShell.snap b/tests/feature_tests/snapshots/e2e__feature_tests__use_nvmrc_lts__PowerShell.snap deleted file mode 100644 index 766c6a0..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__use_nvmrc_lts__PowerShell.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -$ErrorActionPreference = "Stop" -fnm env | Out-String | Invoke-Expression -echo 'lts/dubnium' > '.nvmrc' -fnm install -fnm use -$($__out__ = $(fnm ls | Select-String 'lts-dubnium'); echo $__out__; if ($__out__ -eq $null){ exit 1 } else { $__out__ }) diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__use_nvmrc_lts__Zsh.snap b/tests/feature_tests/snapshots/e2e__feature_tests__use_nvmrc_lts__Zsh.snap deleted file mode 100644 index c222b9f..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__use_nvmrc_lts__Zsh.snap +++ /dev/null @@ -1,10 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -eval "$(fnm env)" -echo lts/dubnium > .nvmrc -fnm install -fnm use -fnm ls | grep lts-dubnium diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_dot_node_version__Bash.snap b/tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_dot_node_version__Bash.snap deleted file mode 100644 index be3337a..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_dot_node_version__Bash.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -shopt -s expand_aliases - -eval "$(fnm env --use-on-cd)" -mkdir inner_path -echo v8.11.3 > inner_path/.node-version -fnm install v8.11.3 -cd inner_path -if [ "$(node -v)" != "v8.11.3" ]; then - echo 'Expected Node version to be "v8.11.3", Got: '"$(node -v)" - exit 1 -fi diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_dot_node_version__Fish.snap b/tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_dot_node_version__Fish.snap deleted file mode 100644 index 0e0746b..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_dot_node_version__Fish.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -fnm env --use-on-cd | source -mkdir inner_path -echo v8.11.3 > inner_path/.node-version -fnm install v8.11.3 -cd inner_path -if test (node -v) != "v8.11.3" - echo 'Expected Node version to be "v8.11.3", Got: '(node -v) - exit 1 -end diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_dot_node_version__PowerShell.snap b/tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_dot_node_version__PowerShell.snap deleted file mode 100644 index 5de718a..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_dot_node_version__PowerShell.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -$ErrorActionPreference = "Stop" -fnm env --use-on-cd | Out-String | Invoke-Expression -mkdir inner_path -echo 'v8.11.3' > 'inner_path/.node-version' -fnm install v8.11.3 -cd inner_path -If ("$(node -v)" -ne "v8.11.3") { - Write-Output ('Expected Node version to be "v8.11.3", Got: ' + $(node -v)) - exit 1 -} diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_dot_node_version__Zsh.snap b/tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_dot_node_version__Zsh.snap deleted file mode 100644 index 09628ff..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_dot_node_version__Zsh.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -eval "$(fnm env --use-on-cd)" -mkdir inner_path -echo v8.11.3 > inner_path/.node-version -fnm install v8.11.3 -cd inner_path -if [ "$(node -v)" != "v8.11.3" ]; then - echo 'Expected Node version to be "v8.11.3", Got: '"$(node -v)" - exit 1 -fi diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_nvmrc__Bash.snap b/tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_nvmrc__Bash.snap deleted file mode 100644 index dbfe7c0..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_nvmrc__Bash.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -shopt -s expand_aliases - -eval "$(fnm env --use-on-cd)" -mkdir inner_path -echo v8.11.3 > inner_path/.nvmrc -fnm install v8.11.3 -cd inner_path -if [ "$(node -v)" != "v8.11.3" ]; then - echo 'Expected Node version to be "v8.11.3", Got: '"$(node -v)" - exit 1 -fi diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_nvmrc__Fish.snap b/tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_nvmrc__Fish.snap deleted file mode 100644 index c7aa857..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_nvmrc__Fish.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -fnm env --use-on-cd | source -mkdir inner_path -echo v8.11.3 > inner_path/.nvmrc -fnm install v8.11.3 -cd inner_path -if test (node -v) != "v8.11.3" - echo 'Expected Node version to be "v8.11.3", Got: '(node -v) - exit 1 -end diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_nvmrc__PowerShell.snap b/tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_nvmrc__PowerShell.snap deleted file mode 100644 index f9ceb49..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_nvmrc__PowerShell.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -$ErrorActionPreference = "Stop" -fnm env --use-on-cd | Out-String | Invoke-Expression -mkdir inner_path -echo 'v8.11.3' > 'inner_path/.nvmrc' -fnm install v8.11.3 -cd inner_path -If ("$(node -v)" -ne "v8.11.3") { - Write-Output ('Expected Node version to be "v8.11.3", Got: ' + $(node -v)) - exit 1 -} diff --git a/tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_nvmrc__Zsh.snap b/tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_nvmrc__Zsh.snap deleted file mode 100644 index e07e748..0000000 --- a/tests/feature_tests/snapshots/e2e__feature_tests__use_on_cd_nvmrc__Zsh.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: tests/feature_tests/mod.rs -expression: "&source.trim()" ---- -set -e -eval "$(fnm env --use-on-cd)" -mkdir inner_path -echo v8.11.3 > inner_path/.nvmrc -fnm install v8.11.3 -cd inner_path -if [ "$(node -v)" != "v8.11.3" ]; then - echo 'Expected Node version to be "v8.11.3", Got: '"$(node -v)" - exit 1 -fi diff --git a/tests/feature_tests/uninstall.rs b/tests/feature_tests/uninstall.rs deleted file mode 100644 index f263365..0000000 --- a/tests/feature_tests/uninstall.rs +++ /dev/null @@ -1,14 +0,0 @@ -#[allow(unused_imports)] -use crate::shellcode::*; - -test_shell!(Bash, Zsh, Fish, PowerShell; { - EvalFnmEnv::default() - .then(Call::new("fnm", vec!["install", "12.0.0"])) - .then(Call::new("fnm", vec!["alias", "12.0.0", "hello"])) - .then(OutputContains::new( - OutputContains::new(Call::new("fnm", vec!["ls"]), "v12.0.0"), - "hello", - )) - .then(Call::new("fnm", vec!["uninstall", "hello"])) - .then(ExpectCommandOutput::new(Call::new("fnm", vec!["ls"]), "* system", "fnm ls")) -}); diff --git a/tests/shellcode/call.rs b/tests/shellcode/call.rs deleted file mode 100644 index 2f45b79..0000000 --- a/tests/shellcode/call.rs +++ /dev/null @@ -1,25 +0,0 @@ -use super::expression::Expression; -use super::shell::Shell; -use std::fmt::Write; - -#[derive(Debug)] -pub(crate) struct Call { - binary: &'static str, - args: Vec<&'static str>, -} - -impl Call { - pub(crate) fn new(binary: &'static str, args: Vec<&'static str>) -> Self { - Self { binary, args } - } -} - -impl Expression for Call { - fn write_shell(&self, writer: &mut impl Write) -> std::fmt::Result { - write!(writer, "{}", self.binary)?; - for arg in &self.args { - write!(writer, " {}", arg)?; - } - Ok(()) - } -} diff --git a/tests/shellcode/die_on_errors.rs b/tests/shellcode/die_on_errors.rs deleted file mode 100644 index 31a2ffd..0000000 --- a/tests/shellcode/die_on_errors.rs +++ /dev/null @@ -1,43 +0,0 @@ -use super::expression::Expression; -use super::shell::{Bash, Fish, PowerShell, WinCmd, Zsh}; -use indoc::writedoc; -use std::fmt::Write; - -#[derive(Debug)] -pub(crate) struct DieOnErrors; - -impl Expression for DieOnErrors { - fn write_shell(&self, writer: &mut impl Write) -> std::fmt::Result { - writedoc!( - writer, - r#" - set -e - shopt -s expand_aliases - "# - ) - } -} - -impl Expression for DieOnErrors { - fn write_shell(&self, writer: &mut impl Write) -> std::fmt::Result { - write!(writer, "set -e") - } -} - -impl Expression for DieOnErrors { - fn write_shell(&self, _writer: &mut impl Write) -> std::fmt::Result { - Ok(()) - } -} - -impl Expression for DieOnErrors { - fn write_shell(&self, writer: &mut impl Write) -> std::fmt::Result { - write!(writer, r#"$ErrorActionPreference = "Stop""#) - } -} - -impl Expression for DieOnErrors { - fn write_shell(&self, _writer: &mut impl Write) -> std::fmt::Result { - Ok(()) - } -} diff --git a/tests/shellcode/eval_fnm_env.rs b/tests/shellcode/eval_fnm_env.rs deleted file mode 100644 index fd1d654..0000000 --- a/tests/shellcode/eval_fnm_env.rs +++ /dev/null @@ -1,63 +0,0 @@ -use super::expression::Expression; -use super::shell::{Bash, Fish, PowerShell, WinCmd, Zsh}; -use std::fmt::Write; - -#[derive(Debug, Default)] -pub(crate) struct EvalFnmEnv { - use_on_cd: bool, - log_level: Option<&'static str>, -} - -impl EvalFnmEnv { - pub(crate) fn use_on_cd(self, use_on_cd: bool) -> Self { - Self { use_on_cd, ..self } - } - - pub(crate) fn log_level(self, log_level: Option<&'static str>) -> Self { - Self { log_level, ..self } - } -} - -impl std::fmt::Display for EvalFnmEnv { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "fnm")?; - if let Some(log_level) = &self.log_level { - write!(f, " --log-level='{}'", log_level)?; - } - write!(f, " env")?; - if self.use_on_cd { - write!(f, " --use-on-cd")?; - } - Ok(()) - } -} - -impl Expression for EvalFnmEnv { - fn write_shell(&self, writer: &mut impl Write) -> std::fmt::Result { - write!(writer, r#"FOR /f "tokens=*" %i IN ('{}') DO CALL %i"#, self) - } -} - -impl Expression for EvalFnmEnv { - fn write_shell(&self, writer: &mut impl Write) -> std::fmt::Result { - write!(writer, r#"{} | Out-String | Invoke-Expression"#, self) - } -} - -impl Expression for EvalFnmEnv { - fn write_shell(&self, writer: &mut impl Write) -> std::fmt::Result { - write!(writer, r#"eval "$({})""#, self) - } -} - -impl Expression for EvalFnmEnv { - fn write_shell(&self, writer: &mut impl Write) -> std::fmt::Result { - write!(writer, r#"eval "$({})""#, self) - } -} - -impl Expression for EvalFnmEnv { - fn write_shell(&self, writer: &mut impl Write) -> std::fmt::Result { - write!(writer, r#"{} | source"#, self) - } -} diff --git a/tests/shellcode/expect_command_output.rs b/tests/shellcode/expect_command_output.rs deleted file mode 100644 index 329c796..0000000 --- a/tests/shellcode/expect_command_output.rs +++ /dev/null @@ -1,128 +0,0 @@ -use super::expression::Expression; -use super::shell::{Bash, Fish, PowerShell, Shell, WinCmd, Zsh}; -use indoc::writedoc; -use std::fmt::Write; - -#[derive(Debug)] -pub(crate) struct ExpectCommandOutput> { - _shell: std::marker::PhantomData, - command: Command, - expected_output: &'static str, - message: &'static str, -} - -impl> ExpectCommandOutput { - pub(crate) fn new( - command: Command, - expected_output: &'static str, - message: &'static str, - ) -> Self { - Self { - _shell: std::marker::PhantomData, - command, - expected_output, - message, - } - } -} - -impl> Expression for ExpectCommandOutput { - fn write_shell(&self, writer: &mut impl Write) -> std::fmt::Result { - let mut command = String::new(); - self.command.write_shell(&mut command)?; - - writedoc!( - writer, - r#" - if [ "$({command})" != "{expected_output}" ]; then - echo 'Expected {message} to be {expected_output:?}, Got: '"$({command})" - exit 1 - fi - "#, - command = command, - message = self.message, - expected_output = self.expected_output, - ) - } -} - -impl> Expression for ExpectCommandOutput { - fn write_shell(&self, writer: &mut impl Write) -> std::fmt::Result { - let mut command = String::new(); - self.command.write_shell(&mut command)?; - - writedoc!( - writer, - r#" - if [ "$({command})" != "{expected_output}" ]; then - echo 'Expected {message} to be {expected_output:?}, Got: '"$({command})" - exit 1 - fi - "#, - command = command, - message = self.message, - expected_output = self.expected_output, - ) - } -} - -impl> Expression for ExpectCommandOutput { - fn write_shell(&self, writer: &mut impl Write) -> std::fmt::Result { - let mut command = String::new(); - self.command.write_shell(&mut command)?; - - writedoc!( - writer, - r#" - if test ({command}) != "{expected_output}" - echo 'Expected {message} to be {expected_output:?}, Got: '({command}) - exit 1 - end - "#, - command = command, - expected_output = self.expected_output, - message = self.message, - ) - } -} - -impl> Expression for ExpectCommandOutput { - fn write_shell(&self, writer: &mut impl Write) -> std::fmt::Result { - let mut command = String::new(); - self.command.write_shell(&mut command)?; - - writedoc!( - writer, - r#" - If ("$({command})" -ne "{expected_output}") {{ - Write-Output ('Expected {message} to be {expected_output:?}, Got: ' + $({command})) - exit 1 - }} - "#, - command = command, - expected_output = self.expected_output, - message = self.message, - ) - } -} - -impl> Expression for ExpectCommandOutput { - fn write_shell(&self, writer: &mut impl Write) -> std::fmt::Result { - let mut command = String::new(); - self.command.write_shell(&mut command)?; - - writedoc!( - writer, - r#" - {command} | findstr {expected_output} - if %errorlevel% neq 0 ( - echo {message} does not match {expected_output:?} - exit 1 - ) - "#, - command = command, - expected_output = WinCmd::shell_escape(self.expected_output), - message = self.message, - ) - } -} diff --git a/tests/shellcode/expression.rs b/tests/shellcode/expression.rs deleted file mode 100644 index a00e531..0000000 --- a/tests/shellcode/expression.rs +++ /dev/null @@ -1,21 +0,0 @@ -use super::line_separated_expressions::LineSeparatedExpressions; -use super::shell::Shell; -use std::fmt::{Debug, Write}; - -pub(crate) trait Expression: Debug + Sized { - fn write_shell(&self, writer: &mut impl Write) -> std::fmt::Result; - - fn then>(self, other: B) -> LineSeparatedExpressions { - LineSeparatedExpressions { - _shell: std::marker::PhantomData, - a: self, - b: other, - } - } -} - -impl Expression for () { - fn write_shell(&self, _writer: &mut impl Write) -> std::fmt::Result { - Ok(()) - } -} diff --git a/tests/shellcode/get_stderr.rs b/tests/shellcode/get_stderr.rs deleted file mode 100644 index 328e9ba..0000000 --- a/tests/shellcode/get_stderr.rs +++ /dev/null @@ -1,25 +0,0 @@ -use super::*; -use std::marker::PhantomData; - -#[derive(Debug)] -pub(crate) struct GetStderr> { - _s: PhantomData, - expr: E, -} - -impl> GetStderr { - pub(crate) fn new(expr: E) -> Self { - Self { - _s: PhantomData, - expr, - } - } -} - -impl> Expression for GetStderr { - fn write_shell(&self, writer: &mut impl std::fmt::Write) -> std::fmt::Result { - self.expr.write_shell(writer)?; - write!(writer, " 2>&1")?; - Ok(()) - } -} diff --git a/tests/shellcode/ignore_errors.rs b/tests/shellcode/ignore_errors.rs deleted file mode 100644 index 4d52b71..0000000 --- a/tests/shellcode/ignore_errors.rs +++ /dev/null @@ -1,49 +0,0 @@ -use super::*; -use std::marker::PhantomData; - -#[derive(Debug)] -pub(crate) struct IgnoreErrors> { - _s: PhantomData, - expr: E, -} - -impl> IgnoreErrors { - pub(crate) fn new(expr: E) -> Self { - Self { - _s: PhantomData, - expr, - } - } -} - -impl> Expression for IgnoreErrors { - fn write_shell(&self, writer: &mut impl std::fmt::Write) -> std::fmt::Result { - self.expr.write_shell(writer)?; - Ok(()) - } -} - -impl> Expression for IgnoreErrors { - fn write_shell(&self, writer: &mut impl std::fmt::Write) -> std::fmt::Result { - self.expr.write_shell(writer)?; - Ok(()) - } -} - -impl> Expression for IgnoreErrors { - fn write_shell(&self, writer: &mut impl std::fmt::Write) -> std::fmt::Result { - self.expr.write_shell(writer)?; - Ok(()) - } -} - -impl> Expression for IgnoreErrors { - fn write_shell(&self, writer: &mut impl std::fmt::Write) -> std::fmt::Result { - write!(writer, r#"$($_tmp_err_action = $ErrorActionPreference;"#)?; - write!(writer, r#"$ErrorActionPreference = "Continue";"#)?; - self.expr.write_shell(writer)?; - write!(writer, ";")?; - write!(writer, r#"$ErrorActionPreference = $_tmp_err_action)"#)?; - Ok(()) - } -} diff --git a/tests/shellcode/line_separated_expressions.rs b/tests/shellcode/line_separated_expressions.rs deleted file mode 100644 index b944cfd..0000000 --- a/tests/shellcode/line_separated_expressions.rs +++ /dev/null @@ -1,62 +0,0 @@ -use super::expression::Expression; -use super::shell::Shell; -use std::fmt::Write; -use std::marker::PhantomData; - -#[derive(Debug)] -pub(crate) struct LineSeparatedExpressions, B: Expression> { - pub(crate) _shell: std::marker::PhantomData, - pub(crate) a: A, - pub(crate) b: B, -} - -impl, B: Expression> LineSeparatedExpressions { - pub fn then>( - self, - c: C, - ) -> LineSeparatedExpressions, C> { - LineSeparatedExpressions { - _shell: PhantomData, - a: self, - b: c, - } - } -} - -impl> LineSeparatedExpressions { - pub(crate) fn new(b: B) -> Self { - Self { - _shell: std::marker::PhantomData, - a: (), - b, - } - } -} - -impl, B: Expression> Expression - for LineSeparatedExpressions -{ - fn write_shell(&self, writer: &mut impl Write) -> std::fmt::Result { - self.a.write_shell(writer)?; - writeln!(writer)?; - self.b.write_shell(writer) - } -} - -mod tests { - use super::super::raw::Raw; - use super::super::shell::Zsh; - use super::*; - use pretty_assertions::assert_eq; - - #[test] - fn test_line_separated_expression() { - let mut s = String::new(); - LineSeparatedExpressions::::new(Raw("Hello".into())) - .then(Raw("World".into())) - .then(Raw("Other".into())) - .write_shell(&mut s) - .unwrap(); - assert_eq!(s.trim(), "Hello\nWorld\nOther"); - } -} diff --git a/tests/shellcode/mod.rs b/tests/shellcode/mod.rs deleted file mode 100644 index c6ab55f..0000000 --- a/tests/shellcode/mod.rs +++ /dev/null @@ -1,113 +0,0 @@ -mod call; -mod die_on_errors; -mod eval_fnm_env; -mod expect_command_output; -mod expression; -mod get_stderr; -mod ignore_errors; -mod line_separated_expressions; -mod nothing; -mod output_contains; -mod raw; -mod shell; -mod sub_shell; -mod test_node_version; -mod write_file; - -#[allow(unused)] -pub use call::*; -#[allow(unused)] -pub use die_on_errors::*; -#[allow(unused)] -pub use eval_fnm_env::*; -#[allow(unused)] -pub use expect_command_output::*; -#[allow(unused)] -pub use expression::*; -#[allow(unused)] -pub use get_stderr::*; -#[allow(unused)] -pub use ignore_errors::*; -#[allow(unused)] -#[allow(unused)] -pub use line_separated_expressions::*; -#[allow(unused)] -pub use nothing::*; -#[allow(unused)] -pub use output_contains::*; -#[allow(unused)] -pub use raw::*; -#[allow(unused)] -pub use shell::*; -#[allow(unused)] -pub use sub_shell::*; -#[allow(unused)] -pub use test_node_version::*; -#[allow(unused)] -pub use write_file::*; - -use std::path::Path; - -pub(crate) fn run_test_file(dir: &Path, shell: &impl Shell, code: &str) { - let fnm_dir = tempfile::tempdir().unwrap(); - let target_dir = std::path::PathBuf::from(env!("CARGO_BIN_EXE_fnm")) - .parent() - .unwrap() - .to_path_buf(); - let path_str = { - let path_env = std::env::var("PATH").unwrap(); - let mut path_split: Vec<_> = std::env::split_paths(&path_env).collect(); - path_split.insert(0, target_dir); - path_split.insert(0, dir.join("bin")); // for custom binaries - std::env::join_paths(path_split).unwrap() - }; - duct::cmd(shell.binary_name(), shell.launch_args()) - .env("PATH", path_str) - .env("FNM_DIR", fnm_dir.path()) - .env("HOME", tempfile::tempdir().unwrap().path()) - .env_remove("FNM_MULTISHELL_PATH") - .dir(dir) - .stdin_bytes(code) - .run() - .unwrap(); -} - -#[macro_export] -macro_rules! test_shell { - ($($shell:ident),+; $block:block) => { - test_shell!($($shell),+; |_path| $block); - }; - ($($shell:ident),+; $f:expr) => { - $( - #[test] - #[serial_test::serial] - #[allow(non_snake_case, clippy::redundant_closure_call)] - fn $shell() { - use super::*; - #[allow(unused)] - use pretty_assertions::assert_eq; - let current_dir = tempfile::tempdir().expect("Can't create a temp dir"); - let shell = $crate::shellcode::$shell; - - let mut source = String::new(); - empty_shell_script(&shell) - .then($crate::shellcode::DieOnErrors) - .then(($f)(current_dir.path())) - .write_shell(&mut source) - .expect("Can't create shell script"); - - insta::assert_snapshot!(&source.trim()); - - if !shell.currently_supported() { - return; - } - - $crate::shellcode::run_test_file( - current_dir.path(), - &shell, - &source.trim() - ); - } - )+ - }; -} diff --git a/tests/shellcode/nothing.rs b/tests/shellcode/nothing.rs deleted file mode 100644 index ade91c5..0000000 --- a/tests/shellcode/nothing.rs +++ /dev/null @@ -1,19 +0,0 @@ -use super::expression::Expression; -use super::shell::Shell; -use std::fmt::Write; -use std::marker::PhantomData; - -#[derive(Debug)] -pub(crate) struct Nothing { - shell: PhantomData, -} - -pub(crate) fn empty_shell_script(_s: &S) -> Nothing { - Nothing { shell: PhantomData } -} - -impl Expression for Nothing { - fn write_shell(&self, _writer: &mut impl Write) -> std::fmt::Result { - Ok(()) - } -} diff --git a/tests/shellcode/output_contains.rs b/tests/shellcode/output_contains.rs deleted file mode 100644 index fc1395e..0000000 --- a/tests/shellcode/output_contains.rs +++ /dev/null @@ -1,65 +0,0 @@ -use super::*; -use std::marker::PhantomData; - -#[derive(Debug)] -pub(crate) struct OutputContains> { - _s: PhantomData, - output_of: Output, - contains: &'static str, -} - -impl> OutputContains { - pub(crate) fn new(output_of: Output, contains: &'static str) -> Self { - Self { - _s: PhantomData, - output_of, - contains, - } - } -} - -impl> Expression for OutputContains { - fn write_shell(&self, writer: &mut impl std::fmt::Write) -> std::fmt::Result { - self.output_of.write_shell(writer)?; - write!(writer, " | grep {}", Zsh::shell_escape(self.contains)) - } -} - -impl> Expression for OutputContains { - fn write_shell(&self, writer: &mut impl std::fmt::Write) -> std::fmt::Result { - self.output_of.write_shell(writer)?; - write!(writer, " | grep {}", Bash::shell_escape(self.contains)) - } -} - -impl> Expression for OutputContains { - fn write_shell(&self, writer: &mut impl std::fmt::Write) -> std::fmt::Result { - self.output_of.write_shell(writer)?; - write!(writer, " | grep {}", Fish::shell_escape(self.contains)) - } -} - -impl> Expression for OutputContains { - fn write_shell(&self, writer: &mut impl std::fmt::Write) -> std::fmt::Result { - // $($__out__ = (fnm ls | findstr 6.11.3); if ($LASTEXITCODE -ne 0) { "WELP" } else { $__out__ }) - write!(writer, "$(")?; - { - write!(writer, "$__out__ = $(")?; - { - self.output_of.write_shell(writer)?; - write!( - writer, - " | Select-String {}", - PowerShell::shell_escape(self.contains) - )?; - } - write!(writer, "); ")?; - write!(writer, "echo $__out__; ")?; - write!(writer, "if ($__out__ -eq $null)")?; - write!(writer, "{{ exit 1 }} ")?; - write!(writer, "else {{ $__out__ }}")?; - } - write!(writer, ")")?; - Ok(()) - } -} diff --git a/tests/shellcode/raw.rs b/tests/shellcode/raw.rs deleted file mode 100644 index 63acac4..0000000 --- a/tests/shellcode/raw.rs +++ /dev/null @@ -1,13 +0,0 @@ -use super::expression::Expression; -use super::shell::Shell; -use std::fmt::Write; - -/// For debugging purposes -#[derive(Debug)] -pub(crate) struct Raw(pub String); - -impl Expression for Raw { - fn write_shell(&self, writer: &mut impl Write) -> std::fmt::Result { - write!(writer, "{}", self.0) - } -} diff --git a/tests/shellcode/shell.rs b/tests/shellcode/shell.rs deleted file mode 100644 index 3bc45f0..0000000 --- a/tests/shellcode/shell.rs +++ /dev/null @@ -1,112 +0,0 @@ -use std::borrow::Cow; -use std::fmt::Debug; - -pub(crate) trait Shell: Debug { - fn currently_supported(&self) -> bool; - fn name(&self) -> &'static str; - fn binary_name(&self) -> &'static str; - fn shell_escape(str: &str) -> Cow; - fn launch_args(&self) -> &'static [&'static str] { - &[] - } -} - -#[derive(Debug)] -pub(crate) struct Fish; -impl Shell for Fish { - fn currently_supported(&self) -> bool { - cfg!(not(windows)) - } - fn name(&self) -> &'static str { - "fish" - } - fn binary_name(&self) -> &'static str { - "fish" - } - fn shell_escape(str: &str) -> Cow { - shell_escape::unix::escape(Cow::from(str)) - } -} - -#[derive(Debug)] -pub(crate) struct Bash; -impl Shell for Bash { - fn currently_supported(&self) -> bool { - true - } - fn name(&self) -> &'static str { - "bash" - } - fn binary_name(&self) -> &'static str { - "bash" - } - fn shell_escape(str: &str) -> Cow { - shell_escape::unix::escape(Cow::from(str)) - } -} - -#[derive(Debug)] -pub(crate) struct Zsh; -impl Shell for Zsh { - fn currently_supported(&self) -> bool { - cfg!(not(windows)) - } - fn name(&self) -> &'static str { - "zsh" - } - fn binary_name(&self) -> &'static str { - "zsh" - } - fn shell_escape(str: &str) -> Cow { - shell_escape::unix::escape(Cow::from(str)) - } -} - -#[derive(Debug)] -pub(crate) struct WinCmd; -impl Shell for WinCmd { - fn currently_supported(&self) -> bool { - cfg!(windows) - } - fn name(&self) -> &'static str { - "win_cmd" - } - fn binary_name(&self) -> &'static str { - "cmd" - } - fn shell_escape(str: &str) -> Cow { - Cow::from( - str.replace('\r', "") - .replace('\n', "^\n\n") - .replace('%', "%%") - .replace('|', "^|") - .replace('(', "^(") - .replace(')', "^)"), - ) - } -} - -#[derive(Debug)] -pub(crate) struct PowerShell; -impl Shell for PowerShell { - fn currently_supported(&self) -> bool { - true - } - fn name(&self) -> &'static str { - "powershell" - } - fn binary_name(&self) -> &'static str { - if cfg!(windows) { - "powershell" - } else { - "pwsh" - } - } - fn shell_escape(str: &str) -> Cow { - let new_str = format!("'{}'", str.replace('\'', "''")); - Cow::from(new_str) - } - fn launch_args(&self) -> &'static [&'static str] { - &["-NoProfile"] - } -} diff --git a/tests/shellcode/sub_shell.rs b/tests/shellcode/sub_shell.rs deleted file mode 100644 index 79fd353..0000000 --- a/tests/shellcode/sub_shell.rs +++ /dev/null @@ -1,55 +0,0 @@ -use super::expression::Expression; -use super::shell::*; -use std::fmt::Write; -use std::marker::PhantomData; - -#[derive(Debug)] -pub(crate) struct SubShell> { - _s: PhantomData, - expression: Exp, -} - -impl> SubShell { - pub(crate) fn new(expression: Exp) -> Self { - Self { - _s: PhantomData, - expression, - } - } -} - -impl> Expression for SubShell { - fn write_shell(&self, writer: &mut impl Write) -> std::fmt::Result { - let mut s = String::new(); - self.expression.write_shell(&mut s)?; - write!(writer, r#"echo {} | zsh"#, Zsh::shell_escape(&s)) - } -} - -impl> Expression for SubShell { - fn write_shell(&self, writer: &mut impl Write) -> std::fmt::Result { - let mut s = String::new(); - self.expression.write_shell(&mut s)?; - write!(writer, r#"echo {} | bash"#, Bash::shell_escape(&s)) - } -} - -impl> Expression for SubShell { - fn write_shell(&self, writer: &mut impl Write) -> std::fmt::Result { - let mut s = String::new(); - self.expression.write_shell(&mut s)?; - write!(writer, r#"fish -c {}"#, Fish::shell_escape(&s)) - } -} - -impl> Expression for SubShell { - fn write_shell(&self, writer: &mut impl Write) -> std::fmt::Result { - let mut s = String::new(); - self.expression.write_shell(&mut s)?; - write!( - writer, - r#"echo {} | powershell -NoProfile"#, - PowerShell::shell_escape(&s) - ) - } -} diff --git a/tests/shellcode/test_node_version.rs b/tests/shellcode/test_node_version.rs deleted file mode 100644 index 0d64899..0000000 --- a/tests/shellcode/test_node_version.rs +++ /dev/null @@ -1,12 +0,0 @@ -use super::shell::Shell; -use super::{Call, ExpectCommandOutput}; - -pub(crate) fn test_node_version( - expected_version: &'static str, -) -> ExpectCommandOutput { - ExpectCommandOutput::new( - Call::new("node", vec!["-v"]), - expected_version, - "Node version", - ) -} diff --git a/tests/shellcode/write_file.rs b/tests/shellcode/write_file.rs deleted file mode 100644 index f31f840..0000000 --- a/tests/shellcode/write_file.rs +++ /dev/null @@ -1,24 +0,0 @@ -use super::*; - -#[derive(Debug)] -pub struct WriteFile { - name: &'static str, - contents: &'static str, -} - -impl WriteFile { - pub(crate) fn new(name: &'static str, contents: &'static str) -> Self { - Self { name, contents } - } -} - -impl Expression for WriteFile { - fn write_shell(&self, writer: &mut impl std::fmt::Write) -> std::fmt::Result { - write!( - writer, - "echo {} > {}", - S::shell_escape(self.contents), - S::shell_escape(self.name) - ) - } -} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..aeca195 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "target": "esnext", + "module": "commonjs", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true + } +}