@quenty/binder 14.35.0 → 14.36.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,12 @@
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.36.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/binder@14.35.0...@quenty/binder@14.36.0) (2026-05-29)
7
+
8
+ ### Bug Fixes
9
+
10
+ - Binder provider tests are self contained and safer ([9c90efb](https://github.com/Quenty/NevermoreEngine/commit/9c90efbe9972f88fb16f948937b4e0c18f45a531))
11
+
6
12
  # [14.35.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/binder@14.34.2...@quenty/binder@14.35.0) (2026-05-18)
7
13
 
8
14
  **Note:** Version bump only for package @quenty/binder
@@ -0,0 +1,10 @@
1
+ {
2
+ "targets": {
3
+ "test": {
4
+ "universeId": 9716264427,
5
+ "placeId": 91449389174744,
6
+ "project": "test/default.project.json",
7
+ "scriptTemplate": "test/scripts/Server/ServerMain.server.lua"
8
+ }
9
+ }
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/binder",
3
- "version": "14.35.0",
3
+ "version": "14.36.0",
4
4
  "description": "Utility object to Bind a class to Roblox object, and associated helper methods",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -29,10 +29,10 @@
29
29
  ],
30
30
  "dependencies": {
31
31
  "@quenty/baseobject": "10.13.0",
32
- "@quenty/brio": "14.29.2",
32
+ "@quenty/brio": "14.30.0",
33
33
  "@quenty/canceltoken": "11.19.0",
34
- "@quenty/instanceutils": "13.29.2",
35
- "@quenty/linkutils": "13.29.2",
34
+ "@quenty/instanceutils": "13.30.0",
35
+ "@quenty/linkutils": "13.30.0",
36
36
  "@quenty/loader": "10.11.0",
37
37
  "@quenty/maid": "3.9.0",
38
38
  "@quenty/nevermore-test-runner": "1.4.0",
@@ -41,11 +41,11 @@
41
41
  "@quenty/servicebag": "11.18.0",
42
42
  "@quenty/signal": "7.13.0",
43
43
  "@quenty/table": "3.9.2",
44
- "@quenty/valueobject": "13.30.2",
44
+ "@quenty/valueobject": "13.31.0",
45
45
  "@quentystudios/jest-lua": "3.10.0-quenty.2"
46
46
  },
47
47
  "publishConfig": {
48
48
  "access": "public"
49
49
  },
50
- "gitHead": "5cba15660c2856169fd0362e1eeeca4c260029c2"
50
+ "gitHead": "f4a374a0a294ee8900aa5cb68ab138b0acf3e0ae"
51
51
  }
@@ -203,12 +203,22 @@ end
203
203
  function BinderProvider:Destroy()
204
204
  self._destroyed = true
205
205
 
206
- for _, item in self._binders do
207
- rawset(self, item:GetTag(), nil)
206
+ local binders = rawget(self, "_binders")
207
+ rawset(self, "_binders", nil)
208
+
209
+ if binders then
210
+ for _, item in binders do
211
+ rawset(self, item:GetTag(), nil)
212
+ end
208
213
  end
209
214
 
210
- self._maid:DoCleaning()
211
- self._binders = nil
215
+ local maid = rawget(self, "_maid")
216
+ rawset(self, "_maid", nil)
217
+
218
+ if maid then
219
+ maid:DoCleaning()
220
+ maid = nil
221
+ end
212
222
  end
213
223
 
214
224
  return BinderProvider
@@ -16,33 +16,44 @@ local expect = Jest.Globals.expect
16
16
  local it = Jest.Globals.it
17
17
 
18
18
  describe("BinderProvider.new()", function()
19
- local provider
20
- local initialized = false
19
+ it("should construct a provider", function()
20
+ local provider = BinderProvider.new("BinderServiceName", function(_self) end)
21
+ expect(provider).toEqual(expect.any("table"))
22
+ provider:Destroy()
23
+ end)
21
24
 
22
- it("should execute immediately", function()
23
- provider = BinderProvider.new("BinderServiceName", function(self, arg)
25
+ it("should initialize and call the init callback", function()
26
+ local initialized = false
27
+
28
+ local provider = BinderProvider.new("BinderServiceName", function(_self, arg)
24
29
  initialized = true
25
30
  assert(arg == 12345, "Bad arg")
26
-
27
- self:Add(Binder.new("Test", function()
28
- return { Destroy = function() end }
29
- end))
30
31
  end)
31
32
 
32
- expect(provider).toEqual(expect.any("table"))
33
- end)
34
-
35
- it("should initialize", function()
36
33
  expect(initialized).toEqual(false)
37
34
  provider:Init(12345)
38
35
  expect(initialized).toEqual(true)
36
+
37
+ provider:Destroy()
39
38
  end)
40
39
 
41
- it("should contain the binder", function()
40
+ it("should contain the binder after init", function()
41
+ local binder
42
+
43
+ local provider = BinderProvider.new("BinderServiceName", function(self)
44
+ binder = Binder.new("Test", function()
45
+ return { Destroy = function() end }
46
+ end)
47
+ self:Add(binder)
48
+ end)
49
+
50
+ provider:Init()
51
+
42
52
  expect(provider.Test).toEqual(expect.any("table"))
43
- end)
44
53
 
45
- if provider then
46
54
  provider:Destroy()
47
- end
55
+ if binder then
56
+ binder:Destroy()
57
+ end
58
+ end)
48
59
  end)
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "BinderTest",
3
+ "globIgnorePaths": [
4
+ "**/.package-lock.json",
5
+ "**/.pnpm",
6
+ "**/.pnpm-workspace-state-v1.json",
7
+ "**/.modules.yaml",
8
+ "**/.ignored",
9
+ "**/.ignored_*"
10
+ ],
11
+ "tree": {
12
+ "$className": "DataModel",
13
+ "ServerScriptService": {
14
+ "$properties": {
15
+ "LoadStringEnabled": true
16
+ },
17
+ "binder": {
18
+ "$path": ".."
19
+ },
20
+ "Script": {
21
+ "$path": "scripts/Server"
22
+ }
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,13 @@
1
+ --[[
2
+ @class ServerMain
3
+ ]]
4
+ local ServerScriptService = game:GetService("ServerScriptService")
5
+
6
+ local root = ServerScriptService.binder
7
+ local loader = root:FindFirstChild("LoaderUtils", true).Parent
8
+ local require = require(loader).bootstrapGame(root)
9
+
10
+ local NevermoreTestRunnerUtils = require("NevermoreTestRunnerUtils")
11
+ if NevermoreTestRunnerUtils.runTestsIfNeededAsync(root) then
12
+ return
13
+ end