darklua icon indicating copy to clipboard operation
darklua copied to clipboard

rename_variables does not rename modules in typedefs

Open znotfireman opened this issue 1 year ago • 0 comments

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)

Ảnh màn hình 2024-08-20 lúc 18 21 10

znotfireman avatar Aug 20 '24 11:08 znotfireman