|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +## 1.21.0 |
| 4 | + |
| 5 | +- Added support for `continue` for Lua 5.0, 5.1 and universal targets. |
| 6 | +- Added support for the new `/** @customName myCustomName **/` decorator, which allows renaming of variables and identifiers. |
| 7 | + - This is useful to get around names that are reserved keywords in TypeScript, but are used in Lua API |
| 8 | +- Fixed a bug that caused super calls in static methods to throw an error |
| 9 | + |
| 10 | +## 1.20.0 |
| 11 | + |
| 12 | +- Added support for `Number.parseInt` and `Number.parseFloat` (mapped to same implementation as global `parseInt` and `parseFloat`) |
| 13 | +- Added implementation for multiple `Number` constants like `Number.EPSILON` |
| 14 | +- Added support for `Array.at` |
| 15 | +- Fixed a bug when throwing an error object in a Lua environment without `debug` module |
| 16 | +- Fixed a bug causing files not to be found when returning an absolute path from a `moduleResolution` plugin |
| 17 | + |
| 18 | +## 1.19.0 |
| 19 | + |
| 20 | +- Added support for the new TypeScript 5.2 `using` keyword for explicit resource management. See the [TypeScript release notes](https://devblogs.microsoft.com/typescript/announcing-typescript-5-2/#using-declarations-and-explicit-resource-management) for more information. |
| 21 | +- Added support for the newly introduced 'copying array methods' `toReversed`, `toSorted`, `toSpliced` and `with`. These were also introduced in TypeScript 5.2, see [their release notes](https://devblogs.microsoft.com/typescript/announcing-typescript-5-2/#copying-array-methods) for more information. |
| 22 | + |
| 23 | +## 1.18.0 |
| 24 | + |
| 25 | +- Upgraded TypeScript to 5.2.2 |
| 26 | +- The `noResolvePaths` option now accepts glob paths (for example, 'mydir/hello\*' to not resolve any files in mydir starting with hello). |
| 27 | + - This also allows disabling module resolution completely by providing a '\*\*' pattern in your tsconfig.json `noResolvePaths`. |
| 28 | + |
| 29 | +## 1.17.0 |
| 30 | + |
| 31 | +- Added the `moduleResolution` plugin, allowing you to provide custom module resolution logic. See [the docs](https://typescripttolua.github.io/docs/api/plugins#moduleresolution) for more info. |
| 32 | +- Added `isEmpty` to `LuaTable`, `LuaMap` and `LuaSet` (and their read-only counterparts). This simply to `next(tbl) == nil`, allowing for a simple check to see if a table is empty or not. |
| 33 | +- Fixed a bug with synthetic nodes (e.g. created by custom TypeScript transformers) throwing an exception. |
| 34 | +- Fixed unnecessary extra unpacking of tables |
| 35 | +- Fixed some bugs with new decorators |
| 36 | + |
| 37 | +## 1.16.0 |
| 38 | + |
| 39 | +- Upgraded TypeScript to 5.1.3. |
| 40 | +- Added support for [TypeScript 5.0 decorators](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-0.html#decorators). |
| 41 | + - Old-style decorators will still work as long as you have `experimentalDecorators` configured, otherwise the new standard is used. |
| 42 | +- Added support for [class static initialization blocks](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Static_initialization_blocks). |
| 43 | +- Fixed a bug causing the `tstl` object in tsconfig.json not to be properly extended when extending a tsconfig from node_modules. |
| 44 | + |
| 45 | +## 1.15.0 |
| 46 | + |
| 47 | +- Using `extends` in tsconfig.json now also correctly merges settings in the `tstl` block (shallow merge). |
| 48 | +- Now avoiding assigning default parameter values if the default value is `nil` (`null` or `undefined`). |
| 49 | +- Fixed a bug where indexing a `LuaMultiReturn` value with [0] would still return everything. |
| 50 | +- Fixed a bug with nested namespaces causing unexpected nil indexing errors. |
| 51 | + |
| 52 | +## 1.14.0 |
| 53 | + |
| 54 | +- **[Breaking]** Upgraded TypeScript to 5.0. |
| 55 | +- Added support for `Number.toFixed`. |
| 56 | +- Added support for spread expressions with `LuaPairsIterable` and `LuaPairsKeysIterable`. |
| 57 | +- Fixed a bug breaking module resolution when using a custom file extension. |
| 58 | +- Fixed various exceptions that could happen when trying to translate invalid TS. |
| 59 | + |
| 60 | +## 1.13.0 |
| 61 | + |
| 62 | +- Fixed alternate file extensions (other than .lua, if configured) breaking module resolution and emitted require statements. |
| 63 | +- Added experimental support for `"luaLibImport": "require-minimal"` configuration option. This will output a lualib bundle containing only the lualib functions used by your code. This might not work if you are including external tstl-generated Lua, for example from a npm package. |
| 64 | +- Added support for the "exports" field in package.json. |
| 65 | +- Fixed some exceptions resulting from invalid language-extensions use. |
| 66 | +- Fixed an exception when using compound assignment (like `+=`) with array length. |
| 67 | + |
| 68 | +## 1.12.0 |
| 69 | + |
| 70 | +- Reworked how tstl detects and rewrites `require` statements during dependency resolution. This should reduce the amount of false-positive matches of require statements: require statements in string literals or comments should no longer be detected by tstl. This means require statements in string literals or comments can survive the transpiler without causing a 'could not resolve lua sources' error or getting rewritten into nonsense. |
| 71 | +- Now using `math.mod` for Lua 5.0 modulo operations. |
| 72 | + |
| 73 | +## 1.11.0 |
| 74 | + |
| 75 | +- **[Breaking]** Upgraded TypeScript to 4.9. |
| 76 | +- `--tstlVerbose` now prints more resolver output when failing to resolve Lua sources. |
| 77 | +- Fixed a bug breaking default exported classes with unicode names |
| 78 | +- Relaxed conditions for the always-true warning to false positives. |
| 79 | + |
3 | 80 | ## 1.10.0 |
4 | 81 |
|
5 | 82 | - **[Breaking]** Upgraded TypeScript to 4.8. |
|
0 commit comments