Socket
Socket
Sign inDemoInstall

typescript-to-lua

Package Overview
Dependencies
Maintainers
2
Versions
157
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typescript-to-lua - npm Package Versions

1
16

0.40.0

Diff

Changelog

Source

0.40.0

  • Added support for using external Lua code in your project. This means you can create and install node_modules packages containing Lua code. It also lets you include Lua source files as part of your source files. Used Lua will automatically be added to your output. For more information, see the External Lua Code page in the docs.

  • [Breaking] Removed support for deprecated annotations that have been replaced with language extensions: /** @luaIterator */, /** @vararg */, /** @luatable */ and /** forRange */. If you were still using these, see the docs for instructions how to upgrade.

  • Added support for array.entries().

  • Added support for LuaTable.has(key) and LuaTable.delete(key) to the language extensions. See docs for more info.

  • Made language extension types more strict, disallowing null and undefined in some places where they would cause problems in Lua.

  • Fixed an issue where using TypeScript transformer plugins would cause invalid namespace and module code, as well as breaking hoisting.

  • Fixed invalid switch statement output when the default clause was not the last clause in the switch.

  • Fixed missing LuaLib dependency when using string.split.

  • Fixed lots of bundling bugs and issues, also added the TypeScriptToLua header to the top of the bundle unless noHeader is specified.

Under the hood:

  • Various improvements to testing infrastructure for testing (virtual) projects with multiple files.
perryvw
published 0.39.6 •

perryvw
published 0.39.5 •

perryvw
published 0.39.4 •

perryvw
published 0.39.3 •

perryvw
published 0.39.2 •

perryvw
published 0.39.1 •

perryvw
published 0.39.0 •

Changelog

Source

0.39.0

  • [Breaking] Removed support for @phantom, @metaExtension, @extension, @pureAbstract compiler annotations. As of this version these will no longer function! For help upgrading your code see the deprecated annotation docs.
  • Added official support for Lua 5.4.
  • Added the LuaTable<TKey, TValue> language extension. This allows the use of barebones Lua tables for key-value storage, without suffering from JS's forced string indexes. For more information see the LuaTable docs.
  • Deprecated @vararg. Instead, tstl will figure out itself when use of the Lua ellipsis token (...) is appropriate. Also language extension $vararg was added to force use of the ellipsis token. See the docs for more information.
  • Added trailingComments and leadingComments fields to statements in the Lua AST. These can be modified by plugins to emit comments in the output lua. For an example see the add-comments test plugin.

Under the hood:

  • Tests are now run on a WebAssembly-compiled version of official Lua releases. This means we can now execute test Lua on all Lua versions (except LuaJIT). Shoutout to Fengari for serving us well for a long time.
perryvw
published 0.38.1 •

perryvw
published 0.38.0 •

Changelog

Source

0.38.0

  • [Breaking] Renamed MultiReturn to LuaMultiReturn to be consistent with other language extensions all starting with Lua-.
  • Fixed various bugs and issues related to LuaMultiReturn, including its value not correctly being wrapped in some cases.
  • Added support for indexing LuaMultiReturn values without destructing.
  • Added language extensions to allow translation directly to (overwritten) Lua operators like +,-,... For more information see Operator Map Types.
  • Added language extension $range(). This function can be used to create numeric lua loops, for example for (const i of $range(1, 10)) { translates to for i=1,10 do. For more information see $range Iterator Function.
  • Added support for Array.isArray, formalizing tstl's isArray convention (note: Due to [] and {} being the same in Lua, {} - without any keys - is considered an array too.)
  • Added support for string.prototype.includes.
  • Added support for enum merging.
  • Fixed missing lualib dependency in string.prototype.split.
  • Added a not-supported diagnostic for not-yet-implemented optional chaining (a?.b).
  • Moved remaining legacy tests to modern testing utils, removing the legacy testing code.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc