Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,8 @@ module.exports = {
"jest/expect-expect": "off",
"jest/consistent-test-it": ["error", { fn: "test", withinDescribe: "test" }],
"jest/no-disabled-tests": "error",
"jest/no-expect-resolves": "error",
"jest/no-identical-title": "off",
"jest/no-test-return-statement": "error",
"jest/no-truthy-falsy": "error",
"jest/prefer-spy-on": "error",
"jest/prefer-todo": "error",
"jest/valid-title": "error",
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16.14.0
- run: npm ci
- run: npm run lint
env:
Expand All @@ -30,7 +32,7 @@ jobs:
- name: Use Node.js 15.14.0
uses: actions/setup-node@v1
with:
node-version: 15.14.0
node-version: 16.14.0
- run: npm ci
- run: npm run build
- run: npx jest --maxWorkers 2 --coverage
Expand Down Expand Up @@ -60,7 +62,7 @@ jobs:
- name: Use Node.js 12.13.1
uses: actions/setup-node@v1
with:
node-version: 12.13.1
node-version: 16.14.0
# NPM
- name: NPM master
run: npm ci && npm run build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Use Node.js 12.13.1
uses: actions/setup-node@v1
with:
node-version: 12.13.1
node-version: 16.14.0
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm run build
Expand Down
1,996 changes: 584 additions & 1,412 deletions package-lock.json

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"node": ">=12.13.0"
},
"peerDependencies": {
"typescript": "~4.5.2"
"typescript": "~4.6.2"
},
"dependencies": {
"enhanced-resolve": "^5.8.2",
Expand All @@ -52,23 +52,23 @@
"devDependencies": {
"@types/fs-extra": "^8.1.0",
"@types/glob": "^7.1.1",
"@types/jest": "^25.1.3",
"@types/jest": "^27.4.1",
"@types/node": "^13.7.7",
"@types/resolve": "1.14.0",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"eslint": "^7.32.0",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-jest": "^24.4.0",
"@typescript-eslint/eslint-plugin": "^5.13.0",
"@typescript-eslint/parser": "^5.13.0",
"eslint": "^8.10.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jest": "^26.1.1",
"fs-extra": "^8.1.0",
"javascript-stringify": "^2.0.1",
"jest": "^27.3.0",
"jest-circus": "^27.3.0",
"lua-types": "2.10.1",
"lua-wasm-bindings": "^0.2.2",
"prettier": "^2.3.2",
"ts-jest": "^27.0.7",
"ts-jest": "^27.1.3",
"ts-node": "^10.3.0",
"typescript": "~4.5.2"
"typescript": "~4.6.2"
}
}
4 changes: 2 additions & 2 deletions test/transpile/bundle.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe("bundle with source maps", () => {
// See https://github.com/TypeScriptToLua/TypeScriptToLua/issues/1109
test('the result file should not contain "{#SourceMapTraceback}" macro-string', () => {
const { lua } = transpileResult.transpiledFiles[0];
expect(lua).not.toBeUndefined();
expect(lua).toBeDefined();
expect(lua!).not.toContain("{#SourceMapTraceback}");
});

Expand Down Expand Up @@ -126,7 +126,7 @@ describe("bundle with source maps", () => {

const typescriptPosition = lineAndColumnOf(code[currentFile], typeScriptPattern);
expect(mappedLine.line).toEqual(typescriptPosition.line);
expect(mappedLine.file).toEqual(`${currentFile}.ts`);
expect(mappedLine.file).toBe(`${currentFile}.ts`);
}
});
});
2 changes: 1 addition & 1 deletion test/transpile/module-resolution.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe("basic module resolution", () => {

test("can resolve package depencency with a dependency on another package", () => {
// Declarations in the node_modules directory
expect(projectWithNodeModules.getLuaExecutionResult().moduleWithDependencyResult).toEqual(
expect(projectWithNodeModules.getLuaExecutionResult().moduleWithDependencyResult).toBe(
"Calling dependency: foo from lua module with decls"
);
});
Expand Down
2 changes: 1 addition & 1 deletion test/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ export abstract class TestBuilder {
const luaCode = transpiledFiles
.filter(f => includeLualib || f.outPath !== "lualib_bundle.lua")
.map(f => `[${f.outPath}]:\n${f.lua?.replace(/^/gm, " ")}`);
const value = prettyFormat(this.getLuaExecutionResult()).replace(/^/gm, " ");
const value = prettyFormat.format(this.getLuaExecutionResult()).replace(/^/gm, " ");
console.log(`Lua Code:\n${luaCode.join("\n")}\n\nValue:\n${value}`);
return this;
}
Expand Down