@greenlabs/ppx-spice 0.3.0-next.0 → 0.3.1

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,10 +1,15 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.3.1
4
+
5
+ - Fixes [#107](https://github.com/green-labs/ppx_spice/issues/107) Arrays being reversed by Spice.arrayFromJson
6
+
3
7
  ## 0.3.0
4
8
 
5
9
  - BREAKING: changes to support rescript v12, will now generate codecs that use Stdlib instead of Js or Belt.
6
10
  - Updates codec generation to handle the `result` type in addition to `Belt.Result.t`
7
11
  - Polyvariant codecs no longer have an intermediate `Js.Json.tagged` type / function calls.
12
+ - Upgrade ocaml from v4.14.0 to v4.14.2 https://github.com/green-labs/ppx_spice/pull/101
8
13
 
9
14
  ## 0.2.9
10
15
 
@@ -44,7 +49,7 @@
44
49
  ## 0.2.1
45
50
 
46
51
  - a190663 Utilize Js.Json.Boolean(bool) instead oif Js.Json.True, False https://github.com/green-labs/ppx_spice/pull/58
47
- - a190663 Add support of uncurried mode for interface(\*.resi) https://github.com/green-labs/ppx_spice/pull/58
52
+ - a190663 Add support of uncurried mode for interface(*.resi) https://github.com/green-labs/ppx_spice/pull/58
48
53
  - Support the compiler v11-rc.5 https://github.com/green-labs/ppx_spice/pull/61
49
54
  - Add the feature of encoding/decoding between the number and (polymorphic)variant with `@spice.as` https://github.com/green-labs/ppx_spice/pull/64
50
55
  - Fix generating encode, decode function when `@spice.as` with number https://github.com/green-labs/ppx_spice/pull/74
package/README.md CHANGED
@@ -130,6 +130,7 @@ Read our [Guide with examples](docs/GUIDE.md)
130
130
 
131
131
  | Compiler | Ppx_spice | Note |
132
132
  | ------------- | --------------------- | ----------------------------- |
133
+ | v12 | v0.3.0 >= | |
133
134
  | v12-alpha.14 | v0.2.9 >= | Bigint.fromFloat type changed |
134
135
  | v12-alpha.5 | v0.2.8 | Curried mode deprecated |
135
136
  | v12-alpha.4 | v0.2.7 >= && > v0.2.2 | |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greenlabs/ppx-spice",
3
- "version": "0.3.0-next.0",
3
+ "version": "0.3.1",
4
4
  "packageManager": "yarn@1.22.22",
5
5
  "description": "ReScript PPX which generate JSON (de)serializer",
6
6
  "license": "MIT",
@@ -23,4 +23,4 @@
23
23
  "@changesets/cli": "^2.26.2",
24
24
  "rescript": "^12.0.0"
25
25
  }
26
- }
26
+ }
package/ppx-linux.exe CHANGED
Binary file
package/ppx-osx.exe CHANGED
Binary file
package/ppx-windows.exe CHANGED
Binary file
@@ -81,7 +81,10 @@ let arrayFromJson = (decoder, json) =>
81
81
  | (_, Error({path} as error)) =>
82
82
  Error({...error, path: "[" ++ (Int.toString(i) ++ ("]" ++ path))})
83
83
 
84
- | (Ok(prev), Ok(newVal)) => Ok(Array.concat([newVal], prev))
84
+ | (Ok(prev), Ok(newVal)) => {
85
+ Array.push(prev, newVal)
86
+ Ok(prev)
87
+ }
85
88
  }
86
89
  )
87
90