Skip to content

Stop using Internet#username() interally#1671

Merged
kingthorin merged 1 commit intodatafaker-net:mainfrom
kingthorin:dont-use-depr-methods
Sep 24, 2025
Merged

Stop using Internet#username() interally#1671
kingthorin merged 1 commit intodatafaker-net:mainfrom
kingthorin:dont-use-depr-methods

Conversation

@kingthorin
Copy link
Copy Markdown
Collaborator

@kingthorin kingthorin commented Sep 24, 2025

Since Internet#usernam() was already changed to use Credentials#username() all internal use may as well do the same thing so that DF itself isn't using deprecated methods.

@what-the-diff
Copy link
Copy Markdown

what-the-diff bot commented Sep 24, 2025

PR Summary

  • Alteration in email address generation in Internet.java
    The way email addresses are generated in Internet.java has been updated. Now, it uses credential-specific usernames, ensuring more security and accuracy.

  • Update in safeEmailAddress() method in Internet.java
    The safeEmailAddress() method, which was previously using the basic username() method, has been revamped. Now it also uses credential-specific usernames, enhancing the safety of email addresses that the method generates.

  • Changes to username() in Name.java
    The username() method in Name.java was modified to return a credential-specific username, replacing the previous internet-based method. This change ensures the generation of more secure and specific usernames.

Since Internet#usernam() was already changed to use
Credentials#username() all internal use may as well do the same thing so
that DF itself isn't using deprecated methods.

Signed-off-by: kingthorin <[email protected]>
@kingthorin kingthorin force-pushed the dont-use-depr-methods branch from d047a76 to 6da85ad Compare September 24, 2025 12:48
@codecov-commenter
Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.28%. Comparing base (93ebb4f) to head (6da85ad).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #1671   +/-   ##
=========================================
  Coverage     92.28%   92.28%           
  Complexity     3393     3393           
=========================================
  Files           333      333           
  Lines          6714     6714           
  Branches        666      666           
=========================================
  Hits           6196     6196           
  Misses          354      354           
  Partials        164      164           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@asolntsev asolntsev added this to the 2.5.1 milestone Sep 24, 2025
@kingthorin
Copy link
Copy Markdown
Collaborator Author

Thanks @asolntsev !

@kingthorin kingthorin merged commit 6201ec8 into datafaker-net:main Sep 24, 2025
13 checks passed
@kingthorin kingthorin deleted the dont-use-depr-methods branch September 24, 2025 13:07
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.

3 participants