@esmj/schema 0.2.1 → 0.2.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.
- package/README.md +6 -2
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -31,6 +31,7 @@ When choosing a schema validation library, bundle size can be an important facto
|
|
|
31
31
|
| @zod/mini | ~20,5 KB |
|
|
32
32
|
| Joi | ~40,4 KB |
|
|
33
33
|
| Zod@4 | ~40,8 KB |
|
|
34
|
+
| Arktype | ~41,8 KB |
|
|
34
35
|
|
|
35
36
|
### Performance Comparison
|
|
36
37
|
|
|
@@ -38,12 +39,13 @@ When choosing a schema validation library, bundle size can be an important facto
|
|
|
38
39
|
|
|
39
40
|
| Library | 1 Schema | 1,000 Schema | 1,000,000 Schema |
|
|
40
41
|
|-----------------|-------------|------------------|----------------------|
|
|
41
|
-
| `@esmj/schema` | `0.02 ms` | 4.93 ms | `
|
|
42
|
+
| `@esmj/schema` | `0.02 ms` | 4.93 ms | `1.13 s` |
|
|
42
43
|
| zod@3 | 0.08 ms | 9.68 ms | 8.53 s |
|
|
43
44
|
| @zod/mini | 0.22 ms | 39.77 ms | 34.51 s |
|
|
44
45
|
| Yup | 0.54 ms | 14.03 ms | 12.34 s |
|
|
45
|
-
| Superstruct | 0.13 ms | `
|
|
46
|
+
| Superstruct | 0.13 ms | `3.67 ms` | 1.74 s |
|
|
46
47
|
| Joi | 0.62 ms | 31.60 ms | 23.06 s |
|
|
48
|
+
| ArkType | 0.37 ms | 54.60 ms | Infinity |
|
|
47
49
|
|
|
48
50
|
#### Parsing Performance
|
|
49
51
|
|
|
@@ -55,6 +57,7 @@ When choosing a schema validation library, bundle size can be an important facto
|
|
|
55
57
|
| Yup | 0.30 ms | 9.49 ms | 8.69 s |
|
|
56
58
|
| Superstruct | 0.08 ms | 4.18 ms | 3.71 s |
|
|
57
59
|
| Joi | 0.33 ms | 3.35 ms | 2.69 s |
|
|
60
|
+
| ArkType | 0.08 ms | 0.70 ms | 576,80 ms |
|
|
58
61
|
|
|
59
62
|
#### Error Handling Performance
|
|
60
63
|
|
|
@@ -66,6 +69,7 @@ When choosing a schema validation library, bundle size can be an important facto
|
|
|
66
69
|
| Yup | 0.27 ms | 19.28 ms | 18.87 s |
|
|
67
70
|
| Superstruct | 0.04 ms | 8.62 ms | 6.24 s |
|
|
68
71
|
| Joi | 0.15 ms | 4.13 ms | 2.57 s |
|
|
72
|
+
| ArkType | 0.07 ms | 3.78 ms | 2.87 s |
|
|
69
73
|
|
|
70
74
|
**Note:** During the performance tests, `@zod/mini` was observed to consume 200% CPU, while other libraries used only 100% CPU. This may affect the interpretation of the results, especially in multi-threaded environments.
|
|
71
75
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@esmj/schema",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Tiny extendable package for schema validation.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"schema",
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
"@typescript-eslint/eslint-plugin": "^8.33.0",
|
|
69
69
|
"@typescript-eslint/parser": "^8.33.0",
|
|
70
70
|
"@zod/mini": "^4.0.0-beta.0",
|
|
71
|
+
"arktype": "^2.1.20",
|
|
71
72
|
"commitizen": "^4.3.1",
|
|
72
73
|
"conventional-changelog-cli": "^5.0.0",
|
|
73
74
|
"cz-conventional-changelog": "^3.3.0",
|