Skip to content

Commit 68cb2df

Browse files
committed
Merge remote-tracking branch 'upstream/master' into tsconfig-plugins
2 parents 2c97f52 + 592c275 commit 68cb2df

File tree

95 files changed

+1527
-1489
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+1527
-1489
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
os: [ubuntu-latest, windows-latest]
2727

2828
steps:
29-
- uses: actions/checkout@v1
29+
- uses: actions/checkout@v2
3030
- name: Use Node.js 12.13.1
3131
uses: actions/setup-node@v1
3232
with:

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v1
14-
- uses: actions/setup-node@v1
13+
- uses: actions/checkout@v2
14+
- name: Use Node.js 12.13.1
15+
uses: actions/setup-node@v1
1516
with:
17+
node-version: 12.13.1
1618
registry-url: "https://registry.npmjs.org"
1719
- run: npm ci
1820
- run: npm run build

CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,43 @@
11
# Changelog
22

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+
341
## 0.29.0
442

543
- 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

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ The real power of this transpiler is usage together with good declarations for t
6363
- [Dota 2 Modding](https://github.com/ModDota/API/tree/master/declarations/server)
6464
- [Defold Game Engine Scripting](https://github.com/dasannikov/DefoldTypeScript/blob/master/defold.d.ts)
6565
- [LÖVE 2D Game Development](https://github.com/hazzard993/love-typescript-definitions)
66+
- [World of Warcraft - Addon Development](https://github.com/wartoshika/wow-declarations)
67+
- [World of Warcraft Classic - Addon Development](https://github.com/wartoshika/wow-classic-declarations)
6668

6769
## Sublime Text integration
6870

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typescript-to-lua",
3-
"version": "0.29.1",
3+
"version": "0.31.0",
44
"description": "A generic TypeScript to Lua transpiler. Write your code in TypeScript and publish Lua!",
55
"repository": "https://github.com/TypeScriptToLua/TypeScriptToLua",
66
"license": "MIT",

src/CompilerOptions.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export type CompilerOptions = OmitIndexSignature<ts.CompilerOptions> & {
2929
luaBundleEntry?: string;
3030
luaTarget?: LuaTarget;
3131
luaLibImport?: LuaLibImportKind;
32-
noHoisting?: boolean;
3332
sourceMapTraceback?: boolean;
3433
luaPlugins?: LuaPluginImport[];
3534
plugins?: Array<ts.PluginImport | TransformerImport>;

0 commit comments

Comments
 (0)