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

fix(macro types): mark other as required for ChoiceOptions #1527

Merged
merged 2 commits into from
Mar 17, 2023

Conversation

taozhou-glean
Copy link
Contributor

@taozhou-glean taozhou-glean commented Mar 16, 2023

Description

other should be required for choice macros, and looks like we do have it as required for SelectOptions, SelectChoiceProps and PluralChoiceProps, just not ChoiceOptions which is probably not intended.

and ICU message without other may be invalid:

image

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Fixes # (issue)

Checklist

  • I have read the CONTRIBUTING and CODE_OF_CONDUCT docs
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@vercel
Copy link

vercel bot commented Mar 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
js-lingui ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 16, 2023 at 5:53PM (UTC)

@github-actions
Copy link

github-actions bot commented Mar 16, 2023

size-limit report 📦

Path Size
./packages/core/build/esm/index.js 1.57 KB (0%)
./packages/detect-locale/build/esm/index.js 812 B (0%)
./packages/react/build/esm/index.js 1.67 KB (0%)
./packages/remote-loader/build/esm/index.js 7.25 KB (0%)

@thekip
Copy link
Collaborator

thekip commented Mar 16, 2023

You need also add a test in packages/macro/__typetests__/index.test-d.tsx

@taozhou-glean
Copy link
Contributor Author

You need also add a test in packages/macro/__typetests__/index.test-d.tsx

done! thanks

@taozhou-glean
Copy link
Contributor Author

You need also add a test in packages/macro/__typetests__/index.test-d.tsx

done! thanks

BTW, yarn test:tsd is failing with 3 tests on t({}) above for me, checked upstream/next and same there. @thekip

@thekip
Copy link
Collaborator

thekip commented Mar 16, 2023

yarn release:build before yarn test:tsd it's a known issue, building modern application with monorepo is hard.

I'm currently looking for another solution.

@taozhou-glean
Copy link
Contributor Author

taozhou-glean commented Mar 16, 2023

yarn release:build before yarn test:tsd

test all passed now! maybe just update scripts for test:tsd to always run release:build before as a workaround for now

@thekip
Copy link
Collaborator

thekip commented Mar 16, 2023

in github WF it's already done this way. In development, it doesn't bother me so much. And i actually find it more useful to have faster feedback when working on typings, so i'm running build once and then re-run only tests.

@thekip thekip self-requested a review March 16, 2023 18:30
@andrii-bodnar andrii-bodnar merged commit c4b700d into lingui:next Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants