faker icon indicating copy to clipboard operation
faker copied to clipboard

feat: add book module

Open cieslarmichal opened this issue 1 year ago • 10 comments

Added new Book module as discussed in https://github.com/faker-js/faker/issues/2310.

Changes made:

  • added a new module with following methods: author, format, genre, publisher, series, title
  • added en locale data
  • added pl locale data
  • added tests for all methods
  • added new docs page

cieslarmichal avatar Jun 15 '24 16:06 cieslarmichal

Deploy Preview for fakerjs ready!

Name Link
Latest commit 76987e094f26c780f5cc21101fde4687e12f1dc8
Latest deploy log https://app.netlify.com/sites/fakerjs/deploys/6707f48d5378110008b87b9d
Deploy Preview https://deploy-preview-2949.fakerjs.dev
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Jun 15 '24 16:06 netlify[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.96%. Comparing base (1760658) to head (76987e0). Report is 1 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2949      +/-   ##
==========================================
- Coverage   99.96%   99.96%   -0.01%     
==========================================
  Files        2778     2794      +16     
  Lines      226364   227415    +1051     
  Branches      577      575       -2     
==========================================
+ Hits       226288   227333    +1045     
- Misses         76       82       +6     
Files with missing lines Coverage Δ
src/definitions/book.ts 100.00% <100.00%> (ø)
src/definitions/definitions.ts 100.00% <ø> (ø)
src/definitions/index.ts 100.00% <ø> (ø)
src/faker.ts 100.00% <100.00%> (ø)
src/index.ts 100.00% <ø> (ø)
src/locales/en/book/author.ts 100.00% <100.00%> (ø)
src/locales/en/book/format.ts 100.00% <100.00%> (ø)
src/locales/en/book/genre.ts 100.00% <100.00%> (ø)
src/locales/en/book/index.ts 100.00% <100.00%> (ø)
src/locales/en/book/publisher.ts 100.00% <100.00%> (ø)
... and 12 more

... and 1 file with indirect coverage changes

codecov[bot] avatar Jun 15 '24 17:06 codecov[bot]

hello guys, is there anything more I should do here? 🙂

cieslarmichal avatar Jun 17 '24 13:06 cieslarmichal

hello guys, is there anything more I should do here? 🙂

There might be. If there is we will write a comment. 🙂 It's not unusual in open source that PRs will take a while to be fully reviewed and merged.

Please keep in mind that all members and maintainers of FakerJS work on this project in their free time.

xDivisionByZerox avatar Jun 17 '24 14:06 xDivisionByZerox

I know, sure, just asking :)

cieslarmichal avatar Jun 17 '24 14:06 cieslarmichal

Ok I will add more book titles

cieslarmichal avatar Jun 18 '24 11:06 cieslarmichal

I have just added more book titles and authors (about 150 each).

cieslarmichal avatar Jun 20 '24 21:06 cieslarmichal

I still have the question if the addition of the polish locale should be it's own PR.

Initial data is initial data. IMO if I consider something useful, I would try it instead of searching the changelog for my locale. Unless, I know the feature exists and I'm just waiting for it to get available for my locale. But I don't have a particular strong opinion on this either.

ST-DDT avatar Jun 22 '24 19:06 ST-DDT

I would say if it's only 2 or 3 locales included it's better to include in the initial commit. That helps verify there are no incorrect assumptions about how the data will be localised (for example in the first version of this PR the pl and en versions of author used different FirstName surname orders. That was good, as it helped us clarify what the rule should be in general and standardise it.)

matthewmayer avatar Jun 23 '24 03:06 matthewmayer

Thank you guys for a nice word :) It was a good review process, I am happy about it, can't wait to release those changes 😎

cieslarmichal avatar Jun 23 '24 16:06 cieslarmichal

Dear @cieslarmichal,

Thank you for your patience and contributions so far. We wanted to provide you with a brief update.

We are pleased to inform you that we have addressed all the known bugs in version 9.0. We will now take a short break and resume work around October 7, 2024, to begin merging new features for v9.1, including yours.

In the meantime, we hope you have a great time, and we sincerely appreciate your ongoing support and contributions.

Best regards, your FakerJS Team

ST-DDT avatar Sep 27 '24 16:09 ST-DDT

Hello, thank you for giving me a chance to contribute and for the information about expected release date 💪

cieslarmichal avatar Sep 27 '24 16:09 cieslarmichal