-
-
Notifications
You must be signed in to change notification settings - Fork 950
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: change random.word to be based on definitions.word.* #276
Conversation
I would put into 6.1 @import-brain |
Done |
How about the review @prisis ? |
@pkuczynski hope it's fine with you if i wait with the review a bit. I would like to fix the tests more and remove all the mock function call, so we now that we break something. And this is a runtime change of the code, so we will not merge it into v6.0 for now. But im thankful for you spend time on this PR. Note: ignore the approve, clicked the wrong button... |
src/random.ts
Outdated
@@ -159,53 +159,28 @@ export class Random { | |||
return this.faker.datatype.boolean(); | |||
} | |||
|
|||
// TODO: have ability to return specific type of word? As in: noun, adjective, verb, etc |
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.
The question is if we want to have this feature too.
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.
We already have. Users can use faker.word.xyz
to do it... That's why I removed this comment.
The problem is, that the longer you wait with merging, the higher chance of conflict. I worked on this as it was listed as "help needed". This feature does not have any tests, so not sure what mocks do you want to remove? |
Sorry but this is irrelevant to the current situation of the project. We have a roadmap https://github.com/orgs/faker-js/projects/2 with the milestone https://github.com/faker-js/faker/milestone/1 This said, I can somewhat promise you that |
Possibly in the future we might consider to move this to faker.word.any() as this what happened with other methods from this module... What do you think? I could record this idea as a GitHub issue for future consideration... |
I think that is reasonable. |
Here you go #339 :) |
@Shinigami92 I think this should be still merged, because it contains valid changes. Then the move in #339 can happen more easily... |
# Conflicts: # src/random.ts
# Conflicts: # src/random.ts
@ST-DDT and I decided this together via screen-share some minutes ago Let me also say that I do totally not expect that the move from initial to v6.0.0 will take same amount of time as from v6.0 to v6.1 🙂 |
I mean this function after the changes done currently, can be with pretty much (almost) no change moved to |
@Shinigami92 @ST-DDT rebased and tests fixed |
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.
I'm more and more tempted to not accept this PR 😕 Sorry...
I re-read through #113 and I thing we should go with the suggested proposal to just regex them out if they generate "invalid" words and then make a retry
With this PR (#276) we loose many possible words, especially hacker words, were you can see that they are not in generated system filenames anymore
I will block this from my side with a request changes
, but if another maintainer is on my side, then I would vote for close this PR
Well, at least we get more sensible words with this pr comparing to before... but yeah, do what you wish... |
What do you consider a "sensible" word? IMO we have to decide first what we expect from this method. |
I wold consider noun, adjective, verb, ... a sensible word. While things like Looking at the wikipedia https://en.wikipedia.org/wiki/Word:
|
For filename generation we could also use In other languages, I would expect the filename is generated in the selected locale, unless there is no translation for it. Wouldn't you? |
I am not doing anything with his PR until you make a decision, right? |
In yesterdays maintainers-team-meeting we discussed that we want to have the |
OK! |
Fixes #113
Fixes #218