Skip to content

Conversation

@xDivisionByZerox
Copy link
Member

Description

Follow-on to #2265.

Normalize the entries in the phone_number module definitions - in all locales. No entries have been removed. The changes are sorting only.

How to verify

Checkout the branch:

git switch refactor/normalize-phone-number-data

The branch contains two commits. One that changes the script to include the internet module being part of the normalization and one that actually updates the files.
By restoring files before the normalization happened and running it yourself, you should see the same state as this PR provides:

# undo the commit that ran the locale data generation
git checkout HEAD~1 . 

# since git checkout changes are always stages, they need to be brought to the work-tree
git restore --staged .

# run neccessary scripts
pnpm run generate:locales && pnpm run test:update-snapshots

You should end up with no changes in your work-tree.

@xDivisionByZerox xDivisionByZerox requested a review from a team May 22, 2025 16:07
@xDivisionByZerox xDivisionByZerox self-assigned this May 22, 2025
@xDivisionByZerox xDivisionByZerox requested a review from a team as a code owner May 22, 2025 16:07
@xDivisionByZerox xDivisionByZerox added p: 1-normal Nothing urgent c: refactor PR that affects the runtime behavior, but doesn't add new features or fixes bugs c: locale Permutes locale definitions m: phone Something is referring to the phone module labels May 22, 2025
@netlify
Copy link

netlify bot commented May 22, 2025

Deploy Preview for fakerjs ready!

Name Link
🔨 Latest commit c9d6b7b
🔍 Latest deploy log https://app.netlify.com/projects/fakerjs/deploys/682f4be1e9d95d000816863c
😎 Deploy Preview https://deploy-preview-3518.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 project configuration.

@codecov
Copy link

codecov bot commented May 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.97%. Comparing base (549d71c) to head (c9d6b7b).
⚠️ Report is 126 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #3518      +/-   ##
==========================================
- Coverage   99.97%   99.97%   -0.01%     
==========================================
  Files        2880     2880              
  Lines      220503   220503              
  Branches      951      952       +1     
==========================================
- Hits       220450   220448       -2     
- Misses         53       55       +2     
Files with missing lines Coverage Δ
src/locales/af_ZA/phone_number/format/human.ts 100.00% <100.00%> (ø)
src/locales/af_ZA/phone_number/format/national.ts 100.00% <100.00%> (ø)
src/locales/cs_CZ/phone_number/format/human.ts 100.00% <100.00%> (ø)
...locales/cs_CZ/phone_number/format/international.ts 100.00% <100.00%> (ø)
src/locales/cs_CZ/phone_number/format/national.ts 100.00% <100.00%> (ø)
src/locales/de/phone_number/format/human.ts 100.00% <100.00%> (ø)
...rc/locales/de/phone_number/format/international.ts 100.00% <100.00%> (ø)
src/locales/de/phone_number/format/national.ts 100.00% <100.00%> (ø)
src/locales/de_AT/phone_number/format/human.ts 100.00% <100.00%> (ø)
...locales/de_AT/phone_number/format/international.ts 100.00% <100.00%> (ø)
... and 83 more

... and 1 file with indirect coverage changes

🚀 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.

Copy link
Member Author

@xDivisionByZerox xDivisionByZerox May 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments inside data structures are not accounted for during the sorting. So we lose some comments here.

Copy link
Member Author

@xDivisionByZerox xDivisionByZerox May 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file contains some comments, which will be lost, as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: locale Permutes locale definitions c: refactor PR that affects the runtime behavior, but doesn't add new features or fixes bugs m: phone Something is referring to the phone module p: 1-normal Nothing urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants