Skip to content

fix(module): rename init.lua to main.lua for LuaRocks compat#36

Merged
wrxck merged 1 commit intodevelopfrom
fix/issue-35-module-structure
Feb 20, 2026
Merged

fix(module): rename init.lua to main.lua for LuaRocks compat#36
wrxck merged 1 commit intodevelopfrom
fix/issue-35-module-structure

Conversation

@wrxck
Copy link
Owner

@wrxck wrxck commented Feb 20, 2026

Summary

  • Renamed src/init.luasrc/main.lua so LuaRocks builtin installs the main module as a flat telegram-bot-lua.lua file instead of telegram-bot-lua/init.lua
  • This fixes require("telegram-bot-lua") on Lua 5.1 environments where ?/init.lua isn't in the default package.path
  • Added 84 module structure tests covering require paths, rockspec integrity, and submodule loading
  • Version bump to 3.2-0

Closes #35

LuaRocks builtin type installs init.lua as a directory module
(telegram-bot-lua/init.lua) instead of a flat file (telegram-bot-lua.lua).
This breaks require("telegram-bot-lua") on Lua 5.1 environments where
?/init.lua is not in the default package.path.

Renaming to main.lua forces LuaRocks to install as a flat file, which
resolves via the universal ?.lua pattern on all Lua versions.

Closes #35
@wrxck wrxck merged commit 6b550af into develop Feb 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant