@quenty/maid 3.0.0 → 3.1.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/LICENSE.md +1 -1
- package/package.json +2 -2
- package/src/Shared/Maid.story.lua +21 -0
- package/test/default.project.json +14 -0
- package/test/scripts/Server/ServerMain.server.lua +13 -0
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
|
+
# [3.1.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/maid@3.0.0...@quenty/maid@3.1.0) (2024-03-09)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Add Maid package ([e0bc7fc](https://github.com/Quenty/NevermoreEngine/commit/e0bc7fc47e7981b74f404410f14b539cd1191223))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [3.0.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/maid@2.6.0...@quenty/maid@3.0.0) (2024-02-13)
|
|
7
18
|
|
|
8
19
|
|
package/LICENSE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2014-
|
|
3
|
+
Copyright (c) 2014-2024 James Onnen (Quenty)
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/maid",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Easily cleanup event listeners and objects in Roblox",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "e0148dde5ca3864389a0faa2da66153a776acc1e"
|
|
33
33
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
--[[
|
|
2
|
+
@class Maid.story
|
|
3
|
+
]]
|
|
4
|
+
|
|
5
|
+
local Maid = require(script.Parent.Maid)
|
|
6
|
+
|
|
7
|
+
return function()
|
|
8
|
+
local maid = Maid.new()
|
|
9
|
+
|
|
10
|
+
local thread = maid:Add(task.spawn(function()
|
|
11
|
+
while true do
|
|
12
|
+
task.wait(0.1) -- In the spawn scenario this yields control back to the main thread, adding the task.
|
|
13
|
+
error("Task is not cancelled because of change")
|
|
14
|
+
end
|
|
15
|
+
end))
|
|
16
|
+
|
|
17
|
+
return function()
|
|
18
|
+
maid:DoCleaning()
|
|
19
|
+
task.cancel(thread)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
-- Don't want to include loader here, so we do this instead
|
|
2
|
+
local Maid = require(game.ServerScriptService.maid.Shared.Maid)
|
|
3
|
+
|
|
4
|
+
local maid = Maid.new()
|
|
5
|
+
|
|
6
|
+
maid:Add(task.defer(function()
|
|
7
|
+
maid:DoCleaning()
|
|
8
|
+
|
|
9
|
+
while true do
|
|
10
|
+
task.wait(0.1)
|
|
11
|
+
error("UPDATE (this should never print)")
|
|
12
|
+
end
|
|
13
|
+
end))
|