@quenty/binder 14.1.0 → 14.2.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 +11 -0
- package/package.json +2 -2
- package/src/Shared/BinderProvider.lua +9 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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
|
+
# [14.2.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/binder@14.1.0...@quenty/binder@14.2.0) (2024-03-27)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* Update avatar editor stuff ([16d10a8](https://github.com/Quenty/NevermoreEngine/commit/16d10a876c90d3b43d69b5f66e217e4c3749296b))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [14.1.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/binder@14.0.0...@quenty/binder@14.1.0) (2024-03-09)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @quenty/binder
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/binder",
|
|
3
|
-
"version": "14.
|
|
3
|
+
"version": "14.2.0",
|
|
4
4
|
"description": "Utility object to Bind a class to Roblox object, and associated helper methods",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "ab3631a54c4e8d448b4229c7e422a9c7f43c0dd7"
|
|
43
43
|
}
|
|
@@ -16,12 +16,16 @@ BinderProvider.__index = BinderProvider
|
|
|
16
16
|
--[=[
|
|
17
17
|
Constructs a new BinderProvider.
|
|
18
18
|
|
|
19
|
+
:::tip
|
|
20
|
+
Don't use this! You can retrieve binders from the service bag directly
|
|
21
|
+
:::
|
|
22
|
+
|
|
19
23
|
```lua
|
|
20
24
|
local serviceBag = ServiceBag.new()
|
|
21
25
|
|
|
22
26
|
-- Usually in a separate file!
|
|
23
27
|
local binderProvider = BinderProvider.new("BirdBinders", function(self, serviceBag)
|
|
24
|
-
|
|
28
|
+
self:Add(Binder.new("Bird", require("Bird"), serviceBag))
|
|
25
29
|
end)
|
|
26
30
|
|
|
27
31
|
-- Retrieve binders
|
|
@@ -109,11 +113,8 @@ function BinderProvider:Init(...)
|
|
|
109
113
|
self._initialized = true
|
|
110
114
|
|
|
111
115
|
-- Pretty sure this is a bad idea
|
|
112
|
-
self._bindersAddedPromise = Promise.new()
|
|
113
|
-
self._maid:
|
|
114
|
-
|
|
115
|
-
self._startPromise = Promise.new()
|
|
116
|
-
self._maid:GiveTask(self._startPromise)
|
|
116
|
+
self._bindersAddedPromise = self._maid:Add(Promise.new())
|
|
117
|
+
self._startPromise = self._maid:Add(Promise.new())
|
|
117
118
|
|
|
118
119
|
self._initMethod(self, ...)
|
|
119
120
|
|
|
@@ -189,6 +190,8 @@ function BinderProvider:Add(binder)
|
|
|
189
190
|
assert(not self._started, "Already inited")
|
|
190
191
|
assert(not self:Get(binder:GetTag()), "Binder already exists")
|
|
191
192
|
|
|
193
|
+
self._maid:GiveTask(binder)
|
|
194
|
+
|
|
192
195
|
table.insert(self._binders, binder)
|
|
193
196
|
self[binder:GetTag()] = binder
|
|
194
197
|
end
|