@quenty/jsonutils 10.10.1 → 10.10.2

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
+ ## [10.10.2](https://github.com/Quenty/NevermoreEngine/compare/@quenty/jsonutils@10.10.1...@quenty/jsonutils@10.10.2) (2025-04-05)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Add types to packages ([2374fb2](https://github.com/Quenty/NevermoreEngine/commit/2374fb2b043cfbe0e9b507b3316eec46a4e353a0))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [10.10.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/jsonutils@10.10.0...@quenty/jsonutils@10.10.1) (2025-03-21)
7
18
 
8
19
  **Note:** Version bump only for package @quenty/jsonutils
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/jsonutils",
3
- "version": "10.10.1",
3
+ "version": "10.10.2",
4
4
  "description": "JSON utility functions for Roblox Lua",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -25,11 +25,11 @@
25
25
  "Quenty"
26
26
  ],
27
27
  "dependencies": {
28
- "@quenty/loader": "^10.8.0",
29
- "@quenty/promise": "^10.10.1"
28
+ "@quenty/loader": "^10.8.1",
29
+ "@quenty/promise": "^10.10.2"
30
30
  },
31
31
  "publishConfig": {
32
32
  "access": "public"
33
33
  },
34
- "gitHead": "6b7c3e15e60cdb185986207b574e2b5591261e7a"
34
+ "gitHead": "78c3ac0ab08dd18085b6e6e6e4f745e76ed99f68"
35
35
  }
@@ -18,7 +18,7 @@ local JSONUtils = {}
18
18
  @return table? -- Result
19
19
  @return string? -- Error
20
20
  ]=]
21
- function JSONUtils.jsonDecode(str)
21
+ function JSONUtils.jsonDecode(str: string): (boolean, string?, string?)
22
22
  if type(str) ~= "string" then
23
23
  return false, nil, "Not a string"
24
24
  end
@@ -31,7 +31,7 @@ function JSONUtils.jsonDecode(str)
31
31
  return false, nil, err
32
32
  end
33
33
 
34
- return true, decoded
34
+ return true, decoded, nil
35
35
  end
36
36
 
37
37
  --[=[
@@ -41,7 +41,7 @@ end
41
41
  @return table? -- Result
42
42
  @return string? -- Error
43
43
  ]=]
44
- function JSONUtils.jsonEncode(value)
44
+ function JSONUtils.jsonEncode(value: any): (boolean, string?, string?)
45
45
  local encoded
46
46
  local ok, err = pcall(function()
47
47
  encoded = HttpService:JSONEncode(value)
@@ -50,7 +50,7 @@ function JSONUtils.jsonEncode(value)
50
50
  return false, nil, err
51
51
  end
52
52
 
53
- return true, encoded
53
+ return true, encoded, nil
54
54
  end
55
55
 
56
56
  --[=[
@@ -58,7 +58,7 @@ end
58
58
  @param str string
59
59
  @return Promise<table>
60
60
  ]=]
61
- function JSONUtils.promiseJSONDecode(str)
61
+ function JSONUtils.promiseJSONDecode(str: string)
62
62
  if type(str) ~= "string" then
63
63
  return Promise.rejected("Not a string")
64
64
  end