Skip to content

Commit

Permalink
fix: update latest Node LTS version to 20.12.2 (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheerlox committed May 2, 2024
1 parent 1a74df1 commit 9eb27a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/nodelix/version_manager.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
defmodule Nodelix.VersionManager do
# https://nodejs.org/en/about/previous-releases
@latest_lts_version "20.10.0"
@latest_lts_version "20.12.2"

@default_archive_base_url "https://nodejs.org/dist/v$version/node-v$version-$target.$ext"
@signed_checksums_base_url "https://nodejs.org/dist/v$version/SHASUMS256.txt.asc"
Expand Down
10 changes: 5 additions & 5 deletions test/nodelix_test.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule NodelixTest do
use ExUnit.Case, async: true

@version Nodelix.VersionManager.latest_lts_version()
@latest_lts_version Nodelix.VersionManager.latest_lts_version()

setup_all do
File.rm_rf!(Path.join([Mix.Project.build_path(), "nodejs"]))
Expand All @@ -11,13 +11,13 @@ defmodule NodelixTest do
test "run without profile" do
assert ExUnit.CaptureIO.capture_io(fn ->
assert Mix.Task.rerun("nodelix", ["--version"]) == :ok
end) =~ @version
end) =~ @latest_lts_version
end

test "run on another profile" do
assert ExUnit.CaptureIO.capture_io(fn ->
assert Mix.Task.rerun("nodelix", ["--profile", "test_profile"]) == :ok
end) =~ @version
end) =~ @latest_lts_version
end

test "installs and runs multiple versions" do
Expand All @@ -27,13 +27,13 @@ defmodule NodelixTest do

assert ExUnit.CaptureIO.capture_io(fn ->
assert Mix.Task.rerun("nodelix", ["--version"]) == :ok
end) =~ @version
end) =~ @latest_lts_version
end

test "re-installs with force flag" do
assert ExUnit.CaptureLog.capture_log(fn ->
assert Mix.Task.rerun("nodelix.install", ["--force"]) == :ok
end) =~ "Succesfully installed Node.js v#{@version}"
end) =~ "Succesfully installed Node.js v#{@latest_lts_version}"
end

test "installs with custom URL" do
Expand Down

0 comments on commit 9eb27a0

Please sign in to comment.