@quenty/valueobject 8.4.0 → 9.0.0-canary.439.eb597ee.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,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
+ # [9.0.0-canary.439.eb597ee.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/valueobject@8.4.0...@quenty/valueobject@9.0.0-canary.439.eb597ee.0) (2024-01-17)
7
+
8
+ **Note:** Version bump only for package @quenty/valueobject
9
+
10
+
11
+
12
+
13
+
6
14
  # [8.4.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/valueobject@8.3.0...@quenty/valueobject@8.4.0) (2024-01-08)
7
15
 
8
16
  **Note:** Version bump only for package @quenty/valueobject
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/valueobject",
3
- "version": "8.4.0",
3
+ "version": "9.0.0-canary.439.eb597ee.0",
4
4
  "description": "To work like value objects in Roblox and track a single item with .Changed events",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -26,15 +26,16 @@
26
26
  "Quenty"
27
27
  ],
28
28
  "dependencies": {
29
- "@quenty/brio": "^9.4.0",
30
- "@quenty/loader": "^7.3.0",
31
- "@quenty/maid": "^2.6.0",
32
- "@quenty/rx": "^8.4.0",
33
- "@quenty/signal": "^3.2.0",
34
- "@quenty/valuebaseutils": "^8.4.0"
29
+ "@quenty/brio": "10.0.0-canary.439.eb597ee.0",
30
+ "@quenty/ducktype": "3.0.0-canary.439.eb597ee.0",
31
+ "@quenty/loader": "8.0.0-canary.439.eb597ee.0",
32
+ "@quenty/maid": "2.6.0",
33
+ "@quenty/rx": "9.0.0-canary.439.eb597ee.0",
34
+ "@quenty/signal": "4.0.0-canary.439.eb597ee.0",
35
+ "@quenty/valuebaseutils": "9.0.0-canary.439.eb597ee.0"
35
36
  },
36
37
  "publishConfig": {
37
38
  "access": "public"
38
39
  },
39
- "gitHead": "075fb03a03f12ade8758f667767ba738204e0c4b"
40
+ "gitHead": "eb597ee01e62e4dd91190bb7abd1d1404652d5ff"
40
41
  }
@@ -12,6 +12,7 @@ local Observable = require("Observable")
12
12
  local ValueBaseUtils = require("ValueBaseUtils")
13
13
  local RxValueBaseUtils = require("RxValueBaseUtils")
14
14
  local Brio = require("Brio")
15
+ local DuckTypeUtils = require("DuckTypeUtils")
15
16
 
16
17
  local EMPTY_FUNCTION = function() end
17
18
 
@@ -75,7 +76,7 @@ end
75
76
  @return boolean
76
77
  ]=]
77
78
  function ValueObject.isValueObject(value)
78
- return type(value) == "table" and getmetatable(value) == ValueObject
79
+ return DuckTypeUtils.isImplementation(ValueObject, value)
79
80
  end
80
81
 
81
82
  function ValueObject:_toMountableObservable(value)
@@ -269,7 +270,7 @@ function ValueObject:__index(index)
269
270
  elseif index == "_value" then
270
271
  return nil -- Edge case
271
272
  else
272
- error(("%q is not a member of ValueObject"):format(tostring(index)))
273
+ error(string.format("%q is not a member of ValueObject", tostring(index)))
273
274
  end
274
275
  end
275
276
 
@@ -278,9 +279,9 @@ function ValueObject:__newindex(index, value)
278
279
  -- Avoid deoptimization
279
280
  ValueObject.SetValue(self, value)
280
281
  elseif index == "LastEventContext" or ValueObject[index] then
281
- error(("%q cannot be set in ValueObject"):format(tostring(index)))
282
+ error(string.format("%q cannot be set in ValueObject", tostring(index)))
282
283
  else
283
- error(("%q is not a member of ValueObject"):format(tostring(index)))
284
+ error(string.format("%q is not a member of ValueObject", tostring(index)))
284
285
  end
285
286
  end
286
287