Skip to content

Commit 960fcce

Browse files
Merge pull request #2 from TypeScriptToLua/master
das
2 parents af2cd50 + 17bb60f commit 960fcce

File tree

150 files changed

+10512
-10362
lines changed

Some content is hidden

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

150 files changed

+10512
-10362
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v1
1515
- uses: actions/setup-node@v1
16-
- run: npm install --global npm@6
1716
- run: npm ci
1817
- run: npm run lint
1918
env:
@@ -27,12 +26,11 @@ jobs:
2726
os: [ubuntu-latest, windows-latest]
2827

2928
steps:
30-
- uses: actions/checkout@v1
31-
- name: Use Node.js 8.5.0
29+
- uses: actions/checkout@v2
30+
- name: Use Node.js 12.13.1
3231
uses: actions/setup-node@v1
3332
with:
34-
node-version: 8.5.0
35-
- run: npm install --global npm@6
33+
node-version: 12.13.1
3634
- run: npm ci
3735
- run: npm run build
3836
- run: npx jest --maxWorkers 2 --coverage

.github/workflows/release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ 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"
17-
- run: npm install --global npm@6
1819
- run: npm ci
1920
- run: npm run build
2021
- run: npm publish

CHANGELOG.md

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

3+
## 0.30.0
4+
5+
- **Breaking:** We dropped support for `var` variables. If you still have any `var` variable declarations, please use `let` or `const` instead.
6+
- **Breaking:** We now depend on Node.js >= 12.13.0
7+
- Added support for string `trimLeft`, `trimRight`, `trimStart` and `trimEnd`.
8+
- Added support for `console.error`, `console.warn` and `console.info` , they will all be transpiled to Lua's `print`.
9+
- Avoided exporting anonymous identifiers.
10+
- Fixed an issue when assigning to an already-exported variable.
11+
- Math.atan2 will now be transpiled to the correct Lua atan2 (or atan for 5.3) method.
12+
- Fixed various destructuring issues.
13+
- Fixed incorrect error for intersection types containing built-ins (like `number` or `string`)
14+
- Modules containing `import` or `export` will now always be recognized as module to match TypeScript's logic.
15+
- Fixed `true` not being recognized as lua keyword.
16+
- Fixed inaccuracies in switch case variable scoping.
17+
- Fixed various problems with variables being global instead of local.
18+
19+
### Internal:
20+
21+
- Refactored transformation pipeline from one big LuaTransformer class to many small modules.
22+
- Moved class construction methods from transformer to LuaLib.
23+
- Upgraded dependencies.
24+
325
## 0.29.0
426

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

package-lock.json

Lines changed: 822 additions & 1173 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 14 additions & 14 deletions
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.30.1",
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",
@@ -18,7 +18,7 @@
1818
"main": "dist/index.js",
1919
"types": "dist/index.d.ts",
2020
"scripts": {
21-
"build": "tsc -p tsconfig.json && npm run build-lualib",
21+
"build": "tsc && npm run build-lualib",
2222
"build-lualib": "ts-node --files ./build_lualib.ts",
2323
"pretest": "npm run lint && ts-node --files --transpile-only ./build_lualib.ts",
2424
"test": "jest",
@@ -36,27 +36,27 @@
3636
"tstl": "./dist/tstl.js"
3737
},
3838
"engines": {
39-
"node": ">=8.5.0"
39+
"node": ">=12.13.0"
4040
},
4141
"dependencies": {
42-
"resolve": "^1.11.0",
42+
"resolve": "^1.13.1",
4343
"source-map": "^0.7.3",
44-
"typescript": "^3.6.2"
44+
"typescript": "^3.7.3"
4545
},
4646
"devDependencies": {
4747
"@types/fs-extra": "^8.0.1",
4848
"@types/glob": "^7.1.1",
49-
"@types/jest": "^24.0.15",
50-
"@types/node": "^11.13.14",
49+
"@types/jest": "^24.0.23",
50+
"@types/node": "^12.12.14",
5151
"@types/resolve": "0.0.8",
5252
"fengari": "^0.1.4",
5353
"fs-extra": "^8.1.0",
54-
"javascript-stringify": "^2.0.0",
55-
"jest": "^24.8.0",
56-
"jest-circus": "^24.8.0",
57-
"prettier": "^1.18.2",
58-
"ts-jest": "^24.0.2",
59-
"ts-node": "^7.0.1",
60-
"tslint": "^5.17.0"
54+
"javascript-stringify": "^2.0.1",
55+
"jest": "^24.9.0",
56+
"jest-circus": "^24.9.0",
57+
"prettier": "^1.19.1",
58+
"ts-jest": "^24.2.0",
59+
"ts-node": "^8.5.4",
60+
"tslint": "^5.20.1"
6161
}
6262
}

src/Decorator.ts

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)