@quenty/instanceutils 13.6.0 → 13.8.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 +16 -0
- package/package.json +7 -7
- package/src/Shared/RxInstanceUtils.lua +5 -9
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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.8.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/instanceutils@13.7.0...@quenty/instanceutils@13.8.0) (2024-10-04)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/instanceutils
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [13.7.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/instanceutils@13.6.0...@quenty/instanceutils@13.7.0) (2024-09-25)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @quenty/instanceutils
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
# [13.6.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/instanceutils@13.5.0...@quenty/instanceutils@13.6.0) (2024-09-25)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @quenty/instanceutils
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/instanceutils",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.8.0",
|
|
4
4
|
"description": "Utility functions involving instances in Roblox",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"Quenty"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@quenty/brio": "^14.
|
|
30
|
-
"@quenty/loader": "^10.
|
|
31
|
-
"@quenty/maid": "^3.
|
|
32
|
-
"@quenty/rx": "^13.
|
|
33
|
-
"@quenty/symbol": "^3.
|
|
29
|
+
"@quenty/brio": "^14.8.0",
|
|
30
|
+
"@quenty/loader": "^10.6.0",
|
|
31
|
+
"@quenty/maid": "^3.4.0",
|
|
32
|
+
"@quenty/rx": "^13.8.0",
|
|
33
|
+
"@quenty/symbol": "^3.2.0"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "035abfa088c854a73e1c65b350267eaa17669646"
|
|
39
39
|
}
|
|
@@ -34,14 +34,12 @@ function RxInstanceUtils.observeProperty(instance, propertyName)
|
|
|
34
34
|
assert(type(propertyName) == "string", "'propertyName' should be of type string")
|
|
35
35
|
|
|
36
36
|
return Observable.new(function(sub)
|
|
37
|
-
local
|
|
38
|
-
|
|
39
|
-
maid:GiveTask(instance:GetPropertyChangedSignal(propertyName):Connect(function()
|
|
37
|
+
local connection = instance:GetPropertyChangedSignal(propertyName):Connect(function()
|
|
40
38
|
sub:Fire(instance[propertyName], instance)
|
|
41
|
-
end)
|
|
39
|
+
end)
|
|
42
40
|
sub:Fire(instance[propertyName], instance)
|
|
43
41
|
|
|
44
|
-
return
|
|
42
|
+
return connection
|
|
45
43
|
end)
|
|
46
44
|
end
|
|
47
45
|
|
|
@@ -122,8 +120,6 @@ function RxInstanceUtils.observeFirstAncestor(instance, className)
|
|
|
122
120
|
assert(type(className) == "string", "Bad className")
|
|
123
121
|
|
|
124
122
|
return Observable.new(function(sub)
|
|
125
|
-
local maid = Maid.new()
|
|
126
|
-
|
|
127
123
|
local lastFound = UNSET_VALUE
|
|
128
124
|
local function handleAncestryChanged()
|
|
129
125
|
local found = instance:FindFirstAncestorWhichIsA(className)
|
|
@@ -133,10 +129,10 @@ function RxInstanceUtils.observeFirstAncestor(instance, className)
|
|
|
133
129
|
end
|
|
134
130
|
end
|
|
135
131
|
|
|
136
|
-
|
|
132
|
+
local connection = instance.AncestryChanged:Connect(handleAncestryChanged)
|
|
137
133
|
handleAncestryChanged()
|
|
138
134
|
|
|
139
|
-
return
|
|
135
|
+
return connection
|
|
140
136
|
end)
|
|
141
137
|
end
|
|
142
138
|
|