Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: document breaking changes for #2476 into migration guide #2935

Merged
merged 4 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion docs/guide/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,20 @@ Removed deprecated location methods
| `faker.location.ordinalDirection(abbreviated)` | `faker.location.ordinalDirection({ abbreviated })` |
| `faker.location.nearbyGPSCoordinate(coordinate, radius, isMetric)` | `faker.location.nearbyGPSCoordinate({ origin, radius, isMetric })` |

#### Removed Definitions
#### Direction definitions reorganized

The locale definitions used by `faker.location.direction()`, `faker.location.cardinalDirection()` and `faker.location.ordinalDirection()` have been reorganized.
Previously, they were located under `definitions.location.direction` and `definitions.location.direction_abbr` and their values were required to be in a specific order.
Now, all values are nested under `definitions.location.direction` with descriptive property names.
If you are using the public methods, no changes are required.
You only need to change your code if you are accessing the raw definitions e.g. in `faker.helpers.fake()`.

| Before | After |
| ------------------------- | ----------------------------------------------------------------------- |
| `location.direction` | `location.direction.cardinal` or `location.direction.ordinal` |
| `location.direction_abbr` | `location.direction.cardinal_abbr` or `location.direction.ordinal_abbr` |

#### Default country definitions removed

The `faker.definitions.location.default_country` definition has been removed, as they were not used by any public method, and were not useful for locales which don't correspond directly to a single country, like `ar`.

Expand Down
12 changes: 0 additions & 12 deletions docs/guide/upgrading_v9/2476.md

This file was deleted.

Loading