@clipboard-health/contract-core 4.6.6 → 4.6.7
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/README.md +0 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -146,7 +146,6 @@ const workerIds = commaSeparatedArray(objectId).optional();
|
|
|
146
146
|
const dates = commaSeparatedArray(dateTimeSchema());
|
|
147
147
|
|
|
148
148
|
// Works with .optional()
|
|
149
|
-
// eslint-disable-next-line unicorn/no-useless-undefined
|
|
150
149
|
const noIds = workerIds.parse(undefined);
|
|
151
150
|
// => undefined
|
|
152
151
|
console.log(noIds);
|
|
@@ -210,7 +209,6 @@ try {
|
|
|
210
209
|
|
|
211
210
|
// Optional usage — compose at the call site
|
|
212
211
|
const schema = dateTimeSchema().optional();
|
|
213
|
-
// eslint-disable-next-line unicorn/no-useless-undefined
|
|
214
212
|
const noDate = schema.parse(undefined);
|
|
215
213
|
// => undefined
|
|
216
214
|
console.log(noDate);
|
|
@@ -239,7 +237,6 @@ console.log(additionalStatus);
|
|
|
239
237
|
console.log(additionalStatus === ENUM_FALLBACK); // true
|
|
240
238
|
|
|
241
239
|
try {
|
|
242
|
-
// eslint-disable-next-line unicorn/no-useless-undefined
|
|
243
240
|
requiredStatusEnumSchema.parse(undefined);
|
|
244
241
|
} catch (error) {
|
|
245
242
|
logError(error);
|
|
@@ -259,7 +256,6 @@ const extraStatus = optionalStatusEnumSchema.parse("extra");
|
|
|
259
256
|
// => "UNRECOGNIZED_" (ENUM_FALLBACK)
|
|
260
257
|
console.log(extraStatus);
|
|
261
258
|
|
|
262
|
-
// eslint-disable-next-line unicorn/no-useless-undefined
|
|
263
259
|
const undefinedStatus = optionalStatusEnumSchema.parse(undefined);
|
|
264
260
|
// => undefined
|
|
265
261
|
console.log(undefinedStatus);
|
|
@@ -285,7 +281,6 @@ try {
|
|
|
285
281
|
}
|
|
286
282
|
|
|
287
283
|
try {
|
|
288
|
-
// eslint-disable-next-line unicorn/no-useless-undefined
|
|
289
284
|
requiredUserTypeSchema.parse(undefined);
|
|
290
285
|
} catch (error) {
|
|
291
286
|
logError(error);
|
|
@@ -301,7 +296,6 @@ const workerUser: OptionalUserType = optionalUserTypeSchema.parse("worker");
|
|
|
301
296
|
// => "worker"
|
|
302
297
|
console.log(workerUser);
|
|
303
298
|
|
|
304
|
-
// eslint-disable-next-line unicorn/no-useless-undefined
|
|
305
299
|
const noUserType = optionalUserTypeSchema.parse(undefined);
|
|
306
300
|
// => undefined
|
|
307
301
|
console.log(noUserType);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clipboard-health/contract-core",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.7",
|
|
4
4
|
"description": "Shared Zod schemas for Clipboard's contracts.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"contract",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"tslib": "2.8.1"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@clipboard-health/testing-core": "2.13.
|
|
29
|
+
"@clipboard-health/testing-core": "2.13.7",
|
|
30
30
|
"zod": "3.25.76"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|