From 922c55afb4ff8758626bc357bbf2620b101b3708 Mon Sep 17 00:00:00 2001 From: Shinigami92 Date: Sat, 17 Feb 2024 00:39:24 +0100 Subject: [PATCH] remove more --- docs/guide/upgrading_v9/2608.md | 3 +++ src/index.ts | 6 ++---- src/modules/datatype/index.ts | 4 +--- src/modules/image/index.ts | 2 -- src/modules/number/index.ts | 8 +++----- 5 files changed, 9 insertions(+), 14 deletions(-) create mode 100644 docs/guide/upgrading_v9/2608.md diff --git a/docs/guide/upgrading_v9/2608.md b/docs/guide/upgrading_v9/2608.md new file mode 100644 index 00000000000..d890809bdb4 --- /dev/null +++ b/docs/guide/upgrading_v9/2608.md @@ -0,0 +1,3 @@ +### Removed all v8 deprecations + +see title diff --git a/src/index.ts b/src/index.ts index fedbe7c28ad..edee4197d8a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -21,6 +21,8 @@ export type { LoremDefinition, MetadataDefinition, MusicDefinition, + /** @deprecated Use PersonDefinition instead */ + PersonDefinition as NameDefinition, PersonDefinition, PersonTitleDefinition, PhoneNumberDefinition, @@ -42,10 +44,6 @@ export type { AircraftType, AirlineModule } from './modules/airline'; export type { AnimalModule } from './modules/animal'; export { CssFunction, CssSpace } from './modules/color'; export type { - /** @deprecated Use CssFunctionType instead */ - CssFunctionType as CSSFunction, - /** @deprecated Use CssSpaceType instead */ - CssSpaceType as CSSSpace, Casing, ColorFormat, ColorModule, diff --git a/src/modules/datatype/index.ts b/src/modules/datatype/index.ts index 8b49dc5d239..d2282c9974b 100644 --- a/src/modules/datatype/index.ts +++ b/src/modules/datatype/index.ts @@ -1,12 +1,10 @@ import { SimpleModuleBase } from '../../internal/module-base'; /** - * Module to generate various primitive values and data types. + * Module to generate a boolean value. * * ### Overview * - * Most of the methods in this module are deprecated and have been moved to other modules like [`faker.number`](https://fakerjs.dev/api/number.html) and [`faker.string`](https://fakerjs.dev/api/string.html), see individual entries for replacements. - * * For a simple random true or false value, use [`boolean()`](https://fakerjs.dev/api/datatype.html#boolean). */ export class DatatypeModule extends SimpleModuleBase { diff --git a/src/modules/image/index.ts b/src/modules/image/index.ts index d396d5fa000..659529643b5 100644 --- a/src/modules/image/index.ts +++ b/src/modules/image/index.ts @@ -10,8 +10,6 @@ import { ModuleBase } from '../../internal/module-base'; * For a random placeholder image containing only solid color and text, use [`urlPlaceholder()`](https://fakerjs.dev/api/image.html#urlplaceholder) (uses a third-party service) or [`dataUri()`](https://fakerjs.dev/api/image.html#datauri) (returns a SVG string). * * For a random user avatar image, use [`avatar()`](https://fakerjs.dev/api/image.html#avatar). - * - * 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. */ export class ImageModule extends ModuleBase { /** diff --git a/src/modules/number/index.ts b/src/modules/number/index.ts index c995e671dbf..bfc6f2c4351 100644 --- a/src/modules/number/index.ts +++ b/src/modules/number/index.ts @@ -90,12 +90,10 @@ export class NumberModule extends SimpleModuleBase { * @param options Upper bound or options object. * @param options.min Lower bound for generated number, inclusive. Defaults to `0.0`. * @param options.max Upper bound for generated number, exclusive, unless `multipleOf`, `precision` or `fractionDigits` are passed. Defaults to `1.0`. - * @param options.precision Deprecated alias for `multipleOf`. Only one of `multipleOf`, `precision` or `fractionDigits` should be passed. * @param options.multipleOf The generated number will be a multiple of this parameter. Only one of `multipleOf`, `precision` or `fractionDigits` should be passed. * @param options.fractionDigits The maximum number of digits to appear after the decimal point, for example `2` will round to 2 decimal points. Only one of `multipleOf`, `precision` or `fractionDigits` should be passed. * * @throws When `min` is greater than `max`. - * @throws When `precision` is negative. * @throws When `multipleOf` is negative. * @throws When `fractionDigits` is negative. * @throws When `fractionDigits` and `multipleOf` is passed in the same options object. @@ -124,17 +122,17 @@ export class NumberModule extends SimpleModuleBase { */ min?: number; /** - * Upper bound for generated number, exclusive, unless `multipleOf`, `precision` or `fractionDigits` are passed. + * Upper bound for generated number, exclusive, unless `multipleOf` or `fractionDigits` are passed. * * @default 1.0 */ max?: number; /** - * The maximum number of digits to appear after the decimal point, for example `2` will round to 2 decimal points. Only one of `multipleOf`, `precision` or `fractionDigits` should be passed. + * The maximum number of digits to appear after the decimal point, for example `2` will round to 2 decimal points. Only one of `multipleOf` or `fractionDigits` should be passed. */ fractionDigits?: number; /** - * The generated number will be a multiple of this parameter. Only one of `multipleOf`, `precision` or `fractionDigits` should be passed. + * The generated number will be a multiple of this parameter. Only one of `multipleOf` or `fractionDigits` should be passed. */ multipleOf?: number; } = {}