Skip to content

Commit b71e956

Browse files
committed
Merge remote-tracking branch 'upstream/master' into transformation-pipeline-refactor
2 parents 170e789 + 53be6c3 commit b71e956

41 files changed

Lines changed: 579 additions & 193 deletions

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: master
6+
pull_request:
7+
8+
jobs:
9+
lint:
10+
name: Lint
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v1
15+
- uses: actions/setup-node@v1
16+
- run: npm install --global npm@6
17+
- run: npm ci
18+
- run: npm run lint
19+
env:
20+
CI: true
21+
22+
test:
23+
name: Test on ${{ matrix.os }}
24+
runs-on: ${{ matrix.os }}
25+
strategy:
26+
matrix:
27+
os: [ubuntu-latest, windows-latest]
28+
29+
steps:
30+
- uses: actions/checkout@v1
31+
- name: Use Node.js 8.5.0
32+
uses: actions/setup-node@v1
33+
with:
34+
node-version: 8.5.0
35+
- run: npm install --global npm@6
36+
- run: npm ci
37+
- run: npm run build
38+
- run: npx jest --maxWorkers 2 --coverage
39+
env:
40+
CI: true
41+
- if: matrix.os == 'ubuntu-latest'
42+
continue-on-error: true
43+
uses: codecov/codecov-action@v1.0.0
44+
with:
45+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/release.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags: "*"
6+
7+
jobs:
8+
release:
9+
name: Release
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v1
14+
- uses: actions/setup-node@v1
15+
- run: npm install --global npm@6
16+
- run: npm ci
17+
- run: npm run build
18+
- run: npm publish
19+
env:
20+
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

.prettierrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ module.exports = {
66
tabWidth: 4,
77
trailingComma: "es5",
88
endOfLine: isCI ? "lf" : "auto",
9-
overrides: [{ files: ["**/*.md", "**/*.yml", "**/.*.yml"], options: { tabWidth: 2 } }],
9+
overrides: [{ files: ["**/*.md", "**/*.yml"], options: { tabWidth: 2 } }],
1010
};

.travis.yml

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

CHANGELOG.md

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

3+
## 0.28.0
4+
5+
- We now have a `noImplicitSelf` option you can add to your tstl tsconfig.json. Default behavior is `false`. Setting this option to `true` will cause no 'self' arguments to be considered/generated in the project. Declarations will behave as if they have a `/** @noSelfInFile */` directive. This option is new and might cause correctness issues, use at your own risk and create an issue if you experience any issues.
6+
- Regular `Error` objects can now be thrown, `throw` is no longer limited to only strings. Take care: printing/toString'ing the LuaLib error class might have different results for different Lua versions.
7+
- Added LuaLib support for `array.reduceRight`.
8+
- Added LuaLib support for `array.find`.
9+
10+
- Fixed an issue in test code causing some inconsistent behavior between JS <-> Lua to go unnoticed. Also fixed `array.splice` and `array.join` whose Lua versions behaved differently from the ECMAScript specification.
11+
- Fixed array.reduce not behaving according to ECMAScript specification.
12+
- Fixed order of operations issue with ternary conditional.
13+
14+
- Updated to TS 3.6.
15+
- Moved from Travis+Appveyor to GitHub Actions!
16+
317
## 0.27.0
418

519
- Added support for [array and object destructuring with rest](https://basarat.gitbooks.io/typescript/content/docs/destructuring.html#object-destructuring-with-rest).

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
<h1>
44
TypeScriptToLua
55
<p></p>
6-
<a href="https://travis-ci.org/TypeScriptToLua/TypeScriptToLua"><img alt="Build status" src="https://img.shields.io/travis/TypeScriptToLua/TypeScriptToLua/master.svg?style=for-the-badge" /></a>
7-
<a href="https://ci.appveyor.com/project/Perryvw/typescripttolua-pa0ym"><img alt="Build status" src="https://img.shields.io/appveyor/ci/Perryvw/typescripttolua-pa0ym/master.svg?logo=appveyor&style=for-the-badge" /></a>
8-
<a href="https://codecov.io/gh/TypeScriptToLua/typescripttolua"><img alt="Coverage" src="https://img.shields.io/codecov/c/gh/TypeScriptToLua/typescripttolua.svg?logo=codecov&style=for-the-badge" /></a>
9-
<a href="https://discord.gg/BWAq58Y"><img alt="Chat with us!" src="https://img.shields.io/discord/515854149821267971.svg?style=for-the-badge&colorB=7581dc&logo=discord&logoColor=white"></a>
6+
<a href="https://github.com/TypeScriptToLua/TypeScriptToLua/actions"><img alt="Continuous Integration status" src="https://github.com/TypeScriptToLua/TypeScriptToLua/workflows/CI/badge.svg" /></a>
7+
<a href="https://codecov.io/gh/TypeScriptToLua/TypeScriptToLua"><img alt="Coverage" src="https://img.shields.io/codecov/c/gh/TypeScriptToLua/TypeScriptToLua.svg?logo=codecov" /></a>
8+
<a href="https://discord.gg/BWAq58Y"><img alt="Chat with us!" src="https://img.shields.io/discord/515854149821267971.svg?colorB=7581dc&logo=discord&logoColor=white"></a>
109
</h1>
1110
</div>
1211

appveyor.yml

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

package-lock.json

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

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "typescript-to-lua",
3-
"version": "0.27.1",
3+
"version": "0.28.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",
@@ -49,6 +49,7 @@
4949
"@types/node": "^11.13.14",
5050
"@types/resolve": "0.0.8",
5151
"fengari": "^0.1.4",
52+
"javascript-stringify": "^2.0.0",
5253
"jest": "^24.8.0",
5354
"jest-circus": "^24.8.0",
5455
"prettier": "^1.18.2",

src/CommandLineParser.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ const optionDeclarations: CommandLineOption[] = [
3838
type: "enum",
3939
choices: Object.values(LuaTarget),
4040
},
41+
{
42+
name: "noImplicitSelf",
43+
description: 'If "this" is implicitly considered an any type, do not generate a self parameter.',
44+
type: "boolean",
45+
},
4146
{
4247
name: "noHeader",
4348
description: "Specify if a header will be added to compiled files.",

0 commit comments

Comments
 (0)