From 453ea970a4c7ed19e9d41fd026923f42dbd4e768 Mon Sep 17 00:00:00 2001 From: DivisionByZero Date: Mon, 15 Apr 2024 00:27:11 +0200 Subject: refactor(locale)!: remove location data index-value-binding (#2476) --- docs/guide/upgrading_v9/2476.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 docs/guide/upgrading_v9/2476.md (limited to 'docs') diff --git a/docs/guide/upgrading_v9/2476.md b/docs/guide/upgrading_v9/2476.md new file mode 100644 index 00000000..b1ee78f8 --- /dev/null +++ b/docs/guide/upgrading_v9/2476.md @@ -0,0 +1,12 @@ +### 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` | -- cgit v1.2.3