-
-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce superstruct resolver size #128
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Size Change: -3.12 kB (-19%) 👏 Total Size: 13.1 kB
ℹ️ View Unchanged
|
jorisre
commented
Feb 3, 2021
superstruct/package.json
Outdated
@@ -12,6 +12,7 @@ | |||
"license": "MIT", | |||
"peerDependencies": { | |||
"react-hook-form": ">=6.6.0", | |||
"@hookform/resolvers": "^1.0.0" | |||
"@hookform/resolvers": "^1.0.0", | |||
"superstruct": ">+0.12.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Force inlining superstruct
Oh, I didn't know about this. Thanks for digging into that. I will include that in the doc. |
bluebill1049
approved these changes
Feb 3, 2021
bluebill1049
approved these changes
Feb 3, 2021
bluebill1049
approved these changes
Feb 3, 2021
🎉 This PR is included in version 2.0.0-beta.11 🎉 The release is available on: Your semantic-release bot 📦🚀 |
jorisre
added a commit
that referenced
this pull request
Apr 2, 2021
* feat: V2 init BREAKING CHANGE: there will be some breaking changes in the next versions * feat: improve modules support * fix: yup resolver typescript errors * Fix: vest validate all criteria + better TypeSript support + add tests * test: add components test to ensure TypeScript is working as expected Related to #97 * chore: improve zod resolvers types * chore(eslint): remove warnings * test: add severals tests & improve typings * chore: setup compressed-size * test: update describe * feat: add Zod sync validation (#114) * feat: add Joi sync validation (#116) * feat: add Joi sync validation * fix(joi): sync error * test: add validateAllCriteria test * test(joi): update test description * feat: add Yup sync validation (#115) * feat: add Yup sync validation * test(zod): add tests * test(zod): update tests * test(yup): add validateAllCriteria test * feat: add Vest sync validation + update to v3 (#117) * feat: update to react-hook-form v7 BREAKING CHANGE: Require react-hook-form >= 7 * chore: fix typescript error (#123) * chore: update deps * chore: fix TypeScript error * refactor: replace deprecated transformToNestObject (#125) * fix: pass down Joi context (#124) * fix: zod union error + reduce size (#126) * test: extract fixtures * fix: zod resolver union error + reduce resolver size * feat: add error's ref (#127) * feat: add error's ref * test: add error's ref + extract fixtures * test: add nested test * refactor: rename toNestObject to toNestError * Reduce superstruct resolver size (#128) * test: extract test's fixtures * test: jest fixtures config * perf: reduce superstruct resolver size * feat: add error's ref * test: add error's ref + extract fixtures * test: add nested test * refactor: rename toNestObject to toNestError * refactor: remove duplicate line * chore: update superstruct peer dep * perf: reduce vest resolver size (#129) * test: extract test's fixtures * test: jest fixtures config * perf: reduce superstruct resolver size * feat: add error's ref * test: add error's ref + extract fixtures * test: add nested test * refactor: rename toNestObject to toNestError * refactor: remove duplicate line * perf: recude vest resolver bundle size * perf: reduce joi resolver's size (#131) * perf: reduce Joi resolver's size * perf: reduce Vest resolver's size * perf: reduce yup resolver's size (#130) * refactor: remove convertArrayToPathName (#132) * perf: reduce joi and yup bundle size (#134) * fix(types): add Lazy schema support to resolver * docs: v2 doc (#136)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I removed
criteriaMode
because Superstruct can't return all errors for a same field. By removingcriteriaMode
the bundle's size is reduced by ~74%. We just have to add an explanation about Superstruct resolver in the new documentation for users.Let me know if you're ok with these changes
I found an explanation about errors in typings: