faker
faker copied to clipboard
refactor(address)!: latitude/longitude return type
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.
Codecov Report
Merging #1064 (dc05add) into next (20f2236) will decrease coverage by
0.00%. The diff coverage is100.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: |
Considering the other PR, we should consider whether we want to introduce a format parameter instead.
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.
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
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.
I eagerly put the PR title to scope location as we will solve
- #1344
in v8.0 and this will then be grouped together
@xDivisionByZerox needs rebase
I tried to solve it, via the GitHub UI Will fix it...