Repository navigation
v0.5.1 - TypeScript declarations, vm.protect, lua2js comment fix
Security fix (lua2js): a Lua line comment containing a bare CR, U+2028 or U+2029 ended the generated // comment early, so the rest of the comment ran as JavaScript. Those characters are now replaced by spaces. If you translated untrusted Lua with 0.5.0, review the comments in the output.
New:
- TypeScript declarations (
src/fengari.d.ts,"types"inpackage.json) forFengariVm,LuaRef,LuaError,LimitError,Coroutine,Userdata,LuaFloat, the options and thelua2jsresult. The C-API namespaces are typedanyfor now. vm.throwLuaError(L, index = -1): throws the Lua error value atindexas aLuaError(LimitErrorafter a limit overrun).vm.protect(fn): runs a host callback in a Lua protected call, so Lua errors raised through the C API becomeLuaError/LimitErrorand the stack is restored.
See CHANGES.md for details.