diff --git a/.lune/install.luau b/.lune/install.luau index afc98889..1cd65d12 100644 --- a/.lune/install.luau +++ b/.lune/install.luau @@ -3,12 +3,20 @@ local fs = require("@lune/fs") local constants = require("./lib/constants") local run = require("./lib/run") -local function toPascalCase(text: string) - return text:gsub("(.+)(%.%w+)$", function(name, ext) - return name:gsub("(%a)(%w+)", function(first, rest) - return `{first:upper()}{if rest then rest else ""}` - end):gsub("%-", "") .. ext - end) +local function toPascalCase(filename: string) + local name, ext = filename:match("(.+)(%.%w+)$") + + local function upperFirstLetter(first: string, rest: string) + return `{first:upper()}{if rest then rest else ""}` + end + + if name and ext then + name = filename:gsub("(%a)(%w+)", upperFirstLetter :: any):gsub("%-", "") + + return name .. ext + else + return filename + end end local function convertPackageNames()