@quenty/tie 10.5.1-canary.478.34e8ede.0 → 10.6.0-canary.490.601c967.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.
package/CHANGELOG.md CHANGED
@@ -3,7 +3,7 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [10.5.1-canary.478.34e8ede.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/tie@10.5.0...@quenty/tie@10.5.1-canary.478.34e8ede.0) (2024-08-27)
6
+ # [10.6.0-canary.490.601c967.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/tie@10.5.0...@quenty/tie@10.6.0-canary.490.601c967.0) (2024-08-27)
7
7
 
8
8
 
9
9
  ### Bug Fixes
@@ -13,7 +13,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
13
13
 
14
14
  ### Features
15
15
 
16
- * Add tuple package and fix tie signal ([134f90c](https://github.com/Quenty/NevermoreEngine/commit/134f90c03b265b9d2232198475ca27f4d5e87071))
17
16
  * Allow default values to be defined for TiePropertyDefinition ([89112f1](https://github.com/Quenty/NevermoreEngine/commit/89112f15ffdc8c637681ba9f4e7aa1c60e2c7e23))
18
17
  * Unedited all changes ([60e64e3](https://github.com/Quenty/NevermoreEngine/commit/60e64e3efce17c10c4b8965871187d231b338dd4))
19
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/tie",
3
- "version": "10.5.1-canary.478.34e8ede.0",
3
+ "version": "10.6.0-canary.490.601c967.0",
4
4
  "description": "Tie allows interfaces to be defined between Lua OOP and Roblox objects.",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -28,28 +28,27 @@
28
28
  "Quenty"
29
29
  ],
30
30
  "dependencies": {
31
- "@quenty/attributeutils": "14.3.1-canary.478.34e8ede.0",
32
- "@quenty/baseobject": "10.3.1-canary.478.34e8ede.0",
33
- "@quenty/brio": "14.3.1-canary.478.34e8ede.0",
34
- "@quenty/collectionserviceutils": "8.3.1-canary.478.34e8ede.0",
35
- "@quenty/instanceutils": "13.3.1-canary.478.34e8ede.0",
36
- "@quenty/loader": "10.3.1-canary.478.34e8ede.0",
31
+ "@quenty/attributeutils": "14.4.0-canary.490.601c967.0",
32
+ "@quenty/baseobject": "10.4.0-canary.490.601c967.0",
33
+ "@quenty/brio": "14.4.0-canary.490.601c967.0",
34
+ "@quenty/collectionserviceutils": "8.4.0-canary.490.601c967.0",
35
+ "@quenty/instanceutils": "13.4.0-canary.490.601c967.0",
36
+ "@quenty/loader": "10.4.0-canary.490.601c967.0",
37
37
  "@quenty/maid": "3.2.0",
38
- "@quenty/rx": "13.3.1-canary.478.34e8ede.0",
39
- "@quenty/statestack": "14.4.1-canary.478.34e8ede.0",
38
+ "@quenty/rx": "13.4.0-canary.490.601c967.0",
39
+ "@quenty/statestack": "14.5.0-canary.490.601c967.0",
40
40
  "@quenty/string": "3.2.0",
41
41
  "@quenty/symbol": "3.1.0",
42
42
  "@quenty/table": "3.5.0",
43
- "@quenty/tuple": "1.0.1-canary.478.34e8ede.0",
44
- "@quenty/valuebaseutils": "13.3.1-canary.478.34e8ede.0",
45
- "@quenty/valueobject": "13.3.1-canary.478.34e8ede.0"
43
+ "@quenty/valuebaseutils": "13.4.0-canary.490.601c967.0",
44
+ "@quenty/valueobject": "13.4.0-canary.490.601c967.0"
46
45
  },
47
46
  "devDependencies": {
48
- "@quenty/promise": "10.3.1-canary.478.34e8ede.0",
49
- "@quenty/signal": "7.3.1-canary.478.34e8ede.0"
47
+ "@quenty/promise": "10.4.0-canary.490.601c967.0",
48
+ "@quenty/signal": "7.4.0-canary.490.601c967.0"
50
49
  },
51
50
  "publishConfig": {
52
51
  "access": "public"
53
52
  },
54
- "gitHead": "34e8edee97fa93a0a5bd84442b85826082444f2a"
53
+ "gitHead": "601c9671f09638be4f326e41fcfe3343ccfe76d8"
55
54
  }
@@ -7,7 +7,6 @@ local require = require(script.Parent.loader).load(script)
7
7
  local BaseObject = require("BaseObject")
8
8
  local TieUtils = require("TieUtils")
9
9
  local Maid = require("Maid")
10
- local Tuple = require("Tuple")
11
10
 
12
11
  local TieSignalImplementation = setmetatable({}, BaseObject)
13
12
  TieSignalImplementation.ClassName = "TieSignalImplementation"
@@ -24,6 +23,12 @@ function TieSignalImplementation.new(memberDefinition, implParent, initialValue)
24
23
  self._bindableEvent.Name = memberDefinition:GetMemberName()
25
24
  self._bindableEvent.Parent = self._implParent
26
25
 
26
+ -- Abuse the fact that the first signal connected is the first
27
+ -- signal to fire!
28
+ self._maid:GiveTask(self._bindableEvent.Event:Connect(function()
29
+ self._thisIsUsFiring = false
30
+ end))
31
+
27
32
  self:SetImplementation(initialValue)
28
33
 
29
34
  return self
@@ -33,37 +38,17 @@ function TieSignalImplementation:SetImplementation(signal)
33
38
  local maid = Maid.new()
34
39
 
35
40
  if type(signal) == "table" then
36
- -- Prevent re-entrance from stuff fired from ourselves when forwarding events in either direction
37
- local signalFiredArgs = {}
38
- local bindableEventFiredArgs = {}
39
-
40
41
  maid:GiveTask(signal:Connect(function(...)
41
- local args = Tuple.new(TieUtils.encode(...))
42
- for pendingArgs, _ in pairs(bindableEventFiredArgs) do
43
- if pendingArgs == args then
44
- -- Remove from queue
45
- bindableEventFiredArgs[pendingArgs] = nil
46
- return
47
- end
48
- end
49
-
50
- signalFiredArgs[args] = true
51
- self._bindableEvent:Fire(args:Unpack())
42
+ self._thisIsUsFiring = true
43
+ self._bindableEvent:Fire(TieUtils.encode(...))
52
44
  end))
53
45
 
54
- maid:GiveTask(self._bindableEvent.Event:Connect(function(...)
55
- local args = Tuple.new(TieUtils.decode(...))
56
- for pendingArgs, _ in pairs(signalFiredArgs) do
57
- if pendingArgs == args then
58
- -- Remove from queue
59
- signalFiredArgs[pendingArgs] = nil
60
- return
61
- end
62
- end
63
-
64
- bindableEventFiredArgs[args] = true
65
- signal:Fire(args:Unpack())
66
- end))
46
+ -- TODO: Listen to the event and fire off our own event (if we aren't the source).
47
+ -- maid:GiveTask(self._bindableEvent.Event:Connect(function(...)
48
+ -- if not self._thisIsUsFiring then
49
+ -- signal:Fire(TieUtils.decode(...))
50
+ -- end
51
+ -- end))
67
52
  end
68
53
 
69
54
  self._maid._implementationMaid = maid