Skip to content

Commit 9689192

Browse files
committed
2 parents 942c8a7 + b345e86 commit 9689192

82 files changed

Lines changed: 8016 additions & 5370 deletions

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
],

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
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+
311
## 1.9.0
412

513
- 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.)

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",

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const isCI = require("is-ci");
1+
const isCI = process.env.GITHUB_ACTIONS !== undefined;
22

33
/** @type {Partial<import("@jest/types").Config.DefaultOptions>} */
44
module.exports = {

language-extensions/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,11 +666,11 @@ declare interface ReadonlyLuaSet<T extends AnyNotNil = AnyNotNil> extends LuaPai
666666

667667
interface ObjectConstructor {
668668
/** Returns an array of keys of an object, when iterated with `pairs`. */
669-
keys<K>(o: LuaPairsIterable<K, any> | LuaPairsKeyIterable<K>): K[];
669+
keys<K extends AnyNotNil>(o: LuaPairsIterable<K, any> | LuaPairsKeyIterable<K>): K[];
670670

671671
/** Returns an array of values of an object, when iterated with `pairs`. */
672672
values<V>(o: LuaPairsIterable<any, V>): V[];
673673

674674
/** Returns an array of key/values of an object, when iterated with `pairs`. */
675-
entries<K, V>(o: LuaPairsIterable<K, V>): Array<[K, V]>;
675+
entries<K extends AnyNotNil, V>(o: LuaPairsIterable<K, V>): Array<[K, V]>;
676676
}

language-extensions/package.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"name": "@typescript-to-lua/language-extensions",
3+
"version": "1.0.0",
4+
"description": "Language extensions used by typescript-to-lua",
5+
"repository": "https://github.com/TypeScriptToLua/TypeScriptToLua",
6+
"homepage": "https://typescripttolua.github.io/",
7+
"bugs": {
8+
"url": "https://github.com/TypeScriptToLua/TypeScriptToLua/issues"
9+
},
10+
"license": "MIT",
11+
"keywords": [
12+
"typescript",
13+
"lua",
14+
"tstl",
15+
"transpiler",
16+
"language extensions"
17+
],
18+
"files": [
19+
"**.d.ts"
20+
],
21+
"main": "",
22+
"types": "index.d.ts"
23+
}

0 commit comments

Comments
 (0)