Skip to content

fix(location): avoid hyphenated surnames in city patterns#2119

Merged
ST-DDT merged 7 commits intofaker-js:nextfrom
matthewmayer:fix/avoid-hyphenation-in-cities
Jul 20, 2023
Merged

fix(location): avoid hyphenated surnames in city patterns#2119
ST-DDT merged 7 commits intofaker-js:nextfrom
matthewmayer:fix/avoid-hyphenation-in-cities

Conversation

@matthewmayer
Copy link
Copy Markdown
Contributor

@matthewmayer matthewmayer commented May 2, 2023

Changes city_patterns to use person.last_name instead of person.lastName. This means it uses the definitions directly, not the method, which avoids using hyphenated and double surnames in locales where those are used which were introduced in #1872

e.g. remove city names like
Newton Morissette-Kovacekwell
Pollich-Douglasville

Note this doesn't affect default en locale as that is already using last_name instead of lastName https://github.com/faker-js/faker/blob/e490ed3e505124585857421cac73d6f8418280aa/src/locales/en/location/city_pattern.ts

@matthewmayer matthewmayer requested a review from a team as a code owner May 2, 2023 12:36
@matthewmayer matthewmayer self-assigned this May 2, 2023
@matthewmayer matthewmayer added p: 1-normal Nothing urgent c: locale Permutes locale definitions m: location Something is referring to the location module labels May 2, 2023
@codecov
Copy link
Copy Markdown

codecov Bot commented May 2, 2023

Codecov Report

Merging #2119 (c928c99) into next (db34e37) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head c928c99 differs from pull request most recent head 88227c2. Consider uploading reports for the commit 88227c2 to get more accurate results

Additional details and impacted files
@@           Coverage Diff            @@
##             next    #2119    +/-   ##
========================================
  Coverage   99.59%   99.60%            
========================================
  Files        2638     2631     -7     
  Lines      244685   245567   +882     
  Branches     1081     1155    +74     
========================================
+ Hits       243698   244587   +889     
+ Misses        960      953     -7     
  Partials       27       27            
Impacted Files Coverage Δ
src/locales/en_AU/location/city_pattern.ts 100.00% <100.00%> (ø)
src/locales/en_CA/location/city_pattern.ts 100.00% <100.00%> (ø)
src/locales/en_GB/location/city_pattern.ts 100.00% <100.00%> (ø)
src/locales/en_IE/location/city_pattern.ts 100.00% <100.00%> (ø)
src/locales/en_US/location/city_pattern.ts 100.00% <100.00%> (ø)
src/locales/fr_CA/location/city_pattern.ts 100.00% <100.00%> (ø)
src/locales/pt_BR/location/city_pattern.ts 100.00% <100.00%> (ø)

... and 67 files with indirect coverage changes

ejcheng
ejcheng previously approved these changes May 3, 2023
Comment thread src/locales/af_ZA/location/city_pattern.ts Outdated
ST-DDT
ST-DDT previously approved these changes May 4, 2023
@ST-DDT ST-DDT requested review from a team and ejcheng May 4, 2023 17:20
Shinigami92
Shinigami92 previously approved these changes May 4, 2023
ejcheng
ejcheng previously approved these changes May 4, 2023
@matthewmayer matthewmayer removed the needs rebase There is a merge conflict label Jun 17, 2023
@ST-DDT ST-DDT enabled auto-merge (squash) July 20, 2023 22:43
@ST-DDT ST-DDT merged commit 7a4bb43 into faker-js:next Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: locale Permutes locale definitions m: location Something is referring to the location module p: 1-normal Nothing urgent

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants