typescript-to-lua 1.30.0 → 1.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,7 +20,7 @@ export declare class LuaPrinter {
20
20
  private static operatorMap;
21
21
  private static operatorPrecedence;
22
22
  private static rightAssociativeOperators;
23
- private currentIndent;
23
+ protected currentIndent: string;
24
24
  protected luaFile: string;
25
25
  protected relativeSourcePath: string;
26
26
  protected options: CompilerOptions;
@@ -16,6 +16,8 @@ const isValidLuaIdentifier = (name, options) => !exports.luaKeywords.has(name) &
16
16
  exports.isValidLuaIdentifier = isValidLuaIdentifier;
17
17
  exports.luaKeywords = new Set([
18
18
  "and",
19
+ "bit",
20
+ "bit32",
19
21
  "break",
20
22
  "do",
21
23
  "else",
@@ -35,8 +35,9 @@ function shouldBeImported(context, importNode) {
35
35
  return context.resolver.isReferencedAliasDeclaration(importNode);
36
36
  }
37
37
  function transformImportSpecifier(context, importSpecifier, moduleTableName) {
38
+ var _a;
38
39
  const leftIdentifier = (0, identifier_1.transformIdentifier)(context, importSpecifier.name);
39
- const propertyName = (0, literal_1.transformPropertyName)(context, importSpecifier.propertyName ? importSpecifier.propertyName : importSpecifier.name);
40
+ const propertyName = (0, literal_1.transformPropertyName)(context, (_a = importSpecifier.propertyName) !== null && _a !== void 0 ? _a : importSpecifier.name);
40
41
  return lua.createVariableDeclarationStatement(leftIdentifier, lua.createTableIndexExpression(moduleTableName, propertyName), importSpecifier);
41
42
  }
42
43
  const transformImportDeclaration = (statement, context) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typescript-to-lua",
3
- "version": "1.30.0",
3
+ "version": "1.31.0",
4
4
  "description": "A generic TypeScript to Lua transpiler. Write your code in TypeScript and publish Lua!",
5
5
  "repository": "https://github.com/TypeScriptToLua/TypeScriptToLua",
6
6
  "homepage": "https://typescripttolua.github.io/",
@@ -42,7 +42,7 @@
42
42
  "node": ">=16.10.0"
43
43
  },
44
44
  "peerDependencies": {
45
- "typescript": "5.7.2"
45
+ "typescript": "5.8.2"
46
46
  },
47
47
  "dependencies": {
48
48
  "@typescript-to-lua/language-extensions": "1.19.0",
@@ -58,7 +58,7 @@
58
58
  "@types/node": "^22.10.0",
59
59
  "@types/picomatch": "^2.3.0",
60
60
  "@types/resolve": "1.14.0",
61
- "eslint": "^9.11.0",
61
+ "eslint": "^9.22.0",
62
62
  "eslint-plugin-jest": "^28.8.3",
63
63
  "fs-extra": "^8.1.0",
64
64
  "javascript-stringify": "^2.0.1",
@@ -69,7 +69,7 @@
69
69
  "prettier": "^2.8.8",
70
70
  "ts-jest": "^29.2.5",
71
71
  "ts-node": "^10.9.2",
72
- "typescript": "5.7.2",
73
- "typescript-eslint": "^8.16.0"
72
+ "typescript": "5.8.2",
73
+ "typescript-eslint": "^8.26.0"
74
74
  }
75
75
  }