@orpc/json-schema 0.0.0-next.f356b86 → 0.0.0
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/dist/index.mjs +1 -2
- package/package.json +5 -5
package/dist/index.mjs
CHANGED
@@ -11,7 +11,6 @@ var JsonSchemaXNativeType = /* @__PURE__ */ ((JsonSchemaXNativeType2) => {
|
|
11
11
|
return JsonSchemaXNativeType2;
|
12
12
|
})(JsonSchemaXNativeType || {});
|
13
13
|
|
14
|
-
const FLEXIBLE_DATE_FORMAT_REGEX = /^[^-]+-[^-]+-[^-]+$/;
|
15
14
|
class experimental_JsonSchemaCoercer {
|
16
15
|
coerce(schema, value, options = {}) {
|
17
16
|
const [, coerced] = this.#coerce(schema, value, options);
|
@@ -296,7 +295,7 @@ class experimental_JsonSchemaCoercer {
|
|
296
295
|
}
|
297
296
|
#stringToDate(value) {
|
298
297
|
const date = new Date(value);
|
299
|
-
if (Number.isNaN(date.getTime()) || !
|
298
|
+
if (Number.isNaN(date.getTime()) || !value.startsWith(date.toISOString().slice(0, 10))) {
|
300
299
|
return value;
|
301
300
|
}
|
302
301
|
return date;
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@orpc/json-schema",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.0.0
|
4
|
+
"version": "0.0.0",
|
5
5
|
"license": "MIT",
|
6
6
|
"homepage": "https://orpc.unnoq.com",
|
7
7
|
"repository": {
|
@@ -25,10 +25,10 @@
|
|
25
25
|
],
|
26
26
|
"dependencies": {
|
27
27
|
"json-schema-typed": "^8.0.1",
|
28
|
-
"@orpc/contract": "
|
29
|
-
"@orpc/openapi": "
|
30
|
-
"@orpc/server": "
|
31
|
-
"@orpc/shared": "
|
28
|
+
"@orpc/contract": "1.6.6",
|
29
|
+
"@orpc/openapi": "1.6.6",
|
30
|
+
"@orpc/server": "1.6.6",
|
31
|
+
"@orpc/shared": "1.6.6"
|
32
32
|
},
|
33
33
|
"devDependencies": {
|
34
34
|
"zod": "^3.25.74"
|