@kaiko.io/rescript-deser 4.0.0-beta.3 → 4.0.0-beta.4
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/lib/bs/.bsdeps +4 -4
- package/lib/bs/.compiler.log +2 -2
- package/lib/bs/.ninja_log +18 -82
- package/lib/bs/build.ninja +1 -1
- package/lib/bs/src/JSON.ast +0 -0
- package/lib/bs/src/JSON.cmi +0 -0
- package/lib/bs/src/JSON.cmt +0 -0
- package/lib/bs/tests/QUnit.cmi +0 -0
- package/lib/bs/tests/QUnit.cmt +0 -0
- package/lib/bs/tests/index.cmi +0 -0
- package/lib/bs/tests/index.cmt +0 -0
- package/lib/es6/src/JSON.js +10 -10
- package/lib/js/src/JSON.js +10 -10
- package/package.json +3 -3
- package/src/JSON.res +1 -1
package/lib/bs/.bsdeps
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
11.0.0-
|
|
1
|
+
11.0.0-rc.4
|
|
2
2
|
/home/manu/src/kaiko/rescript-deser
|
|
3
3
|
0
|
|
4
4
|
bsconfig.json 0x1.92beacc6fcbbbp+30
|
|
5
|
-
tests 0x1.
|
|
6
|
-
src/ 0x1.
|
|
5
|
+
tests 0x1.93fb8b23e3f01p+30
|
|
6
|
+
src/ 0x1.93fb8b23e3f01p+30
|
|
7
7
|
===
|
|
8
|
-
/home/manu/src/kaiko/rescript-deser/node_modules/rescript/linux/rescript.exe 0x1.
|
|
8
|
+
/home/manu/src/kaiko/rescript-deser/node_modules/rescript/linux/rescript.exe 0x1.94b388560105ep+30
|
package/lib/bs/.compiler.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#Start(
|
|
2
|
-
#Done(
|
|
1
|
+
#Start(1697442090837)
|
|
2
|
+
#Done(1697442090837)
|
package/lib/bs/.ninja_log
CHANGED
|
@@ -1,83 +1,19 @@
|
|
|
1
1
|
# ninja log v6
|
|
2
|
-
0 6
|
|
3
|
-
0 7
|
|
4
|
-
0 8
|
|
5
|
-
6 9
|
|
6
|
-
7 9
|
|
7
|
-
8 10
|
|
8
|
-
9
|
|
9
|
-
9
|
|
10
|
-
9
|
|
11
|
-
9
|
|
12
|
-
10
|
|
13
|
-
10
|
|
14
|
-
10
|
|
15
|
-
10
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
0 8 1690472976984278051 tests/QUnit.cmj 2ec5fa040bfd2d9d
|
|
21
|
-
0 8 1690472976984278051 tests/QUnit.cmi 2ec5fa040bfd2d9d
|
|
22
|
-
0 8 1690472976984278051 ../es6/tests/QUnit.js 2ec5fa040bfd2d9d
|
|
23
|
-
0 8 1690472976984278051 ../js/tests/QUnit.js 2ec5fa040bfd2d9d
|
|
24
|
-
0 21 1690472976984278051 src/JSON.cmj 72e6767661d939a8
|
|
25
|
-
0 21 1690472976984278051 src/JSON.cmi 72e6767661d939a8
|
|
26
|
-
0 21 1690472976984278051 ../es6/src/JSON.js 72e6767661d939a8
|
|
27
|
-
0 21 1690472976984278051 ../js/src/JSON.js 72e6767661d939a8
|
|
28
|
-
21 34 1690472977004278213 tests/index.cmj 99dcd7620c5e344f
|
|
29
|
-
21 34 1690472977004278213 tests/index.cmi 99dcd7620c5e344f
|
|
30
|
-
21 34 1690472977004278213 ../es6/tests/index.js 99dcd7620c5e344f
|
|
31
|
-
21 34 1690472977004278213 ../js/tests/index.js 99dcd7620c5e344f
|
|
32
|
-
1 8 1692077881863146346 src/JSON.ast ec417eedaf9813d7
|
|
33
|
-
8 14 1692077881863146346 src/JSON.d cd2d6773c781340f
|
|
34
|
-
0 9 1692077894949942101 src/JSON.ast ec417eedaf9813d7
|
|
35
|
-
9 11 1692077894949942101 src/JSON.d cd2d6773c781340f
|
|
36
|
-
0 8 1692078180322757231 src/JSON.ast ec417eedaf9813d7
|
|
37
|
-
8 10 1692078180322757231 src/JSON.d cd2d6773c781340f
|
|
38
|
-
0 7 1692078195156236902 src/JSON.ast ec417eedaf9813d7
|
|
39
|
-
7 10 1692078195156236902 src/JSON.d cd2d6773c781340f
|
|
40
|
-
10 35 1692078195156236902 src/JSON.cmj 72e6767661d939a8
|
|
41
|
-
10 35 1692078195156236902 src/JSON.cmi 72e6767661d939a8
|
|
42
|
-
10 35 1692078195156236902 ../es6/src/JSON.js 72e6767661d939a8
|
|
43
|
-
10 35 1692078195156236902 ../js/src/JSON.js 72e6767661d939a8
|
|
44
|
-
35 50 1692078195176237099 tests/index.cmj 99dcd7620c5e344f
|
|
45
|
-
35 50 1692078195176237099 tests/index.cmi 99dcd7620c5e344f
|
|
46
|
-
35 50 1692078195176237099 ../es6/tests/index.js 99dcd7620c5e344f
|
|
47
|
-
35 50 1692078195176237099 ../js/tests/index.js 99dcd7620c5e344f
|
|
48
|
-
0 7 1692078280717274299 src/JSON.ast ec417eedaf9813d7
|
|
49
|
-
7 9 1692078280717274299 src/JSON.d cd2d6773c781340f
|
|
50
|
-
9 30 1692078280717274299 src/JSON.cmj 72e6767661d939a8
|
|
51
|
-
9 30 1692078280717274299 src/JSON.cmi 72e6767661d939a8
|
|
52
|
-
9 30 1692078280717274299 ../es6/src/JSON.js 72e6767661d939a8
|
|
53
|
-
9 30 1692078280717274299 ../js/src/JSON.js 72e6767661d939a8
|
|
54
|
-
30 42 1692078280733941130 tests/index.cmj 99dcd7620c5e344f
|
|
55
|
-
30 42 1692078280733941130 tests/index.cmi 99dcd7620c5e344f
|
|
56
|
-
30 42 1692078280733941130 ../es6/tests/index.js 99dcd7620c5e344f
|
|
57
|
-
30 42 1692078280733941130 ../js/tests/index.js 99dcd7620c5e344f
|
|
58
|
-
0 6 1692078378979358674 tests/index.ast af1b9dde75b669ce
|
|
59
|
-
6 7 1692078378979358674 tests/index.d 5a4db9cdecd186b3
|
|
60
|
-
8 20 1692078378979358674 tests/index.cmj 99dcd7620c5e344f
|
|
61
|
-
8 20 1692078378979358674 tests/index.cmi 99dcd7620c5e344f
|
|
62
|
-
8 20 1692078378979358674 ../es6/tests/index.js 99dcd7620c5e344f
|
|
63
|
-
8 20 1692078378979358674 ../js/tests/index.js 99dcd7620c5e344f
|
|
64
|
-
0 8 1692078483192900791 src/JSON.ast ec417eedaf9813d7
|
|
65
|
-
8 10 1692078483192900791 src/JSON.d cd2d6773c781340f
|
|
66
|
-
0 7 1692078491420312038 src/JSON.ast ec417eedaf9813d7
|
|
67
|
-
7 10 1692078491420312038 src/JSON.d cd2d6773c781340f
|
|
68
|
-
0 7 1692078495960690503 src/JSON.ast ec417eedaf9813d7
|
|
69
|
-
7 10 1692078495960690503 src/JSON.d cd2d6773c781340f
|
|
70
|
-
0 7 1692078499500970674 src/JSON.ast ec417eedaf9813d7
|
|
71
|
-
7 9 1692078499500970674 src/JSON.d cd2d6773c781340f
|
|
72
|
-
0 8 1692078506824846034 src/JSON.ast ec417eedaf9813d7
|
|
73
|
-
8 10 1692078506824846034 src/JSON.d cd2d6773c781340f
|
|
74
|
-
0 8 1692078511601840838 src/JSON.ast ec417eedaf9813d7
|
|
75
|
-
8 10 1692078511601840838 src/JSON.d cd2d6773c781340f
|
|
76
|
-
10 30 1692078511601840838 src/JSON.cmj 72e6767661d939a8
|
|
77
|
-
10 30 1692078511601840838 src/JSON.cmi 72e6767661d939a8
|
|
78
|
-
10 30 1692078511601840838 ../es6/src/JSON.js 72e6767661d939a8
|
|
79
|
-
10 30 1692078511601840838 ../js/src/JSON.js 72e6767661d939a8
|
|
80
|
-
30 43 1692078511615175063 tests/index.cmj 99dcd7620c5e344f
|
|
81
|
-
30 43 1692078511615175063 tests/index.cmi 99dcd7620c5e344f
|
|
82
|
-
30 43 1692078511615175063 ../es6/tests/index.js 99dcd7620c5e344f
|
|
83
|
-
30 43 1692078511615175063 ../js/tests/index.js 99dcd7620c5e344f
|
|
2
|
+
0 6 1697442041120968689 tests/QUnit.ast 67b6a0da460567c3
|
|
3
|
+
0 7 1697442041120968689 tests/index.ast 5536aeeda222362c
|
|
4
|
+
0 8 1697442041120968689 src/JSON.ast b65d00b367d55de4
|
|
5
|
+
6 9 1697442041124302115 tests/QUnit.d 4a2631c992d93ce7
|
|
6
|
+
7 9 1697442041124302115 tests/index.d 5a4db9cdecd186b3
|
|
7
|
+
8 10 1697442041124302115 src/JSON.d cd2d6773c781340f
|
|
8
|
+
9 16 1697442041130968965 tests/QUnit.cmj 11defb6b2e52acbf
|
|
9
|
+
9 16 1697442041130968965 tests/QUnit.cmi 11defb6b2e52acbf
|
|
10
|
+
9 16 1697442041130968965 ../es6/tests/QUnit.js 11defb6b2e52acbf
|
|
11
|
+
9 16 1697442041130968965 ../js/tests/QUnit.js 11defb6b2e52acbf
|
|
12
|
+
10 29 1697442041144302666 src/JSON.cmj f85e720d809b7705
|
|
13
|
+
10 29 1697442041144302666 src/JSON.cmi f85e720d809b7705
|
|
14
|
+
10 29 1697442041144302666 ../es6/src/JSON.js f85e720d809b7705
|
|
15
|
+
10 29 1697442041144302666 ../js/src/JSON.js f85e720d809b7705
|
|
16
|
+
29 41 1697442041154302941 tests/index.cmj 11fbdd4f70b0d5d2
|
|
17
|
+
29 41 1697442041154302941 tests/index.cmi 11fbdd4f70b0d5d2
|
|
18
|
+
29 41 1697442041154302941 ../es6/tests/index.js 11fbdd4f70b0d5d2
|
|
19
|
+
29 41 1697442041154302941 ../js/tests/index.js 11fbdd4f70b0d5d2
|
package/lib/bs/build.ninja
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
rescript = 1
|
|
2
2
|
g_finger := /home/manu/src/kaiko/rescript-deser/node_modules/@kaiko.io/rescript-prelude/lib/ocaml/install.stamp
|
|
3
3
|
rule astj
|
|
4
|
-
command = /home/manu/src/kaiko/rescript-deser/node_modules/rescript/linux/bsc.exe -warn-error +8+11+26+27+33+56 -bs-v 11.0.0-
|
|
4
|
+
command = /home/manu/src/kaiko/rescript-deser/node_modules/rescript/linux/bsc.exe -warn-error +8+11+26+27+33+56 -bs-v 11.0.0-rc.4 -uncurried -absname -bs-ast -o $out $i
|
|
5
5
|
o tests/index.ast : astj ../../tests/index.res
|
|
6
6
|
rule deps_dev
|
|
7
7
|
command = /home/manu/src/kaiko/rescript-deser/node_modules/rescript/linux/bsb_helper.exe -g -hash 84aecc33f8594375b23a1a137b057f93 $in
|
package/lib/bs/src/JSON.ast
CHANGED
|
Binary file
|
package/lib/bs/src/JSON.cmi
CHANGED
|
Binary file
|
package/lib/bs/src/JSON.cmt
CHANGED
|
Binary file
|
package/lib/bs/tests/QUnit.cmi
CHANGED
|
Binary file
|
package/lib/bs/tests/QUnit.cmt
CHANGED
|
Binary file
|
package/lib/bs/tests/index.cmi
CHANGED
|
Binary file
|
package/lib/bs/tests/index.cmt
CHANGED
|
Binary file
|
package/lib/es6/src/JSON.js
CHANGED
|
@@ -110,9 +110,9 @@ function toString(type_) {
|
|
|
110
110
|
case "Array" :
|
|
111
111
|
return "Array of " + toString(type_._0);
|
|
112
112
|
case "Tuple" :
|
|
113
|
-
return "Tuple of (" +
|
|
113
|
+
return "Tuple of (" + Prelude.$$Array.map(type_._0, toString).join(", ") + ")";
|
|
114
114
|
case "Object" :
|
|
115
|
-
var desc =
|
|
115
|
+
var desc = Prelude.$$Array.map(type_._0, (function (param) {
|
|
116
116
|
return param[0] + ": " + toString(param[1]);
|
|
117
117
|
})).join(", ");
|
|
118
118
|
return "Object of {" + desc + "}";
|
|
@@ -152,9 +152,9 @@ function _taggedToString(tagged) {
|
|
|
152
152
|
case "JSONNumber" :
|
|
153
153
|
return "Number(" + String(tagged._0) + ")";
|
|
154
154
|
case "JSONObject" :
|
|
155
|
-
return "Object(" + Prelude
|
|
155
|
+
return "Object(" + Prelude.default(JSON.stringify(tagged._0), "...") + ")";
|
|
156
156
|
case "JSONArray" :
|
|
157
|
-
return "Array(" + Prelude
|
|
157
|
+
return "Array(" + Prelude.default(JSON.stringify(tagged._0), "...") + ")";
|
|
158
158
|
|
|
159
159
|
}
|
|
160
160
|
}
|
|
@@ -306,7 +306,7 @@ function fromUntagged(untagged, _shape, self) {
|
|
|
306
306
|
} else {
|
|
307
307
|
if (match.TAG === "JSONArray") {
|
|
308
308
|
var shape$1 = shape._0;
|
|
309
|
-
return
|
|
309
|
+
return Prelude.$$Array.map(match._0, (function(shape$1){
|
|
310
310
|
return function (item) {
|
|
311
311
|
return fromUntagged(item, shape$1, self);
|
|
312
312
|
}
|
|
@@ -344,7 +344,7 @@ function fromUntagged(untagged, _shape, self) {
|
|
|
344
344
|
} else {
|
|
345
345
|
if (match.TAG === "JSONObject") {
|
|
346
346
|
var values = match._0;
|
|
347
|
-
return Curry._1(Prelude.Dict.fromArray,
|
|
347
|
+
return Curry._1(Prelude.Dict.fromArray, Prelude.$$Array.map(shape._0, (function(values){
|
|
348
348
|
return function (param) {
|
|
349
349
|
var field = param[0];
|
|
350
350
|
var value;
|
|
@@ -426,7 +426,7 @@ function fromUntagged(untagged, _shape, self) {
|
|
|
426
426
|
exit = 1;
|
|
427
427
|
} else {
|
|
428
428
|
if (match.TAG === "JSONArray") {
|
|
429
|
-
return
|
|
429
|
+
return Prelude.$$Array.map(Prelude.$$Array.keepSome(Prelude.$$Array.map(Prelude.$$Array.map(match._0, shape._0.fromJSON), Prelude.Result.warn)), (function (prim) {
|
|
430
430
|
return prim;
|
|
431
431
|
}));
|
|
432
432
|
}
|
|
@@ -518,8 +518,8 @@ function checkFieldsSanity(name, _fields, _optional) {
|
|
|
518
518
|
} else {
|
|
519
519
|
switch (fields.TAG) {
|
|
520
520
|
case "Tuple" :
|
|
521
|
-
return Curry._2(Prelude.ManyResults.map, Prelude.ManyResults.bailU(
|
|
522
|
-
return function (
|
|
521
|
+
return Curry._2(Prelude.ManyResults.map, Prelude.ManyResults.bailU(Prelude.$$Array.mapWithIndex(fields._0, (function(optional){
|
|
522
|
+
return function (field, index) {
|
|
523
523
|
return function () {
|
|
524
524
|
return checkFieldsSanity(name + "[" + String(index) + "]", field, optional);
|
|
525
525
|
};
|
|
@@ -528,7 +528,7 @@ function checkFieldsSanity(name, _fields, _optional) {
|
|
|
528
528
|
|
|
529
529
|
}));
|
|
530
530
|
case "Object" :
|
|
531
|
-
return Curry._2(Prelude.ManyResults.map, Prelude.ManyResults.bailU(
|
|
531
|
+
return Curry._2(Prelude.ManyResults.map, Prelude.ManyResults.bailU(Prelude.$$Array.map(fields._0, (function(optional){
|
|
532
532
|
return function (param) {
|
|
533
533
|
var field = param[1];
|
|
534
534
|
var fieldName = param[0];
|
package/lib/js/src/JSON.js
CHANGED
|
@@ -111,9 +111,9 @@ function toString(type_) {
|
|
|
111
111
|
case "Array" :
|
|
112
112
|
return "Array of " + toString(type_._0);
|
|
113
113
|
case "Tuple" :
|
|
114
|
-
return "Tuple of (" +
|
|
114
|
+
return "Tuple of (" + Prelude.$$Array.map(type_._0, toString).join(", ") + ")";
|
|
115
115
|
case "Object" :
|
|
116
|
-
var desc =
|
|
116
|
+
var desc = Prelude.$$Array.map(type_._0, (function (param) {
|
|
117
117
|
return param[0] + ": " + toString(param[1]);
|
|
118
118
|
})).join(", ");
|
|
119
119
|
return "Object of {" + desc + "}";
|
|
@@ -153,9 +153,9 @@ function _taggedToString(tagged) {
|
|
|
153
153
|
case "JSONNumber" :
|
|
154
154
|
return "Number(" + String(tagged._0) + ")";
|
|
155
155
|
case "JSONObject" :
|
|
156
|
-
return "Object(" + Prelude
|
|
156
|
+
return "Object(" + Prelude.default(JSON.stringify(tagged._0), "...") + ")";
|
|
157
157
|
case "JSONArray" :
|
|
158
|
-
return "Array(" + Prelude
|
|
158
|
+
return "Array(" + Prelude.default(JSON.stringify(tagged._0), "...") + ")";
|
|
159
159
|
|
|
160
160
|
}
|
|
161
161
|
}
|
|
@@ -307,7 +307,7 @@ function fromUntagged(untagged, _shape, self) {
|
|
|
307
307
|
} else {
|
|
308
308
|
if (match.TAG === "JSONArray") {
|
|
309
309
|
var shape$1 = shape._0;
|
|
310
|
-
return
|
|
310
|
+
return Prelude.$$Array.map(match._0, (function(shape$1){
|
|
311
311
|
return function (item) {
|
|
312
312
|
return fromUntagged(item, shape$1, self);
|
|
313
313
|
}
|
|
@@ -345,7 +345,7 @@ function fromUntagged(untagged, _shape, self) {
|
|
|
345
345
|
} else {
|
|
346
346
|
if (match.TAG === "JSONObject") {
|
|
347
347
|
var values = match._0;
|
|
348
|
-
return Curry._1(Prelude.Dict.fromArray,
|
|
348
|
+
return Curry._1(Prelude.Dict.fromArray, Prelude.$$Array.map(shape._0, (function(values){
|
|
349
349
|
return function (param) {
|
|
350
350
|
var field = param[0];
|
|
351
351
|
var value;
|
|
@@ -427,7 +427,7 @@ function fromUntagged(untagged, _shape, self) {
|
|
|
427
427
|
exit = 1;
|
|
428
428
|
} else {
|
|
429
429
|
if (match.TAG === "JSONArray") {
|
|
430
|
-
return
|
|
430
|
+
return Prelude.$$Array.map(Prelude.$$Array.keepSome(Prelude.$$Array.map(Prelude.$$Array.map(match._0, shape._0.fromJSON), Prelude.Result.warn)), (function (prim) {
|
|
431
431
|
return prim;
|
|
432
432
|
}));
|
|
433
433
|
}
|
|
@@ -519,8 +519,8 @@ function checkFieldsSanity(name, _fields, _optional) {
|
|
|
519
519
|
} else {
|
|
520
520
|
switch (fields.TAG) {
|
|
521
521
|
case "Tuple" :
|
|
522
|
-
return Curry._2(Prelude.ManyResults.map, Prelude.ManyResults.bailU(
|
|
523
|
-
return function (
|
|
522
|
+
return Curry._2(Prelude.ManyResults.map, Prelude.ManyResults.bailU(Prelude.$$Array.mapWithIndex(fields._0, (function(optional){
|
|
523
|
+
return function (field, index) {
|
|
524
524
|
return function () {
|
|
525
525
|
return checkFieldsSanity(name + "[" + String(index) + "]", field, optional);
|
|
526
526
|
};
|
|
@@ -529,7 +529,7 @@ function checkFieldsSanity(name, _fields, _optional) {
|
|
|
529
529
|
|
|
530
530
|
}));
|
|
531
531
|
case "Object" :
|
|
532
|
-
return Curry._2(Prelude.ManyResults.map, Prelude.ManyResults.bailU(
|
|
532
|
+
return Curry._2(Prelude.ManyResults.map, Prelude.ManyResults.bailU(Prelude.$$Array.map(fields._0, (function(optional){
|
|
533
533
|
return function (param) {
|
|
534
534
|
var field = param[1];
|
|
535
535
|
var fieldName = param[0];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaiko.io/rescript-deser",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.4",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"json",
|
|
6
6
|
"deserializer",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"README.md"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@kaiko.io/rescript-prelude": "7.0.0-beta.
|
|
24
|
-
"rescript": "11.0.0-
|
|
23
|
+
"@kaiko.io/rescript-prelude": "7.0.0-beta.2",
|
|
24
|
+
"rescript": "11.0.0-rc.4"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"esbuild": "^0.15.7",
|
package/src/JSON.res
CHANGED
|
@@ -311,7 +311,7 @@ module Field = {
|
|
|
311
311
|
|
|
312
312
|
| (Tuple(fields), optional) =>
|
|
313
313
|
fields
|
|
314
|
-
->Array.mapWithIndex((
|
|
314
|
+
->Array.mapWithIndex((field, index) => () =>
|
|
315
315
|
checkFieldsSanity(`${name}[${index->Int.toString}]`, field, optional))
|
|
316
316
|
->ManyResults.bailU
|
|
317
317
|
->ManyResults.map(_ => ())
|