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

1.2.0

Diff

Changelog

Source

1.2.0

  • Upgraded to TypeScript 4.5.x.
  • Improved general output formatting.
  • Added support for more complicated (nested) destructuring patterns, also fixing an exception they caused before.
  • Fixed incorrect interactions between standard library functionality and optional chaining, e.g. myArray?.forEach().
  • Fixed rejected promises sometimes not getting the correct rejection reason.
  • Fixed some delete behavior that was different in Lua compared to JS.
  • Fixed a bug causing exported classes to lose their decorators.
  • Fixed plugins checking for ts-node from the wrong location (tsconfig directory), plugins will now check for ts-node relative to the tstl directory.

Under the hood:

  • We can now transform using preceding statements, allowing all kinds of optimizations and improvements to output Lua.
  • Updated various language constructs to use preceding statements instead of inline immediately-invoked functions.
perryvw
published 1.1.1 •

perryvw
published 1.1.0 •

Changelog

Source

1.1.0

  • [Breaking] We now use TypeScript's JSX transformer instead of maintaining our own. As a result, React.createElement now requires a self parameter, so remove @noSelf, this: void if necessary.
  • [Breaking(-ish)] Due to limitations in 5.1, try/catch can no longer be used in async or generator functions when targetting Lua 5.1. This was already broken but now tstl will explicitly give an error if you try.
  • Added support for the switch statement in all versions! (Before they were not supported in 5.1 and universal).
  • Added support for string.prototype.replaceAll and improved string.prototype.replace implementation.
  • Added noResolvePaths tsconfig option to disable module resolution for environment-provided modules.
  • Implemented support for void expressions, i.e void(0) or void(ignoreThisReturnValue()).
  • Upgraded TypeScript to 4.4.4 and made it a peer dependency to hopefully avoid plugin issues due to mismatching TypeScript versions.
  • The $vararg language extension can be used to access CLI arguments, now also in bundles.
  • Fixed a bug regarding baseUrl and relative imports.
  • Fixed sourceMapTraceback: true not working correctly for bundles.
  • Fixed an issue regarding hoisting in switch case clauses.
  • Added missing function context validation cases for object literals.
  • Fixed a problem where awaiting rejected promises in try/catch would give the wrong result.
  • Fixed an issue where chained .then calls on already-resolved or already-rejected promises would cause some callbacks to not fire while they should.
  • Fixed source file paths in source maps being absolute, they are now relative again.
perryvw
published 1.0.1 •

perryvw
published 1.0.0 •

Changelog

Source

1.0.0

  • [Breaking] /* @tupleReturn */ has been removed and will no longer have any effect. You will get an error if you try ot use it or if you use declarations that use it.
  • Added support for the Promise class.
  • Added support for async and await using coroutines.
  • Module resolution now also correctly resolves <directory>/init.lua files for require("<directory>").
  • Fixed an error not being thrown when trying to call a method in an optional chain that does not exist. (If the method itself is not optional)
  • Fixed a bug where parentheses could break the context parameter being resolved for a method.
  • Fixed a bug where context parameters in object literal methods were not inferred correctly.
  • Fixed a bug with sourceMapTraceback.
  • Fixed TS emitting empty JSON files if you use JSON source files.
perryvw
published 0.42.0 •

Changelog

Source

0.42.0

  • [Breaking] The /** @tupleReturn */ is now deprecated, and will be removed next release. If you are still using it, please upgrade to the LuaMultiReturn language extension.
  • Added support for JSX, see documentation for more information.
  • Added support for the baseUrl configuration key for module resolution.

A large list of bugfixes:

  • Fixed an exception causing tstl to exit when trying to assign to an optional chain.
  • Fixed resolved files appearing duplicated in lua bundles.
  • Fixed a problem resolving external Lua files in nested directories.
  • Fixed @noResolution in library packages losing their NoResolution tag, causing attempts to resolve them for package users.
  • Fixed a bug in the bundling code causing modules not to be cached if they return nil (which happens if they are not a module)
  • Fixed module resolution trying to incorrectly resolve and rewrite things like myObject.require() or my_custom_require().
  • Fixed lualib bundle not being included in the output if external packages use it, but the client code does not.
perryvw
published 0.41.2 •

perryvw
published 0.41.1 •

perryvw
published 0.41.0 •

Changelog

Source

0.41.0

  • Added support for optional chaining a?.b, a?.[b] and a?.().
  • Added an error when trying to bundle a library ("buildmode": "library") project.
  • Added --tstlVerbose CLI flag to help with diagnosing problems.
  • Fixed a bug where vararg (...) was not correctly optimized.
  • Fixed .tsx files not correctly being resolved.
  • Fixed a bug where files were emitted to the wrong location if no outDir was specified.
perryvw
published 0.40.1 •

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