Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(lorempixel.avatar): deprecate #1069

Merged
merged 4 commits into from
Jun 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/modules/image/providers/lorempixel.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Faker } from '../../..';
import { deprecated } from '../../../internal/deprecated';
import type { MethodsOf } from '../../../utils/types';

/**
Expand Down Expand Up @@ -40,12 +41,21 @@ export class Lorempixel {
/**
* 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 lorempixel.
avatar(): string {
deprecated({
deprecated: 'faker.image.lorempixel.avatar()',
proposed: 'faker.internet.avatar()',
since: '7.3',
until: '8.0',
});
return this.faker.internet.avatar();
}

Expand Down