@quenty/loader 10.8.2 → 10.8.3
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 +8 -0
- package/package.json +2 -2
- package/src/Dependencies/PackageTracker.lua +1 -1
- package/src/Dependencies/PackageTrackerProvider.lua +1 -1
- package/src/LoaderLink/LoaderLinkCreator.lua +1 -1
- package/src/Maid.lua +16 -12
- package/src/Replication/Replicator.lua +1 -1
- package/src/Replication/ReplicatorReferences.lua +1 -1
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
|
+
## [10.8.3](https://github.com/Quenty/NevermoreEngine/compare/@quenty/loader@10.8.2...@quenty/loader@10.8.3) (2025-04-10)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @quenty/loader
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [10.8.2](https://github.com/Quenty/NevermoreEngine/compare/@quenty/loader@10.8.0...@quenty/loader@10.8.2) (2025-04-07)
|
|
7
15
|
|
|
8
16
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/loader",
|
|
3
|
-
"version": "10.8.
|
|
3
|
+
"version": "10.8.3",
|
|
4
4
|
"description": "A simple module loader for Roblox",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "b06c070ae91d5dab7bd8de6e290ad2caabb15d8f"
|
|
30
30
|
}
|
|
@@ -34,7 +34,7 @@ export type PackageTracker = typeof(setmetatable(
|
|
|
34
34
|
_subpackagesTrackerList: { PackageTracker },
|
|
35
35
|
_packageModuleScriptMap: { [string]: ModuleScriptInfo },
|
|
36
36
|
},
|
|
37
|
-
PackageTracker
|
|
37
|
+
{} :: typeof({ __index = PackageTracker })
|
|
38
38
|
))
|
|
39
39
|
|
|
40
40
|
function PackageTracker.new(packageTrackerProvider: PackageTrackerProvider, packageRoot: Instance): PackageTracker
|
|
@@ -18,7 +18,7 @@ export type PackageTrackerProvider = typeof(setmetatable(
|
|
|
18
18
|
_maid: Maid.Maid,
|
|
19
19
|
_trackCount: number,
|
|
20
20
|
},
|
|
21
|
-
PackageTrackerProvider
|
|
21
|
+
{} :: typeof({ __index = PackageTrackerProvider })
|
|
22
22
|
))
|
|
23
23
|
|
|
24
24
|
function PackageTrackerProvider.new(): PackageTrackerProvider
|
package/src/Maid.lua
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
local Maid = {}
|
|
28
28
|
Maid.ClassName = "Maid"
|
|
29
29
|
|
|
30
|
-
export type MaidTask = (() -> ()) | Instance | thread |
|
|
30
|
+
export type MaidTask = (() -> ()) | Instance | thread | any | RBXScriptConnection | nil
|
|
31
31
|
|
|
32
32
|
export type Maid = typeof(setmetatable(
|
|
33
33
|
{} :: {
|
|
@@ -37,9 +37,9 @@ export type Maid = typeof(setmetatable(
|
|
|
37
37
|
DoCleaning: (self: Maid) -> (),
|
|
38
38
|
Destroy: (self: Maid) -> (),
|
|
39
39
|
_tasks: { [any]: MaidTask },
|
|
40
|
-
[string | number |
|
|
40
|
+
[string | number | MaidTask]: any,
|
|
41
41
|
},
|
|
42
|
-
Maid
|
|
42
|
+
{} :: typeof({ __index = Maid })
|
|
43
43
|
))
|
|
44
44
|
|
|
45
45
|
--[[
|
|
@@ -53,9 +53,12 @@ export type Maid = typeof(setmetatable(
|
|
|
53
53
|
@return Maid
|
|
54
54
|
]]
|
|
55
55
|
function Maid.new(): Maid
|
|
56
|
-
return setmetatable(
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
return setmetatable(
|
|
57
|
+
{
|
|
58
|
+
_tasks = {},
|
|
59
|
+
} :: any,
|
|
60
|
+
Maid
|
|
61
|
+
) :: Maid
|
|
59
62
|
end
|
|
60
63
|
|
|
61
64
|
--[[
|
|
@@ -136,8 +139,9 @@ function Maid.__newindex(self: Maid, index: any, newTask: MaidTask)
|
|
|
136
139
|
if typeof(job) == "function" then
|
|
137
140
|
(job :: any)()
|
|
138
141
|
elseif typeof(job) == "table" then
|
|
139
|
-
|
|
140
|
-
|
|
142
|
+
local destructable: any = job
|
|
143
|
+
if type(destructable.Destroy) == "function" then
|
|
144
|
+
destructable:Destroy()
|
|
141
145
|
end
|
|
142
146
|
elseif typeof(job) == "Instance" then
|
|
143
147
|
job:Destroy()
|
|
@@ -172,7 +176,7 @@ function Maid.Add<T>(self: Maid, task: T): T
|
|
|
172
176
|
error("Task cannot be false or nil", 2)
|
|
173
177
|
end
|
|
174
178
|
|
|
175
|
-
self[#(self._tasks :: any) + 1] = task
|
|
179
|
+
self[#(self._tasks :: any) + 1] = task :: any
|
|
176
180
|
|
|
177
181
|
if type(task) == "table" and not task.Destroy then
|
|
178
182
|
warn("[Maid.Add] - Gave table task without .Destroy\n\n" .. debug.traceback())
|
|
@@ -196,7 +200,7 @@ function Maid.GiveTask(self: Maid, task: MaidTask): number
|
|
|
196
200
|
local taskId = #(self._tasks :: any) + 1
|
|
197
201
|
self[taskId] = task
|
|
198
202
|
|
|
199
|
-
if type(task) == "table" and not task.Destroy then
|
|
203
|
+
if type(task) == "table" and not (task :: any).Destroy then
|
|
200
204
|
warn("[Maid.GiveTask] - Gave table task without .Destroy\n\n" .. debug.traceback())
|
|
201
205
|
end
|
|
202
206
|
|
|
@@ -261,8 +265,8 @@ function Maid.DoCleaning(self: Maid)
|
|
|
261
265
|
tasks[index] = nil
|
|
262
266
|
if typeof(job) == "function" then
|
|
263
267
|
(job :: any)()
|
|
264
|
-
elseif typeof(job) == "table" and type(job.Destroy) == "function" then
|
|
265
|
-
job:Destroy()
|
|
268
|
+
elseif typeof(job) == "table" and type((job :: any).Destroy) == "function" then
|
|
269
|
+
(job :: any):Destroy()
|
|
266
270
|
elseif typeof(job) == "Instance" then
|
|
267
271
|
job:Destroy()
|
|
268
272
|
elseif typeof(job) == "thread" then
|
|
@@ -16,7 +16,7 @@ export type ReplicatorReferences = typeof(setmetatable(
|
|
|
16
16
|
_lookup: { [Instance]: Instance },
|
|
17
17
|
_listeners: { [Instance]: { ListenerCallback } },
|
|
18
18
|
},
|
|
19
|
-
ReplicatorReferences
|
|
19
|
+
{} :: typeof({ __index = ReplicatorReferences })
|
|
20
20
|
))
|
|
21
21
|
|
|
22
22
|
function ReplicatorReferences.new(): ReplicatorReferences
|