From c8ff8a193737b07ef6fab9dfcaea79e72fb8aed7 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Wed, 4 Mar 2026 22:06:45 -0500 Subject: [PATCH] Breaking: Change `min` to return the latest patch The major/minor will be the minimum, but the patch will be the latest. E.g. `julia = "1.10"` would lead to e.g. 1.10.10 (not 1.10.0). --- src/installer.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/installer.ts b/src/installer.ts index dc1234a..d9d9555 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -179,7 +179,15 @@ export function getJuliaVersion(availableReleases: string[], versionInput: strin if (!juliaCompatRange) { throw new Error('Unable to use version "min" when the Julia project file does not specify a compat for Julia') } - version = semver.minSatisfying(availableReleases, juliaCompatRange, {includePrerelease}) + // true_min_version is the actual minimum + // E.g. if the Julia [compat] entry is "1.10", then true_min_version is v"1.10.0" + let true_min_version = semver.minSatisfying(availableReleases, juliaCompatRange, {includePrerelease}) + let my_tilde_range = `~${true_min_version}` + // min_with_patch is the minimum major/minor, but latest patch + // E.g. if the Julia [compat] entry is "1.10", then true_min_version is v"1.10.10" (or whatever the latest 1.10.x patch is) + // https://github.com/julia-actions/setup-julia/issues/372 + min_with_patch = semver.maxSatisfying(availableReleases, my_tilde_range, {includePrerelease}) + version = min_with_patch } else if (versionInput == "lts") { version = semver.maxSatisfying(availableReleases, LTS_VERSION, { includePrerelease: false }); } else if (versionInput == "pre") {