-
-
Notifications
You must be signed in to change notification settings - Fork 939
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
chore: rename Gender to Sex #1163
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1163 +/- ##
==========================================
- Coverage 99.62% 99.62% -0.01%
==========================================
Files 2153 2153
Lines 236521 236547 +26
Branches 979 980 +1
==========================================
+ Hits 235643 235659 +16
- Misses 857 867 +10
Partials 21 21
|
As far as I can tell there is no way to do that other than documentation since the type will be gone as soon as the TypeScript code is compiled to JavaScript.
We have already talked about this possibility in a team meeting. But, you also came to the conclusion that it's not as easy as just providing an extra set of names to pick from (your Polish example). Because of that, we decided to keep the options as they are, for now. When the library is considered stable and easier maintainable we will think about such features. |
The current change would be considered a breaking change since the Gender enum would be removed. But like I said in an earlier comment, I'm not sure if you can deprecate and enum. I'm just pinging @Shinigami92 and @ST-DDT so they will see this (but they are currently on vacation). One other think is that I'd like to get the additional type (now Otherwise this looks good to me. |
I am not sure if anybody would use the enum, as initially, I changed types to use it, and all tests were failing compilation when called with strings like
I can't do it, if we want to support param values as strings, eg |
@xDivisionByZerox @ST-DDT @Shinigami92 is this ready for merge? I left some unresolved comments from @Shinigami92 - can you help me with this, as I am not sure if I should tackle them or not as it seems there are some contradictory opinions... |
Co-authored-by: Leyla Jähnig <leyla.jaehnig@gmx.de>
3d693f7
Suggestions from @xDivisionByZerox are done. Is this ready for merge? |
Fixes #352
Questions:
Gender
type in favor ofSex
Intersex
norNonbinary
to the enum, as I felt that the way it is used, it would be better not to specify the sex, which would lead to randomizing the value despite the sex. For example 'faker.name.firstName()` would provide either a female or male first name, which IMHO would provide inclusivity for non-binary data...Alex, Max, Sam, etc
and then I could add a new enum value for picking them up. Although some (or maybe even many) languages do not have such names (eg. in Polish, every female name must end with ana
, and if a name does not, it is considered male - there are no exceptions to this rule).