@sanity/validation 2.33.1-performance-opts.7 → 2.33.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validateDocument.d.ts","sourceRoot":"","sources":["../../src/validateDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,MAAM,EACN,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EAMjB,MAAM,eAAe,CAAA;AAYtB;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,OAAO,EACb,UAAU,EAAE,UAAU,EAAE,GACvB,UAAU,GAAG,SAAS,CAiBxB;AAED,wBAA8B,gBAAgB,CAC5C,GAAG,EAAE,cAAc,EACnB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,IAAI,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,GACrD,OAAO,CAAC,gBAAgB,EAAE,CAAC,CA2B7B;AAED;;;;;;GAMG;AACH,aAAK,iBAAiB,CAAC,CAAC,IAAI;KACzB,CAAC,IAAI,MAAM,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS;CAC5F,CAAA;AAED,aAAK,mBAAmB,GAAG;IACzB,KAAK,EAAE,OAAO,CAAA;CACf,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"validateDocument.d.ts","sourceRoot":"","sources":["../../src/validateDocument.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,MAAM,EACN,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EAMjB,MAAM,eAAe,CAAA;AAYtB;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,OAAO,EACb,UAAU,EAAE,UAAU,EAAE,GACvB,UAAU,GAAG,SAAS,CAiBxB;AAED,wBAA8B,gBAAgB,CAC5C,GAAG,EAAE,cAAc,EACnB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,IAAI,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,GACrD,OAAO,CAAC,gBAAgB,EAAE,CAAC,CA2B7B;AAED;;;;;;GAMG;AACH,aAAK,iBAAiB,CAAC,CAAC,IAAI;KACzB,CAAC,IAAI,MAAM,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,SAAS,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS;CAC5F,CAAA;AAED,aAAK,mBAAmB,GAAG;IACzB,KAAK,EAAE,OAAO,CAAA;CACf,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,CAAA;AAExC,wBAAsB,YAAY,CAAC,EACjC,KAAK,EACL,IAAI,EACJ,IAAS,EACT,MAAM,EACN,GAAG,aAAa,EACjB,EAAE,mBAAmB,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CA4HnD"}
|
package/lib/validateDocument.js
CHANGED
|
@@ -117,8 +117,6 @@ function _validateDocument() {
|
|
|
117
117
|
return _validateDocument.apply(this, arguments);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
var idle = () => new Promise(resolve => window.requestIdleCallback(resolve));
|
|
121
|
-
|
|
122
120
|
function validateItem(_x4) {
|
|
123
121
|
return _validateItem.apply(this, arguments);
|
|
124
122
|
}
|
|
@@ -132,7 +130,6 @@ function _validateItem() {
|
|
|
132
130
|
parent = _ref.parent,
|
|
133
131
|
restOfContext = _objectWithoutProperties(_ref, _excluded);
|
|
134
132
|
|
|
135
|
-
yield idle();
|
|
136
133
|
var rules = (0, _normalizeValidationRules.default)(type); // run validation for the current value
|
|
137
134
|
|
|
138
135
|
var selfChecks = rules.map(rule => rule.validate(value, _objectSpread(_objectSpread({}, restOfContext), {}, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/validation",
|
|
3
|
-
"version": "2.33.
|
|
3
|
+
"version": "2.33.2",
|
|
4
4
|
"description": "Validation and warning infrastructure for Sanity projects",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./dist/dts",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@sanity/client": "^3.3.3",
|
|
36
|
-
"@sanity/schema": "2.33.
|
|
36
|
+
"@sanity/schema": "2.33.2"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@sanity/types": "2.33.
|
|
39
|
+
"@sanity/types": "2.33.2",
|
|
40
40
|
"date-fns": "^2.16.1",
|
|
41
41
|
"lodash": "^4.17.15"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "83c4df94ad62c8aca6823bc47b1aafcbb4ca0ecc"
|
|
44
44
|
}
|
package/src/validateDocument.ts
CHANGED
|
@@ -94,8 +94,6 @@ type ValidateItemOptions = {
|
|
|
94
94
|
value: unknown
|
|
95
95
|
} & ExplicitUndefined<ValidationContext>
|
|
96
96
|
|
|
97
|
-
const idle = () => new Promise((resolve) => window.requestIdleCallback(resolve))
|
|
98
|
-
|
|
99
97
|
export async function validateItem({
|
|
100
98
|
value,
|
|
101
99
|
type,
|
|
@@ -103,7 +101,6 @@ export async function validateItem({
|
|
|
103
101
|
parent,
|
|
104
102
|
...restOfContext
|
|
105
103
|
}: ValidateItemOptions): Promise<ValidationMarker[]> {
|
|
106
|
-
await idle()
|
|
107
104
|
const rules = normalizeValidationRules(type)
|
|
108
105
|
|
|
109
106
|
// run validation for the current value
|