@quenty/datastore 13.25.2 → 13.25.3-canary.607f741.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,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
+ ## [13.25.3-canary.607f741.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/datastore@13.25.2...@quenty/datastore@13.25.3-canary.607f741.0) (2025-12-28)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Handle nil value in StoreOnValueChange ([#615](https://github.com/Quenty/NevermoreEngine/issues/615)) ([09fa459](https://github.com/Quenty/NevermoreEngine/commit/09fa459b175b6e813cf64a3650d00127fa0cab06))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [13.25.2](https://github.com/Quenty/NevermoreEngine/compare/@quenty/datastore@13.25.1...@quenty/datastore@13.25.2) (2025-11-22)
7
18
 
8
19
  **Note:** Version bump only for package @quenty/datastore
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/datastore",
3
- "version": "13.25.2",
3
+ "version": "13.25.3-canary.607f741.0",
4
4
  "description": "Quenty's Datastore implementation for Roblox",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -26,23 +26,23 @@
26
26
  "Quenty"
27
27
  ],
28
28
  "dependencies": {
29
- "@quenty/baseobject": "^10.9.0",
30
- "@quenty/bindtocloseservice": "^8.21.2",
31
- "@quenty/loader": "^10.9.0",
32
- "@quenty/maid": "^3.5.0",
33
- "@quenty/math": "^2.7.3",
34
- "@quenty/pagesutils": "^5.13.0",
35
- "@quenty/promise": "^10.12.0",
36
- "@quenty/promisemaid": "^5.12.0",
37
- "@quenty/rx": "^13.20.0",
38
- "@quenty/servicebag": "^11.13.1",
39
- "@quenty/signal": "^7.11.1",
40
- "@quenty/symbol": "^3.5.0",
41
- "@quenty/table": "^3.8.0",
42
- "@quenty/valueobject": "^13.21.2"
29
+ "@quenty/baseobject": "10.9.0",
30
+ "@quenty/bindtocloseservice": "8.21.3-canary.607f741.0",
31
+ "@quenty/loader": "10.9.0",
32
+ "@quenty/maid": "3.5.0",
33
+ "@quenty/math": "2.7.3",
34
+ "@quenty/pagesutils": "5.13.0",
35
+ "@quenty/promise": "10.12.0",
36
+ "@quenty/promisemaid": "5.12.0",
37
+ "@quenty/rx": "13.20.0",
38
+ "@quenty/servicebag": "11.13.2-canary.607f741.0",
39
+ "@quenty/signal": "7.11.1",
40
+ "@quenty/symbol": "3.5.0",
41
+ "@quenty/table": "3.8.0",
42
+ "@quenty/valueobject": "13.21.3-canary.607f741.0"
43
43
  },
44
44
  "publishConfig": {
45
45
  "access": "public"
46
46
  },
47
- "gitHead": "b3a8753cbae8b4312b1ed66fce1577a94015c156"
47
+ "gitHead": "607f7418f46b85cd5843f1c5665911eb2dd7e3fb"
48
48
  }
@@ -91,23 +91,25 @@ local DataStore = setmetatable({}, DataStoreStage)
91
91
  DataStore.ClassName = "DataStore"
92
92
  DataStore.__index = DataStore
93
93
 
94
- export type DataStore = typeof(setmetatable(
95
- {} :: {
96
- _key: string,
97
- _userIdList: { number }?,
98
- _robloxDataStore: DataStorePromises.RobloxDataStore,
99
- _debugWriting: boolean,
100
- _sessionLockingEnabled: boolean,
101
- _autoSaveTimeSeconds: ValueObject.ValueObject<number?>,
102
- _jitterProportion: ValueObject.ValueObject<number>,
103
- _syncOnSave: ValueObject.ValueObject<boolean>,
104
- _loadedOk: ValueObject.ValueObject<boolean>,
105
- _firstLoadPromise: Promise.Promise<()>,
106
- _promiseSessionLockingFailed: Promise.Promise<()>,
107
- Saving: Signal.Signal<Promise.Promise<()>>,
108
- },
109
- {} :: typeof({ __index = DataStore })
110
- )) & DataStoreStage.DataStoreStage
94
+ export type DataStore =
95
+ typeof(setmetatable(
96
+ {} :: {
97
+ _key: string,
98
+ _userIdList: { number }?,
99
+ _robloxDataStore: DataStorePromises.RobloxDataStore,
100
+ _debugWriting: boolean,
101
+ _sessionLockingEnabled: boolean,
102
+ _autoSaveTimeSeconds: ValueObject.ValueObject<number?>,
103
+ _jitterProportion: ValueObject.ValueObject<number>,
104
+ _syncOnSave: ValueObject.ValueObject<boolean>,
105
+ _loadedOk: ValueObject.ValueObject<boolean>,
106
+ _firstLoadPromise: Promise.Promise<()>,
107
+ _promiseSessionLockingFailed: Promise.Promise<()>,
108
+ Saving: Signal.Signal<Promise.Promise<()>>,
109
+ },
110
+ {} :: typeof({ __index = DataStore })
111
+ ))
112
+ & DataStoreStage.DataStoreStage
111
113
 
112
114
  --[=[
113
115
  Constructs a new DataStore. See [DataStoreStage] for more API.
@@ -41,23 +41,25 @@ export type DataStoreStageKey = string | number
41
41
 
42
42
  export type DataStoreCallback = () -> Promise.Promise<()>?
43
43
 
44
- export type DataStoreStage = typeof(setmetatable(
45
- {} :: {
46
- _loadName: DataStoreStageKey,
47
- _loadParent: DataStoreStage?,
48
- _saveDataSnapshot: any,
49
- _fullPath: string?,
50
- _baseDataSnapshot: any,
51
- _viewSnapshot: any,
52
- _stores: { [DataStoreStageKey]: DataStoreStage },
53
- _savingCallbacks: { DataStoreCallback },
54
- _keySubscriptions: ObservableSubscriptionTable.ObservableSubscriptionTable<any>,
55
-
56
- Changed: Signal.Signal<any>,
57
- DataStored: Signal.Signal<any>,
58
- },
59
- {} :: typeof({ __index = DataStoreStage })
60
- )) & BaseObject.BaseObject
44
+ export type DataStoreStage =
45
+ typeof(setmetatable(
46
+ {} :: {
47
+ _loadName: DataStoreStageKey,
48
+ _loadParent: DataStoreStage?,
49
+ _saveDataSnapshot: any,
50
+ _fullPath: string?,
51
+ _baseDataSnapshot: any,
52
+ _viewSnapshot: any,
53
+ _stores: { [DataStoreStageKey]: DataStoreStage },
54
+ _savingCallbacks: { DataStoreCallback },
55
+ _keySubscriptions: ObservableSubscriptionTable.ObservableSubscriptionTable<any>,
56
+
57
+ Changed: Signal.Signal<any>,
58
+ DataStored: Signal.Signal<any>,
59
+ },
60
+ {} :: typeof({ __index = DataStoreStage })
61
+ ))
62
+ & BaseObject.BaseObject
61
63
 
62
64
  --[=[
63
65
  Constructs a new DataStoreStage to load from. Prefer to use DataStore because this doesn't
@@ -605,7 +607,12 @@ function DataStoreStage.StoreOnValueChange(self: DataStoreStage, name: DataStore
605
607
  local maid = Maid.new()
606
608
 
607
609
  maid:GiveTask(valueObj.Changed:Connect(function()
608
- self:_storeAtKey(name, valueObj.Value)
610
+ local value = valueObj.Value
611
+ if value == nil then
612
+ self:_storeAtKey(name, DataStoreDeleteToken)
613
+ else
614
+ self:_storeAtKey(name, value)
615
+ end
609
616
  end))
610
617
 
611
618
  -- Hopefully this doesn't result in data-loss when writing as
@@ -66,18 +66,20 @@ PlayerDataStoreManager.ClassName = "PlayerDataStoreManager"
66
66
  PlayerDataStoreManager.__index = PlayerDataStoreManager
67
67
 
68
68
  export type KeyGenerator = (Player) -> string
69
- export type PlayerDataStoreManager = typeof(setmetatable(
70
- {} :: {
71
- _robloxDataStore: any,
72
- _keyGenerator: KeyGenerator,
73
- _datastores: { [Player]: DataStore.DataStore },
74
- _removing: { [Player]: boolean },
75
- _pendingSaves: PendingPromiseTracker.PendingPromiseTracker<any>,
76
- _removingCallbacks: { (Player) -> any },
77
- _disableSavingInStudio: boolean?,
78
- },
79
- {} :: typeof({ __index = PlayerDataStoreManager })
80
- )) & BaseObject.BaseObject
69
+ export type PlayerDataStoreManager =
70
+ typeof(setmetatable(
71
+ {} :: {
72
+ _robloxDataStore: any,
73
+ _keyGenerator: KeyGenerator,
74
+ _datastores: { [Player]: DataStore.DataStore },
75
+ _removing: { [Player]: boolean },
76
+ _pendingSaves: PendingPromiseTracker.PendingPromiseTracker<any>,
77
+ _removingCallbacks: { (Player) -> any },
78
+ _disableSavingInStudio: boolean?,
79
+ },
80
+ {} :: typeof({ __index = PlayerDataStoreManager })
81
+ ))
82
+ & BaseObject.BaseObject
81
83
 
82
84
  --[=[
83
85
  Constructs a new PlayerDataStoreManager.