-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
V2 - better modules support #104
Conversation
This is super exciting! |
@bluebill1049 PR ready for review 🙂 |
"license": "MIT", | ||
"peerDependencies": { | ||
"react-hook-form": ">=6.6.0", | ||
"@hookform/resolvers": "^1.0.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.
dependent itself?
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.
Yes, to import convertArrayToPathName
, inspiration from preact
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.
oh cool! 👍
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.
This is too good! Does this need a breaking change? if not maybe we can keep it under v1, until v2 with breaking changes (those new attributes, arguments, and functionalityies)?
"umd": "./superstruct/dist/superstruct.umd.js", | ||
"import": "./superstruct/dist/superstruct.mjs", | ||
"require": "./superstruct/dist/superstruct.js" | ||
}, |
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.
nice!
"prepare": "run-s build && check-export-map", | ||
"build": "npm-run-all --parallel build:*", | ||
"build:src": "microbundle build", | ||
"build:zod": "microbundle --cwd zod --globals '@hookform/resolvers=hookformResolvers'", |
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.
That's new to me, --globals
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.
It specify variable name for external imports in umd/iife bundles
I suggest to publish a V2 beta because there are lot of changes (project structure, bundles etc...) And we can advise users to try beta and collect feedbacks. What do you think ? |
sounds good to me! The only thing to beware that their argument of resolver may change with v7, we didn't document the third argument in the readme tho, just in case someone is using it. |
🎉 This PR is included in version 1.3.2-beta.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
First of all, huge thank to the preact hard work. This PR is heavily inspired of their modules structure.
Good news, no breaking changes ! users can import resolvers as usual 🎉
Tested with Next.js and CRA with success ✅ ! Others formats will be tested after first beta release
Solves #71 & #100