Skip to content
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

Merged
merged 8 commits into from
Jan 4, 2021
Merged

V2 - better modules support #104

merged 8 commits into from
Jan 4, 2021

Conversation

jorisre
Copy link
Member

@jorisre jorisre commented Jan 2, 2021

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 🎉

  • move resolvers into separate folders
  • add exports map in package.json + support node 13 (thank to preact)
  • build: use microbundle + severals updates
  • test: update config
  • remove IE11
  • use semantic-release default config

Tested with Next.js and CRA with success ✅ ! Others formats will be tested after first beta release

Solves #71 & #100

package.json Show resolved Hide resolved
@bluebill1049
Copy link
Member

This is super exciting!

@jorisre jorisre marked this pull request as ready for review January 2, 2021 16:16
@jorisre jorisre requested a review from bluebill1049 January 2, 2021 16:16
@jorisre
Copy link
Member Author

jorisre commented Jan 4, 2021

@bluebill1049 PR ready for review 🙂

@bluebill1049
Copy link
Member

Screen Shot 2021-01-04 at 8 40 41 pm

Wow, this is cool!

"license": "MIT",
"peerDependencies": {
"react-hook-form": ">=6.6.0",
"@hookform/resolvers": "^1.0.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dependent itself?

Copy link
Member Author

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh cool! 👍

Copy link
Member

@bluebill1049 bluebill1049 left a 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"
},
Copy link
Member

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'",
Copy link
Member

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

Copy link
Member Author

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

@jorisre
Copy link
Member Author

jorisre commented Jan 4, 2021

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)?

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 ?
I’m thinking about a powerful v2 without any breaking changes for developers :) 🤞🏻

@bluebill1049
Copy link
Member

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)?

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 ?
I’m thinking about a powerful v2 without any breaking changes for developers :) 🤞🏻

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.

@jorisre jorisre merged commit d6d25b9 into beta Jan 4, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Jan 4, 2021

🎉 This PR is included in version 1.3.2-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@bluebill1049 bluebill1049 deleted the v2/better-modules-support branch January 5, 2021 04:29
@jorisre jorisre mentioned this pull request Jan 9, 2021
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants