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

add-zod(5): Add makeProps #504

Merged
merged 16 commits into from Sep 24, 2021
Merged

add-zod(5): Add makeProps #504

merged 16 commits into from Sep 24, 2021

Conversation

FlorianWendelborn
Copy link
Member

@FlorianWendelborn FlorianWendelborn commented Sep 21, 2021

Rebased on top of #505, #506, #507, and #508


Breaking Changes:

  • Kotti.UserMenu.Section now enforces title as string | null

@render
Copy link

render bot commented Sep 21, 2021

@FlorianWendelborn FlorianWendelborn requested review from Isokaeder and carsoli and removed request for Isokaeder September 21, 2021 19:25
@FlorianWendelborn FlorianWendelborn added autorebase:opt-in Apply this label to enable automatic rebasing package:kotti-ui @3yourmind/kotti-ui type:enhancement features, etc. labels Sep 21, 2021
@FlorianWendelborn FlorianWendelborn force-pushed the add-zod/add-make-props branch 5 times, most recently from 77102a4 to d8f4245 Compare September 21, 2021 20:16
@FlorianWendelborn FlorianWendelborn changed the title add-zod(100): Add makeProps add-zod(5): Add makeProps Sep 21, 2021
@FlorianWendelborn FlorianWendelborn added the priority:4-high ⚠️ Needs to be fixed ASAP, but without HACKs label Sep 21, 2021
@FlorianWendelborn FlorianWendelborn added the autorebase:non-rebaseable AutoRebase applies this label when a pull request can't be rebased automatically label Sep 22, 2021
Also, this adds a surplus check so that jest sees that result.error is defined

This isn’t necessary for TS itself, but somehow ts-jest didn’t see this... upgrading to latest didn’t fix this bug unfortunately, so this is as good as it gets
@FlorianWendelborn FlorianWendelborn removed the autorebase:non-rebaseable AutoRebase applies this label when a pull request can't be rebased automatically label Sep 22, 2021
Copy link
Contributor

@carsoli carsoli left a comment

Choose a reason for hiding this comment

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

If you attend to any of the comments, please have separate commits/commit, for an easier review process
Thanks!

@carsoli carsoli self-requested a review September 24, 2021 12:36
Unfortunately, the makeProps type hints only work for some types in Vue, others somehow get resolved to any. As far as I can tell, this is due to PropType<> being buggy.

I also tested @vue/composition-api@1.1.5 and PropType does appear to be broken there as well.

Let’s hope that one day Vue will properly support this.
… Various PR Comments

Co-Authored-By: Carol Soliman <17387510+carsoli@users.noreply.github.com>
Co-Authored-By: Carol Soliman <17387510+carsoli@users.noreply.github.com>
Co-Authored-By: Carol Soliman <17387510+carsoli@users.noreply.github.com>
Co-Authored-By: Carol Soliman <17387510+carsoli@users.noreply.github.com>
z.array().nonempty() influences the type definitions, and causes issues with Array.prototype.map() not being aware of the underlying array's cardinality.
@carsoli carsoli merged commit e06834b into master Sep 24, 2021
@carsoli carsoli deleted the add-zod/add-make-props branch September 24, 2021 14:35
@FlorianWendelborn FlorianWendelborn linked an issue Oct 3, 2021 that may be closed by this pull request
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autorebase:opt-in Apply this label to enable automatic rebasing package:kotti-ui @3yourmind/kotti-ui priority:4-high ⚠️ Needs to be fixed ASAP, but without HACKs type:enhancement features, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Prop Validation EVERYWHERE
2 participants