From 902fc61028e08f2f6798f92daab56686b0f3bec2 Mon Sep 17 00:00:00 2001 From: xDivisionByZerox Date: Sun, 12 Jun 2022 13:48:02 +0200 Subject: [PATCH] chore(lorempicsum.avatar): deprecate --- src/modules/image/providers/lorempicsum.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/modules/image/providers/lorempicsum.ts b/src/modules/image/providers/lorempicsum.ts index 2586920513e..df8e70f9dd3 100644 --- a/src/modules/image/providers/lorempicsum.ts +++ b/src/modules/image/providers/lorempicsum.ts @@ -1,4 +1,5 @@ import type { Faker } from '../../..'; +import { deprecated } from '../../../internal/deprecated'; /** * Module to generate links to random images on `https://picsum.photos/`. @@ -73,12 +74,21 @@ export class LoremPicsum { /** * Returns a random avatar url. * + * @see faker.internet.avatar() + * * @example * faker.internet.avatar() * // 'https://cloudflare-ipfs.com/ipfs/Qmd3W5DuhgHirLHGVixi6V76LhCkZUz6pnFt5AJBiyvHye/avatar/315.jpg' + * + * @deprecated */ - // TODO ST-DDT 2022-03-11: Deprecate this method as it is duplicate and has nothing to do with lorempicsum. avatar(): string { + deprecated({ + deprecated: 'faker.image.lorempicsum.avatar()', + proposed: 'this.faker.internet.avatar()', + since: 'v7.3.0', + until: 'v8.0.0', + }); return this.faker.internet.avatar(); }