diff options
| author | Matt Mayer <[email protected]> | 2024-06-13 13:13:31 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-06-13 06:13:31 +0000 |
| commit | 2a2a13200acd858a2ee45e43072f55888511fb8d (patch) | |
| tree | 031762cfb94559260c732f66ad7108af55847482 /docs/guide | |
| parent | c1aca55adeca4c3a096cf1c75d1e35a7c4373c45 (diff) | |
| download | faker-2a2a13200acd858a2ee45e43072f55888511fb8d.tar.xz faker-2a2a13200acd858a2ee45e43072f55888511fb8d.zip | |
docs: merge migration guide snippet (#2935)
Diffstat (limited to 'docs/guide')
| -rw-r--r-- | docs/guide/upgrading.md | 15 | ||||
| -rw-r--r-- | docs/guide/upgrading_v9/2476.md | 12 |
2 files changed, 14 insertions, 13 deletions
diff --git a/docs/guide/upgrading.md b/docs/guide/upgrading.md index 653570b6..81a48ad8 100644 --- a/docs/guide/upgrading.md +++ b/docs/guide/upgrading.md @@ -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`. diff --git a/docs/guide/upgrading_v9/2476.md b/docs/guide/upgrading_v9/2476.md deleted file mode 100644 index b1ee78f8..00000000 --- a/docs/guide/upgrading_v9/2476.md +++ /dev/null @@ -1,12 +0,0 @@ -### Direction definitions reorganized - -The locale definitions used by `faker.location.direction()`, `faker.location.cardinalDirection()` and `faker.location.ordinalDirection()` have been reorganized. -Previously, they were organized under `definitions.location.direction` and `definitions.location.direction_abbr` and where 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` | |
