Skip to content

Commit e850d98

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 46367c1 + 6b068dc commit e850d98

187 files changed

Lines changed: 10291 additions & 6634 deletions

File tree

Some content is hidden

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

.devcontainer/devcontainer.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
{
22
"name": "TypeScriptToLua",
3-
"image": "mcr.microsoft.com/vscode/devcontainers/javascript-node:14",
4-
"settings": {
5-
"terminal.integrated.shell.linux": "/bin/bash"
6-
},
3+
"image": "mcr.microsoft.com/vscode/devcontainers/javascript-node:18",
74
"extensions": [
85
"typescript-to-lua.vscode-typescript-to-lua",
96
"dbaeumer.vscode-eslint",
107
"editorconfig.editorconfig",
118
"esbenp.prettier-vscode"
129
],
13-
"postCreateCommand": "npm ci"
10+
"postCreateCommand": "npm ci",
11+
"remoteUser": "node"
1412
}

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ module.exports = {
55
project: [
66
"test/tsconfig.json",
77
"src/lualib/tsconfig.json",
8+
"src/lualib/tsconfig.lua50.json",
89
"benchmark/tsconfig.json",
910
"language-extensions/tsconfig.json",
1011
],

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Sponsoring TypeScriptToLua helps us stay motivated and shows your appreciation for our work!
2+
github: [Perryvw]

.github/workflows/ci.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
steps:
3131
- uses: actions/checkout@v2
32-
- name: Use Node.js 15.14.0
32+
- name: Use Node.js 16.14.0
3333
uses: actions/setup-node@v1
3434
with:
3535
node-version: 16.14.0
@@ -59,16 +59,30 @@ jobs:
5959
uses: actions/checkout@v2
6060
with:
6161
path: commit
62-
- name: Use Node.js 12.13.1
62+
- name: Use Node.js 16.14.0
6363
uses: actions/setup-node@v1
6464
with:
6565
node-version: 16.14.0
6666
# NPM
67-
- name: NPM master
68-
run: npm ci && npm run build
67+
# install and build master
68+
- name: npm ci master
69+
run: npm ci
6970
working-directory: master
70-
- name: NPM commit
71-
run: npm ci && npm run build
71+
- name: Use local tstl language extensions
72+
run: npm i lua-types@latest && npm i -D file:.
73+
working-directory: master
74+
- name: Build master
75+
run: npm run build
76+
working-directory: master
77+
# install and build commit
78+
- name: npm ci commit
79+
run: npm ci
80+
working-directory: commit
81+
- name: Use local tstl language extensions
82+
run: npm i -D file:.
83+
working-directory: commit
84+
- name: Build commit
85+
run: npm run build
7286
working-directory: commit
7387
# Benchmark directory setup
7488
- name: Ensure benchmark data dir exists

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
steps:
1313
- uses: actions/checkout@v2
14-
- name: Use Node.js 12.13.1
14+
- name: Use Node.js 16.14.0
1515
uses: actions/setup-node@v1
1616
with:
1717
node-version: 16.14.0

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ yarn.lock
99

1010
benchmark/data/*
1111
benchmark/dist/*
12+
13+
# v8 cpu profiles
14+
*-.log
15+
*.cpuprofile

CHANGELOG.md

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

3+
## 1.10.0
4+
5+
- **[Breaking]** Upgraded TypeScript to 4.8.
6+
- **[Breaking]** Changed how language-extensions are distributed, you should now put `"types": ["@typescript-to-lua/language-extensions"]` in your tsconfig.json (instead of "typescript-to-lua/...").
7+
- Added support for **Lua 5.0**, thanks for the effort @YoRyan!
8+
- Added support for TypeScript 4.7 [instantiation expressions](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-7.html#instantiation-expressions).
9+
- Fixed a bug causing some `require` uses not being recognized my module resolution, leading to missing files in the output.
10+
11+
## 1.9.0
12+
13+
- Added a warning when trying to use a type in a condition that can never be false in Lua, such as numbers or strings. (Only when `strictNullChecks` is enabled.)
14+
- Fixed some missing and misplaced errors when trying to reference LuaTable/LuaMap/LuaSet functions without calling them.
15+
- Fixed a bug in the `get()` type of `ReadOnlyLuaMap`. It is now typed the same as `LuaMap`, i.e. it can return `undefined`.
16+
- Fixed an issue in bundling that could sometimes lead to invalid bundle entry requires.
17+
- Added a warning when using `paths` without specifying `baseUrl`.
18+
- Fixed exception while checking for standard library types.
19+
20+
## 1.8.0
21+
22+
- Added support for the [tsconfig.json paths](https://www.typescriptlang.org/tsconfig#paths) configuration option.
23+
- Fixed spreading lua iterables & iterators translating to incorrect lua.
24+
- You can now write things like `[...pairs(obj)]`.
25+
- Fixed a bug in module resolution resolving the wrong lua files when having the same file names in nested directories.
26+
- Fixed a bug causing temporary variables for nested destructuring in loop variables to be outside the loop, instead of inside.
27+
- Fixed import expressions not actually requiring their import.
28+
- Fixed `super` calls not being source-mapped correctly.
29+
30+
## 1.7.0
31+
32+
- Added support for `LuaMap` and `LuaSet` language extensions that translate to very low level Lua table operations. See [our docs](https://typescripttolua.github.io/docs/advanced/language-extensions/#luamap-and-luaset) for more information.
33+
- Big performance improvements, speeding up TSTL translation by 2-3x. Thanks @GlassBricks!
34+
- Reduced the use of temorary variables.
35+
- Moved tsconfig-schema into main TypeScriptToLua repository.
36+
- Added support for array options in tstl CLI.
37+
- Fixed bug where promise `then` was not correctly forwarding the result value to chained promises.
38+
- Fixed a bug causing false positive errors from jsdoc documentation comments.
39+
- Fixed various calling context bugs.
40+
341
## 1.6.0
442

543
- **[Breaking]** Upgraded TypeScript to 4.7

benchmark/tsconfig.53.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
4-
"types": ["lua-types/5.3"]
4+
"types": ["lua-types/5.3", "@typescript-to-lua/language-extensions"]
55
},
66
"tstl": {
77
"luaTarget": "5.3"

benchmark/tsconfig.jit.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
4-
"types": ["lua-types/jit"]
4+
"types": ["lua-types/jit", "@typescript-to-lua/language-extensions"]
55
},
66
"tstl": {
77
"luaTarget": "JIT"

benchmark/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"target": "esnext",
44
"lib": ["esnext"],
55
// Dev types are JIT
6-
"types": ["lua-types/jit"],
6+
"types": ["lua-types/jit", "@typescript-to-lua/language-extensions"],
77
"moduleResolution": "node",
88
"outDir": "dist",
99
"rootDir": "src",

0 commit comments

Comments
 (0)