aboutsummaryrefslogtreecommitdiff
path: root/docs/guide
diff options
context:
space:
mode:
authorShinigami <[email protected]>2023-04-04 19:17:43 +0200
committerGitHub <[email protected]>2023-04-04 19:17:43 +0200
commitea620467165a9a2247b147edcf46ef0783325977 (patch)
tree2e500c5d886aa534e4ce9c2ab731632a800ab313 /docs/guide
parentcddbb959f13aa29a7264174b1fc4eaa4271cf900 (diff)
downloadfaker-ea620467165a9a2247b147edcf46ef0783325977.tar.xz
faker-ea620467165a9a2247b147edcf46ef0783325977.zip
docs(helpers): document unique deprecation (#2001)
Diffstat (limited to 'docs/guide')
-rw-r--r--docs/guide/upgrading.md35
-rw-r--r--docs/guide/usage.md6
2 files changed, 26 insertions, 15 deletions
diff --git a/docs/guide/upgrading.md b/docs/guide/upgrading.md
index 5e554849..38b6e6a4 100644
--- a/docs/guide/upgrading.md
+++ b/docs/guide/upgrading.md
@@ -103,21 +103,21 @@ For more information refer to our [Localization Guide](localization).
### Other deprecated methods removed/replaced
-| Old method | New method |
-| ------------------------------- | ----------------------------------------------------------------- |
-| `faker.unique` | `faker.helpers.unique` |
-| `faker.fake` | `faker.helpers.fake` |
-| `faker.commerce.color` | `faker.color.human` |
-| `faker.company.companyName` | `faker.company.name` |
-| `faker.phone.phoneNumber` | `faker.phone.number` |
-| `faker.phone.phoneNumberFormat` | No direct replacement, see documentation for `faker.phone.number` |
-| `faker.phone.phoneFormats` | No direct replacement, see documentation for `faker.phone.number` |
-| `faker.name.findName` | _Removed, replace with `faker.person.fullName`_ |
-| `faker.address.cityPrefix` | _Removed_ |
-| `faker.address.citySuffix` | _Removed_ |
-| `faker.address.streetPrefix` | _Removed_ |
-| `faker.address.streetSuffix` | _Removed_ |
-| `faker.image.lorempixel` | _Removed, as the LoremPixel service is no longer available_ |
+| Old method | New method |
+| ------------------------------- | --------------------------------------------------------------------------------------------------------------- |
+| `faker.unique` | `faker.helpers.unique` (:warning: please have a look at [#1785](https://github.com/faker-js/faker/issues/1785)) |
+| `faker.fake` | `faker.helpers.fake` |
+| `faker.commerce.color` | `faker.color.human` |
+| `faker.company.companyName` | `faker.company.name` |
+| `faker.phone.phoneNumber` | `faker.phone.number` |
+| `faker.phone.phoneNumberFormat` | No direct replacement, see documentation for `faker.phone.number` |
+| `faker.phone.phoneFormats` | No direct replacement, see documentation for `faker.phone.number` |
+| `faker.name.findName` | _Removed, replace with `faker.person.fullName`_ |
+| `faker.address.cityPrefix` | _Removed_ |
+| `faker.address.citySuffix` | _Removed_ |
+| `faker.address.streetPrefix` | _Removed_ |
+| `faker.address.streetSuffix` | _Removed_ |
+| `faker.image.lorempixel` | _Removed, as the LoremPixel service is no longer available_ |
## Deprecations and other changes
@@ -216,6 +216,11 @@ The `allowLeadingZeros` boolean parameter in `faker.string.numeric` (in the new
The functions `faker.system.mimeType`, `faker.system.fileType` and `faker.system.fileExt` now return data from a smaller set of more common MIME types, filetypes and extensions.
+### `faker.helpers.unique` is planned to be outsourced
+
+The `faker.helpers.unique` method is planned to be outsourced to a separate package.
+Please have a look at issue [#1785](https://github.com/faker-js/faker/issues/1785) for more details.
+
### Locales renamed
The `en_IND` (English, India) locale was renamed to `en_IN` for consistency with other locales.
diff --git a/docs/guide/usage.md b/docs/guide/usage.md
index f97590af..767cf747 100644
--- a/docs/guide/usage.md
+++ b/docs/guide/usage.md
@@ -249,4 +249,10 @@ const user = createRandomUser();
By wrapping Faker's `email` function with the [`unique`](../api/helpers.md#unique) helper function, we ensure that the return value of `email` is always unique.
+::: warning
+The `faker.helpers.unique` is targeted to be removed from Faker in the future.
+Please have a look at the issue [#1785](https://github.com/faker-js/faker/issues/1785).
+We will update these docs once a replacement is available.
+:::
+
Congratulations, you should now be able to create any complex object you desire. Happy faking 🥳.