-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
10 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,33 @@ | ||
#!/usr/bin/env bash | ||
set -x | ||
set -euo pipefail | ||
# shellcheck source-path=SCRIPTDIR | ||
source "$(dirname "$0")/assert.sh" | ||
|
||
export RTX_EXPERIMENTAL=1 | ||
export RTX_NODE_BUILD=1 | ||
export RTX_NODE_COREPACK=1 | ||
export RTX_NODE_DEFAULT_PACKAGES_FILE="$ROOT/e2e/.default-npm-packages" | ||
|
||
rtx plugin uninstall node | ||
rtx i node node@lts/hydrogen | ||
assert_contains "rtx x node@lts/hydrogen -- node --version" "v18." | ||
assert "rtx x -- node --version" "v20.0.0" | ||
assert_contains "rtx node node-build --version" "node-build " | ||
assert_contains "rtx x -- which yarn" "yarn" | ||
|
||
# test asdf-nodejs | ||
rtx plugin i nodejs https://github.com/asdf-vm/asdf-nodejs.git | ||
rtx use [email protected] | ||
rtx ls | ||
assert "rtx x -- node --version" "v20.1.0" | ||
assert_contains "rtx ls-remote nodejs" "20.1.0" | ||
assert_contains "rtx node nodebuild --version" "node-build " | ||
rtx use --rm node | ||
|
||
# RTX_LEGACY_VERSION_FILE env var | ||
RTX_LEGACY_VERSION_FILE=1 assert_contains "rtx current node" "20.0.0" | ||
RTX_LEGACY_VERSION_FILE=0 assert_not_contains "rtx current node" "20.0.0" | ||
rtx plugin uninstall nodejs | ||
assert_not_contains "rtx plugins --user" "node" | ||
|
||
# disable nodejs plugin | ||
RTX_DISABLE_TOOLS=node assert_not_contains "rtx plugins --core" "node" | ||
|
||
export RTX_NODE_BUILD=0 | ||
rtx uninstall -a node | ||
rtx i node | ||
assert "rtx x -- node --version" "v20.0.0" | ||
# rtx uninstall node | ||
# RTX_NODE_COMPILE=1 rtx i node | ||
# assert "rtx x -- node --version" "v20.0.0" | ||
|
||
export RTX_NODE_COREPACK=1 | ||
rtx uninstall node | ||
rtx i node | ||
assert_contains "rtx x node -- which yarn" "yarn" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters