From 86bb94e7368d327ed9c19451672dafc1be983c92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leyla=20J=C3=A4hnig?= Date: Thu, 16 Jun 2022 19:37:41 +0200 Subject: chore(unsplash.avatar): deprecate (#1062) --- src/modules/image/providers/unsplash.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/modules') diff --git a/src/modules/image/providers/unsplash.ts b/src/modules/image/providers/unsplash.ts index 45bd815c..2b66bca3 100644 --- a/src/modules/image/providers/unsplash.ts +++ b/src/modules/image/providers/unsplash.ts @@ -1,4 +1,5 @@ import type { Faker } from '../../..'; +import { deprecated } from '../../../internal/deprecated'; /** * Module to generate links to random images on `https://source.unsplash.com/`. @@ -30,12 +31,21 @@ export class Unsplash { /** * 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 unsplash. avatar(): string { + deprecated({ + deprecated: 'faker.image.unsplash.avatar()', + proposed: 'faker.internet.avatar()', + since: '7.3', + until: '8.0', + }); return this.faker.internet.avatar(); } -- cgit v1.2.3