darklua
darklua copied to clipboard
rename_variables does not rename modules in typedefs
Minimal repro, expected this:
-- types
export type foo = { bar = "idk" }
return nil
-- other module
local types = require("./types")
type foo = types.foo
to be transformed as:
-- types
export type foo = { bar = "idk" }
return nil
-- other module
local a = require("./types")
type foo = a.foo
Actually transformed without renaming the typedef:
-- types
export type foo = { bar = "idk" }
return nil
-- other module
local a = require("./types")
type foo = types.foo
Came from https://github.com/prvdmwrong/prvdmwrong, run the build script (lune run build-pkg) and accept "Publish these packages to NPM and Wally?" when prompted (comment lines around 265 to not actually publish)