typescript-to-lua 1.29.0 → 1.29.1
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.
|
@@ -17,6 +17,11 @@ do
|
|
|
17
17
|
end
|
|
18
18
|
if __TS__StringIncludes(_VERSION, "Lua 5.0") then
|
|
19
19
|
return debug.traceback(("[Level " .. tostring(level)) .. "]")
|
|
20
|
+
elseif _VERSION == "Lua 5.1" then
|
|
21
|
+
return string.sub(
|
|
22
|
+
debug.traceback("", level),
|
|
23
|
+
2
|
|
24
|
+
)
|
|
20
25
|
else
|
|
21
26
|
return debug.traceback(nil, level)
|
|
22
27
|
end
|
|
@@ -25,7 +30,7 @@ do
|
|
|
25
30
|
return function(self)
|
|
26
31
|
local description = getDescription(self)
|
|
27
32
|
local caller = debug.getinfo(3, "f")
|
|
28
|
-
local isClassicLua = __TS__StringIncludes(_VERSION, "Lua 5.0")
|
|
33
|
+
local isClassicLua = __TS__StringIncludes(_VERSION, "Lua 5.0")
|
|
29
34
|
if isClassicLua or caller and caller.func ~= error then
|
|
30
35
|
return description
|
|
31
36
|
else
|
|
@@ -49,7 +54,7 @@ do
|
|
|
49
54
|
end
|
|
50
55
|
self.message = message
|
|
51
56
|
self.name = "Error"
|
|
52
|
-
self.stack = getErrorStack(nil,
|
|
57
|
+
self.stack = getErrorStack(nil, __TS__New)
|
|
53
58
|
local metatable = getmetatable(self)
|
|
54
59
|
if metatable and not metatable.__errorToStringPatched then
|
|
55
60
|
metatable.__errorToStringPatched = true
|
|
@@ -1098,6 +1098,11 @@ do
|
|
|
1098
1098
|
end
|
|
1099
1099
|
if __TS__StringIncludes(_VERSION, "Lua 5.0") then
|
|
1100
1100
|
return debug.traceback(("[Level " .. tostring(level)) .. "]")
|
|
1101
|
+
elseif _VERSION == "Lua 5.1" then
|
|
1102
|
+
return string.sub(
|
|
1103
|
+
debug.traceback("", level),
|
|
1104
|
+
2
|
|
1105
|
+
)
|
|
1101
1106
|
else
|
|
1102
1107
|
return debug.traceback(nil, level)
|
|
1103
1108
|
end
|
|
@@ -1106,7 +1111,7 @@ do
|
|
|
1106
1111
|
return function(self)
|
|
1107
1112
|
local description = getDescription(self)
|
|
1108
1113
|
local caller = debug.getinfo(3, "f")
|
|
1109
|
-
local isClassicLua = __TS__StringIncludes(_VERSION, "Lua 5.0")
|
|
1114
|
+
local isClassicLua = __TS__StringIncludes(_VERSION, "Lua 5.0")
|
|
1110
1115
|
if isClassicLua or caller and caller.func ~= error then
|
|
1111
1116
|
return description
|
|
1112
1117
|
else
|
|
@@ -1130,7 +1135,7 @@ do
|
|
|
1130
1135
|
end
|
|
1131
1136
|
self.message = message
|
|
1132
1137
|
self.name = "Error"
|
|
1133
|
-
self.stack = getErrorStack(nil,
|
|
1138
|
+
self.stack = getErrorStack(nil, __TS__New)
|
|
1134
1139
|
local metatable = getmetatable(self)
|
|
1135
1140
|
if metatable and not metatable.__errorToStringPatched then
|
|
1136
1141
|
metatable.__errorToStringPatched = true
|
|
@@ -17,6 +17,11 @@ do
|
|
|
17
17
|
end
|
|
18
18
|
if __TS__StringIncludes(_VERSION, "Lua 5.0") then
|
|
19
19
|
return debug.traceback(("[Level " .. tostring(level)) .. "]")
|
|
20
|
+
elseif _VERSION == "Lua 5.1" then
|
|
21
|
+
return string.sub(
|
|
22
|
+
debug.traceback("", level),
|
|
23
|
+
2
|
|
24
|
+
)
|
|
20
25
|
else
|
|
21
26
|
return debug.traceback(nil, level)
|
|
22
27
|
end
|
|
@@ -25,7 +30,7 @@ do
|
|
|
25
30
|
return function(self)
|
|
26
31
|
local description = getDescription(self)
|
|
27
32
|
local caller = debug.getinfo(3, "f")
|
|
28
|
-
local isClassicLua = __TS__StringIncludes(_VERSION, "Lua 5.0")
|
|
33
|
+
local isClassicLua = __TS__StringIncludes(_VERSION, "Lua 5.0")
|
|
29
34
|
if isClassicLua or caller and caller.func ~= error then
|
|
30
35
|
return description
|
|
31
36
|
else
|
|
@@ -49,7 +54,7 @@ do
|
|
|
49
54
|
end
|
|
50
55
|
self.message = message
|
|
51
56
|
self.name = "Error"
|
|
52
|
-
self.stack = getErrorStack(nil,
|
|
57
|
+
self.stack = getErrorStack(nil, __TS__New)
|
|
53
58
|
local metatable = getmetatable(self)
|
|
54
59
|
if metatable and not metatable.__errorToStringPatched then
|
|
55
60
|
metatable.__errorToStringPatched = true
|
|
@@ -1094,6 +1094,11 @@ do
|
|
|
1094
1094
|
end
|
|
1095
1095
|
if __TS__StringIncludes(_VERSION, "Lua 5.0") then
|
|
1096
1096
|
return debug.traceback(("[Level " .. tostring(level)) .. "]")
|
|
1097
|
+
elseif _VERSION == "Lua 5.1" then
|
|
1098
|
+
return string.sub(
|
|
1099
|
+
debug.traceback("", level),
|
|
1100
|
+
2
|
|
1101
|
+
)
|
|
1097
1102
|
else
|
|
1098
1103
|
return debug.traceback(nil, level)
|
|
1099
1104
|
end
|
|
@@ -1102,7 +1107,7 @@ do
|
|
|
1102
1107
|
return function(self)
|
|
1103
1108
|
local description = getDescription(self)
|
|
1104
1109
|
local caller = debug.getinfo(3, "f")
|
|
1105
|
-
local isClassicLua = __TS__StringIncludes(_VERSION, "Lua 5.0")
|
|
1110
|
+
local isClassicLua = __TS__StringIncludes(_VERSION, "Lua 5.0")
|
|
1106
1111
|
if isClassicLua or caller and caller.func ~= error then
|
|
1107
1112
|
return description
|
|
1108
1113
|
else
|
|
@@ -1126,7 +1131,7 @@ do
|
|
|
1126
1131
|
end
|
|
1127
1132
|
self.message = message
|
|
1128
1133
|
self.name = "Error"
|
|
1129
|
-
self.stack = getErrorStack(nil,
|
|
1134
|
+
self.stack = getErrorStack(nil, __TS__New)
|
|
1130
1135
|
local metatable = getmetatable(self)
|
|
1131
1136
|
if metatable and not metatable.__errorToStringPatched then
|
|
1132
1137
|
metatable.__errorToStringPatched = true
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "typescript-to-lua",
|
|
3
|
-
"version": "1.29.
|
|
3
|
+
"version": "1.29.1",
|
|
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/",
|