@conform-to/yup 0.4.0-pre.0 → 0.4.0-pre.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/index.js +2 -7
- package/module/index.js +2 -7
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -86,18 +86,13 @@ function getFieldsetConstraint(source) {
|
|
|
86
86
|
return [key, constraint];
|
|
87
87
|
}));
|
|
88
88
|
}
|
|
89
|
-
function getError(error
|
|
89
|
+
function getError(error) {
|
|
90
90
|
var _error$inner$reduce;
|
|
91
91
|
|
|
92
92
|
return (_error$inner$reduce = error === null || error === void 0 ? void 0 : error.inner.reduce((result, e) => {
|
|
93
93
|
var _e$path;
|
|
94
94
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
if (!scope || scope.includes(name)) {
|
|
98
|
-
result.push([name, e.message]);
|
|
99
|
-
}
|
|
100
|
-
|
|
95
|
+
result.push([(_e$path = e.path) !== null && _e$path !== void 0 ? _e$path : '', e.message]);
|
|
101
96
|
return result;
|
|
102
97
|
}, [])) !== null && _error$inner$reduce !== void 0 ? _error$inner$reduce : [];
|
|
103
98
|
}
|
package/module/index.js
CHANGED
|
@@ -82,18 +82,13 @@ function getFieldsetConstraint(source) {
|
|
|
82
82
|
return [key, constraint];
|
|
83
83
|
}));
|
|
84
84
|
}
|
|
85
|
-
function getError(error
|
|
85
|
+
function getError(error) {
|
|
86
86
|
var _error$inner$reduce;
|
|
87
87
|
|
|
88
88
|
return (_error$inner$reduce = error === null || error === void 0 ? void 0 : error.inner.reduce((result, e) => {
|
|
89
89
|
var _e$path;
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
if (!scope || scope.includes(name)) {
|
|
94
|
-
result.push([name, e.message]);
|
|
95
|
-
}
|
|
96
|
-
|
|
91
|
+
result.push([(_e$path = e.path) !== null && _e$path !== void 0 ? _e$path : '', e.message]);
|
|
97
92
|
return result;
|
|
98
93
|
}, [])) !== null && _error$inner$reduce !== void 0 ? _error$inner$reduce : [];
|
|
99
94
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@conform-to/yup",
|
|
3
3
|
"description": "Conform schema resolver for yup",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "0.4.0-pre.
|
|
5
|
+
"version": "0.4.0-pre.1",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"module": "module/index.js",
|
|
8
8
|
"repository": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"url": "https://github.com/edmundhung/conform/issues"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"@conform-to/dom": "0.4.0-pre.
|
|
17
|
+
"@conform-to/dom": "0.4.0-pre.1",
|
|
18
18
|
"yup": ">=0.32.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|