From f6090f9c9892d8ac27d696bc1183ed80150abae7 Mon Sep 17 00:00:00 2001 From: Erica Marigold Date: Sun, 10 Nov 2024 20:46:01 +0530 Subject: [PATCH] feat: trim leading `v` in versions --- lib/init.luau | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/init.luau b/lib/init.luau index a2b44d7..44674c4 100644 --- a/lib/init.luau +++ b/lib/init.luau @@ -91,7 +91,7 @@ local PRERELEASE_LEX_ORDER: { [PreleaseType]: number } = { } function Semver.parse(ver: string): SemverResult - local components = string.split(ver, ".") + local components = string.split(if stringStartsWith(ver, "v") then string.sub(ver, 2) else ver, ".") if #components < 3 then return Result.Err({ msg = Option.Some(`Expected MAJOR.MINOR.PATCH format, missing {#components} / 3 components`),