@quenty/observablecollection 12.14.1-canary.522.b5d379b.0 → 12.15.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,7 +3,7 @@
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
- ## [12.14.1-canary.522.b5d379b.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/observablecollection@12.14.0...@quenty/observablecollection@12.14.1-canary.522.b5d379b.0) (2024-11-24)
6
+ # [12.15.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/observablecollection@12.14.0...@quenty/observablecollection@12.15.0) (2024-12-03)
7
7
 
8
8
 
9
9
  ### Bug Fixes
@@ -11,6 +11,11 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
11
  * ObservableSortedList fires removed indexes (note: Doesn't handle negatives right now) ([f1c068d](https://github.com/Quenty/NevermoreEngine/commit/f1c068dd206b6a624e97cab86bb18c39e800a79a))
12
12
 
13
13
 
14
+ ### Features
15
+
16
+ * Return a cleanup method, even when amount is 0 ([8544c2b](https://github.com/Quenty/NevermoreEngine/commit/8544c2b9b5993de54d299ec8cbf4443b721af029))
17
+
18
+
14
19
 
15
20
 
16
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/observablecollection",
3
- "version": "12.14.1-canary.522.b5d379b.0",
3
+ "version": "12.15.0",
4
4
  "description": "A set of observable collections, such as sets, maps, sorted lists, and more.",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -27,24 +27,24 @@
27
27
  "Quenty"
28
28
  ],
29
29
  "dependencies": {
30
- "@quenty/baseobject": "10.7.1",
31
- "@quenty/brio": "14.13.1-canary.522.b5d379b.0",
32
- "@quenty/ducktype": "5.7.1",
33
- "@quenty/loader": "10.7.1",
34
- "@quenty/maid": "3.4.0",
35
- "@quenty/promise": "10.8.0",
36
- "@quenty/rx": "13.13.1-canary.522.b5d379b.0",
37
- "@quenty/signal": "7.9.0",
38
- "@quenty/steputils": "3.5.2",
39
- "@quenty/symbol": "3.3.0",
40
- "@quenty/table": "3.7.0",
41
- "@quenty/valueobject": "13.13.1-canary.522.b5d379b.0"
30
+ "@quenty/baseobject": "^10.7.1",
31
+ "@quenty/brio": "^14.14.0",
32
+ "@quenty/ducktype": "^5.7.1",
33
+ "@quenty/loader": "^10.7.1",
34
+ "@quenty/maid": "^3.4.0",
35
+ "@quenty/promise": "^10.8.0",
36
+ "@quenty/rx": "^13.14.0",
37
+ "@quenty/signal": "^7.9.0",
38
+ "@quenty/steputils": "^3.5.2",
39
+ "@quenty/symbol": "^3.4.0",
40
+ "@quenty/table": "^3.7.0",
41
+ "@quenty/valueobject": "^13.14.0"
42
42
  },
43
43
  "devDependencies": {
44
- "@quenty/blend": "12.13.1-canary.522.b5d379b.0"
44
+ "@quenty/blend": "^12.14.0"
45
45
  },
46
46
  "publishConfig": {
47
47
  "access": "public"
48
48
  },
49
- "gitHead": "b5d379b3553fb94b954870562e1bd2a57e9a1c10"
49
+ "gitHead": "66190e48c1ca93b07040326e9cfcf97e8eb4b0e1"
50
50
  }
@@ -271,18 +271,10 @@ end
271
271
  ]=]
272
272
  function ObservableCountingMap:Set(key, amount)
273
273
  local current = self:Get(key)
274
- if current == amount then
275
- return
276
- end
277
-
278
274
  if current < amount then
279
275
  self:Add(-(amount - current))
280
- return
281
- elseif current == amount then
282
- return
283
- else
276
+ elseif current > amount then
284
277
  self:Add(current - amount)
285
- return
286
278
  end
287
279
  end
288
280
 
@@ -298,7 +290,9 @@ function ObservableCountingMap:Add(key, amount)
298
290
  amount = amount or 1
299
291
 
300
292
  if amount == 0 then
301
- return
293
+ return function()
294
+
295
+ end
302
296
  end
303
297
 
304
298
  local oldValue = self._map[key]