@quenty/valueobject 13.6.0 → 13.7.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,6 +3,14 @@
|
|
|
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
|
+
# [13.7.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/valueobject@13.6.0...@quenty/valueobject@13.7.0) (2024-09-25)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/valueobject
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [13.6.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/valueobject@13.5.0...@quenty/valueobject@13.6.0) (2024-09-25)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @quenty/valueobject
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/valueobject",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.7.0",
|
|
4
4
|
"description": "To work like value objects in Roblox and track a single item with .Changed events",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -26,16 +26,16 @@
|
|
|
26
26
|
"Quenty"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@quenty/brio": "^14.
|
|
29
|
+
"@quenty/brio": "^14.7.0",
|
|
30
30
|
"@quenty/ducktype": "^5.5.0",
|
|
31
31
|
"@quenty/loader": "^10.5.0",
|
|
32
32
|
"@quenty/maid": "^3.3.0",
|
|
33
|
-
"@quenty/rx": "^13.
|
|
34
|
-
"@quenty/signal": "^7.
|
|
35
|
-
"@quenty/valuebaseutils": "^13.
|
|
33
|
+
"@quenty/rx": "^13.7.0",
|
|
34
|
+
"@quenty/signal": "^7.6.0",
|
|
35
|
+
"@quenty/valuebaseutils": "^13.7.0"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "9b17fe79cddd071f0f06a9d35184e76b44bd6fe6"
|
|
41
41
|
}
|
|
@@ -148,11 +148,11 @@ function ValueObject:Observe()
|
|
|
148
148
|
return
|
|
149
149
|
end
|
|
150
150
|
|
|
151
|
-
local
|
|
151
|
+
local connection
|
|
152
152
|
|
|
153
|
-
|
|
153
|
+
connection = self.Changed:Connect(function(newValue, _, ...)
|
|
154
154
|
sub:Fire(newValue, ...)
|
|
155
|
-
end)
|
|
155
|
+
end)
|
|
156
156
|
|
|
157
157
|
local args = rawget(self, "_lastEventContext")
|
|
158
158
|
if args then
|
|
@@ -161,7 +161,7 @@ function ValueObject:Observe()
|
|
|
161
161
|
sub:Fire(self.Value)
|
|
162
162
|
end
|
|
163
163
|
|
|
164
|
-
return
|
|
164
|
+
return connection
|
|
165
165
|
end)
|
|
166
166
|
end
|
|
167
167
|
|
|
@@ -37,24 +37,7 @@ end
|
|
|
37
37
|
function ValueObjectUtils.observeValue(valueObject)
|
|
38
38
|
assert(ValueObject.isValueObject(valueObject), "Bad valueObject")
|
|
39
39
|
|
|
40
|
-
return
|
|
41
|
-
if not valueObject.Destroy then
|
|
42
|
-
warn("[ValueObjectUtils.observeValue] - Connecting to dead ValueObject")
|
|
43
|
-
-- No firing, we're dead
|
|
44
|
-
sub:Complete()
|
|
45
|
-
return
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
local maid = Maid.new()
|
|
49
|
-
|
|
50
|
-
maid:GiveTask(valueObject.Changed:Connect(function()
|
|
51
|
-
sub:Fire(valueObject.Value)
|
|
52
|
-
end))
|
|
53
|
-
|
|
54
|
-
sub:Fire(valueObject.Value)
|
|
55
|
-
|
|
56
|
-
return maid
|
|
57
|
-
end)
|
|
40
|
+
return valueObject:Observe()
|
|
58
41
|
end
|
|
59
42
|
|
|
60
43
|
--[=[
|