|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +## 0.31.0 |
| 4 | + |
| 5 | +- **Breaking:** The old annotation syntax (`/* !varArg */`) **no longer works**, the only currently supported syntax is: |
| 6 | + |
| 7 | + `/** @varArg */`. |
| 8 | + |
| 9 | +- **Breaking:** Fixed some cases where variables were **incorrectly** not labeled `local`. The only variables that are implicitly put in the global context are _top-level variables in non-module files, without any imports or exports in their file_. |
| 10 | + |
| 11 | +- Moved handling of parentheses out of the transformers and unified this logic in the printer. This might result in some more parentheses in the generated code, but also makes it more correct and fixes some related bugs. |
| 12 | + |
| 13 | +- Added support for `array.includes`. |
| 14 | + |
| 15 | +- Fixed a bug breaking global augmentation. |
| 16 | + |
| 17 | +- Fixed hoisting breaking if there were synthetic nodes in the AST (i.e. when a TS transformer modified the AST). |
| 18 | + |
| 19 | +## 0.30.0 |
| 20 | + |
| 21 | +- **Breaking:** We dropped support for `var` variables. If you still have any `var` variable declarations, please use `let` or `const` instead. |
| 22 | +- **Breaking:** We now depend on Node.js >= 12.13.0 |
| 23 | +- Added support for string `trimLeft`, `trimRight`, `trimStart` and `trimEnd`. |
| 24 | +- Added support for `console.error`, `console.warn` and `console.info` , they will all be transpiled to Lua's `print`. |
| 25 | +- Avoided exporting anonymous identifiers. |
| 26 | +- Fixed an issue when assigning to an already-exported variable. |
| 27 | +- Math.atan2 will now be transpiled to the correct Lua atan2 (or atan for 5.3) method. |
| 28 | +- Fixed various destructuring issues. |
| 29 | +- Fixed incorrect error for intersection types containing built-ins (like `number` or `string`) |
| 30 | +- Modules containing `import` or `export` will now always be recognized as module to match TypeScript's logic. |
| 31 | +- Fixed `true` not being recognized as lua keyword. |
| 32 | +- Fixed inaccuracies in switch case variable scoping. |
| 33 | +- Fixed various problems with variables being global instead of local. |
| 34 | + |
| 35 | +### Internal: |
| 36 | + |
| 37 | +- Refactored transformation pipeline from one big LuaTransformer class to many small modules. |
| 38 | +- Moved class construction methods from transformer to LuaLib. |
| 39 | +- Upgraded dependencies. |
| 40 | + |
3 | 41 | ## 0.29.0 |
4 | 42 |
|
5 | 43 | - Added bundling support using options `luaBundle` and `luaBundleEntry` (so **not** TS's outFile). This will bundle all output files into one single bundle file, with _luaBundleEntry_ as entry point. For more information on these options see https://github.com/TypeScriptToLua/TypeScriptToLua/wiki#tstl-specific-options |
|
0 commit comments