faker icon indicating copy to clipboard operation
faker copied to clipboard

refactor(address)!: latitude/longitude return type

Open xDivisionByZerox opened this issue 3 years ago • 5 comments

This PR changes to return type of address.latitude() and address.longitude() from string to number.

Related to #1058.

This is a breaking change! Do not merge until the next major release.

xDivisionByZerox avatar Jun 12 '22 10:06 xDivisionByZerox

Codecov Report

Merging #1064 (dc05add) into next (20f2236) will decrease coverage by 0.00%. The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #1064      +/-   ##
==========================================
- Coverage   99.63%   99.63%   -0.01%     
==========================================
  Files        2164     2164              
  Lines      236854   236852       -2     
  Branches     1004     1002       -2     
==========================================
- Hits       235991   235977      -14     
- Misses        842      854      +12     
  Partials       21       21              
Impacted Files Coverage Δ
src/modules/address/index.ts 99.77% <100.00%> (-0.01%) :arrow_down:
src/modules/internet/user-agent.ts 83.06% <0.00%> (-3.18%) :arrow_down:

codecov[bot] avatar Jun 12 '22 10:06 codecov[bot]

Considering the other PR, we should consider whether we want to introduce a format parameter instead.

ST-DDT avatar Jun 13 '22 20:06 ST-DDT

Considering the other PR, we should consider whether we want to introduce a format parameter instead.

I really dislike the idea. For me, it doesn't make sense that coordinates would be strings. But we (as a library) should allow stringified strings as input parameters due to the nature of JS and enhancing the dx when using Faker.

xDivisionByZerox avatar Jun 13 '22 21:06 xDivisionByZerox

Cross referencing related PRs:

  • https://github.com/faker-js/faker/pull/1066
  • https://github.com/faker-js/faker/pull/1064
  • https://github.com/faker-js/faker/pull/1061

ST-DDT avatar Jun 13 '22 22:06 ST-DDT

I really dislike the idea. For me, it doesn't make sense that coordinates would be strings. But we (as a library) should allow stringified strings as input parameters due to the nature of JS and enhancing the dx when using Faker.

Further discussion regarding that topic please in https://github.com/faker-js/faker/pull/1066 or a separate issue/discussion.

ST-DDT avatar Jun 13 '22 22:06 ST-DDT

I eagerly put the PR title to scope location as we will solve

  • #1344

in v8.0 and this will then be grouped together

Shinigami92 avatar Oct 13 '22 18:10 Shinigami92

@xDivisionByZerox needs rebase

Shinigami92 avatar Oct 15 '22 16:10 Shinigami92

I tried to solve it, via the GitHub UI Will fix it...

Shinigami92 avatar Oct 16 '22 21:10 Shinigami92