@greenlabs/ppx-spice 0.2.8 → 0.2.9

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
@@ -1,5 +1,10 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.2.9
4
+
5
+ - Update test project for compiler v12. https://github.com/green-labs/ppx_spice/pull/94
6
+ - Fix bigint codec on rescript v12. https://github.com/green-labs/ppx_spice/pull/93
7
+
3
8
  ## 0.2.8
4
9
 
5
10
  - Dropped support for curried mode in accordance with compiler v12 changes.
package/README.md CHANGED
@@ -128,11 +128,13 @@ Read our [Guide with examples](docs/GUIDE.md)
128
128
 
129
129
  ### Compatibility on the compiler versions
130
130
 
131
- | Compiler | Ppx_spice |
132
- | -------- | ---------------------------- |
133
- | v12 | v0.2.3 >= |
134
- | v11 | v0.2.2 >= && > v0.2.0 |
135
- | v10 | v0.2.0 >= |
131
+ | Compiler | Ppx_spice | Note |
132
+ | ------------- | --------------------- | ----------------------------- |
133
+ | v12-alpha.14 | v0.2.9 >= | Bigint.fromFloat type changed |
134
+ | v12-alpha.5 | v0.2.8 | Curried mode deprecated |
135
+ | v12-alpha.4 | v0.2.7 >= && > v0.2.2 | |
136
+ | v11 | v0.2.2 >= && > v0.2.0 | |
137
+ | v10 | v0.2.0 >= | |
136
138
 
137
139
  NOTE: Starting from v0.2.8, support for curried mode is discontinued to align with the changes in compiler v12.
138
140
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greenlabs/ppx-spice",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "description": "ReScript PPX which generate JSON (de)serializer",
5
5
  "license": "MIT",
6
6
  "author": "Greenlabs Dev <developer@greenlabs.co.kr>",
package/ppx-osx.exe CHANGED
Binary file
package/ppx-windows.exe CHANGED
Binary file
@@ -39,7 +39,11 @@ let bigintToJson = (i): Js.Json.t => Js.Json.Number(BigInt.toFloat(i))
39
39
 
40
40
  let bigintFromJson = j =>
41
41
  switch (j: Js.Json.t) {
42
- | Js.Json.Number(n) => Ok(BigInt.fromFloat(n))
42
+ | Js.Json.Number(n) =>
43
+ switch BigInt.fromFloat(n) {
44
+ | Some(v) => v->Ok
45
+ | None => error("Not a bigint", j)
46
+ }
43
47
  | _ => error("Not a number", j)
44
48
  }
45
49