Skip to content

Commit

Permalink
Merge pull request #6 from Saeris/feat/support-valibot-v0.21.0
Browse files Browse the repository at this point in the history
Support Valibot `v0.21.0`
  • Loading branch information
Saeris committed Nov 27, 2023
2 parents 3826a88 + 254049e commit c0ffe80
Show file tree
Hide file tree
Showing 30 changed files with 3,576 additions and 4,153 deletions.
5 changes: 5 additions & 0 deletions .changeset/green-turtles-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"valimock": minor
---

Add support for Valibot v0.21.0
541 changes: 0 additions & 541 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

874 changes: 0 additions & 874 deletions .yarn/releases/yarn-3.6.4.cjs

This file was deleted.

893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.0.2.cjs

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
nodeLinker: node-modules
compressionLevel: mixed

enableGlobalCache: false

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.6.4.cjs
yarnPath: .yarn/releases/yarn-4.0.2.cjs
73 changes: 70 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,78 @@ describe(`example test`, () => {
>
> Please see the [`__tests__`](./src/__tests__/) folder for more usage examples of different schema types.
## API Coverage

> [!WARNING]
>
> At present, not all of `valibot`'s API is fully covered by `valimock`, however, any unimplemented schema type can be handled by a user-supplied map via the `customMocks` configuration option. The schema's `kind` proerty is used as the property key for this map.
>
> In the future a table will be provided with API coverage data.
> At present, not all of `valibot`'s API is fully covered by `valimock`, however, any unimplemented schema type can be handled by a user-supplied map via the `customMocks` configuration option. The schema's `type` proerty is used as the property key for this map.
| | Implemented | Incomplete | Not Implemented | Unsupported |
| ---------- | :---------: | :--------: | :-------------: | :---------: |
| **Symbol** |||||

### Schemas

| Any | Array | Bigint | Blob | Boolean | Date | Enum |
| :------------: | :-------------: | :-----------: | :-----------: | :---------: | :---------: | :-------------: |
||||||||
| **Instance** | **Intersect** | **Literal** | **Map** | **NaN** | **Never** | **NonNullable** |
||||||||
| **NonNullish** | **NonOptional** | **Null** | **Nullable** | **Nullish** | **Number** | **Object** |
||||||||
| **Optional** | **Picklist** | **Record** | **Recursive** | **Set** | **Special** | **String** |
||||||||
| **Symbol** | **Tuple** | **Undefined** | **Union** | **Unknown** | **Variant** | **Void** |
||||||||

### Validations

| | String | Number | Bigint | Boolean | Date | Array | Tuple | Union | Map | Set | Object | Blob |
| ----------------- | :----: | :----: | :----: | :-----: | :--: | :---: | :---: | :---: | :-: | :-: | :----: | :--: |
| **bytes** |||||||||||||
| **cuid2** |||||||||||||
| **custom** |||||||||||||
| **customAsync** |||||||||||||
| **email** |||||||||||||
| **emoji** |||||||||||||
| **endsWith** |||||||||||||
| **excludes** |||||||||||||
| **finite** |||||||||||||
| **imei** |||||||||||||
| **includes** |||||||||||||
| **integer** |||||||||||||
| **ip** |||||||||||||
| **ipv4** |||||||||||||
| **ipv6** |||||||||||||
| **isoDate** |||||||||||||
| **isoDateTime** |||||||||||||
| **isoTime** |||||||||||||
| **isoTimeSecond** |||||||||||||
| **isoTimestamp** |||||||||||||
| **isoWeek** |||||||||||||
| **length** |||||||||||||
| **mexBytes** |||||||||||||
| **maxLength** |||||||||||||
| **maxSize** |||||||||||||
| **maxValue** |||||||||||||
| **mimeType** |||||||||||||
| **minBytes** |||||||||||||
| **minLength** |||||||||||||
| **minSize** |||||||||||||
| **minValue** |||||||||||||
| **multipleOf** |||||||||||||
| **notBytes** |||||||||||||
| **notLength** |||||||||||||
| **notSize** |||||||||||||
| **notValue** |||||||||||||
| **regex** |||||||||||||
| **safeInteger** |||||||||||||
| **size** |||||||||||||
| **startsWith** |||||||||||||
| **ulid** |||||||||||||
| **url** |||||||||||||
| **uuid** |||||||||||||
| **value** |||||||||||||

## 📣 Acknowledgements

Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"engines": {
"node": ">=18.x"
},
"packageManager": "yarn@3.6.3",
"packageManager": "yarn@4.0.2",
"type": "module",
"main": "./dist/Valimock.js",
"module": "./dist/Valimock.js",
Expand Down Expand Up @@ -59,24 +59,24 @@
"randexp": "^0.5.3"
},
"peerDependencies": {
"@faker-js/faker": "^8.1.0",
"valibot": "^0.19.0"
"@faker-js/faker": ">= 8.0.0",
"valibot": ">= 0.21.0"
},
"devDependencies": {
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.2",
"@faker-js/faker": "^8.2.0",
"@faker-js/faker": "^8.3.1",
"@saeris/eslint-config": "^2.5.0",
"@types/eslint": "^8.44.4",
"@types/node": "20.8.6",
"@types/eslint": "^8.44.7",
"@types/node": "20.9.4",
"@vitest/coverage-v8": "^0.34.6",
"eslint": "^8.51.0",
"eslint": "^8.54.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-vitest": "^0.3.2",
"prettier": "^3.0.3",
"tsup": "^7.2.0",
"typescript": "5.2.2",
"valibot": "^0.19.0",
"eslint-plugin-vitest": "^0.3.10",
"prettier": "^3.1.0",
"tsup": "^8.0.1",
"typescript": "5.3.2",
"valibot": "^0.21.0",
"vitest": "^0.34.6"
},
"eslintConfig": {
Expand Down
Loading

0 comments on commit c0ffe80

Please sign in to comment.