@rbxts/covenant 3.3.2 → 3.3.4

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rbxts/covenant",
3
- "version": "3.3.2",
3
+ "version": "3.3.4",
4
4
  "main": "src/init.luau",
5
5
  "scripts": {
6
6
  "build": "rbxtsc",
package/src/covenant.luau CHANGED
@@ -10,6 +10,7 @@ local _stringEnums = TS.import(script, script.Parent, "stringEnums")
10
10
  local Remove = _stringEnums.Remove
11
11
  local Delete = _stringEnums.Delete
12
12
  local EventMap = TS.import(script, script.Parent, "dataStructureWithEvents").EventMap
13
+ local tableToString = TS.import(script, script.Parent, "tableToString").tableToString
13
14
  local BIG_PRIORITY = 10000000
14
15
  for _k, _v in TS.import(script, TS.getModule(script, "@rbxts", "jecs").jecs) or {} do
15
16
  exports[_k] = _v
@@ -378,7 +379,7 @@ do
378
379
  self._world:set(entity, component, newState)
379
380
  end
380
381
  if self.logging and RunService:IsStudio() then
381
- print(`{self:getComponentName(component)}.{entity}:{lastState}->{newState}`)
382
+ print(`{self:getComponentName(component)}.{entity}:{tableToString(lastState)}->{tableToString(newState)}`)
382
383
  end
383
384
  local _stringifiedComponentSubscribers = self.stringifiedComponentSubscribers
384
385
  local _arg0 = tostring(component)
@@ -0,0 +1 @@
1
+ export declare function tableToString(table: unknown): string;
@@ -0,0 +1,17 @@
1
+ local function tableToString(table)
2
+ local s = ""
3
+ if type(table) == "table" then
4
+ s = s .. "{ "
5
+ for i, v in pairs(table) do
6
+ s = s .. "(" tableToString(i) .. " = " .. tableToString(v) .. "), "
7
+ end
8
+ s = s .. "}"
9
+ else
10
+ s = s .. tostring(table)
11
+ end
12
+ return s
13
+ end
14
+
15
+ return {
16
+ tableToString = tableToString,
17
+ }