Skip to content

Commit 5ebfbb8

Browse files
committed
refactor(image)!: remove v8 deprecated providers
1 parent 23e52bf commit 5ebfbb8

File tree

6 files changed

+3
-828
lines changed

6 files changed

+3
-828
lines changed

docs/guide/upgrading_v9/2634.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Remove deprecated image providers
2+
3+
Removed deprecated image providers from `faker.image`.

src/modules/image/index.ts

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
import type { Faker } from '../..';
21
import { deprecated } from '../../internal/deprecated';
32
import { ModuleBase } from '../../internal/module-base';
43
import type { MethodsOf } from '../../utils/types';
5-
import { LoremPicsum } from './providers/lorempicsum';
6-
import { Placeholder } from './providers/placeholder';
7-
import { Unsplash } from './providers/unsplash';
84

95
/**
106
* Module to generate images.
@@ -20,35 +16,6 @@ import { Unsplash } from './providers/unsplash';
2016
* This module previously also contained methods for specifically themed images like "fashion" or "food", but these are now deprecated. If you need more control over image type, you can request categorized images using [`urlLoremFlickr()`](https://fakerjs.dev/api/image.html#urlloremflickr), use an image provider directly or provide your own set of placeholder images.
2117
*/
2218
export class ImageModule extends ModuleBase {
23-
/**
24-
* @deprecated Use `faker.image` instead.
25-
*/
26-
// eslint-disable-next-line deprecation/deprecation
27-
readonly unsplash: Unsplash;
28-
29-
/**
30-
* @deprecated Use `faker.image` instead.
31-
*/
32-
// eslint-disable-next-line deprecation/deprecation
33-
readonly lorempicsum: LoremPicsum;
34-
35-
/**
36-
* @deprecated Use `faker.image.urlPlaceholder` instead.
37-
*/
38-
// eslint-disable-next-line deprecation/deprecation
39-
readonly placeholder: Placeholder;
40-
41-
constructor(faker: Faker) {
42-
super(faker);
43-
44-
// eslint-disable-next-line deprecation/deprecation
45-
this.unsplash = new Unsplash(this.faker);
46-
// eslint-disable-next-line deprecation/deprecation
47-
this.lorempicsum = new LoremPicsum(this.faker);
48-
// eslint-disable-next-line deprecation/deprecation
49-
this.placeholder = new Placeholder(this.faker);
50-
}
51-
5219
/**
5320
* Generates a random avatar image url.
5421
*

src/modules/image/providers/lorempicsum.ts

Lines changed: 0 additions & 169 deletions
This file was deleted.

src/modules/image/providers/placeholder.ts

Lines changed: 0 additions & 129 deletions
This file was deleted.

0 commit comments

Comments
 (0)