version bumps (scrimage, kotlinJsWrappers, ktor, hoplite, tstl, typed-factorio, typescript)

This commit is contained in:
Adam 2022-09-10 10:13:48 +02:00
parent 80e8c95bc9
commit dadbcdd8d6
6 changed files with 85 additions and 65 deletions

View file

@ -16,7 +16,7 @@ kvision = "5.14.0" # https://github.com/rjaros/kvision/rele
log4j2 = "2.17.2" log4j2 = "2.17.2"
okio = "3.2.0" # https://search.maven.org/artifact/com.squareup.okio/okio okio = "3.2.0" # https://search.maven.org/artifact/com.squareup.okio/okio
qosLogback = "1.2.11" qosLogback = "1.2.11"
scrimage = "4.0.31" # https://github.com/sksamuel/scrimage/releases scrimage = "4.0.32" # https://github.com/sksamuel/scrimage/releases
semver = "1.2.0" # https://github.com/swiftzer/semver/releases semver = "1.2.0" # https://github.com/swiftzer/semver/releases
slf4j = "1.7.36" slf4j = "1.7.36"
@ -25,7 +25,7 @@ kxs-charleskornKaml = "0.44.0"
kxs-mamoeYamlkt = "0.12.0" kxs-mamoeYamlkt = "0.12.0"
kxs-kxsTsGen = "0.2.1" kxs-kxsTsGen = "0.2.1"
kotlinJsWrappers = "1.0.0-pre.378" # https://search.maven.org/artifact/org.jetbrains.kotlin-wrappers/kotlin-wrappers-bom kotlinJsWrappers = "1.0.0-pre.383" # https://search.maven.org/artifact/org.jetbrains.kotlin-wrappers/kotlin-wrappers-bom
kotlinx-cli = "0.3.4" kotlinx-cli = "0.3.4"
kotlinx-coroutines = "1.6.4" # https://github.com/Kotlin/kotlinx.coroutines/releases kotlinx-coroutines = "1.6.4" # https://github.com/Kotlin/kotlinx.coroutines/releases
@ -35,9 +35,9 @@ kotlinx-nodejs = "0.0.7"
kSvgDsl = "v2.2.0" kSvgDsl = "v2.2.0"
ktor = "2.1.0" # https://github.com/ktorio/ktor/releases ktor = "2.1.1" # https://github.com/ktorio/ktor/releases
hoplite = "2.6.1" # https://github.com/sksamuel/hoplite/releases hoplite = "2.6.2" # https://github.com/sksamuel/hoplite/releases
simpleSyslogParser = "1.0.0" # https://search.maven.org/artifact/com.github.palindromicity/simple-syslog simpleSyslogParser = "1.0.0" # https://search.maven.org/artifact/com.github.palindromicity/simple-syslog
@ -49,11 +49,10 @@ klogging = "0.4.9"
## npm ## ## npm ##
npm-luaTypes = "2.12.0" npm-luaTypes = "2.13.0" # https://www.npmjs.com/package/lua-types
npm-typescriptToLua = "1.9.0" npm-typescriptToLua = "1.10.0" # https://www.npmjs.com/package/typescript-to-lua
#npm-typedFactorio = "1.6.1" # https://github.com/GlassBricks/typed-factorio/blob/main/Changelog.md npm-typedFactorio = "1.7.5" # https://www.npmjs.com/package/typed-factorio
npm-typedFactorio = "1.7.0" # for factorio 1.1.61 npm-typescript = "4.8.3" # https://github.com/microsoft/TypeScript/releases
npm-typescript = "4.7.4"
## test ## ## test ##

View file

@ -37,8 +37,7 @@ class EntityUpdateTest : FunSpec({
""".trimIndent() """.trimIndent()
test("decode") { test("decode") {
val entityUpdate: KafkatorioPacket = jsonMapperKafkatorio.decodeFromString(json) val entityUpdate: KafkatorioPacket = jsonMapperKafkatorio.decodeFromString(json)
entityUpdate.data entityUpdate.data.shouldBeInstanceOf<EntityUpdate>()
.shouldBeInstanceOf<EntityUpdate>()
// entityUpdate.health.shouldNotBeNull().shouldBeExactly(350f) // entityUpdate.health.shouldNotBeNull().shouldBeExactly(350f)
} }

View file

@ -4,6 +4,11 @@
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
"@typescript-to-lua/language-extensions": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@typescript-to-lua/language-extensions/-/language-extensions-1.0.0.tgz",
"integrity": "sha512-GtmhFqyg+txpGgGLM3mlS3R6AEG9MQhKALxxcbr6SBzg9u7YAXcPKqUBaBYd6nH+Pi/eQLcWz4BNOLhz8v4TjQ=="
},
"enhanced-resolve": { "enhanced-resolve": {
"version": "5.10.0", "version": "5.10.0",
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz",
@ -40,9 +45,9 @@
} }
}, },
"lua-types": { "lua-types": {
"version": "2.12.0", "version": "2.13.0",
"resolved": "https://registry.npmjs.org/lua-types/-/lua-types-2.12.0.tgz", "resolved": "https://registry.npmjs.org/lua-types/-/lua-types-2.13.0.tgz",
"integrity": "sha512-s96z1Zcz3KRXfWyNFM3KP2zpNYTfZwgHo8X/yFXveyS8Dux+cUuyT+zA5tFZbmGh8VViwNs9bFbzNevAR/18uw==" "integrity": "sha512-wra+mIPZlcbm8bYoM6QutEwTOAjZ9KyKMiaidGeZ+QJItIAK9hwG+1I6GCDKnW0T9E/Xv2IoTFtZwxQv4zAIJw=="
}, },
"path-parse": { "path-parse": {
"version": "1.0.7", "version": "1.0.7",
@ -75,20 +80,21 @@
"integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==" "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ=="
}, },
"typed-factorio": { "typed-factorio": {
"version": "1.7.0", "version": "1.7.5",
"resolved": "https://registry.npmjs.org/typed-factorio/-/typed-factorio-1.7.0.tgz", "resolved": "https://registry.npmjs.org/typed-factorio/-/typed-factorio-1.7.5.tgz",
"integrity": "sha512-i7MLTRW7vQAWTwHZSbX8m+PQm0hnCW/3nCBQI1b0DAikK9a/nJIZWpy2U3C4cnwhNqyNz5p50mLFQiedb/s+ow==" "integrity": "sha512-3lTeV8FkmLx7mUUhUp1WPhIDviiqPOfibHYIjE58Lt59mN0ujEDbf7q3o9G8YWjmvgBatS9xJ81a+/Tvq20mUw=="
}, },
"typescript": { "typescript": {
"version": "4.7.4", "version": "4.8.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.3.tgz",
"integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==" "integrity": "sha512-goMHfm00nWPa8UvR/CPSvykqf6dVV8x/dp0c5mFTMTIu0u0FlGWRioyy7Nn0PGAdHxpJZnuO/ut+PpQ8UiHAig=="
}, },
"typescript-to-lua": { "typescript-to-lua": {
"version": "1.9.0", "version": "1.10.0",
"resolved": "https://registry.npmjs.org/typescript-to-lua/-/typescript-to-lua-1.9.0.tgz", "resolved": "https://registry.npmjs.org/typescript-to-lua/-/typescript-to-lua-1.10.0.tgz",
"integrity": "sha512-Oj8kutP1u/TSjN9oGUuESfOL+feHMSs7CCxl90C60jWTH+4ZXLtrXlRJTalA3Z2/aHjQXXgPaXQStSXBzAYLow==", "integrity": "sha512-rt+Bb2hH3FqytqTmTqOL+xPFRcV/r4TZ5X+46vVSfw9luzbu9V6ai5yyU8GePARVcf5hGvCv+DqxBNQtdcJLsA==",
"requires": { "requires": {
"@typescript-to-lua/language-extensions": "1.0.0",
"enhanced-resolve": "^5.8.2", "enhanced-resolve": "^5.8.2",
"resolve": "^1.15.1", "resolve": "^1.15.1",
"source-map": "^0.7.3" "source-map": "^0.7.3"

View file

@ -11,10 +11,10 @@
}, },
"devDependencies": {}, "devDependencies": {},
"dependencies": { "dependencies": {
"lua-types": "2.12.0", "lua-types": "2.13.0",
"typescript-to-lua": "1.9.0", "typescript-to-lua": "1.10.0",
"typed-factorio": "1.7.0", "typed-factorio": "1.7.5",
"typescript": "4.7.4" "typescript": "4.8.3"
}, },
"license": "UNLICENSED", "license": "UNLICENSED",
"peerDependencies": {}, "peerDependencies": {},

View file

@ -255,11 +255,15 @@ local function __TS__ArrayPushArray(self, items)
return len return len
end end
local function __TS__CountVarargs(...)
return select("#", ...)
end
local function __TS__ArrayReduce(self, callbackFn, ...) local function __TS__ArrayReduce(self, callbackFn, ...)
local len = #self local len = #self
local k = 0 local k = 0
local accumulator = nil local accumulator = nil
if select("#", ...) ~= 0 then if __TS__CountVarargs(...) ~= 0 then
accumulator = ... accumulator = ...
elseif len > 0 then elseif len > 0 then
accumulator = self[1] accumulator = self[1]
@ -283,7 +287,7 @@ local function __TS__ArrayReduceRight(self, callbackFn, ...)
local len = #self local len = #self
local k = len - 1 local k = len - 1
local accumulator = nil local accumulator = nil
if select("#", ...) ~= 0 then if __TS__CountVarargs(...) ~= 0 then
accumulator = ... accumulator = ...
elseif len > 0 then elseif len > 0 then
accumulator = self[k + 1] accumulator = self[k + 1]
@ -399,7 +403,7 @@ end
local function __TS__ArraySplice(self, ...) local function __TS__ArraySplice(self, ...)
local args = {...} local args = {...}
local len = #self local len = #self
local actualArgumentCount = select("#", ...) local actualArgumentCount = __TS__CountVarargs(...)
local start = args[1] local start = args[1]
local deleteCount = args[2] local deleteCount = args[2]
if start < 0 then if start < 0 then
@ -1016,6 +1020,16 @@ local function __TS__DecorateParam(paramIndex, decorator)
return function(____, target, key) return decorator(nil, target, key, paramIndex) end return function(____, target, key) return decorator(nil, target, key, paramIndex) end
end end
local function __TS__StringIncludes(self, searchString, position)
if not position then
position = 1
else
position = position + 1
end
local index = string.find(self, searchString, position, true)
return index ~= nil
end
local Error, RangeError, ReferenceError, SyntaxError, TypeError, URIError local Error, RangeError, ReferenceError, SyntaxError, TypeError, URIError
do do
local function getErrorStack(self, constructor) local function getErrorStack(self, constructor)
@ -1030,13 +1044,18 @@ do
break break
end end
end end
return debug.traceback(nil, level) if __TS__StringIncludes(_VERSION, "Lua 5.0") then
return debug.traceback(("[Level " .. tostring(level)) .. "]")
else
return debug.traceback(nil, level)
end
end end
local function wrapErrorToString(self, getDescription) local function wrapErrorToString(self, getDescription)
return function(self) return function(self)
local description = getDescription(self) local description = getDescription(self)
local caller = debug.getinfo(3, "f") local caller = debug.getinfo(3, "f")
if _VERSION == "Lua 5.1" or caller and caller.func ~= error then local isClassicLua = __TS__StringIncludes(_VERSION, "Lua 5.0") or _VERSION == "Lua 5.1"
if isClassicLua or caller and caller.func ~= error then
return description return description
else else
return (tostring(description) .. "\n") .. self.stack return (tostring(description) .. "\n") .. self.stack
@ -1185,16 +1204,9 @@ do
function __TS__Generator(fn) function __TS__Generator(fn)
return function(...) return function(...)
local args = {...} local args = {...}
local argsLength = select("#", ...) local argsLength = __TS__CountVarargs(...)
return { return {
____coroutine = coroutine.create(function() ____coroutine = coroutine.create(function() return fn(__TS__Unpack(args, 1, argsLength)) end),
local ____fn_1 = fn
local ____unpack_0 = unpack
if ____unpack_0 == nil then
____unpack_0 = table.unpack
end
return ____fn_1(____unpack_0(args, 1, argsLength))
end),
[Symbol.iterator] = generatorIterator, [Symbol.iterator] = generatorIterator,
next = generatorNext next = generatorNext
} }
@ -1358,8 +1370,12 @@ do
Map[Symbol.species] = Map Map[Symbol.species] = Map
end end
local __TS__Match = string.match
local __TS__MathAtan2 = math.atan2 or math.atan local __TS__MathAtan2 = math.atan2 or math.atan
local __TS__MathModf = math.modf
local function __TS__MathSign(val) local function __TS__MathSign(val)
if val > 0 then if val > 0 then
return 1 return 1
@ -1369,6 +1385,10 @@ local function __TS__MathSign(val)
return 0 return 0
end end
local function __TS__Modulo50(a, b)
return a - math.floor(a / b) * b
end
local function __TS__Number(value) local function __TS__Number(value)
local valueType = type(value) local valueType = type(value)
if valueType == "number" then if valueType == "number" then
@ -1415,7 +1435,7 @@ do
if radix < 2 or radix > 36 then if radix < 2 or radix > 36 then
error("toString() radix argument must be between 2 and 36", 0) error("toString() radix argument must be between 2 and 36", 0)
end end
local integer, fraction = math.modf(math.abs(self)) local integer, fraction = __TS__MathModf(math.abs(self))
local result = "" local result = ""
if radix == 8 then if radix == 8 then
result = string.format("%o", integer) result = string.format("%o", integer)
@ -1571,7 +1591,7 @@ local function __TS__ObjectValues(obj)
end end
local function __TS__ParseFloat(numberString) local function __TS__ParseFloat(numberString)
local infinityMatch = string.match(numberString, "^%s*(-?Infinity)") local infinityMatch = __TS__Match(numberString, "^%s*(-?Infinity)")
if infinityMatch then if infinityMatch then
local ____temp_0 local ____temp_0
if __TS__StringAccess(infinityMatch, 0) == "-" then if __TS__StringAccess(infinityMatch, 0) == "-" then
@ -1581,7 +1601,7 @@ local function __TS__ParseFloat(numberString)
end end
return ____temp_0 return ____temp_0
end end
local number = tonumber(string.match(numberString, "^%s*(-?%d+%.?%d*)")) local number = tonumber(__TS__Match(numberString, "^%s*(-?%d+%.?%d*)"))
local ____number_1 = number local ____number_1 = number
if ____number_1 == nil then if ____number_1 == nil then
____number_1 = 0 / 0 ____number_1 = 0 / 0
@ -1629,16 +1649,16 @@ do
function __TS__ParseInt(numberString, base) function __TS__ParseInt(numberString, base)
if base == nil then if base == nil then
base = 10 base = 10
local hexMatch = string.match(numberString, "^%s*-?0[xX]") local hexMatch = __TS__Match(numberString, "^%s*-?0[xX]")
if hexMatch then if hexMatch then
base = 16 base = 16
local ____string_match_result__0_0 local ____TS__Match_result__0_0
if string.match(hexMatch, "-") then if __TS__Match(hexMatch, "-") then
____string_match_result__0_0 = "-" .. __TS__StringSubstr(numberString, #hexMatch) ____TS__Match_result__0_0 = "-" .. __TS__StringSubstr(numberString, #hexMatch)
else else
____string_match_result__0_0 = __TS__StringSubstr(numberString, #hexMatch) ____TS__Match_result__0_0 = __TS__StringSubstr(numberString, #hexMatch)
end end
numberString = ____string_match_result__0_0 numberString = ____TS__Match_result__0_0
end end
end end
if base < 2 or base > 36 then if base < 2 or base > 36 then
@ -1653,7 +1673,7 @@ do
local allowedDigits = ____temp_1 local allowedDigits = ____temp_1
local pattern = ("^%s*(-?[" .. allowedDigits) .. "]*)" local pattern = ("^%s*(-?[" .. allowedDigits) .. "]*)"
local number = tonumber( local number = tonumber(
string.match(numberString, pattern), __TS__Match(numberString, pattern),
base base
) )
if number == nil then if number == nil then
@ -1965,13 +1985,13 @@ end
local function __TS__SparseArrayNew(...) local function __TS__SparseArrayNew(...)
local sparseArray = {...} local sparseArray = {...}
sparseArray.sparseLength = select("#", ...) sparseArray.sparseLength = __TS__CountVarargs(...)
return sparseArray return sparseArray
end end
local function __TS__SparseArrayPush(sparseArray, ...) local function __TS__SparseArrayPush(sparseArray, ...)
local args = {...} local args = {...}
local argsLen = select("#", ...) local argsLen = __TS__CountVarargs(...)
local listLen = sparseArray.sparseLength local listLen = sparseArray.sparseLength
for i = 1, argsLen do for i = 1, argsLen do
sparseArray[listLen + i] = args[i] sparseArray[listLen + i] = args[i]
@ -2086,6 +2106,8 @@ local function __TS__SourceMapTraceBack(fileName, sourceMap)
local trace local trace
if thread == nil and message == nil and level == nil then if thread == nil and message == nil and level == nil then
trace = originalTraceback() trace = originalTraceback()
elseif __TS__StringIncludes(_VERSION, "Lua 5.0") then
trace = originalTraceback((("[Level " .. tostring(level)) .. "] ") .. message)
else else
trace = originalTraceback(thread, message, level) trace = originalTraceback(thread, message, level)
end end
@ -2111,7 +2133,7 @@ local function __TS__SourceMapTraceBack(fileName, sourceMap)
local function stringReplacer(____, file, line) local function stringReplacer(____, file, line)
local fileSourceMap = _G.__TS__sourcemap[file] local fileSourceMap = _G.__TS__sourcemap[file]
if fileSourceMap and fileSourceMap[line] then if fileSourceMap and fileSourceMap[line] then
local chunkName = string.match(file, "%[string \"([^\"]+)\"%]") local chunkName = __TS__Match(file, "%[string \"([^\"]+)\"%]")
local sourceName = string.gsub(chunkName, ".lua$", ".ts") local sourceName = string.gsub(chunkName, ".lua$", ".ts")
local data = fileSourceMap[line] local data = fileSourceMap[line]
if type(data) == "number" then if type(data) == "number" then
@ -2178,16 +2200,6 @@ local function __TS__StringEndsWith(self, searchString, endPosition)
return string.sub(self, endPosition - #searchString + 1, endPosition) == searchString return string.sub(self, endPosition - #searchString + 1, endPosition) == searchString
end end
local function __TS__StringIncludes(self, searchString, position)
if not position then
position = 1
else
position = position + 1
end
local index = string.find(self, searchString, position, true)
return index ~= nil
end
local function __TS__StringPadEnd(self, maxLength, fillString) local function __TS__StringPadEnd(self, maxLength, fillString)
if fillString == nil then if fillString == nil then
fillString = " " fillString = " "
@ -2443,6 +2455,7 @@ return {
__TS__Class = __TS__Class, __TS__Class = __TS__Class,
__TS__ClassExtends = __TS__ClassExtends, __TS__ClassExtends = __TS__ClassExtends,
__TS__CloneDescriptor = __TS__CloneDescriptor, __TS__CloneDescriptor = __TS__CloneDescriptor,
__TS__CountVarargs = __TS__CountVarargs,
__TS__Decorate = __TS__Decorate, __TS__Decorate = __TS__Decorate,
__TS__DecorateParam = __TS__DecorateParam, __TS__DecorateParam = __TS__DecorateParam,
__TS__Delete = __TS__Delete, __TS__Delete = __TS__Delete,
@ -2460,8 +2473,11 @@ return {
__TS__Iterator = __TS__Iterator, __TS__Iterator = __TS__Iterator,
__TS__LuaIteratorSpread = __TS__LuaIteratorSpread, __TS__LuaIteratorSpread = __TS__LuaIteratorSpread,
Map = Map, Map = Map,
__TS__Match = __TS__Match,
__TS__MathAtan2 = __TS__MathAtan2, __TS__MathAtan2 = __TS__MathAtan2,
__TS__MathModf = __TS__MathModf,
__TS__MathSign = __TS__MathSign, __TS__MathSign = __TS__MathSign,
__TS__Modulo50 = __TS__Modulo50,
__TS__New = __TS__New, __TS__New = __TS__New,
__TS__Number = __TS__Number, __TS__Number = __TS__Number,
__TS__NumberIsFinite = __TS__NumberIsFinite, __TS__NumberIsFinite = __TS__NumberIsFinite,

View file

@ -8,7 +8,7 @@
"module": "commonjs", "module": "commonjs",
"moduleResolution": "node", "moduleResolution": "node",
"types": [ "types": [
"typescript-to-lua/language-extensions", "@typescript-to-lua/language-extensions",
"lua-types/5.2", "lua-types/5.2",
"typed-factorio/runtime", "typed-factorio/runtime",
"typed-factorio/strict-index-types" "typed-factorio/strict-index-types"