0.144.0
Added
- Lua
oslibrary support — theoslibrary is now available in the Lua sandbox, providing access to date, time, and environment functions. Parity with Neovim: all functions available on desktop, nil on mobile.os.executeandos.exitare permanently blocked for security.- Plugin:
src/lua/engine.ts(openedoslibrary, added defense-in-depth blocks)
- Plugin:
Changed
- Fengari CJS-to-TypeScript-ESM conversion — all 37 fengari source files converted from CommonJS JavaScript to TypeScript ESM with full typing (
strict: true). Broken circular dependencies betweendefs.ts/luaconf.tsandlinit.ts/lualib.ts. Implemented a hybrid TValue type system with type predicates and narrowed accessors.- Plugin:
src/lib/fengari/*.ts(37 files converted from.jsCJS to.tsESM) - Plugin:
src/lib/fengari/index.ts(barrel rewritten — noas anycasts) - Plugin:
src/lib/fengari/platform.ts(was.js) - Plugin:
src/lib/fengari/package.json(removed — CJS marker no longer needed) - Plugin:
src/lib/fengari/DIFFERENCES.md(updated for TS conversion) - Plugin:
src/lua/engine.ts(null check forluaL_newstate()) - Plugin:
vitest.config.ts(removed.test.jspattern) - Plugin:
eslint.config.mts(removed all fengari-specific rule overrides — all suppressions now inline with descriptions) - Plugin:
src/lib/fengari/lbaselib.ts(console.log→console.warnfor Luaprint()fallback — dead code in plugin context, avoids community scannerno-consolewarning) - Plugin:
src/lua/engine.ts(narrowedlua_atnativeerrorhandler string coercion)
- Plugin:
- Host-agnostic Lua runtime — replaced platform guards with a dependency injection pattern. Fengari no longer sniffs for Node.js or browser environments, instead using a provider injected by the plugin.
- Plugin:
src/lib/fengari/platform.ts(platform provider implementation) - Plugin:
src/lua/engine.ts(injected Obsidian platform provider)
- Plugin:
Tests
- 23 unit tests in
test/unit/fengari/(6 fork-specific converted to typed TS, 17 upstream absorbed from fengari repo) - 13 unit tests in
test/unit/lua/os-lib.test.tsfor theoslibrary
Documentation
CHANGELOG.mdAGENTS.md: updated fengari section — TypeScript ESM conversion, TValue type system, test organizationCONTRIBUTING.md: updated fengari directory descriptionKNOWN_LIMITATIONS.md: updated absorbed fengari references and linksdocs/configuration/lua-config.md: updated absorbed fengari references
Full Changelog: 0.143.0...0.144.0