From 2bf897464cdda53886380590d64236658102cdda Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Tue, 5 Mar 2024 06:10:07 +0100 Subject: [PATCH 01/17] infra(typescript-eslint): consistent-type-exports (#2714) --- .eslintrc.cjs | 1 + test/scripts/apidoc/signature.example.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index eb5c3e2318b..198153defc3 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -63,6 +63,7 @@ module.exports = defineConfig({ 'error', { default: 'array-simple', readonly: 'generic' }, ], + '@typescript-eslint/consistent-type-exports': 'error', '@typescript-eslint/consistent-type-imports': 'error', '@typescript-eslint/explicit-module-boundary-types': 'error', '@typescript-eslint/naming-convention': [ diff --git a/test/scripts/apidoc/signature.example.ts b/test/scripts/apidoc/signature.example.ts index af04ee90f2f..c42d2d454ce 100644 --- a/test/scripts/apidoc/signature.example.ts +++ b/test/scripts/apidoc/signature.example.ts @@ -4,7 +4,7 @@ import type { AlphaNumericChar } from '../../../src/modules/string'; import type { LiteralUnion } from '../../../src/utils/types'; // explicitly export types so they show up in the docs as decomposed types export type { NumberColorFormat, StringColorFormat } from '../../../src'; -export { AlphaNumericChar, Casing, ColorFormat, LiteralUnion }; +export type { AlphaNumericChar, Casing, ColorFormat, LiteralUnion }; /** * Parameter options type with default from signature. From e868060c87cbca3c1bf90465d61fc39a4eea1f9c Mon Sep 17 00:00:00 2001 From: Shinigami Date: Tue, 5 Mar 2024 10:56:25 +0100 Subject: [PATCH 02/17] refactor(date)!: remove v8 deprecated date methods (#2704) --- docs/guide/upgrading_v9/2704.md | 14 + src/modules/date/index.ts | 847 ++----------------- test/all-functional.spec.ts | 4 + test/modules/__snapshots__/date.spec.ts.snap | 216 ----- test/modules/date.spec.ts | 277 +----- 5 files changed, 87 insertions(+), 1271 deletions(-) create mode 100644 docs/guide/upgrading_v9/2704.md diff --git a/docs/guide/upgrading_v9/2704.md b/docs/guide/upgrading_v9/2704.md new file mode 100644 index 00000000000..26c2b46104e --- /dev/null +++ b/docs/guide/upgrading_v9/2704.md @@ -0,0 +1,14 @@ +### Remove deprecated date methods + +Removed deprecated date methods + +| old | replacement | +| -------------------------------------- | ------------------------------------------ | +| `faker.date.past(years, refDate)` | `faker.date.past({ years, refDate })` | +| `faker.date.future(years, refDate)` | `faker.date.future({ years, refDate })` | +| `faker.date.between(from, to)` | `faker.date.between({ from, to })` | +| `faker.date.betweens(from, to, count)` | `faker.date.betweens({ from, to, count })` | +| `faker.date.recent(days, refDate)` | `faker.date.recent({ days, refDate })` | +| `faker.date.soon(days, refDate)` | `faker.date.soon({ days, refDate })` | +| `faker.date.month({ abbr })` | `faker.date.month({ abbreviated })` | +| `faker.date.weekday({ abbr })` | `faker.date.weekday({ abbreviated })` | diff --git a/src/modules/date/index.ts b/src/modules/date/index.ts index 9e8002d2d9c..2729c8496a3 100644 --- a/src/modules/date/index.ts +++ b/src/modules/date/index.ts @@ -1,7 +1,6 @@ import type { Faker } from '../..'; import type { DateEntryDefinition } from '../../definitions'; import { FakerError } from '../../errors/faker-error'; -import { deprecated } from '../../internal/deprecated'; import { SimpleModuleBase } from '../../internal/module-base'; import { assertLocaleData } from '../../locale-proxy'; @@ -83,94 +82,23 @@ export class SimpleDateModule extends SimpleModuleBase { * * @since 8.0.0 */ - past(options?: { - /** - * The range of years the date may be in the past. - * - * @default 1 - */ - years?: number; - /** - * The date to use as reference point for the newly generated date. - * - * @default faker.defaultRefDate() - */ - refDate?: string | Date | number; - }): Date; - /** - * Generates a random date in the past. - * - * @param years The range of years the date may be in the past. Defaults to `1`. - * @param refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`. - * - * @see faker.date.recent(): For generating dates in the recent past (days instead of years). - * - * @example - * faker.date.past() // '2021-12-03T05:40:44.408Z' - * faker.date.past(10) // '2017-10-25T21:34:19.488Z' - * faker.date.past(10, '2020-01-01T00:00:00.000Z') // '2017-08-18T02:59:12.350Z' - * - * @since 2.0.1 - * - * @deprecated Use `faker.date.past({ years, refDate })` instead. - */ - past(years?: number, refDate?: string | Date | number): Date; - /** - * Generates a random date in the past. - * - * @param options The optional options object. - * @param options.years The range of years the date may be in the past. Defaults to `1`. - * @param options.refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`. - * @param legacyRefDate Deprecated, use `options.refDate` instead. - * - * @see faker.date.recent(): For generating dates in the recent past (days instead of years). - * - * @example - * faker.date.past() // '2021-12-03T05:40:44.408Z' - * faker.date.past({ years: 10 }) // '2017-10-25T21:34:19.488Z' - * faker.date.past({ years: 10, refDate: '2020-01-01T00:00:00.000Z' }) // '2017-08-18T02:59:12.350Z' - * - * @since 8.0.0 - */ - past( - options?: - | number - | { - /** - * The range of years the date may be in the past. - * - * @default 1 - */ - years?: number; - /** - * The date to use as reference point for the newly generated date. - * - * @default faker.defaultRefDate() - */ - refDate?: string | Date | number; - }, - legacyRefDate?: string | Date | number - ): Date; past( - options: - | number - | { - years?: number; - refDate?: string | Date | number; - } = {}, - legacyRefDate?: string | Date | number + options: { + /** + * The range of years the date may be in the past. + * + * @default 1 + */ + years?: number; + /** + * The date to use as reference point for the newly generated date. + * + * @default faker.defaultRefDate() + */ + refDate?: string | Date | number; + } = {} ): Date { - if (typeof options === 'number') { - deprecated({ - deprecated: 'faker.date.past(years, refDate)', - proposed: 'faker.date.past({ years, refDate })', - since: '8.0', - until: '9.0', - }); - options = { years: options }; - } - - const { years = 1, refDate = legacyRefDate } = options; + const { years = 1, refDate } = options; if (years <= 0) { throw new FakerError('Years must be greater than 0.'); @@ -205,94 +133,23 @@ export class SimpleDateModule extends SimpleModuleBase { * * @since 8.0.0 */ - future(options?: { - /** - * The range of years the date may be in the future. - * - * @default 1 - */ - years?: number; - /** - * The date to use as reference point for the newly generated date. - * - * @default faker.defaultRefDate() - */ - refDate?: string | Date | number; - }): Date; - /** - * Generates a random date in the future. - * - * @param years The range of years the date may be in the future. Defaults to `1`. - * @param refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`. - * - * @see faker.date.soon(): For generating dates in the near future (days instead of years). - * - * @example - * faker.date.future() // '2022-11-19T05:52:49.100Z' - * faker.date.future(10) // '2030-11-23T09:38:28.710Z' - * faker.date.future(10, '2020-01-01T00:00:00.000Z') // '2020-12-13T22:45:10.252Z' - * - * @since 2.0.1 - * - * @deprecated Use `faker.date.future({ years, refDate })` instead. - */ - future(years?: number, refDate?: string | Date | number): Date; - /** - * Generates a random date in the future. - * - * @param options The optional options object. - * @param options.years The range of years the date may be in the future. Defaults to `1`. - * @param options.refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`. - * @param legacyRefDate Deprecated, use `options.refDate` instead. - * - * @see faker.date.soon(): For generating dates in the near future (days instead of years). - * - * @example - * faker.date.future() // '2022-11-19T05:52:49.100Z' - * faker.date.future({ years: 10 }) // '2030-11-23T09:38:28.710Z' - * faker.date.future({ years: 10, refDate: '2020-01-01T00:00:00.000Z' }) // '2020-12-13T22:45:10.252Z' - * - * @since 8.0.0 - */ - future( - options?: - | number - | { - /** - * The range of years the date may be in the future. - * - * @default 1 - */ - years?: number; - /** - * The date to use as reference point for the newly generated date. - * - * @default faker.defaultRefDate() - */ - refDate?: string | Date | number; - }, - legacyRefDate?: string | Date | number - ): Date; future( - options: - | number - | { - years?: number; - refDate?: string | Date | number; - } = {}, - legacyRefDate?: string | Date | number + options: { + /** + * The range of years the date may be in the future. + * + * @default 1 + */ + years?: number; + /** + * The date to use as reference point for the newly generated date. + * + * @default faker.defaultRefDate() + */ + refDate?: string | Date | number; + } = {} ): Date { - if (typeof options === 'number') { - deprecated({ - deprecated: 'faker.date.future(years, refDate)', - proposed: 'faker.date.future({ years, refDate })', - since: '8.0', - until: '9.0', - }); - options = { years: options }; - } - - const { years = 1, refDate = legacyRefDate } = options; + const { years = 1, refDate } = options; if (years <= 0) { throw new FakerError('Years must be greater than 0.'); @@ -332,73 +189,7 @@ export class SimpleDateModule extends SimpleModuleBase { * The late date boundary. */ to: string | Date | number; - }): Date; - /** - * Generates a random date between the given boundaries. - * - * @param from The early date boundary. - * @param to The late date boundary. - * - * @example - * faker.date.between('2020-01-01T00:00:00.000Z', '2030-01-01T00:00:00.000Z') // '2026-05-16T02:22:53.002Z' - * - * @since 2.0.1 - * - * @deprecated Use `faker.date.between({ from, to })` instead. - */ - between(from: string | Date | number, to: string | Date | number): Date; - /** - * Generates a random date between the given boundaries. - * - * @param options The optional options object. - * @param options.from The early date boundary. - * @param options.to The late date boundary. - * @param legacyTo Deprecated, use `options.to` instead. - * - * @example - * faker.date.between({ from: '2020-01-01T00:00:00.000Z', to: '2030-01-01T00:00:00.000Z' }) // '2026-05-16T02:22:53.002Z' - * - * @since 8.0.0 - */ - between( - options: - | string - | Date - | number - | { - /** - * The early date boundary. - */ - from: string | Date | number; - /** - * The late date boundary. - */ - to: string | Date | number; - }, - legacyTo?: string | Date | number - ): Date; - between( - options: - | string - | Date - | number - | { - from: string | Date | number; - to: string | Date | number; - }, - legacyTo?: string | Date | number - ): Date { - if (options instanceof Date || typeof options !== 'object') { - deprecated({ - deprecated: 'faker.date.between(from, to)', - proposed: 'faker.date.between({ from, to })', - since: '8.0', - until: '9.0', - }); - // We use options as fallback for legacyTo avoid TS errors for unintended usage. - options = { from: options, to: legacyTo ?? options }; - } - + }): Date { const { from, to } = options; const fromMs = toDate(from, this.faker.defaultRefDate).getTime(); @@ -460,122 +251,7 @@ export class SimpleDateModule extends SimpleModuleBase { */ max: number; }; - }): Date[]; - /** - * Generates random dates between the given boundaries. - * - * @param from The early date boundary. - * @param to The late date boundary. - * @param count The number of dates to generate. Defaults to `3`. - * @param count.min The minimum number of dates to generate. - * @param count.max The maximum number of dates to generate. - * - * @example - * faker.date.betweens('2020-01-01T00:00:00.000Z', '2030-01-01T00:00:00.000Z') - * // [ - * // 2022-07-02T06:00:00.000Z, - * // 2024-12-31T12:00:00.000Z, - * // 2027-07-02T18:00:00.000Z - * // ] - * faker.date.betweens('2020-01-01T00:00:00.000Z', '2030-01-01T00:00:00.000Z', 2) - * // [ 2023-05-02T16:00:00.000Z, 2026-09-01T08:00:00.000Z ] - * - * @since 5.4.0 - * - * @deprecated Use `faker.date.betweens({ from, to, count })` instead. - */ - betweens( - from: string | Date | number, - to: string | Date | number, - count?: number - ): Date[]; - /** - * Generates random dates between the given boundaries. - * - * @param options The optional options object. - * @param options.from The early date boundary. - * @param options.to The late date boundary. - * @param options.count The number of dates to generate. Defaults to `3`. - * @param legacyTo Deprecated, use `options.to` instead. - * @param legacyCount Deprecated, use `options.count` instead. Defaults to `3`. - * - * @example - * faker.date.betweens({ from: '2020-01-01T00:00:00.000Z', to: '2030-01-01T00:00:00.000Z' }) - * // [ - * // 2022-07-02T06:00:00.000Z, - * // 2024-12-31T12:00:00.000Z, - * // 2027-07-02T18:00:00.000Z - * // ] - * faker.date.betweens({ from: '2020-01-01T00:00:00.000Z', to: '2030-01-01T00:00:00.000Z', count: 2 }) - * // [ 2023-05-02T16:00:00.000Z, 2026-09-01T08:00:00.000Z ] - * faker.date.betweens({ from: '2020-01-01T00:00:00.000Z', to: '2030-01-01T00:00:00.000Z', count: { min: 2, max: 5 }}) - * // [ - * // 2021-12-19T06:35:40.191Z, - * // 2022-09-10T08:03:51.351Z, - * // 2023-04-19T11:41:17.501Z - * // ] - * - * @since 8.0.0 - */ - betweens( - options: - | string - | Date - | number - | { - /** - * The early date boundary. - */ - from: string | Date | number; - /** - * The late date boundary. - */ - to: string | Date | number; - /** - * The number of dates to generate. - * - * @default 3 - */ - count?: - | number - | { - /** - * The minimum number of dates to generate. - */ - min: number; - /** - * The maximum number of dates to generate. - */ - max: number; - }; - }, - legacyTo?: string | Date | number, - legacyCount?: number - ): Date[]; - betweens( - options: - | string - | Date - | number - | { - from: string | Date | number; - to: string | Date | number; - count?: number | { min: number; max: number }; - }, - legacyTo?: string | Date | number, - legacyCount: number = 3 - ): Date[] { - if (options instanceof Date || typeof options !== 'object') { - deprecated({ - deprecated: 'faker.date.betweens(from, to, count)', - proposed: 'faker.date.betweens({ from, to, count })', - since: '8.0', - until: '9.0', - }); - // We use options as fallback for legacyTo avoid TS errors for unintended usage. - options = { from: options, to: legacyTo ?? options, count: legacyCount }; - } - + }): Date[] { const { from, to, count = 3 } = options; return this.faker.helpers @@ -599,89 +275,23 @@ export class SimpleDateModule extends SimpleModuleBase { * * @since 8.0.0 */ - recent(options?: { - /** - * The range of days the date may be in the past. - * - * @default 1 - */ - days?: number; - /** - * The date to use as reference point for the newly generated date. - * - * @default faker.defaultRefDate() - */ - refDate?: string | Date | number; - }): Date; - /** - * Generates a random date in the recent past. - * - * @param days The range of days the date may be in the past. Defaults to `1`. - * @param refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`. - * - * @see faker.date.past(): For generating dates further back in time (years instead of days). - * - * @example - * faker.date.recent() // '2022-02-04T02:09:35.077Z' - * faker.date.recent(10) // '2022-01-29T06:12:12.829Z' - * faker.date.recent(10, '2020-01-01T00:00:00.000Z') // '2019-12-27T18:11:19.117Z' - * - * @since 2.0.1 - * - * @deprecated Use `faker.date.recent({ days, refDate })` instead. - */ - recent(days?: number, refDate?: string | Date | number): Date; - /** - * Generates a random date in the recent past. - * - * @param options The optional options object. - * @param options.days The range of days the date may be in the past. Defaults to `1`. - * @param options.refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`. - * @param legacyRefDate Deprecated, use `options.refDate` instead. - * - * @see faker.date.past(): For generating dates further back in time (years instead of days). - * - * @example - * faker.date.recent() // '2022-02-04T02:09:35.077Z' - * faker.date.recent({ days: 10 }) // '2022-01-29T06:12:12.829Z' - * faker.date.recent({ days: 10, refDate: '2020-01-01T00:00:00.000Z' }) // '2019-12-27T18:11:19.117Z' - * - * @since 8.0.0 - */ - recent( - options?: - | number - | { - /** - * The range of days the date may be in the past. - * - * @default 1 - */ - days?: number; - /** - * The date to use as reference point for the newly generated date. - * - * @default faker.defaultRefDate() - */ - refDate?: string | Date | number; - }, - legacyRefDate?: string | Date | number - ): Date; recent( - options: number | { days?: number; refDate?: string | Date | number } = {}, - legacyRefDate?: string | Date | number + options: { + /** + * The range of days the date may be in the past. + * + * @default 1 + */ + days?: number; + /** + * The date to use as reference point for the newly generated date. + * + * @default faker.defaultRefDate() + */ + refDate?: string | Date | number; + } = {} ): Date { - if (typeof options === 'number') { - deprecated({ - deprecated: 'faker.date.recent(days, refDate)', - proposed: 'faker.date.recent({ days, refDate })', - since: '8.0', - until: '9.0', - }); - options = { days: options }; - } - - const { days = 1, refDate = legacyRefDate } = options; + const { days = 1, refDate } = options; if (days <= 0) { throw new FakerError('Days must be greater than 0.'); @@ -716,89 +326,23 @@ export class SimpleDateModule extends SimpleModuleBase { * * @since 8.0.0 */ - soon(options?: { - /** - * The range of days the date may be in the future. - * - * @default 1 - */ - days?: number; - /** - * The date to use as reference point for the newly generated date. - * - * @default faker.defaultRefDate() - */ - refDate?: string | Date | number; - }): Date; - /** - * Generates a random date in the near future. - * - * @param days The range of days the date may be in the future. Defaults to `1`. - * @param refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`. - * - * @see faker.date.future(): For generating dates further in the future (years instead of days). - * - * @example - * faker.date.soon() // '2022-02-05T09:55:39.216Z' - * faker.date.soon(10) // '2022-02-11T05:14:39.138Z' - * faker.date.soon(10, '2020-01-01T00:00:00.000Z') // '2020-01-01T02:40:44.990Z' - * - * @since 5.0.0 - * - * @deprecated Use `faker.date.soon({ days, refDate })` instead. - */ - soon(days?: number, refDate?: string | Date | number): Date; - /** - * Generates a random date in the near future. - * - * @param options The optional options object. - * @param options.days The range of days the date may be in the future. Defaults to `1`. - * @param options.refDate The date to use as reference point for the newly generated date. Defaults to `faker.defaultRefDate()`. - * @param legacyRefDate Deprecated, use `options.refDate` instead. - * - * @see faker.date.future(): For generating dates further in the future (years instead of days). - * - * @example - * faker.date.soon() // '2022-02-05T09:55:39.216Z' - * faker.date.soon({ days: 10 }) // '2022-02-11T05:14:39.138Z' - * faker.date.soon({ days: 10, refDate: '2020-01-01T00:00:00.000Z' }) // '2020-01-01T02:40:44.990Z' - * - * @since 8.0.0 - */ soon( - options?: - | number - | { - /** - * The range of days the date may be in the future. - * - * @default 1 - */ - days?: number; - /** - * The date to use as reference point for the newly generated date. - * - * @default faker.defaultRefDate() - */ - refDate?: string | Date | number; - }, - legacyRefDate?: string | Date | number - ): Date; - soon( - options: number | { days?: number; refDate?: string | Date | number } = {}, - legacyRefDate?: string | Date | number + options: { + /** + * The range of days the date may be in the future. + * + * @default 1 + */ + days?: number; + /** + * The date to use as reference point for the newly generated date. + * + * @default faker.defaultRefDate() + */ + refDate?: string | Date | number; + } = {} ): Date { - if (typeof options === 'number') { - deprecated({ - deprecated: 'faker.date.soon(days, refDate)', - proposed: 'faker.date.soon({ days, refDate })', - since: '8.0', - until: '9.0', - }); - options = { days: options }; - } - - const { days = 1, refDate = legacyRefDate } = options; + const { days = 1, refDate } = options; if (days <= 0) { throw new FakerError('Days must be greater than 0.'); @@ -940,129 +484,8 @@ export class DateModule extends SimpleDateModule { * * @since 3.0.1 */ - month(options?: { - /** - * Whether to return an abbreviation. - * - * @default false - */ - abbreviated?: boolean; - /** - * Whether to return the name of a month in the context of a date. - * - * In the default `en` locale this has no effect, - * however, in other locales like `fr` or `ru`, this may affect grammar or capitalization, - * for example `'январь'` with `{ context: false }` and `'января'` with `{ context: true }` in `ru`. - * - * @default false - */ - context?: boolean; - }): string; - /** - * Returns a random name of a month. - * - * @param options The optional options to use. - * @param options.abbr Deprecated, use `abbreviated` instead. - * @param options.context Whether to return the name of a month in the context of a date. In the default `en` locale this has no effect, however, in other locales like `fr` or `ru`, this may affect grammar or capitalization, for example `'январь'` with `{ context: false }` and `'января'` with `{ context: true }` in `ru`. Defaults to `false`. - * - * @example - * faker.date.month() // 'October' - * faker.date.month({ abbr: true }) // 'Feb' - * faker.date.month({ context: true }) // 'June' - * faker.date.month({ abbr: true, context: true }) // 'Sep' - * - * @since 3.0.1 - * - * @deprecated Use `faker.date.month({ abbreviated, ... })` instead. - */ - month(options?: { - /** - * Whether to return an abbreviation. - * - * @default false - * - * @deprecated Use `abbreviated` instead. - */ - abbr?: boolean; - /** - * Whether to return the name of a month in the context of a date. - * - * In the default `en` locale this has no effect, - * however, in other locales like `fr` or `ru`, this may affect grammar or capitalization, - * for example `'январь'` with `{ context: false }` and `'января'` with `{ context: true }` in `ru`. - * - * @default false - */ - context?: boolean; - }): string; - /** - * Returns a random name of a month. - * - * @param options The optional options to use. - * @param options.abbr Deprecated, use `abbreviated` instead. - * @param options.abbreviated Whether to return an abbreviation. Defaults to `false`. - * @param options.context Whether to return the name of a month in the context of a date. In the default `en` locale this has no effect, however, in other locales like `fr` or `ru`, this may affect grammar or capitalization, for example `'январь'` with `{ context: false }` and `'января'` with `{ context: true }` in `ru`. Defaults to `false`. - * - * @example - * faker.date.month() // 'October' - * faker.date.month({ abbreviated: true }) // 'Feb' - * faker.date.month({ context: true }) // 'June' - * faker.date.month({ abbreviated: true, context: true }) // 'Sep' - * - * @since 3.0.1 - */ - month(options?: { - /** - * Whether to return an abbreviation. - * - * @default false - * - * @deprecated Use `abbreviated` instead. - */ - abbr?: boolean; - /** - * Whether to return an abbreviation. - * - * @default false - */ - abbreviated?: boolean; - /** - * Whether to return the name of a month in the context of a date. - * - * In the default `en` locale this has no effect, - * however, in other locales like `fr` or `ru`, this may affect grammar or capitalization, - * for example `'январь'` with `{ context: false }` and `'января'` with `{ context: true }` in `ru`. - * - * @default false - */ - context?: boolean; - }): string; - /** - * Returns a random name of a month. - * - * @param options The optional options to use. - * @param options.abbr Deprecated, use `abbreviated` instead. - * @param options.abbreviated Whether to return an abbreviation. Defaults to `false`. - * @param options.context Whether to return the name of a month in the context of a date. In the default `en` locale this has no effect, however, in other locales like `fr` or `ru`, this may affect grammar or capitalization, for example `'январь'` with `{ context: false }` and `'января'` with `{ context: true }` in `ru`. Defaults to `false`. - * - * @example - * faker.date.month() // 'October' - * faker.date.month({ abbreviated: true }) // 'Feb' - * faker.date.month({ context: true }) // 'June' - * faker.date.month({ abbreviated: true, context: true }) // 'Sep' - * - * @since 3.0.1 - */ month( options: { - /** - * Whether to return an abbreviation. - * - * @default false - * - * @deprecated Use `abbreviated` instead. - */ - abbr?: boolean; /** * Whether to return an abbreviation. * @@ -1081,17 +504,7 @@ export class DateModule extends SimpleDateModule { context?: boolean; } = {} ): string { - // eslint-disable-next-line deprecation/deprecation - const { abbr, abbreviated = abbr ?? false, context = false } = options; - - if (abbr != null) { - deprecated({ - deprecated: 'faker.date.month({ abbr })', - proposed: 'faker.date.month({ abbreviated })', - since: '8.0', - until: '9.0', - }); - } + const { abbreviated = false, context = false } = options; const source = this.faker.definitions.date.month; let type: keyof DateEntryDefinition; @@ -1123,130 +536,8 @@ export class DateModule extends SimpleDateModule { * * @since 3.0.1 */ - weekday(options?: { - /** - * Whether to return an abbreviation. - * - * @default false - */ - abbreviated?: boolean; - /** - * Whether to return the day of the week in the context of a date. - * - * In the default `en` locale this has no effect, - * however, in other locales like `fr` or `ru`, this may affect grammar or capitalization, - * for example `'Lundi'` with `{ context: false }` and `'lundi'` with `{ context: true }` in `fr`. - * - * @default false - */ - context?: boolean; - }): string; - /** - * Returns a random day of the week. - * - * @param options The optional options to use. - * @param options.abbr Deprecated, use `abbreviated` instead. - * @param options.abbreviated Whether to return an abbreviation. Defaults to `false`. - * @param options.context Whether to return the day of the week in the context of a date. In the default `en` locale this has no effect, however, in other locales like `fr` or `ru`, this may affect grammar or capitalization, for example `'Lundi'` with `{ context: false }` and `'lundi'` with `{ context: true }` in `fr`. Defaults to `false`. - * - * @example - * faker.date.weekday() // 'Monday' - * faker.date.weekday({ abbr: true }) // 'Thu' - * faker.date.weekday({ context: true }) // 'Thursday' - * faker.date.weekday({ abbr: true, context: true }) // 'Fri' - * - * @since 3.0.1 - * - * @deprecated Use `faker.date.weekday({ abbreviated, ... })` instead. - */ - weekday(options?: { - /** - * Whether to return an abbreviation. - * - * @default false - * - * @deprecated Use `abbreviated` instead. - */ - abbr?: boolean; - /** - * Whether to return the day of the week in the context of a date. - * - * In the default `en` locale this has no effect, - * however, in other locales like `fr` or `ru`, this may affect grammar or capitalization, - * for example `'Lundi'` with `{ context: false }` and `'lundi'` with `{ context: true }` in `fr`. - * - * @default false - */ - context?: boolean; - }): string; - /** - * Returns a random day of the week. - * - * @param options The optional options to use. - * @param options.abbr Deprecated, use `abbreviated` instead. - * @param options.abbreviated Whether to return an abbreviation. Defaults to `false`. - * @param options.context Whether to return the day of the week in the context of a date. In the default `en` locale this has no effect, however, in other locales like `fr` or `ru`, this may affect grammar or capitalization, for example `'Lundi'` with `{ context: false }` and `'lundi'` with `{ context: true }` in `fr`. Defaults to `false`. - * - * @example - * faker.date.weekday() // 'Monday' - * faker.date.weekday({ abbreviated: true }) // 'Thu' - * faker.date.weekday({ context: true }) // 'Thursday' - * faker.date.weekday({ abbreviated: true, context: true }) // 'Fri' - * - * @since 3.0.1 - */ - weekday(options?: { - /** - * Whether to return an abbreviation. - * - * @default false - * - * @deprecated Use `abbreviated` instead. - */ - abbr?: boolean; - /** - * Whether to return an abbreviation. - * - * @default false - */ - abbreviated?: boolean; - /** - * Whether to return the day of the week in the context of a date. - * - * In the default `en` locale this has no effect, - * however, in other locales like `fr` or `ru`, this may affect grammar or capitalization, - * for example `'Lundi'` with `{ context: false }` and `'lundi'` with `{ context: true }` in `fr`. - * - * @default false - */ - context?: boolean; - }): string; - /** - * Returns a random day of the week. - * - * @param options The optional options to use. - * @param options.abbr Deprecated, use `abbreviated` instead. - * @param options.abbreviated Whether to return an abbreviation. Defaults to `false`. - * @param options.context Whether to return the day of the week in the context of a date. In the default `en` locale this has no effect, however, in other locales like `fr` or `ru`, this may affect grammar or capitalization, for example `'Lundi'` with `{ context: false }` and `'lundi'` with `{ context: true }` in `fr`. Defaults to `false`. - * - * @example - * faker.date.weekday() // 'Monday' - * faker.date.weekday({ abbreviated: true }) // 'Thu' - * faker.date.weekday({ context: true }) // 'Thursday' - * faker.date.weekday({ abbreviated: true, context: true }) // 'Fri' - * - * @since 3.0.1 - */ weekday( options: { - /** - * Whether to return an abbreviation. - * - * @default false - * - * @deprecated Use `abbreviated` instead. - */ - abbr?: boolean; /** * Whether to return an abbreviation. * @@ -1265,17 +556,7 @@ export class DateModule extends SimpleDateModule { context?: boolean; } = {} ): string { - // eslint-disable-next-line deprecation/deprecation - const { abbr, abbreviated = abbr ?? false, context = false } = options; - - if (abbr != null) { - deprecated({ - deprecated: 'faker.date.weekday({ abbr })', - proposed: 'faker.date.weekday({ abbreviated })', - since: '8.0', - until: '9.0', - }); - } + const { abbreviated = false, context = false } = options; const source = this.faker.definitions.date.weekday; let type: keyof DateEntryDefinition; diff --git a/test/all-functional.spec.ts b/test/all-functional.spec.ts index 5f7618ff81b..51540feb518 100644 --- a/test/all-functional.spec.ts +++ b/test/all-functional.spec.ts @@ -49,6 +49,10 @@ const BROKEN_LOCALE_METHODS = { suffixes: ['az'], companySuffix: ['az'], }, + date: { + between: '*', + betweens: '*', + }, location: { state: ['az', 'nb_NO', 'ro_MD', 'sk'], stateAbbr: ['cs_CZ', 'ro_MD', 'sk'], diff --git a/test/modules/__snapshots__/date.spec.ts.snap b/test/modules/__snapshots__/date.spec.ts.snap index 1b28f47bd47..9b3c3d7659b 100644 --- a/test/modules/__snapshots__/date.spec.ts.snap +++ b/test/modules/__snapshots__/date.spec.ts.snap @@ -380,219 +380,3 @@ exports[`date > 1337 > weekday > with abbreviated = true 1`] = `"Mon"`; exports[`date > 1337 > weekday > with abbreviated = true and context = true 1`] = `"Mon"`; exports[`date > 1337 > weekday > with context = true 1`] = `"Monday"`; - -exports[`date > deprecated > 42 > between > with Date dates 1`] = `2021-03-15T19:30:57.115Z`; - -exports[`date > deprecated > 42 > between > with string dates 1`] = `2021-03-15T19:30:57.115Z`; - -exports[`date > deprecated > 42 > betweens > with Date dates 1`] = ` -[ - 2021-03-15T19:30:57.115Z, - 2021-04-05T21:40:57.332Z, - 2021-04-18T19:23:52.947Z, -] -`; - -exports[`date > deprecated > 42 > betweens > with Date dates and count 1`] = ` -[ - 2021-03-02T22:04:55.366Z, - 2021-03-15T19:30:57.115Z, - 2021-03-29T00:52:30.236Z, - 2021-04-05T21:40:57.332Z, - 2021-04-18T19:23:52.947Z, -] -`; - -exports[`date > deprecated > 42 > betweens > with string dates 1`] = ` -[ - 2021-03-15T19:30:57.115Z, - 2021-04-05T21:40:57.332Z, - 2021-04-18T19:23:52.947Z, -] -`; - -exports[`date > deprecated > 42 > betweens > with string dates and count 1`] = ` -[ - 2021-03-02T22:04:55.366Z, - 2021-03-15T19:30:57.115Z, - 2021-03-29T00:52:30.236Z, - 2021-04-05T21:40:57.332Z, - 2021-04-18T19:23:52.947Z, -] -`; - -exports[`date > deprecated > 42 > future > with only Date refDate 1`] = `2021-07-08T10:07:33.524Z`; - -exports[`date > deprecated > 42 > future > with only number refDate 1`] = `2021-07-08T10:07:33.524Z`; - -exports[`date > deprecated > 42 > future > with only string refDate 1`] = `2021-07-08T10:07:33.524Z`; - -exports[`date > deprecated > 42 > future > with value 1`] = `2024-11-19T18:52:08.216Z`; - -exports[`date > deprecated > 42 > past > with only Date refDate 1`] = `2020-10-08T00:10:57.898Z`; - -exports[`date > deprecated > 42 > past > with only number refDate 1`] = `2020-10-08T00:10:57.898Z`; - -exports[`date > deprecated > 42 > past > with only string refDate 1`] = `2020-10-08T00:10:57.898Z`; - -exports[`date > deprecated > 42 > past > with value 1`] = `2017-05-26T15:26:23.206Z`; - -exports[`date > deprecated > 42 > recent > with only Date refDate 1`] = `2021-02-21T08:09:54.819Z`; - -exports[`date > deprecated > 42 > recent > with only number refDate 1`] = `2021-02-21T08:09:54.819Z`; - -exports[`date > deprecated > 42 > recent > with only string refDate 1`] = `2021-02-21T08:09:54.819Z`; - -exports[`date > deprecated > 42 > recent > with value 1`] = `2021-02-17T23:15:52.423Z`; - -exports[`date > deprecated > 42 > soon > with only Date refDate 1`] = `2021-02-22T02:08:36.603Z`; - -exports[`date > deprecated > 42 > soon > with only number refDate 1`] = `2021-02-22T02:08:36.603Z`; - -exports[`date > deprecated > 42 > soon > with only string refDate 1`] = `2021-02-22T02:08:36.603Z`; - -exports[`date > deprecated > 42 > soon > with value 1`] = `2021-02-25T11:02:38.999Z`; - -exports[`date > deprecated > 1211 > between > with Date dates 1`] = `2021-04-17T11:58:13.327Z`; - -exports[`date > deprecated > 1211 > between > with string dates 1`] = `2021-04-17T11:58:13.327Z`; - -exports[`date > deprecated > 1211 > betweens > with Date dates 1`] = ` -[ - 2021-03-07T00:34:12.745Z, - 2021-04-15T10:20:25.794Z, - 2021-04-17T11:58:13.327Z, -] -`; - -exports[`date > deprecated > 1211 > betweens > with Date dates and count 1`] = ` -[ - 2021-03-07T00:34:12.745Z, - 2021-04-02T08:42:57.721Z, - 2021-04-15T10:20:25.794Z, - 2021-04-17T11:58:13.327Z, - 2021-04-21T13:18:14.822Z, -] -`; - -exports[`date > deprecated > 1211 > betweens > with string dates 1`] = ` -[ - 2021-03-07T00:34:12.745Z, - 2021-04-15T10:20:25.794Z, - 2021-04-17T11:58:13.327Z, -] -`; - -exports[`date > deprecated > 1211 > betweens > with string dates and count 1`] = ` -[ - 2021-03-07T00:34:12.745Z, - 2021-04-02T08:42:57.721Z, - 2021-04-15T10:20:25.794Z, - 2021-04-17T11:58:13.327Z, - 2021-04-21T13:18:14.822Z, -] -`; - -exports[`date > deprecated > 1211 > future > with only Date refDate 1`] = `2022-01-26T14:59:27.356Z`; - -exports[`date > deprecated > 1211 > future > with only number refDate 1`] = `2022-01-26T14:59:27.356Z`; - -exports[`date > deprecated > 1211 > future > with only string refDate 1`] = `2022-01-26T14:59:27.356Z`; - -exports[`date > deprecated > 1211 > future > with value 1`] = `2030-06-03T19:31:11.518Z`; - -exports[`date > deprecated > 1211 > past > with only Date refDate 1`] = `2020-03-19T19:19:04.066Z`; - -exports[`date > deprecated > 1211 > past > with only number refDate 1`] = `2020-03-19T19:19:04.066Z`; - -exports[`date > deprecated > 1211 > past > with only string refDate 1`] = `2020-03-19T19:19:04.066Z`; - -exports[`date > deprecated > 1211 > past > with value 1`] = `2011-11-12T14:47:19.904Z`; - -exports[`date > deprecated > 1211 > recent > with only Date refDate 1`] = `2021-02-20T18:52:11.498Z`; - -exports[`date > deprecated > 1211 > recent > with only number refDate 1`] = `2021-02-20T18:52:11.498Z`; - -exports[`date > deprecated > 1211 > recent > with only string refDate 1`] = `2021-02-20T18:52:11.498Z`; - -exports[`date > deprecated > 1211 > recent > with value 1`] = `2021-02-12T10:18:34.226Z`; - -exports[`date > deprecated > 1211 > soon > with only Date refDate 1`] = `2021-02-22T15:26:19.924Z`; - -exports[`date > deprecated > 1211 > soon > with only number refDate 1`] = `2021-02-22T15:26:19.924Z`; - -exports[`date > deprecated > 1211 > soon > with only string refDate 1`] = `2021-02-22T15:26:19.924Z`; - -exports[`date > deprecated > 1211 > soon > with value 1`] = `2021-03-02T23:59:57.196Z`; - -exports[`date > deprecated > 1337 > between > with Date dates 1`] = `2021-03-09T04:11:24.661Z`; - -exports[`date > deprecated > 1337 > between > with string dates 1`] = `2021-03-09T04:11:24.661Z`; - -exports[`date > deprecated > 1337 > betweens > with Date dates 1`] = ` -[ - 2021-03-03T01:51:22.487Z, - 2021-03-09T04:11:24.661Z, - 2021-03-10T02:59:27.388Z, -] -`; - -exports[`date > deprecated > 1337 > betweens > with Date dates and count 1`] = ` -[ - 2021-03-03T01:51:22.487Z, - 2021-03-09T04:11:24.661Z, - 2021-03-10T02:59:27.388Z, - 2021-03-12T15:42:07.228Z, - 2021-03-20T19:33:45.512Z, -] -`; - -exports[`date > deprecated > 1337 > betweens > with string dates 1`] = ` -[ - 2021-03-03T01:51:22.487Z, - 2021-03-09T04:11:24.661Z, - 2021-03-10T02:59:27.388Z, -] -`; - -exports[`date > deprecated > 1337 > betweens > with string dates and count 1`] = ` -[ - 2021-03-03T01:51:22.487Z, - 2021-03-09T04:11:24.661Z, - 2021-03-10T02:59:27.388Z, - 2021-03-12T15:42:07.228Z, - 2021-03-20T19:33:45.512Z, -] -`; - -exports[`date > deprecated > 1337 > future > with only Date refDate 1`] = `2021-05-28T08:29:26.600Z`; - -exports[`date > deprecated > 1337 > future > with only number refDate 1`] = `2021-05-28T08:29:26.600Z`; - -exports[`date > deprecated > 1337 > future > with only string refDate 1`] = `2021-05-28T08:29:26.600Z`; - -exports[`date > deprecated > 1337 > future > with value 1`] = `2023-10-06T02:30:57.962Z`; - -exports[`date > deprecated > 1337 > past > with only Date refDate 1`] = `2020-11-18T01:49:04.822Z`; - -exports[`date > deprecated > 1337 > past > with only number refDate 1`] = `2020-11-18T01:49:04.822Z`; - -exports[`date > deprecated > 1337 > past > with only string refDate 1`] = `2020-11-18T01:49:04.822Z`; - -exports[`date > deprecated > 1337 > past > with value 1`] = `2018-07-11T07:47:33.460Z`; - -exports[`date > deprecated > 1337 > recent > with only Date refDate 1`] = `2021-02-21T10:51:56.041Z`; - -exports[`date > deprecated > 1337 > recent > with only number refDate 1`] = `2021-02-21T10:51:56.041Z`; - -exports[`date > deprecated > 1337 > recent > with only string refDate 1`] = `2021-02-21T10:51:56.041Z`; - -exports[`date > deprecated > 1337 > recent > with value 1`] = `2021-02-19T02:16:05.654Z`; - -exports[`date > deprecated > 1337 > soon > with only Date refDate 1`] = `2021-02-21T23:26:35.381Z`; - -exports[`date > deprecated > 1337 > soon > with only number refDate 1`] = `2021-02-21T23:26:35.381Z`; - -exports[`date > deprecated > 1337 > soon > with only string refDate 1`] = `2021-02-21T23:26:35.381Z`; - -exports[`date > deprecated > 1337 > soon > with value 1`] = `2021-02-24T08:02:25.768Z`; diff --git a/test/modules/date.spec.ts b/test/modules/date.spec.ts index d2e0833719c..303dc407524 100644 --- a/test/modules/date.spec.ts +++ b/test/modules/date.spec.ts @@ -141,66 +141,6 @@ describe('date', () => { }); }); - describe('deprecated', () => { - seededTests(faker, 'date', (t) => { - t.describeEach( - 'past', - 'recent', - 'soon', - 'future' - )((t) => { - t.it('with only string refDate', undefined, refDate) - .it('with only Date refDate', undefined, new Date(refDate)) - .it( - 'with only number refDate', - undefined, - new Date(refDate).getTime() - ) - .it('with value', 10, refDate); - }); - - t.describe('between', (t) => { - t.it( - 'with string dates', - '2021-02-21T17:09:15.711Z', - '2021-04-21T17:11:17.711Z' - ).it( - 'with Date dates', - new Date('2021-02-21T17:09:15.711Z'), - new Date('2021-04-21T17:11:17.711Z') - ); - }); - - t.describe('betweens', (t) => { - t.it( - 'with string dates', - '2021-02-21T17:09:15.711Z', - '2021-04-21T17:11:17.711Z' - ) - .it( - 'with Date dates', - new Date('2021-02-21T17:09:15.711Z'), - new Date('2021-04-21T17:11:17.711Z') - ) - .it( - 'with string dates and count', - '2021-02-21T17:09:15.711Z', - '2021-04-21T17:11:17.711Z', - 5 - ) - .it( - 'with Date dates and count', - new Date('2021-02-21T17:09:15.711Z'), - new Date('2021-04-21T17:11:17.711Z'), - 5 - ); - }); - - // No changes to these methods - t.skip('anytime').skip('birthdate').skip('month').skip('weekday'); - }); - }); - describe.each(times(NON_SEEDED_BASED_RUN).map(() => faker.seed()))( 'random seeded tests for seed %i', () => { @@ -325,11 +265,11 @@ describe('date', () => { const from = new Date(1990, 5, 7, 9, 11, 0, 0); const to = new Date(2000, 6, 8, 10, 12, 0, 0); - const dates = faker.date.betweens( - converter(from), - converter(to), - 2 - ); + const dates = faker.date.betweens({ + from: converter(from), + to: converter(to), + count: 2, + }); expect(dates).toHaveLength(2); @@ -458,22 +398,11 @@ describe('date', () => { expect(fakerAZ.definitions.date.month.wide_context).toContain(month); }); - it('should return random value from date.month.abbr array for abbr option', () => { - const month = faker.date.month({ abbr: true }); - expect(faker.definitions.date.month.abbr).toContain(month); - }); - it('should return random value from date.month.abbr array for abbreviated option', () => { const month = faker.date.month({ abbreviated: true }); expect(faker.definitions.date.month.abbr).toContain(month); }); - it('should return random value from date.month.abbr_context array for abbr and context option', () => { - // Use a locale (e.g. az) which has a wide_context array - const month = fakerAZ.date.month({ abbr: true, context: true }); - expect(fakerAZ.definitions.date.month.abbr_context).toContain(month); - }); - it('should return random value from date.month.abbr_context array for abbreviated and context option', () => { // Use a locale (e.g. az) which has a wide_context array const month = fakerAZ.date.month({ @@ -489,12 +418,6 @@ describe('date', () => { expect(faker.definitions.date.month.wide).toContain(month); }); - it('should return random value from date.month.abbr array for abbr and context option when date.month.abbr_context array is missing', () => { - // Use a locale (e.g. the default en) which has no abbr_context array - const month = faker.date.month({ abbr: true, context: true }); - expect(faker.definitions.date.month.abbr).toContain(month); - }); - it('should return random value from date.month.abbr array for abbreviated and context option when date.month.abbr_context array is missing', () => { // Use a locale (e.g. the default en) which has no abbr_context array const month = faker.date.month({ abbreviated: true, context: true }); @@ -516,24 +439,11 @@ describe('date', () => { ); }); - it('should return random value from date.weekday.abbr array for abbr option', () => { - const weekday = faker.date.weekday({ abbr: true }); - expect(faker.definitions.date.weekday.abbr).toContain(weekday); - }); - it('should return random value from date.weekday.abbr array for abbreviated option', () => { const weekday = faker.date.weekday({ abbreviated: true }); expect(faker.definitions.date.weekday.abbr).toContain(weekday); }); - it('should return random value from date.weekday.abbr_context array for abbr and context option', () => { - // Use a locale (e.g. az) which has a abbr_context array - const weekday = fakerAZ.date.weekday({ abbr: true, context: true }); - expect(fakerAZ.definitions.date.weekday.abbr_context).toContain( - weekday - ); - }); - it('should return random value from date.weekday.abbr_context array for abbreviated and context option', () => { // Use a locale (e.g. az) which has a abbr_context array const weekday = fakerAZ.date.weekday({ @@ -551,12 +461,6 @@ describe('date', () => { expect(faker.definitions.date.weekday.wide).toContain(weekday); }); - it('should return random value from date.weekday.abbr array for abbr and context option when date.weekday.abbr_context array is missing', () => { - // Use a locale (e.g. the default en) which has no abbr_context array - const weekday = faker.date.weekday({ abbr: true, context: true }); - expect(faker.definitions.date.weekday.abbr).toContain(weekday); - }); - it('should return random value from date.weekday.abbr array for abbreviated and context option when date.weekday.abbr_context array is missing', () => { // Use a locale (e.g. the default en) which has no abbr_context array const weekday = faker.date.weekday({ @@ -647,177 +551,6 @@ describe('date', () => { ); }); }); - - describe('deprecated', () => { - describe('past()', () => { - it('should return a date 5 years in the past', () => { - const today = new Date(); - const yearsAgo = new Date(today); - yearsAgo.setFullYear(yearsAgo.getFullYear() - 5); - - const date = faker.date.past(5); - - expect(date).lessThan(today); - expect(date).greaterThanOrEqual(yearsAgo); - }); - - it('should throw an error when years = 0', () => { - const refDate = new Date(); - expect(() => faker.date.past(0, refDate.toISOString())).toThrow( - new FakerError('Years must be greater than 0.') - ); - }); - - it.each(converterMap)( - 'should return a past date relative to given refDate', - (converter) => { - const refDate = new Date(); - refDate.setFullYear(refDate.getFullYear() + 5); - - const date = faker.date.past(5, converter(refDate)); - - expect(date).lessThan(refDate); - expect(date).greaterThan(new Date()); - } - ); - }); - - describe('future()', () => { - it('should return a date 75 years into the future', () => { - const date = faker.date.future(75); - - expect(date).greaterThan(new Date()); - }); - - it('should throw an error when years = 0', () => { - const refDate = new Date(); - expect(() => faker.date.future(0, refDate.toISOString())).toThrow( - new FakerError('Years must be greater than 0.') - ); - }); - - it.each(converterMap)( - 'should return a date 75 years after the date given', - (converter) => { - const refDate = new Date(1880, 11, 9, 10, 0, 0, 0); // set the date beyond the usual calculation (to make sure this is working correctly) - - const date = faker.date.future(75, converter(refDate)); - - // date should be after the date given, but before the current time - expect(date).greaterThan(refDate); - expect(date).lessThan(new Date()); - } - ); - }); - - describe('between()', () => { - it.each(converterMap)( - 'should return a random date between the dates given', - (converter) => { - const from = new Date(1990, 5, 7, 9, 11, 0, 0); - const to = new Date(2000, 6, 8, 10, 12, 0, 0); - - const date = faker.date.between(converter(from), converter(to)); - - expect(date).greaterThan(from); - expect(date).lessThan(to); - } - ); - }); - - describe('betweens()', () => { - it.each(converterMap)( - 'should return an array of 3 dates ( by default ) of sorted randoms dates between the dates given', - (converter) => { - const from = new Date(1990, 5, 7, 9, 11, 0, 0); - const to = new Date(2000, 6, 8, 10, 12, 0, 0); - - const dates = faker.date.betweens(converter(from), converter(to)); - - expect(dates[0]).greaterThan(from); - expect(dates[0]).lessThan(to); - expect(dates[1]).greaterThan(dates[0]); - expect(dates[2]).greaterThan(dates[1]); - } - ); - }); - - describe('recent()', () => { - it('should return a date N days from the recent past', () => { - const date = faker.date.recent(30); - - expect(date).lessThanOrEqual(new Date()); - }); - - it('should throw an error when days = 0', () => { - const refDate = new Date(); - expect(() => faker.date.recent(0, refDate.toISOString())).toThrow( - new FakerError('Days must be greater than 0.') - ); - }); - - it.each(converterMap)( - 'should return a date N days from the recent past, starting from refDate', - (converter) => { - const days = 30; - const refDate = new Date(2120, 11, 9, 10, 0, 0, 0); // set the date beyond the usual calculation (to make sure this is working correctly) - - const lowerBound = new Date( - refDate.getTime() - days * 24 * 60 * 60 * 1000 - ); - - const date = faker.date.recent(days, converter(refDate)); - - expect( - lowerBound, - '`recent()` date should not be further back than `n` days ago' - ).lessThanOrEqual(date); - expect( - date, - '`recent()` date should not be ahead of the starting date reference' - ).lessThanOrEqual(refDate); - } - ); - }); - - describe('soon()', () => { - it('should return a date N days into the future', () => { - const date = faker.date.soon(30); - - expect(date).greaterThanOrEqual(new Date()); - }); - - it('should throw an error when days = 0', () => { - const refDate = new Date(); - expect(() => faker.date.soon(0, refDate.toISOString())).toThrow( - new FakerError('Days must be greater than 0.') - ); - }); - - it.each(converterMap)( - 'should return a date N days from the recent future, starting from refDate', - (converter) => { - const days = 30; - const refDate = new Date(1880, 11, 9, 10, 0, 0, 0); // set the date beyond the usual calculation (to make sure this is working correctly) - - const upperBound = new Date( - refDate.getTime() + days * 24 * 60 * 60 * 1000 - ); - - const date = faker.date.soon(days, converter(refDate)); - - expect( - date, - '`soon()` date should not be further ahead than `n` days ago' - ).lessThanOrEqual(upperBound); - expect( - refDate, - '`soon()` date should not be behind the starting date reference' - ).lessThanOrEqual(date); - } - ); - }); - }); } ); From 660da4c401b36ebfe0c0f7975c265146d9224921 Mon Sep 17 00:00:00 2001 From: Shinigami Date: Tue, 5 Mar 2024 15:49:25 +0100 Subject: [PATCH 03/17] refactor(phone)!: remove v8 deprecated phone format (#2712) --- docs/guide/upgrading_v9/2712.md | 7 +++ src/modules/phone/index.ts | 53 ++----------------- test/modules/__snapshots__/phone.spec.ts.snap | 6 --- test/modules/phone.spec.ts | 2 +- 4 files changed, 12 insertions(+), 56 deletions(-) create mode 100644 docs/guide/upgrading_v9/2712.md diff --git a/docs/guide/upgrading_v9/2712.md b/docs/guide/upgrading_v9/2712.md new file mode 100644 index 00000000000..660523f67f2 --- /dev/null +++ b/docs/guide/upgrading_v9/2712.md @@ -0,0 +1,7 @@ +### Remove deprecated phone methods + +Removed deprecated phone methods + +| old | replacement | +| ---------------------------- | -------------------------------------------------------------------------------- | +| `faker.phone.number(format)` | `faker.phone.number()`, `faker.string.numeric()` or `faker.helpers.fromRegExp()` | diff --git a/src/modules/phone/index.ts b/src/modules/phone/index.ts index 833938d71fc..44f2a111de8 100644 --- a/src/modules/phone/index.ts +++ b/src/modules/phone/index.ts @@ -1,4 +1,3 @@ -import { deprecated } from '../../internal/deprecated'; import { ModuleBase } from '../../internal/module-base'; import { legacyReplaceSymbolWithNumber } from '../helpers'; @@ -21,54 +20,10 @@ export class PhoneModule extends ModuleBase { * * @since 7.3.0 */ - number(): string; - /** - * Generates a random phone number. - * - * @param format Format of the phone number. - * - * @see faker.string.numeric(): For generating a random string of numbers. - * @see faker.helpers.fromRegExp(): For generating a phone number matching a regular expression. - * - * @example - * faker.phone.number('501-###-###') // '501-039-841' - * faker.phone.number('+48 91 ### ## ##') // '+48 91 463 61 70' - * - * @since 7.3.0 - * - * @deprecated Use `faker.phone.number()` without an argument, `faker.string.numeric()` or `faker.helpers.fromRegExp()` instead. - */ - number(format: string): string; - /** - * Generates a random phone number. - * - * @param format Format of the phone number. Defaults to a random phone number format. - * - * @see faker.string.numeric(): For generating a random string of numbers. - * @see faker.helpers.fromRegExp(): For generating a phone number matching a regular expression. - * - * @example - * faker.phone.number() // '961-770-7727' - * - * @since 7.3.0 - */ - number(format?: string): string; - number(format?: string): string { - if (format != null) { - deprecated({ - deprecated: 'faker.phone.number(format)', - proposed: - 'faker.phone.number(), faker.string.numeric() or faker.helpers.fromRegExp()', - since: '8.1', - until: '9.0', - }); - } - - format = - format ?? - this.faker.helpers.arrayElement( - this.faker.definitions.phone_number.formats - ); + number(): string { + const format = this.faker.helpers.arrayElement( + this.faker.definitions.phone_number.formats + ); return legacyReplaceSymbolWithNumber(this.faker, format); } diff --git a/test/modules/__snapshots__/phone.spec.ts.snap b/test/modules/__snapshots__/phone.spec.ts.snap index 2f60813caf7..20928c043e0 100644 --- a/test/modules/__snapshots__/phone.spec.ts.snap +++ b/test/modules/__snapshots__/phone.spec.ts.snap @@ -2,18 +2,12 @@ exports[`phone > 42 > imei 1`] = `"39-751108-670982-8"`; -exports[`phone > 42 > number > format 1`] = `"397-511-0867"`; - exports[`phone > 42 > number > noArgs 1`] = `"(975) 310-8670 x982"`; exports[`phone > 1211 > imei 1`] = `"98-296673-687684-2"`; -exports[`phone > 1211 > number > format 1`] = `"982-966-7368"`; - exports[`phone > 1211 > number > noArgs 1`] = `"1-929-767-3687 x68488"`; exports[`phone > 1337 > imei 1`] = `"21-243529-713619-6"`; -exports[`phone > 1337 > number > format 1`] = `"212-435-2971"`; - exports[`phone > 1337 > number > noArgs 1`] = `"324-452-9713 x619"`; diff --git a/test/modules/phone.spec.ts b/test/modules/phone.spec.ts index 4ee4241703d..4e1a76a353f 100644 --- a/test/modules/phone.spec.ts +++ b/test/modules/phone.spec.ts @@ -11,7 +11,7 @@ describe('phone', () => { t.it('imei'); t.describe('number', (t) => { - t.it('noArgs').it('format', '###-###-####'); + t.it('noArgs'); }); }); From 489bbc243f3094464888bdf7fb90835fcfa57691 Mon Sep 17 00:00:00 2001 From: Matt Mayer <152770+matthewmayer@users.noreply.github.com> Date: Tue, 5 Mar 2024 21:54:14 +0700 Subject: [PATCH 04/17] test: verify locale code is format in metadata (#2713) --- test/locale-imports.spec.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/locale-imports.spec.ts b/test/locale-imports.spec.ts index 4c1197c886f..229f782a818 100644 --- a/test/locale-imports.spec.ts +++ b/test/locale-imports.spec.ts @@ -35,6 +35,11 @@ describe.each(keys(allLocales))('locale imports', (locale) => { expect(metadata.code).toBeTypeOf('string'); expect(metadata.code).toEqual(locale); if (locale !== 'base') { + expect(metadata.code).toEqual( + [metadata.language, metadata.country, metadata.variant] + .filter((v) => v != null) + .join('_') + ); expect(metadata.language).toBeTypeOf('string'); expect(metadata.language).toMatch(/^[a-z]{2}$/); expect(metadata.script).toBeTypeOf('string'); From ade91fd30d6b5fbcc2ab2534502467b1e0f3b086 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Tue, 5 Mar 2024 22:33:35 +0100 Subject: [PATCH 05/17] docs: improve jsdocs default texts (#2717) --- src/modules/git/index.ts | 6 ++-- src/modules/image/index.ts | 30 +++++++++---------- .../word/filter-word-list-by-length.ts | 2 +- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/modules/git/index.ts b/src/modules/git/index.ts index 15cd21a3d69..0c50b6146e8 100644 --- a/src/modules/git/index.ts +++ b/src/modules/git/index.ts @@ -29,8 +29,8 @@ export class GitModule extends ModuleBase { * Generates a random commit entry as printed by `git log`. * * @param options Options for the commit entry. - * @param options.merge Set to `true` to generate a merge message line. - * @param options.eol Choose the end of line character to use. Defaults to 'CRLF'. + * @param options.merge Whether to generate a merge message line. Defaults to 20% `true` and 80% `false`. + * @param options.eol Choose the end of line character to use. Defaults to `'CRLF'`. * 'LF' = '\n', * 'CRLF' = '\r\n' * @param options.refDate The date to use as reference point for the commit. Defaults to `new Date()`. @@ -192,7 +192,7 @@ export class GitModule extends ModuleBase { * - 8 for GitLab * * @param options Options for the commit sha. - * @param options.length The length of the commit sha. Defaults to 40. + * @param options.length The length of the commit sha. Defaults to `40`. * * @example * faker.git.commitSha() // '2c6e3880fd94ddb7ef72d34e683cdc0c47bec6e6' diff --git a/src/modules/image/index.ts b/src/modules/image/index.ts index d396d5fa000..02b3c31ce87 100644 --- a/src/modules/image/index.ts +++ b/src/modules/image/index.ts @@ -67,8 +67,8 @@ export class ImageModule extends ModuleBase { * Generates a random image url. * * @param options Options for generating a URL for an image. - * @param options.width The width of the image. Defaults to random integer between `1` and `3999`. - * @param options.height The height of the image. Defaults to random integer between `1` and `3999`. + * @param options.width The width of the image. Defaults to a random integer between `1` and `3999`. + * @param options.height The height of the image. Defaults to a random integer between `1` and `3999`. * * @example * faker.image.url() // 'https://loremflickr.com/640/480?lock=1234' @@ -109,8 +109,8 @@ export class ImageModule extends ModuleBase { * Generates a random image url provided via https://loremflickr.com. * * @param options Options for generating a URL for an image. - * @param options.width The width of the image. Defaults to random integer between `1` and `3999`. - * @param options.height The height of the image. Defaults to random integer between `1` and `3999`. + * @param options.width The width of the image. Defaults to a random integer between `1` and `3999`. + * @param options.height The height of the image. Defaults to a random integer between `1` and `3999`. * @param options.category Category to use for the image. * * @example @@ -156,10 +156,10 @@ export class ImageModule extends ModuleBase { * Generates a random image url provided via https://picsum.photos. * * @param options Options for generating a URL for an image. - * @param options.width The width of the image. Defaults to random integer between `1` and `3999`. - * @param options.height The height of the image. Defaults to random integer between `1` and `3999`. + * @param options.width The width of the image. Defaults to a random integer between `1` and `3999`. + * @param options.height The height of the image. Defaults to a random integer between `1` and `3999`. * @param options.grayscale Whether the image should be grayscale. Defaults to a random boolean value. - * @param options.blur Whether the image should be blurred. `0` disables the blur. Defaults to a random integer from `0` to `10`. + * @param options.blur Whether the image should be blurred. `0` disables the blur. Defaults to a random integer between `0` and `10`. * * @example * faker.image.urlPicsumPhotos() // 'https://picsum.photos/seed/NWbJM2B/640/480' @@ -235,12 +235,12 @@ export class ImageModule extends ModuleBase { * Generates a random image url provided via https://via.placeholder.com/. * * @param options Options for generating a URL for an image. - * @param options.width The width of the image. Defaults to random number between 1 and 3999. - * @param options.height The height of the image. Defaults to random number between 1 and 3999. - * @param options.backgroundColor The background color of the image. Defaults to random hex color. - * @param options.textColor The text color of the image. Defaults to random hex color. - * @param options.format The format of the image. Defaults to random format. - * @param options.text The text to display on the image. Defaults to string. + * @param options.width The width of the image. Defaults to a random number between 1 and 3999. + * @param options.height The height of the image. Defaults to a random number between 1 and 3999. + * @param options.backgroundColor The background color of the image. Defaults to a random hex color. + * @param options.textColor The text color of the image. Defaults to a random hex color. + * @param options.format The format of the image. Defaults to a random format. + * @param options.text The text to display on the image. Defaults to a random string. * * @example * faker.image.urlPlaceholder() // 'https://via.placeholder.com/150x180/FF0000/FFFFFF.webp?text=lorem' @@ -328,8 +328,8 @@ export class ImageModule extends ModuleBase { * Generates a random data uri containing an URL-encoded SVG image or a Base64-encoded SVG image. * * @param options Options for generating a data uri. - * @param options.width The width of the image. Defaults to random integer between `1` and `3999`. - * @param options.height The height of the image. Defaults to random integer between `1` and `3999`. + * @param options.width The width of the image. Defaults to a random integer between `1` and `3999`. + * @param options.height The height of the image. Defaults to a random integer between `1` and `3999`. * @param options.color The color of the image. Must be a color supported by svg. Defaults to a random color. * @param options.type The type of the image. Defaults to a random type. * diff --git a/src/modules/word/filter-word-list-by-length.ts b/src/modules/word/filter-word-list-by-length.ts index f3fcd5abfee..5352294205b 100644 --- a/src/modules/word/filter-word-list-by-length.ts +++ b/src/modules/word/filter-word-list-by-length.ts @@ -53,7 +53,7 @@ string, // Parameters[0]['strategy'] * @param options The options to provide. * @param options.wordList A list of words to filter. * @param options.length The exact or the range of lengths the words should have. - * @param options.strategy The strategy to apply when no words with a matching length are found. Defaults to 'any-length'. + * @param options.strategy The strategy to apply when no words with a matching length are found. Defaults to `'any-length'`. * * Available error handling strategies: * From 2716865a0441b8502c8d0ee3efbdbe1bcebe0101 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Wed, 6 Mar 2024 17:35:53 +0100 Subject: [PATCH 06/17] infra(unicorn): switch-case-braces (#2721) --- .eslintrc.cjs | 1 - scripts/apidoc/signature.ts | 42 ++++++++++----- src/modules/color/index.ts | 54 ++++++++++++++----- src/modules/helpers/eval.ts | 10 ++-- src/modules/helpers/index.ts | 3 +- src/modules/location/index.ts | 11 ++-- src/modules/person/index.ts | 9 ++-- src/modules/string/index.ts | 22 +++++--- src/modules/system/index.ts | 15 ++++-- test/scripts/apidoc/verify-jsdoc-tags.spec.ts | 12 +++-- 10 files changed, 126 insertions(+), 53 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 198153defc3..09b3f68a0c9 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -57,7 +57,6 @@ module.exports = defineConfig({ 'unicorn/prefer-string-slice': 'off', 'unicorn/prevent-abbreviations': 'off', 'unicorn/require-array-join-separator': 'off', - 'unicorn/switch-case-braces': 'off', '@typescript-eslint/array-type': [ 'error', diff --git a/scripts/apidoc/signature.ts b/scripts/apidoc/signature.ts index 82d4047ef7d..64910534647 100644 --- a/scripts/apidoc/signature.ts +++ b/scripts/apidoc/signature.ts @@ -145,13 +145,15 @@ async function analyzeParameterOptions( } switch (parameterType.type) { - case 'array': + case 'array': { return analyzeParameterOptions(`${name}[]`, parameterType.elementType); + } - case 'union': + case 'union': { return Promise.all( parameterType.types.map((type) => analyzeParameterOptions(name, type)) ).then((options) => options.flat()); + } case 'reflection': { const properties = parameterType.declaration.children ?? []; @@ -175,11 +177,13 @@ async function analyzeParameterOptions( ); } - case 'typeOperator': + case 'typeOperator': { return analyzeParameterOptions(name, parameterType.target); + } - default: + default: { return []; + } } } @@ -200,13 +204,14 @@ async function typeToText(type_?: Type, short = false): Promise { return isComplexType ? `Array<${text}>` : `${text}[]`; } - case 'union': + case 'union': { return (await Promise.all(type.types.map((t) => typeToText(t, short)))) .map((t) => (t.includes('=>') ? `(${t})` : t)) .sort() .join(' | '); + } - case 'reference': + case 'reference': { if (!type.typeArguments || type.typeArguments.length === 0) { const reflection = type.reflection as DeclarationReflection | undefined; const reflectionType = reflection?.type; @@ -229,18 +234,22 @@ async function typeToText(type_?: Type, short = false): Promise { return `${type.name}<${( await Promise.all(type.typeArguments.map((t) => typeToText(t, short))) ).join(', ')}>`; + } - case 'reflection': + case 'reflection': { return declarationTypeToText(type.declaration, short); + } - case 'indexedAccess': + case 'indexedAccess': { return `${await typeToText(type.objectType, short)}[${await typeToText( type.indexType, short )}]`; + } - case 'literal': + case 'literal': { return (await formatTypescript(type.toString())).replace(/;\n$/, ''); + } case 'typeOperator': { const text = await typeToText(type.target, short); @@ -251,8 +260,9 @@ async function typeToText(type_?: Type, short = false): Promise { return `${type.operator} ${text}`; } - default: + default: { return type.toString(); + } } } @@ -261,13 +271,15 @@ async function declarationTypeToText( short = false ): Promise { switch (declaration.kind) { - case ReflectionKind.Method: + case ReflectionKind.Method: { return signatureTypeToText(declaration.signatures?.[0]); + } - case ReflectionKind.Property: + case ReflectionKind.Property: { return typeToText(declaration.type); + } - case ReflectionKind.TypeLiteral: + case ReflectionKind.TypeLiteral: { if (declaration.children?.length) { if (short) { // This is too long for the parameter table, thus we abbreviate this. @@ -288,9 +300,11 @@ async function declarationTypeToText( } return declaration.toString(); + } - default: + default: { return declaration.toString(); + } } } diff --git a/src/modules/color/index.ts b/src/modules/color/index.ts index 779bd20b6ce..2b355062168 100644 --- a/src/modules/color/index.ts +++ b/src/modules/color/index.ts @@ -60,12 +60,16 @@ function formatHexColor( const { prefix, casing } = options; switch (casing) { - case 'upper': + case 'upper': { hexColor = hexColor.toUpperCase(); break; - case 'lower': + } + + case 'lower': { hexColor = hexColor.toLowerCase(); break; + } + case 'mixed': // Do nothing } @@ -111,32 +115,49 @@ function toCSS( ): string { const percentage = (value: number) => Math.round(value * 100); switch (cssFunction) { - case 'rgba': + case 'rgba': { return `rgba(${values[0]}, ${values[1]}, ${values[2]}, ${values[3]})`; - case 'color': + } + + case 'color': { return `color(${space} ${values[0]} ${values[1]} ${values[2]})`; - case 'cmyk': + } + + case 'cmyk': { return `cmyk(${percentage(values[0])}%, ${percentage( values[1] )}%, ${percentage(values[2])}%, ${percentage(values[3])}%)`; - case 'hsl': + } + + case 'hsl': { return `hsl(${values[0]}deg ${percentage(values[1])}% ${percentage( values[2] )}%)`; - case 'hsla': + } + + case 'hsla': { return `hsl(${values[0]}deg ${percentage(values[1])}% ${percentage( values[2] )}% / ${percentage(values[3])})`; - case 'hwb': + } + + case 'hwb': { return `hwb(${values[0]} ${percentage(values[1])}% ${percentage( values[2] )}%)`; - case 'lab': + } + + case 'lab': { return `lab(${percentage(values[0])}% ${values[1]} ${values[2]})`; - case 'lch': + } + + case 'lch': { return `lch(${percentage(values[0])}% ${values[1]} ${values[2]})`; - case 'rgb': + } + + case 'rgb': { return `rgb(${values[0]}, ${values[1]}, ${values[2]})`; + } } } @@ -155,12 +176,17 @@ function toColorFormat( space: CssSpaceType = 'sRGB' ): string | number[] { switch (format) { - case 'css': + case 'css': { return toCSS(values, cssFunction, space); - case 'binary': + } + + case 'binary': { return toBinary(values); - case 'decimal': + } + + case 'decimal': { return values; + } } } diff --git a/src/modules/helpers/eval.ts b/src/modules/helpers/eval.ts index 033c5d35d80..4a861ec0700 100644 --- a/src/modules/helpers/eval.ts +++ b/src/modules/helpers/eval.ts @@ -119,12 +119,15 @@ function evalProcessFunction( switch (nextChar) { case '.': case '(': - case undefined: + case undefined: { break; // valid - default: + } + + default: { throw new FakerError( `Expected dot ('.'), open parenthesis ('('), or nothing after function call but got '${nextChar}'` ); + } } return [ @@ -223,7 +226,8 @@ function resolveProperty(entrypoint: unknown, key: string): unknown { return entrypoint?.[key as keyof typeof entrypoint]; } - default: + default: { return undefined; + } } } diff --git a/src/modules/helpers/index.ts b/src/modules/helpers/index.ts index b21f13e7188..b86b2cd7d32 100644 --- a/src/modules/helpers/index.ts +++ b/src/modules/helpers/index.ts @@ -56,8 +56,9 @@ function getRepetitionsBasedOnQuantifierParameters( break; } - default: + default: { throw new FakerError('Unknown quantifier symbol provided.'); + } } } else if (quantifierMin != null && quantifierMax != null) { repetitions = faker.number.int({ diff --git a/src/modules/location/index.ts b/src/modules/location/index.ts index 9712076629e..92284560600 100644 --- a/src/modules/location/index.ts +++ b/src/modules/location/index.ts @@ -355,12 +355,17 @@ export class LocationModule extends ModuleBase { const { variant = 'alpha-2' } = options; const key = (() => { switch (variant) { - case 'numeric': + case 'numeric': { return 'numeric'; - case 'alpha-3': + } + + case 'alpha-3': { return 'alpha3'; - case 'alpha-2': + } + + case 'alpha-2': { return 'alpha2'; + } } })(); diff --git a/src/modules/person/index.ts b/src/modules/person/index.ts index dce8a45f533..6bb4f7766c0 100644 --- a/src/modules/person/index.ts +++ b/src/modules/person/index.ts @@ -37,17 +37,20 @@ function selectDefinition( let values: T[] | undefined | null; switch (sex) { - case Sex.Female: + case Sex.Female: { values = female; break; + } - case Sex.Male: + case Sex.Male: { values = male; break; + } - default: + default: { values = generic; break; + } } if (values == null) { diff --git a/src/modules/string/index.ts b/src/modules/string/index.ts index cf469a2cd89..cfee0dc13fe 100644 --- a/src/modules/string/index.ts +++ b/src/modules/string/index.ts @@ -223,15 +223,20 @@ export class StringModule extends SimpleModuleBase { let charsArray: string[]; switch (casing) { - case 'upper': + case 'upper': { charsArray = [...UPPER_CHARS]; break; - case 'lower': + } + + case 'lower': { charsArray = [...LOWER_CHARS]; break; - case 'mixed': + } + + case 'mixed': { charsArray = [...LOWER_CHARS, ...UPPER_CHARS]; break; + } } charsArray = charsArray.filter((elem) => !exclude.includes(elem)); @@ -313,15 +318,20 @@ export class StringModule extends SimpleModuleBase { let charsArray = [...DIGIT_CHARS]; switch (casing) { - case 'upper': + case 'upper': { charsArray.push(...UPPER_CHARS); break; - case 'lower': + } + + case 'lower': { charsArray.push(...LOWER_CHARS); break; - case 'mixed': + } + + case 'mixed': { charsArray.push(...LOWER_CHARS, ...UPPER_CHARS); break; + } } charsArray = charsArray.filter((elem) => !exclude.includes(elem)); diff --git a/src/modules/system/index.ts b/src/modules/system/index.ts index ee0d2600fb7..3468bbb0a79 100644 --- a/src/modules/system/index.ts +++ b/src/modules/system/index.ts @@ -266,23 +266,30 @@ export class SystemModule extends ModuleBase { let prefix = ''; const digit = () => this.faker.string.numeric({ allowLeadingZeros: true }); switch (interfaceSchema) { - case 'index': + case 'index': { suffix = digit(); break; - case 'slot': + } + + case 'slot': { suffix = `${digit()}${ this.faker.helpers.maybe(() => `f${digit()}`) ?? '' }${this.faker.helpers.maybe(() => `d${digit()}`) ?? ''}`; break; - case 'mac': + } + + case 'mac': { suffix = this.faker.internet.mac(''); break; - case 'pci': + } + + case 'pci': { prefix = this.faker.helpers.maybe(() => `P${digit()}`) ?? ''; suffix = `${digit()}s${digit()}${ this.faker.helpers.maybe(() => `f${digit()}`) ?? '' }${this.faker.helpers.maybe(() => `d${digit()}`) ?? ''}`; break; + } } return `${prefix}${interfaceType}${commonInterfaceSchemas[interfaceSchema]}${suffix}`; diff --git a/test/scripts/apidoc/verify-jsdoc-tags.spec.ts b/test/scripts/apidoc/verify-jsdoc-tags.spec.ts index 42882474ccf..da34316e96c 100644 --- a/test/scripts/apidoc/verify-jsdoc-tags.spec.ts +++ b/test/scripts/apidoc/verify-jsdoc-tags.spec.ts @@ -98,18 +98,20 @@ function assertNestedParameterDefault( } switch (parameterType.type) { - case 'array': + case 'array': { return assertNestedParameterDefault( `${name}[]`, parameterType.elementType ); + } - case 'union': + case 'union': { for (const type of parameterType.types) { assertNestedParameterDefault(name, type); } return; + } case 'reflection': { for (const property of parameterType.declaration.children ?? []) { @@ -131,11 +133,13 @@ function assertNestedParameterDefault( return; } - case 'typeOperator': + case 'typeOperator': { return assertNestedParameterDefault(name, parameterType.target); + } - default: + default: { return; + } } } From b3afc8f351003cf9df9984fb5be6cd46e18f71d8 Mon Sep 17 00:00:00 2001 From: Shinigami Date: Wed, 6 Mar 2024 17:50:00 +0100 Subject: [PATCH 07/17] refactor(git)!: remove v8 deprecated git method (#2716) --- docs/guide/upgrading_v9/2716.md | 7 +++++++ src/modules/git/index.ts | 23 ++--------------------- test/modules/git.spec.ts | 2 -- 3 files changed, 9 insertions(+), 23 deletions(-) create mode 100644 docs/guide/upgrading_v9/2716.md diff --git a/docs/guide/upgrading_v9/2716.md b/docs/guide/upgrading_v9/2716.md new file mode 100644 index 00000000000..8f24100c14e --- /dev/null +++ b/docs/guide/upgrading_v9/2716.md @@ -0,0 +1,7 @@ +### Remove deprecated git method + +Removed deprecated git method + +| old | replacement | +| ---------------------- | ------------------------------------ | +| `faker.git.shortSha()` | `faker.git.commitSha({ length: 7 })` | diff --git a/src/modules/git/index.ts b/src/modules/git/index.ts index 0c50b6146e8..8f33f0c5484 100644 --- a/src/modules/git/index.ts +++ b/src/modules/git/index.ts @@ -1,4 +1,3 @@ -import { deprecated } from '../../internal/deprecated'; import { ModuleBase } from '../../internal/module-base'; const nbsp = '\u00A0'; @@ -196,6 +195,8 @@ export class GitModule extends ModuleBase { * * @example * faker.git.commitSha() // '2c6e3880fd94ddb7ef72d34e683cdc0c47bec6e6' + * faker.git.commitSha({ length: 7 }) // 'dbee57b' + * faker.git.commitSha({ length: 8 }) // '0e52376a' * * @since 5.0.0 */ @@ -216,24 +217,4 @@ export class GitModule extends ModuleBase { prefix: '', }); } - - /** - * Generates a random commit sha (short). - * - * @example - * faker.git.shortSha() // '6155732' - * - * @since 5.0.0 - * - * @deprecated Use `faker.git.commitSha({ length: 7 })` instead. - */ - shortSha(): string { - deprecated({ - deprecated: 'faker.git.shortSha()', - proposed: 'faker.git.commitSha({ length: 7 })', - since: '8.0', - until: '9.0', - }); - return this.commitSha({ length: 7 }); - } } diff --git a/test/modules/git.spec.ts b/test/modules/git.spec.ts index b120cc09cd8..8957e99566b 100644 --- a/test/modules/git.spec.ts +++ b/test/modules/git.spec.ts @@ -18,8 +18,6 @@ describe('git', () => { .it('with length 8', { length: 8 }); }); - t.skip('shortSha'); - t.describeEach( 'commitEntry', 'commitDate' From ccd7054e341de0f9016359ca64e1985110476729 Mon Sep 17 00:00:00 2001 From: Shinigami Date: Thu, 7 Mar 2024 09:00:41 +0100 Subject: [PATCH 08/17] test: remove node v14 case (#2723) --- test/internal/bind-this-to-member-functions.spec.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/internal/bind-this-to-member-functions.spec.ts b/test/internal/bind-this-to-member-functions.spec.ts index 7dedc00e7b1..22a3012df4b 100644 --- a/test/internal/bind-this-to-member-functions.spec.ts +++ b/test/internal/bind-this-to-member-functions.spec.ts @@ -18,9 +18,8 @@ describe('internal', () => { const someMethodWithoutBind = someModule.someMethod; - // The second error message is for NodeJS v14 support expect(() => someMethodWithoutBind()).toThrow( - /^(Cannot read properties of undefined \(reading 'faker'\)|Cannot read property 'faker' of undefined)$/ + new Error("Cannot read properties of undefined (reading 'faker')") ); bindThisToMemberFunctions(someModule); From e1dc906b53d96ac8ef50b1f7af2302204d67f687 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Thu, 7 Mar 2024 14:44:28 +0100 Subject: [PATCH 09/17] test(finance): fix tests for amount (#2702) --- test/modules/finance.spec.ts | 37 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/test/modules/finance.spec.ts b/test/modules/finance.spec.ts index e3ec6dd8496..db60a9b3956 100644 --- a/test/modules/finance.spec.ts +++ b/test/modules/finance.spec.ts @@ -260,13 +260,8 @@ describe('finance', () => { expect(amount).toBeTruthy(); expect(amount).toBeTypeOf('string'); - expect( - +amount, - 'the amount should be greater than 0' - ).toBeGreaterThan(0); - expect(+amount, 'the amount should be less than 1001').toBeLessThan( - 1001 - ); + expect(+amount).toBeGreaterThanOrEqual(0); + expect(+amount).toBeLessThanOrEqual(1000); }); it('should use the default decimal location when not passing arguments', () => { @@ -275,13 +270,15 @@ describe('finance', () => { amount = faker.finance.amount(100, 100, 1); expect(amount).toBeTruthy(); - expect(amount, 'the amount should be equal 100.0').toBe('100.0'); + expect(amount).toBe('100.0'); }); //TODO: add support for more currency and decimal options it('should not include a currency symbol by default', () => { const amount = faker.finance.amount(); + expect(amount).toBeTruthy(); + expect(amount).toBeTypeOf('string'); expect( amount, 'The expected match should not include a currency symbol' @@ -293,34 +290,24 @@ describe('finance', () => { expect(amount).toBeTruthy(); expect(amount).toBeTypeOf('string'); - expect(+amount, 'the amount should be less than 0').toBeLessThan(0); - expect( - +amount, - 'the amount should be greater than -201' - ).toBeGreaterThan(-201); + expect(+amount).toBeLessThanOrEqual(-1); + expect(+amount).toBeGreaterThanOrEqual(-200); }); it('should handle argument dec', () => { const amount = faker.finance.amount(100, 100, 1); expect(amount).toBeTruthy(); - expect(amount, 'the amount should be equal 100.0').toBe('100.0'); + expect(amount).toBeTypeOf('string'); + expect(amount).toBe('100.0'); }); it('should handle argument dec = 0', () => { const amount = faker.finance.amount(100, 100, 0); expect(amount).toBeTruthy(); - expect(amount, 'the amount should be equal 100').toBe('100'); - }); - - it('should return a string', () => { - const amount = faker.finance.amount(100, 100, 0); - - expect(amount).toBeTruthy(); - expect(amount, 'the amount type should be string').toBeTypeOf( - 'string' - ); + expect(amount).toBeTypeOf('string'); + expect(amount).toBe('100'); }); it.each([false, undefined])( @@ -335,7 +322,7 @@ describe('finance', () => { autoFormat ); - expect(amount).toStrictEqual(number.toString()); + expect(amount).toBe(number.toString()); } ); From db7aaa0801f9c71812debac4dcd507e103bec15a Mon Sep 17 00:00:00 2001 From: Matt Mayer <152770+matthewmayer@users.noreply.github.com> Date: Sat, 9 Mar 2024 20:21:48 +0700 Subject: [PATCH 10/17] docs: standardize heading levels (#2728) --- docs/guide/upgrading_v9/2357.md | 2 +- docs/guide/upgrading_v9/2508.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guide/upgrading_v9/2357.md b/docs/guide/upgrading_v9/2357.md index 28a530c3fe7..58092a0b9a1 100644 --- a/docs/guide/upgrading_v9/2357.md +++ b/docs/guide/upgrading_v9/2357.md @@ -1,4 +1,4 @@ -# Use High Precision RNG by default +### Use High Precision RNG by default TLDR: Many Faker methods will return a different result in v9 compared to v8 for the same seed. diff --git a/docs/guide/upgrading_v9/2508.md b/docs/guide/upgrading_v9/2508.md index 28e6f8edd3f..699ae21b3b1 100644 --- a/docs/guide/upgrading_v9/2508.md +++ b/docs/guide/upgrading_v9/2508.md @@ -1,4 +1,4 @@ -# Some methods now return undefined in Javascript when unknown enumeration values are passed +### Some methods now return undefined in Javascript when unknown enumeration values are passed Some methods would previously fallback to a default value for an option when an unknown value was passed for a enum parameter. Now, these methods will return undefined instead. From a536a9d79f410986e6bd6dc1bc4a72252a0cc8d9 Mon Sep 17 00:00:00 2001 From: Shinigami Date: Sun, 10 Mar 2024 00:57:03 +0100 Subject: [PATCH 11/17] refactor(finance)!: remove v8 deprecated finance methods (#2727) --- docs/guide/upgrading_v9/2727.md | 10 + src/modules/finance/index.ts | 413 +++--------------- .../__snapshots__/finance.spec.ts.snap | 78 ---- test/modules/finance-iban.spec.ts | 35 +- test/modules/finance.spec.ts | 134 ++---- 5 files changed, 121 insertions(+), 549 deletions(-) create mode 100644 docs/guide/upgrading_v9/2727.md diff --git a/docs/guide/upgrading_v9/2727.md b/docs/guide/upgrading_v9/2727.md new file mode 100644 index 00000000000..659d61f6351 --- /dev/null +++ b/docs/guide/upgrading_v9/2727.md @@ -0,0 +1,10 @@ +### Remove deprecated finance methods + +Removed deprecated finance methods + +| old | replacement | +| --------------------------------------------------------- | ------------------------------------------------------------- | +| `faker.finance.account` | `faker.finance.accountNumber` | +| `faker.finance.mask` | `faker.finance.maskedNumber` | +| `faker.finance.amount(min, max, dec, symbol, autoFormat)` | `faker.finance.amount({ min, max, dec, symbol, autoFormat })` | +| `faker.finance.iban(formatted, countryCode)` | `faker.finance.iban({ formatted, countryCode })` | diff --git a/src/modules/finance/index.ts b/src/modules/finance/index.ts index 335bac97479..b78b6a3f18b 100644 --- a/src/modules/finance/index.ts +++ b/src/modules/finance/index.ts @@ -1,5 +1,4 @@ import { FakerError } from '../../errors/faker-error'; -import { deprecated } from '../../internal/deprecated'; import { ModuleBase } from '../../internal/module-base'; import iban from './iban'; @@ -53,32 +52,6 @@ export function prettyPrintIban(iban: string): string { * For blockchain related methods, use: [`bitcoinAddress()`](https://fakerjs.dev/api/finance.html#bitcoinaddress), [`ethereumAddress()`](https://fakerjs.dev/api/finance.html#ethereumaddress) and [`litecoinAddress()`](https://fakerjs.dev/api/finance.html#litecoinaddress). */ export class FinanceModule extends ModuleBase { - /** - * Generates a random account number. - * - * @param length The length of the account number. Defaults to `8`. - * - * @see faker.finance.accountNumber(): For the replacement method. - * - * @example - * faker.finance.account() // 92842238 - * faker.finance.account(5) // 32564 - * - * @since 2.0.1 - * - * @deprecated Use `faker.finance.accountNumber` instead. - */ - account(length?: number): string { - deprecated({ - deprecated: 'faker.finance.account', - proposed: 'faker.finance.accountNumber', - since: '8.0', - until: '9.0', - }); - - return this.accountNumber(length); - } - /** * Generates a random account number. * @@ -213,35 +186,6 @@ export class FinanceModule extends ModuleBase { return `${routingNumber}${Math.ceil(sum / 10) * 10 - sum}`; } - /** - * Generates a random masked number. - * - * @param length The length of the unmasked number. Defaults to `4`. - * @param parens Whether to use surrounding parenthesis. Defaults to `true`. - * @param ellipsis Whether to prefix the numbers with an ellipsis. Defaults to `true`. - * - * @see faker.finance.maskedNumber(): For the replacement method. - * - * @example - * faker.finance.mask() // '(...9711)' - * faker.finance.mask(3) // '(...342)' - * faker.finance.mask(3, false) // '...236' - * faker.finance.mask(3, false, false) // '298' - * - * @since 2.0.1 - * - * @deprecated Use `faker.finance.maskedNumber` instead. - */ - mask(length?: number, parens?: boolean, ellipsis?: boolean): string { - deprecated({ - deprecated: 'faker.finance.mask', - proposed: 'faker.finance.maskedNumber', - since: '8.0', - until: '9.0', - }); - return this.maskedNumber({ length, parens, ellipsis }); - } - /** * Generates a random masked number. * @@ -410,207 +354,46 @@ export class FinanceModule extends ModuleBase { * * @since 2.0.1 */ - amount(options?: { - /** - * The lower bound for the amount. - * - * @default 0 - */ - min?: number; - /** - * The upper bound for the amount. - * - * @default 1000 - */ - max?: number; - /** - * The number of decimal places for the amount. - * - * @default 2 - */ - dec?: number; - /** - * The symbol used to prefix the amount. - * - * @default '' - */ - symbol?: string; - /** - * If true this method will use `Number.toLocaleString()`. Otherwise it will use `Number.toFixed()`. - * - * @default false - */ - autoFormat?: boolean; - }): string; - /** - * Generates a random amount between the given bounds (inclusive). - * - * @param min The lower bound for the amount. Defaults to `0`. - * @param max The upper bound for the amount. Defaults to `1000`. - * @param dec The number of decimal places for the amount. Defaults to `2`. - * @param symbol The symbol used to prefix the amount. Defaults to `''`. - * @param autoFormat If true this method will use `Number.toLocaleString()`. Otherwise it will use `Number.toFixed()`. - * - * @example - * faker.finance.amount() // '617.87' - * faker.finance.amount(5, 10) // '5.53' - * faker.finance.amount(5, 10, 0) // '8' - * faker.finance.amount(5, 10, 2, '$') // '$5.85' - * faker.finance.amount(5, 10, 5, '', true) // '9,75067' - * - * @since 2.0.1 - * - * @deprecated Use `faker.finance.amount({ min, max, dec, symbol, autoFormat })` instead. - */ amount( - min?: number, - max?: number, - dec?: number, - symbol?: string, - autoFormat?: boolean - ): string; - /** - * Generates a random amount between the given bounds (inclusive). - * - * @param options An options object. - * @param options.min The lower bound for the amount. Defaults to `0`. - * @param options.max The upper bound for the amount. Defaults to `1000`. - * @param options.dec The number of decimal places for the amount. Defaults to `2`. - * @param options.symbol The symbol used to prefix the amount. Defaults to `''`. - * @param options.autoFormat If true this method will use `Number.toLocaleString()`. Otherwise it will use `Number.toFixed()`. - * @param legacyMax The upper bound for the amount. Defaults to `1000`. - * @param legacyDec The number of decimal places for the amount. Defaults to `2`. - * @param legacySymbol The symbol used to prefix the amount. Defaults to `''`. - * @param legacyAutoFormat If true this method will use `Number.toLocaleString()`. Otherwise it will use `Number.toFixed()`. Defaults to `false`. - * - * @example - * faker.finance.amount() // '617.87' - * faker.finance.amount({ min: 5, max: 10 }) // '5.53' - * faker.finance.amount({ min: 5, max: 10, dec: 0 }) // '8' - * faker.finance.amount({ min: 5, max: 10, dec: 2, symbol: '$' }) // '$5.85' - * faker.finance.amount({ min: 5, max: 10, dec: 5, symbol: '', autoFormat: true }) // '9,75067' - * - * @since 2.0.1 - */ - amount( - options?: - | number - | { - /** - * The lower bound for the amount. - * - * @default 0 - */ - min?: number; - /** - * The upper bound for the amount. - * - * @default 1000 - */ - max?: number; - /** - * The number of decimal places for the amount. - * - * @default 2 - */ - dec?: number; - /** - * The symbol used to prefix the amount. - * - * @default '' - */ - symbol?: string; - /** - * If true this method will use `Number.toLocaleString()`. Otherwise it will use `Number.toFixed()`. - * - * @default false - */ - autoFormat?: boolean; - }, - legacyMax?: number, - legacyDec?: number, - legacySymbol?: string, - legacyAutoFormat?: boolean - ): string; - /** - * Generates a random amount between the given bounds (inclusive). - * - * @param options An options object. - * @param options.min The lower bound for the amount. Defaults to `0`. - * @param options.max The upper bound for the amount. Defaults to `1000`. - * @param options.dec The number of decimal places for the amount. Defaults to `2`. - * @param options.symbol The symbol used to prefix the amount. Defaults to `''`. - * @param options.autoFormat If true this method will use `Number.toLocaleString()`. Otherwise it will use `Number.toFixed()`. - * @param legacyMax The upper bound for the amount. Defaults to `1000`. - * @param legacyDec The number of decimal places for the amount. Defaults to `2`. - * @param legacySymbol The symbol used to prefix the amount. Defaults to `''`. - * @param legacyAutoFormat If true this method will use `Number.toLocaleString()`. Otherwise it will use `Number.toFixed()`. Defaults to `false`. - * - * @example - * faker.finance.amount() // '617.87' - * faker.finance.amount({ min: 5, max: 10 }) // '5.53' - * faker.finance.amount({ min: 5, max: 10, dec: 0 }) // '8' - * faker.finance.amount({ min: 5, max: 10, dec: 2, symbol: '$' }) // '$5.85' - * faker.finance.amount({ min: 5, max: 10, dec: 5, symbol: '', autoFormat: true }) // '9,75067' - * - * @since 2.0.1 - */ - amount( - options: - | number - | { - /** - * The lower bound for the amount. - * - * @default 0 - */ - min?: number; - /** - * The upper bound for the amount. - * - * @default 1000 - */ - max?: number; - /** - * The number of decimal places for the amount. - * - * @default 2 - */ - dec?: number; - /** - * The symbol used to prefix the amount. - * - * @default '' - */ - symbol?: string; - /** - * If true this method will use `Number.toLocaleString()`. Otherwise it will use `Number.toFixed()`. - * - * @default false - */ - autoFormat?: boolean; - } = {}, - legacyMax: number = 1000, - legacyDec: number = 2, - legacySymbol: string = '', - legacyAutoFormat: boolean = false + options: { + /** + * The lower bound for the amount. + * + * @default 0 + */ + min?: number; + /** + * The upper bound for the amount. + * + * @default 1000 + */ + max?: number; + /** + * The number of decimal places for the amount. + * + * @default 2 + */ + dec?: number; + /** + * The symbol used to prefix the amount. + * + * @default '' + */ + symbol?: string; + /** + * If true this method will use `Number.toLocaleString()`. Otherwise it will use `Number.toFixed()`. + * + * @default false + */ + autoFormat?: boolean; + } = {} ): string { - if (typeof options === 'number') { - deprecated({ - deprecated: 'faker.finance.amount(min, max, dec, symbol, autoFormat)', - proposed: 'faker.finance.amount({ min, max, dec, symbol, autoFormat })', - since: '8.0', - until: '9.0', - }); - options = { min: options }; - } - const { - autoFormat = legacyAutoFormat, - dec = legacyDec, - max = legacyMax, + autoFormat = false, + dec = 2, + max = 1000, min = 0, - symbol = legacySymbol, + symbol = '', } = options; const randValue = this.faker.number.float({ @@ -1017,118 +800,22 @@ export class FinanceModule extends ModuleBase { * * @since 4.0.0 */ - iban(options?: { - /** - * Return a formatted version of the generated IBAN. - * - * @default false - */ - formatted?: boolean; - /** - * The country code from which you want to generate an IBAN, - * if none is provided a random country will be used. - */ - countryCode?: string; - }): string; - /** - * Generates a random iban. - * - * @param formatted Return a formatted version of the generated IBAN. Defaults to `false`. - * @param countryCode The country code from which you want to generate an IBAN, if none is provided a random country will be used. - * - * @throws Will throw an error if the passed country code is not supported. - * - * @example - * faker.finance.iban() // 'TR736918640040966092800056' - * faker.finance.iban(true) // 'FR20 8008 2330 8984 74S3 Z620 224' - * faker.finance.iban(true, 'DE') // 'DE84 1022 7075 0900 1170 01' - * - * @since 4.0.0 - * - * @deprecated Use `faker.finance.iban({ formatted, countryCode })` instead. - */ - iban(formatted?: boolean, countryCode?: string): string; - /** - * Generates a random iban. - * - * @param options An options object or whether the return value should be formatted. - * @param options.formatted Return a formatted version of the generated IBAN. Defaults to `false`. - * @param options.countryCode The country code from which you want to generate an IBAN, if none is provided a random country will be used. - * @param legacyCountryCode The country code from which you want to generate an IBAN, if none is provided a random country will be used. - * - * @throws Will throw an error if the passed country code is not supported. - * - * @example - * faker.finance.iban() // 'TR736918640040966092800056' - * faker.finance.iban({ formatted: true }) // 'FR20 8008 2330 8984 74S3 Z620 224' - * faker.finance.iban({ formatted: true, countryCode: 'DE' }) // 'DE84 1022 7075 0900 1170 01' - * - * @since 4.0.0 - */ iban( - options?: - | boolean - | { - /** - * Return a formatted version of the generated IBAN. - * - * @default false - */ - formatted?: boolean; - /** - * The country code from which you want to generate an IBAN, - * if none is provided a random country will be used. - */ - countryCode?: string; - }, - legacyCountryCode?: string - ): string; - /** - * Generates a random iban. - * - * @param options An options object or whether the return value should be formatted. - * @param options.formatted Return a formatted version of the generated IBAN. Defaults to `false`. - * @param options.countryCode The country code from which you want to generate an IBAN, if none is provided a random country will be used. - * @param legacyCountryCode The country code from which you want to generate an IBAN, if none is provided a random country will be used. - * - * @throws Will throw an error if the passed country code is not supported. - * - * @example - * faker.finance.iban() // 'TR736918640040966092800056' - * faker.finance.iban({ formatted: true }) // 'FR20 8008 2330 8984 74S3 Z620 224' - * faker.finance.iban({ formatted: true, countryCode: 'DE' }) // 'DE84 1022 7075 0900 1170 01' - * - * @since 4.0.0 - */ - iban( - options: - | boolean - | { - /** - * Return a formatted version of the generated IBAN. - * - * @default false - */ - formatted?: boolean; - /** - * The country code from which you want to generate an IBAN, - * if none is provided a random country will be used. - */ - countryCode?: string; - } = {}, - legacyCountryCode?: string + options: { + /** + * Return a formatted version of the generated IBAN. + * + * @default false + */ + formatted?: boolean; + /** + * The country code from which you want to generate an IBAN, + * if none is provided a random country will be used. + */ + countryCode?: string; + } = {} ): string { - if (typeof options === 'boolean') { - deprecated({ - deprecated: 'faker.finance.iban(formatted, countryCode)', - proposed: 'faker.finance.iban({ formatted, countryCode })', - since: '8.0', - until: '9.0', - }); - options = { formatted: options }; - } - - const { countryCode = legacyCountryCode, formatted = false } = options; + const { countryCode, formatted = false } = options; const ibanFormat = countryCode ? iban.formats.find((f) => f.country === countryCode) diff --git a/test/modules/__snapshots__/finance.spec.ts.snap b/test/modules/__snapshots__/finance.spec.ts.snap index 146db5d6290..30e1f66ae3d 100644 --- a/test/modules/__snapshots__/finance.spec.ts.snap +++ b/test/modules/__snapshots__/finance.spec.ts.snap @@ -1,9 +1,5 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`finance > 42 > account > noArgs 1`] = `"39751108"`; - -exports[`finance > 42 > account > with length 1`] = `"3975110867"`; - exports[`finance > 42 > accountName 1`] = `"Money Market Account"`; exports[`finance > 42 > accountNumber > noArgs 1`] = `"39751108"`; @@ -14,18 +10,10 @@ exports[`finance > 42 > accountNumber > with length option 1`] = `"3975110867"`; exports[`finance > 42 > amount > noArgs 1`] = `"374.54"`; -exports[`finance > 42 > amount > with leagcy dec 1`] = `"374.54012"`; - -exports[`finance > 42 > amount > with leagcy max 1`] = `"18.73"`; - -exports[`finance > 42 > amount > with min 1`] = `"380.79"`; - exports[`finance > 42 > amount > with min and max option 1`] = `"24.98"`; exports[`finance > 42 > amount > with min option 1`] = `"380.79"`; -exports[`finance > 42 > amount > with min, leagcy max, leagcy dec and leagcy symbol 1`] = `"$24.98160"`; - exports[`finance > 42 > amount > with min, max and dec option 1`] = `"24.98160"`; exports[`finance > 42 > amount > with min, max, dec and symbol option 1`] = `"#24.98160"`; @@ -68,26 +56,12 @@ exports[`finance > 42 > ethereumAddress 1`] = `"0x8ead331ddf0fc4446b96d368ab4bd1 exports[`finance > 42 > iban > noArgs 1`] = `"GT69T10P0V1346241560ZH610G35"`; -exports[`finance > 42 > iban > with formatted 1`] = `"GT69 T10P 0V13 4624 1560 ZH61 0G35"`; - -exports[`finance > 42 > iban > with formatted and countryCode 1`] = `"DE69 9500 1670 8002 5210 05"`; - exports[`finance > 42 > iban > with formatted and countryCode option 1`] = `"DE69 9500 1670 8002 5210 05"`; exports[`finance > 42 > iban > with formatted option 1`] = `"GT69 T10P 0V13 4624 1560 ZH61 0G35"`; exports[`finance > 42 > litecoinAddress 1`] = `"3JAaa4SAH2YQdbbiwrhB9hnsMcvA"`; -exports[`finance > 42 > mask > noArgs 1`] = `"(...3975)"`; - -exports[`finance > 42 > mask > with ellipsis 1`] = `"(...3975)"`; - -exports[`finance > 42 > mask > with length 1`] = `"(...39751)"`; - -exports[`finance > 42 > mask > with length, parenthesis and ellipsis 1`] = `"(...39751)"`; - -exports[`finance > 42 > mask > with parenthesis 1`] = `"(...3975)"`; - exports[`finance > 42 > maskedNumber > noArgs 1`] = `"(...3975)"`; exports[`finance > 42 > maskedNumber > with length 1`] = `"(...39751)"`; @@ -110,10 +84,6 @@ exports[`finance > 42 > transactionDescription 1`] = `"deposit transaction at Re exports[`finance > 42 > transactionType 1`] = `"withdrawal"`; -exports[`finance > 1211 > account > noArgs 1`] = `"98296673"`; - -exports[`finance > 1211 > account > with length 1`] = `"9829667368"`; - exports[`finance > 1211 > accountName 1`] = `"Personal Loan Account"`; exports[`finance > 1211 > accountNumber > noArgs 1`] = `"98296673"`; @@ -124,18 +94,10 @@ exports[`finance > 1211 > accountNumber > with length option 1`] = `"9829667368" exports[`finance > 1211 > amount > noArgs 1`] = `"928.52"`; -exports[`finance > 1211 > amount > with leagcy dec 1`] = `"928.52016"`; - -exports[`finance > 1211 > amount > with leagcy max 1`] = `"46.43"`; - -exports[`finance > 1211 > amount > with min 1`] = `"929.24"`; - exports[`finance > 1211 > amount > with min and max option 1`] = `"47.15"`; exports[`finance > 1211 > amount > with min option 1`] = `"929.24"`; -exports[`finance > 1211 > amount > with min, leagcy max, leagcy dec and leagcy symbol 1`] = `"$47.14081"`; - exports[`finance > 1211 > amount > with min, max and dec option 1`] = `"47.14081"`; exports[`finance > 1211 > amount > with min, max, dec and symbol option 1`] = `"#47.14081"`; @@ -178,26 +140,12 @@ exports[`finance > 1211 > ethereumAddress 1`] = `"0xed4fefa7fbaec9dc4c48fa8ebf46 exports[`finance > 1211 > iban > noArgs 1`] = `"TN8326736788219352058231"`; -exports[`finance > 1211 > iban > with formatted 1`] = `"TN83 2673 6788 2193 5205 8231"`; - -exports[`finance > 1211 > iban > with formatted and countryCode 1`] = `"DE13 8077 6768 8219 3520 53"`; - exports[`finance > 1211 > iban > with formatted and countryCode option 1`] = `"DE13 8077 6768 8219 3520 53"`; exports[`finance > 1211 > iban > with formatted option 1`] = `"TN83 2673 6788 2193 5205 8231"`; exports[`finance > 1211 > litecoinAddress 1`] = `"3eZEFLmGPLEQrSRdAcnZLoWwYeiHwmRog"`; -exports[`finance > 1211 > mask > noArgs 1`] = `"(...9829)"`; - -exports[`finance > 1211 > mask > with ellipsis 1`] = `"(...9829)"`; - -exports[`finance > 1211 > mask > with length 1`] = `"(...98296)"`; - -exports[`finance > 1211 > mask > with length, parenthesis and ellipsis 1`] = `"(...98296)"`; - -exports[`finance > 1211 > mask > with parenthesis 1`] = `"(...9829)"`; - exports[`finance > 1211 > maskedNumber > noArgs 1`] = `"(...9829)"`; exports[`finance > 1211 > maskedNumber > with length 1`] = `"(...98296)"`; @@ -220,10 +168,6 @@ exports[`finance > 1211 > transactionDescription 1`] = `"payment transaction at exports[`finance > 1211 > transactionType 1`] = `"invoice"`; -exports[`finance > 1337 > account > noArgs 1`] = `"21243529"`; - -exports[`finance > 1337 > account > with length 1`] = `"2124352971"`; - exports[`finance > 1337 > accountName 1`] = `"Money Market Account"`; exports[`finance > 1337 > accountNumber > noArgs 1`] = `"21243529"`; @@ -234,18 +178,10 @@ exports[`finance > 1337 > accountNumber > with length option 1`] = `"2124352971" exports[`finance > 1337 > amount > noArgs 1`] = `"262.02"`; -exports[`finance > 1337 > amount > with leagcy dec 1`] = `"262.02467"`; - -exports[`finance > 1337 > amount > with leagcy max 1`] = `"13.10"`; - -exports[`finance > 1337 > amount > with min 1`] = `"269.40"`; - exports[`finance > 1337 > amount > with min and max option 1`] = `"20.48"`; exports[`finance > 1337 > amount > with min option 1`] = `"269.40"`; -exports[`finance > 1337 > amount > with min, leagcy max, leagcy dec and leagcy symbol 1`] = `"$20.48098"`; - exports[`finance > 1337 > amount > with min, max and dec option 1`] = `"20.48098"`; exports[`finance > 1337 > amount > with min, max, dec and symbol option 1`] = `"#20.48098"`; @@ -288,26 +224,12 @@ exports[`finance > 1337 > ethereumAddress 1`] = `"0x536a7b5fa28d2f9bb79ca46ea394 exports[`finance > 1337 > iban > noArgs 1`] = `"FO2200532700604734"`; -exports[`finance > 1337 > iban > with formatted 1`] = `"FO22 0053 2700 6047 34"`; - -exports[`finance > 1337 > iban > with formatted and countryCode 1`] = `"DE04 0033 2713 1474 7007 41"`; - exports[`finance > 1337 > iban > with formatted and countryCode option 1`] = `"DE04 0033 2713 1474 7007 41"`; exports[`finance > 1337 > iban > with formatted option 1`] = `"FO22 0053 2700 6047 34"`; exports[`finance > 1337 > litecoinAddress 1`] = `"LhsjwgYJ7oC8ZrMNmqzLbhEubpcw"`; -exports[`finance > 1337 > mask > noArgs 1`] = `"(...2124)"`; - -exports[`finance > 1337 > mask > with ellipsis 1`] = `"(...2124)"`; - -exports[`finance > 1337 > mask > with length 1`] = `"(...21243)"`; - -exports[`finance > 1337 > mask > with length, parenthesis and ellipsis 1`] = `"(...21243)"`; - -exports[`finance > 1337 > mask > with parenthesis 1`] = `"(...2124)"`; - exports[`finance > 1337 > maskedNumber > noArgs 1`] = `"(...2124)"`; exports[`finance > 1337 > maskedNumber > with length 1`] = `"(...21243)"`; diff --git a/test/modules/finance-iban.spec.ts b/test/modules/finance-iban.spec.ts index 4d801aa570f..f699ada4121 100644 --- a/test/modules/finance-iban.spec.ts +++ b/test/modules/finance-iban.spec.ts @@ -11,7 +11,10 @@ describe('finance_iban', () => { describe('generic IBAN country checks', () => { it.each(ibanLib.formats.map((entry) => entry.country))('%s', (country) => { expect(country).toMatch(/^[A-Z]{2}$/); - const actual = faker.finance.iban(true, country); + const actual = faker.finance.iban({ + formatted: true, + countryCode: country, + }); expect(actual).toMatch(new RegExp(`^${country}`)); expect(actual).toSatisfy(validator.isIBAN); @@ -33,7 +36,10 @@ describe('finance_iban', () => { // example IBAN GE29 NB00 0000 0101 9049 17 - const iban = faker.finance.iban(false, 'GE'); + const iban = faker.finance.iban({ + formatted: false, + countryCode: 'GE', + }); expect(iban).toSatisfy(validator.isIBAN); @@ -93,7 +99,10 @@ describe('finance_iban', () => { // Account Code 16 digits // Total Length 24 chars - const iban = faker.finance.iban(false, 'PK'); + const iban = faker.finance.iban({ + formatted: false, + countryCode: 'PK', + }); expect(iban).toSatisfy(validator.isIBAN); @@ -159,7 +168,10 @@ describe('finance_iban', () => { // Chiffre d'indicatif national 0 // Numéro de compte bancaire 0519786457841326 - const iban = faker.finance.iban(false, 'TR'); + const iban = faker.finance.iban({ + formatted: false, + countryCode: 'TR', + }); expect(iban).toSatisfy(validator.isIBAN); @@ -229,7 +241,10 @@ describe('finance_iban', () => { // example IBAN AZ21 NABZ 0000 0000 1370 1000 1944 - const iban = faker.finance.iban(false, 'AZ'); + const iban = faker.finance.iban({ + formatted: false, + countryCode: 'AZ', + }); expect(iban).toSatisfy(validator.isIBAN); @@ -288,7 +303,10 @@ describe('finance_iban', () => { // example IBAN CR05 0152 0200 1026 2840 66 - const iban = faker.finance.iban(false, 'CR'); + const iban = faker.finance.iban({ + formatted: false, + countryCode: 'CR', + }); expect(iban).toSatisfy(validator.isIBAN); @@ -336,7 +354,10 @@ describe('finance_iban', () => { // National check digit 1 digit // Bank account number 16 digit - const iban = faker.finance.iban(false, 'AL'); + const iban = faker.finance.iban({ + formatted: false, + countryCode: 'AL', + }); const ibanFormated = prettyPrintIban(iban); expect(iban).toSatisfy(validator.isIBAN); diff --git a/test/modules/finance.spec.ts b/test/modules/finance.spec.ts index db60a9b3956..0b9a4d6cff7 100644 --- a/test/modules/finance.spec.ts +++ b/test/modules/finance.spec.ts @@ -28,10 +28,6 @@ describe('finance', () => { 'transactionDescription' ); - t.describe('account', (t) => { - t.it('noArgs').it('with length', 10); - }); - t.describe('accountNumber', (t) => { t.it('noArgs') .it('with length', 10) @@ -61,17 +57,7 @@ describe('finance', () => { dec: 5, symbol: '#', autoFormat: false, - }) - .it('with min', 10) - .it('with leagcy max', undefined, 50) - .it('with leagcy dec', undefined, undefined, 5) - .it( - 'with min, leagcy max, leagcy dec and leagcy symbol', - 10, - 50, - 5, - '$' - ); + }); }); t.describe('bic', (t) => { @@ -84,9 +70,7 @@ describe('finance', () => { .it('with formatted and countryCode option', { formatted: true, countryCode: 'DE', - }) - .it('with formatted', true) - .it('with formatted and countryCode', true, 'DE'); + }); }); t.describe('creditCardNumber', (t) => { @@ -96,14 +80,6 @@ describe('finance', () => { .it('with issuer option mastercard', { issuer: 'mastercard' }); }); - t.describe('mask', (t) => { - t.it('noArgs') - .it('with length', 5) - .it('with parenthesis', undefined, true) - .it('with ellipsis', undefined, undefined, true) - .it('with length, parenthesis and ellipsis', 5, true, true); - }); - t.describe('maskedNumber', (t) => { t.it('noArgs') .it('with length', 5) @@ -120,28 +96,6 @@ describe('finance', () => { describe.each(times(NON_SEEDED_BASED_RUN).map(() => faker.seed()))( 'random seeded tests for seed %i', () => { - describe('account()', () => { - it('should supply a default length', () => { - const accountNumber = faker.finance.account(); - - expect(accountNumber).toBeTruthy(); - expect( - accountNumber, - 'The length of the account number should be 8 characters long' - ).toHaveLength(8); - }); - - it('should have same length as given length number', () => { - const accountNumber = faker.finance.account(16); - - expect(accountNumber).toBeTruthy(); - expect( - accountNumber, - 'The length of the account number should match the given number' - ).toHaveLength(16); - }); - }); - describe('accountNumber()', () => { it('should supply a default length', () => { const accountNumber = faker.finance.accountNumber(); @@ -191,31 +145,6 @@ describe('finance', () => { }); }); - describe('mask()', () => { - it('should set a default length', () => { - const expected = 4; // default account mask length - const mask = faker.finance.mask(undefined, false, false); - - expect( - mask, - `The expected default mask length is ${expected} but it was ${mask.length}` - ).toHaveLength(expected); - }); - - it('should set a specified length', () => { - let expected = faker.number.int(20); - - expected = expected || 4; - - const mask = faker.finance.mask(expected, false, false); // the length of mask picks 4 if the random number generator picks 0 - - expect( - mask, - `The expected default mask length is ${expected} but it was ${mask.length}` - ).toHaveLength(expected); - }); - }); - describe('maskedNumber()', () => { it('should return contain parenthesis, ellipsis and have a length of 4 by default', () => { const actual = faker.finance.maskedNumber(); @@ -264,15 +193,6 @@ describe('finance', () => { expect(+amount).toBeLessThanOrEqual(1000); }); - it('should use the default decimal location when not passing arguments', () => { - let amount = faker.finance.amount(); - - amount = faker.finance.amount(100, 100, 1); - - expect(amount).toBeTruthy(); - expect(amount).toBe('100.0'); - }); - //TODO: add support for more currency and decimal options it('should not include a currency symbol by default', () => { const amount = faker.finance.amount(); @@ -286,7 +206,7 @@ describe('finance', () => { }); it('should handle negative amounts', () => { - const amount = faker.finance.amount(-200, -1); + const amount = faker.finance.amount({ min: -200, max: -1 }); expect(amount).toBeTruthy(); expect(amount).toBeTypeOf('string'); @@ -294,8 +214,16 @@ describe('finance', () => { expect(+amount).toBeGreaterThanOrEqual(-200); }); + it('should use the default dec', () => { + const amount = faker.finance.amount({ min: 100, max: 100 }); + + expect(amount).toBeTruthy(); + expect(amount).toBeTypeOf('string'); + expect(amount).toBe('100.00'); + }); + it('should handle argument dec', () => { - const amount = faker.finance.amount(100, 100, 1); + const amount = faker.finance.amount({ min: 100, max: 100, dec: 1 }); expect(amount).toBeTruthy(); expect(amount).toBeTypeOf('string'); @@ -303,7 +231,7 @@ describe('finance', () => { }); it('should handle argument dec = 0', () => { - const amount = faker.finance.amount(100, 100, 0); + const amount = faker.finance.amount({ min: 100, max: 100, dec: 0 }); expect(amount).toBeTruthy(); expect(amount).toBeTypeOf('string'); @@ -314,13 +242,12 @@ describe('finance', () => { 'should return unformatted if autoformat is %s', (autoFormat) => { const number = 6000; - const amount = faker.finance.amount( - number, - number, - 0, - undefined, - autoFormat - ); + const amount = faker.finance.amount({ + min: number, + max: number, + dec: 0, + autoFormat, + }); expect(amount).toBe(number.toString()); } @@ -333,13 +260,12 @@ describe('finance', () => { minimumFractionDigits: decimalPlaces, }); - const amount = faker.finance.amount( - number, - number, - decimalPlaces, - undefined, - true - ); + const amount = faker.finance.amount({ + min: number, + max: number, + dec: decimalPlaces, + autoFormat: true, + }); expect(amount).toStrictEqual(expected); }); @@ -562,7 +488,10 @@ describe('finance', () => { }); it('should return a specific and formally correct IBAN number', () => { - const iban = faker.finance.iban(false, 'DE'); + const iban = faker.finance.iban({ + formatted: false, + countryCode: 'DE', + }); const bban = iban.substring(4) + iban.substring(0, 4); const countryCode = iban.substring(0, 2); @@ -577,7 +506,10 @@ describe('finance', () => { 'throws an error for unsupported country code "%s"', (unsupportedCountryCode) => expect(() => - faker.finance.iban(false, unsupportedCountryCode) + faker.finance.iban({ + formatted: false, + countryCode: unsupportedCountryCode, + }) ).toThrow( new FakerError( `Country code ${unsupportedCountryCode} not supported.` From 89e3f1cb2f5fcb76952e2287b3c0dc6ee71745c9 Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Sun, 10 Mar 2024 09:47:34 +0100 Subject: [PATCH 12/17] infra(unicorn): no-array-callback-reference (#2722) --- .eslintrc.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 09b3f68a0c9..b2424b41f32 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -38,6 +38,7 @@ module.exports = defineConfig({ 'prefer-exponentiation-operator': 'error', 'prefer-template': 'error', + 'unicorn/no-array-callback-reference': 'off', // reduces readability 'unicorn/no-nested-ternary': 'off', // incompatible with prettier 'unicorn/no-null': 'off', // incompatible with TypeScript 'unicorn/no-zero-fractions': 'off', // deactivated to raise awareness of floating operations @@ -49,7 +50,6 @@ module.exports = defineConfig({ 'unicorn/better-regex': 'off', 'unicorn/consistent-function-scoping': 'off', 'unicorn/import-style': 'off', - 'unicorn/no-array-callback-reference': 'off', 'unicorn/no-await-expression-member': 'off', 'unicorn/no-object-as-default-parameter': 'off', 'unicorn/numeric-separators-style': 'off', From e920105f2472e1ab4087907040ce63d068cff92f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 09:48:30 +0100 Subject: [PATCH 13/17] chore(deps): update dependency typescript to ~5.4.2 (#2733) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 124 ++++++++++++++++++++++++------------------------- 2 files changed, 63 insertions(+), 63 deletions(-) diff --git a/package.json b/package.json index 622d9d8abb8..348d6f5bd51 100644 --- a/package.json +++ b/package.json @@ -122,7 +122,7 @@ "tsup": "~8.0.2", "tsx": "~4.7.1", "typedoc": "~0.25.10", - "typescript": "~5.3.3", + "typescript": "~5.4.2", "validator": "~13.11.0", "vite": "~5.1.4", "vitepress": "1.0.0-rc.44", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 747c9966d66..311fb6d233f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -43,10 +43,10 @@ devDependencies: version: 13.11.9 '@typescript-eslint/eslint-plugin': specifier: ~7.1.0 - version: 7.1.0(@typescript-eslint/parser@7.1.0)(eslint@8.57.0)(typescript@5.3.3) + version: 7.1.0(@typescript-eslint/parser@7.1.0)(eslint@8.57.0)(typescript@5.4.2) '@typescript-eslint/parser': specifier: ~7.1.0 - version: 7.1.0(eslint@8.57.0)(typescript@5.3.3) + version: 7.1.0(eslint@8.57.0)(typescript@5.4.2) '@vitest/coverage-v8': specifier: ~1.3.1 version: 1.3.1(vitest@1.3.1) @@ -76,7 +76,7 @@ devDependencies: version: 0.1.0(eslint@8.57.0) eslint-plugin-deprecation: specifier: ~2.0.0 - version: 2.0.0(eslint@8.57.0)(typescript@5.3.3) + version: 2.0.0(eslint@8.57.0)(typescript@5.4.2) eslint-plugin-jsdoc: specifier: ~48.2.0 version: 48.2.0(eslint@8.57.0) @@ -88,7 +88,7 @@ devDependencies: version: 51.0.1(eslint@8.57.0) eslint-plugin-vitest: specifier: ~0.3.22 - version: 0.3.22(@typescript-eslint/eslint-plugin@7.1.0)(eslint@8.57.0)(typescript@5.3.3)(vitest@1.3.1) + version: 0.3.22(@typescript-eslint/eslint-plugin@7.1.0)(eslint@8.57.0)(typescript@5.4.2)(vitest@1.3.1) glob: specifier: ~10.3.10 version: 10.3.10 @@ -100,7 +100,7 @@ devDependencies: version: 3.2.5 prettier-plugin-organize-imports: specifier: ~3.2.4 - version: 3.2.4(prettier@3.2.5)(typescript@5.3.3) + version: 3.2.4(prettier@3.2.5)(typescript@5.4.2) rimraf: specifier: ~5.0.5 version: 5.0.5 @@ -115,16 +115,16 @@ devDependencies: version: 9.5.0 tsup: specifier: ~8.0.2 - version: 8.0.2(typescript@5.3.3) + version: 8.0.2(typescript@5.4.2) tsx: specifier: ~4.7.1 version: 4.7.1 typedoc: specifier: ~0.25.10 - version: 0.25.10(typescript@5.3.3) + version: 0.25.10(typescript@5.4.2) typescript: - specifier: ~5.3.3 - version: 5.3.3 + specifier: ~5.4.2 + version: 5.4.2 validator: specifier: ~13.11.0 version: 13.11.0 @@ -133,13 +133,13 @@ devDependencies: version: 5.1.4(@types/node@20.11.24) vitepress: specifier: 1.0.0-rc.44 - version: 1.0.0-rc.44(@algolia/client-search@4.22.1)(@types/node@20.11.24)(search-insights@2.13.0)(typescript@5.3.3) + version: 1.0.0-rc.44(@algolia/client-search@4.22.1)(@types/node@20.11.24)(search-insights@2.13.0)(typescript@5.4.2) vitest: specifier: ~1.3.1 version: 1.3.1(@types/node@20.11.24)(@vitest/ui@1.3.1) vue: specifier: ~3.4.21 - version: 3.4.21(typescript@5.3.3) + version: 3.4.21(typescript@5.4.2) packages: @@ -1113,7 +1113,7 @@ packages: dev: true optional: true - /@typescript-eslint/eslint-plugin@7.1.0(@typescript-eslint/parser@7.1.0)(eslint@8.57.0)(typescript@5.3.3): + /@typescript-eslint/eslint-plugin@7.1.0(@typescript-eslint/parser@7.1.0)(eslint@8.57.0)(typescript@5.4.2): resolution: {integrity: sha512-j6vT/kCulhG5wBmGtstKeiVr1rdXE4nk+DT1k6trYkwlrvW9eOF5ZbgKnd/YR6PcM4uTEXa0h6Fcvf6X7Dxl0w==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -1125,10 +1125,10 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.1.0(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/parser': 7.1.0(eslint@8.57.0)(typescript@5.4.2) '@typescript-eslint/scope-manager': 7.1.0 - '@typescript-eslint/type-utils': 7.1.0(eslint@8.57.0)(typescript@5.3.3) - '@typescript-eslint/utils': 7.1.0(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/type-utils': 7.1.0(eslint@8.57.0)(typescript@5.4.2) + '@typescript-eslint/utils': 7.1.0(eslint@8.57.0)(typescript@5.4.2) '@typescript-eslint/visitor-keys': 7.1.0 debug: 4.3.4(supports-color@8.1.1) eslint: 8.57.0 @@ -1136,13 +1136,13 @@ packages: ignore: 5.3.1 natural-compare: 1.4.0 semver: 7.6.0 - ts-api-utils: 1.2.1(typescript@5.3.3) - typescript: 5.3.3 + ts-api-utils: 1.2.1(typescript@5.4.2) + typescript: 5.4.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@7.1.0(eslint@8.57.0)(typescript@5.3.3): + /@typescript-eslint/parser@7.1.0(eslint@8.57.0)(typescript@5.4.2): resolution: {integrity: sha512-V1EknKUubZ1gWFjiOZhDSNToOjs63/9O0puCgGS8aDOgpZY326fzFu15QAUjwaXzRZjf/qdsdBrckYdv9YxB8w==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -1154,11 +1154,11 @@ packages: dependencies: '@typescript-eslint/scope-manager': 7.1.0 '@typescript-eslint/types': 7.1.0 - '@typescript-eslint/typescript-estree': 7.1.0(typescript@5.3.3) + '@typescript-eslint/typescript-estree': 7.1.0(typescript@5.4.2) '@typescript-eslint/visitor-keys': 7.1.0 debug: 4.3.4(supports-color@8.1.1) eslint: 8.57.0 - typescript: 5.3.3 + typescript: 5.4.2 transitivePeerDependencies: - supports-color dev: true @@ -1179,7 +1179,7 @@ packages: '@typescript-eslint/visitor-keys': 7.1.0 dev: true - /@typescript-eslint/type-utils@7.1.0(eslint@8.57.0)(typescript@5.3.3): + /@typescript-eslint/type-utils@7.1.0(eslint@8.57.0)(typescript@5.4.2): resolution: {integrity: sha512-UZIhv8G+5b5skkcuhgvxYWHjk7FW7/JP5lPASMEUoliAPwIH/rxoUSQPia2cuOj9AmDZmwUl1usKm85t5VUMew==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -1189,12 +1189,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 7.1.0(typescript@5.3.3) - '@typescript-eslint/utils': 7.1.0(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/typescript-estree': 7.1.0(typescript@5.4.2) + '@typescript-eslint/utils': 7.1.0(eslint@8.57.0)(typescript@5.4.2) debug: 4.3.4(supports-color@8.1.1) eslint: 8.57.0 - ts-api-utils: 1.2.1(typescript@5.3.3) - typescript: 5.3.3 + ts-api-utils: 1.2.1(typescript@5.4.2) + typescript: 5.4.2 transitivePeerDependencies: - supports-color dev: true @@ -1209,7 +1209,7 @@ packages: engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@6.21.0(typescript@5.3.3): + /@typescript-eslint/typescript-estree@6.21.0(typescript@5.4.2): resolution: {integrity: sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -1225,13 +1225,13 @@ packages: is-glob: 4.0.3 minimatch: 9.0.3 semver: 7.6.0 - ts-api-utils: 1.2.1(typescript@5.3.3) - typescript: 5.3.3 + ts-api-utils: 1.2.1(typescript@5.4.2) + typescript: 5.4.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/typescript-estree@7.1.0(typescript@5.3.3): + /@typescript-eslint/typescript-estree@7.1.0(typescript@5.4.2): resolution: {integrity: sha512-k7MyrbD6E463CBbSpcOnwa8oXRdHzH1WiVzOipK3L5KSML92ZKgUBrTlehdi7PEIMT8k0bQixHUGXggPAlKnOQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -1247,13 +1247,13 @@ packages: is-glob: 4.0.3 minimatch: 9.0.3 semver: 7.6.0 - ts-api-utils: 1.2.1(typescript@5.3.3) - typescript: 5.3.3 + ts-api-utils: 1.2.1(typescript@5.4.2) + typescript: 5.4.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@6.21.0(eslint@8.57.0)(typescript@5.3.3): + /@typescript-eslint/utils@6.21.0(eslint@8.57.0)(typescript@5.4.2): resolution: {integrity: sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -1264,7 +1264,7 @@ packages: '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 6.21.0 '@typescript-eslint/types': 6.21.0 - '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.3.3) + '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.4.2) eslint: 8.57.0 semver: 7.6.0 transitivePeerDependencies: @@ -1272,7 +1272,7 @@ packages: - typescript dev: true - /@typescript-eslint/utils@7.1.0(eslint@8.57.0)(typescript@5.3.3): + /@typescript-eslint/utils@7.1.0(eslint@8.57.0)(typescript@5.4.2): resolution: {integrity: sha512-WUFba6PZC5OCGEmbweGpnNJytJiLG7ZvDBJJoUcX4qZYf1mGZ97mO2Mps6O2efxJcJdRNpqweCistDbZMwIVHw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -1283,7 +1283,7 @@ packages: '@types/semver': 7.5.8 '@typescript-eslint/scope-manager': 7.1.0 '@typescript-eslint/types': 7.1.0 - '@typescript-eslint/typescript-estree': 7.1.0(typescript@5.3.3) + '@typescript-eslint/typescript-estree': 7.1.0(typescript@5.4.2) eslint: 8.57.0 semver: 7.6.0 transitivePeerDependencies: @@ -1319,7 +1319,7 @@ packages: vue: ^3.2.25 dependencies: vite: 5.1.4(@types/node@20.11.24) - vue: 3.4.21(typescript@5.3.3) + vue: 3.4.21(typescript@5.4.2) dev: true /@vitest/coverage-v8@1.3.1(vitest@1.3.1): @@ -1455,7 +1455,7 @@ packages: mitt: 3.0.1 perfect-debounce: 1.0.0 speakingurl: 14.0.1 - vue: 3.4.21(typescript@5.3.3) + vue: 3.4.21(typescript@5.4.2) dev: true /@vue/devtools-shared@7.0.16: @@ -1492,7 +1492,7 @@ packages: dependencies: '@vue/compiler-ssr': 3.4.21 '@vue/shared': 3.4.21 - vue: 3.4.21(typescript@5.3.3) + vue: 3.4.21(typescript@5.4.2) dev: true /@vue/shared@3.4.21: @@ -2890,17 +2890,17 @@ packages: - supports-color dev: true - /eslint-plugin-deprecation@2.0.0(eslint@8.57.0)(typescript@5.3.3): + /eslint-plugin-deprecation@2.0.0(eslint@8.57.0)(typescript@5.4.2): resolution: {integrity: sha512-OAm9Ohzbj11/ZFyICyR5N6LbOIvQMp7ZU2zI7Ej0jIc8kiGUERXPNMfw2QqqHD1ZHtjMub3yPZILovYEYucgoQ==} peerDependencies: eslint: ^7.0.0 || ^8.0.0 typescript: ^4.2.4 || ^5.0.0 dependencies: - '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.4.2) eslint: 8.57.0 tslib: 2.6.2 - tsutils: 3.21.0(typescript@5.3.3) - typescript: 5.3.3 + tsutils: 3.21.0(typescript@5.4.2) + typescript: 5.4.2 transitivePeerDependencies: - supports-color dev: true @@ -2973,7 +2973,7 @@ packages: - supports-color dev: true - /eslint-plugin-vitest@0.3.22(@typescript-eslint/eslint-plugin@7.1.0)(eslint@8.57.0)(typescript@5.3.3)(vitest@1.3.1): + /eslint-plugin-vitest@0.3.22(@typescript-eslint/eslint-plugin@7.1.0)(eslint@8.57.0)(typescript@5.4.2)(vitest@1.3.1): resolution: {integrity: sha512-atkFGQ7aVgcuSeSMDqnyevIyUpfBPMnosksgEPrKE7Y8xQlqG/5z2IQ6UDau05zXaaFv7Iz8uzqvIuKshjZ0Zw==} engines: {node: ^18.0.0 || >= 20.0.0} peerDependencies: @@ -2986,8 +2986,8 @@ packages: vitest: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 7.1.0(@typescript-eslint/parser@7.1.0)(eslint@8.57.0)(typescript@5.3.3) - '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/eslint-plugin': 7.1.0(@typescript-eslint/parser@7.1.0)(eslint@8.57.0)(typescript@5.4.2) + '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.4.2) eslint: 8.57.0 vitest: 1.3.1(@types/node@20.11.24)(@vitest/ui@1.3.1) transitivePeerDependencies: @@ -4915,7 +4915,7 @@ packages: fast-diff: 1.3.0 dev: true - /prettier-plugin-organize-imports@3.2.4(prettier@3.2.5)(typescript@5.3.3): + /prettier-plugin-organize-imports@3.2.4(prettier@3.2.5)(typescript@5.4.2): resolution: {integrity: sha512-6m8WBhIp0dfwu0SkgfOxJqh+HpdyfqSSLfKKRZSFbDuEQXDDndb8fTpRWkUrX/uBenkex3MgnVk0J3b3Y5byog==} peerDependencies: '@volar/vue-language-plugin-pug': ^1.0.4 @@ -4929,7 +4929,7 @@ packages: optional: true dependencies: prettier: 3.2.5 - typescript: 5.3.3 + typescript: 5.4.2 dev: true /prettier@3.2.5: @@ -5811,13 +5811,13 @@ packages: engines: {node: '>=8'} dev: true - /ts-api-utils@1.2.1(typescript@5.3.3): + /ts-api-utils@1.2.1(typescript@5.4.2): resolution: {integrity: sha512-RIYA36cJn2WiH9Hy77hdF9r7oEwxAtB/TS9/S4Qd90Ap4z5FSiin5zEiTL44OII1Y3IIlEvxwxFUVgrHSZ/UpA==} engines: {node: '>=16'} peerDependencies: typescript: '>=4.2.0' dependencies: - typescript: 5.3.3 + typescript: 5.4.2 dev: true /ts-interface-checker@0.1.13: @@ -5832,7 +5832,7 @@ packages: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} dev: true - /tsup@8.0.2(typescript@5.3.3): + /tsup@8.0.2(typescript@5.4.2): resolution: {integrity: sha512-NY8xtQXdH7hDUAZwcQdY/Vzlw9johQsaqf7iwZ6g1DOUlFYQ5/AtVAjTvihhEyeRlGo4dLRVHtrRaL35M1daqQ==} engines: {node: '>=18'} hasBin: true @@ -5865,20 +5865,20 @@ packages: source-map: 0.8.0-beta.0 sucrase: 3.35.0 tree-kill: 1.2.2 - typescript: 5.3.3 + typescript: 5.4.2 transitivePeerDependencies: - supports-color - ts-node dev: true - /tsutils@3.21.0(typescript@5.3.3): + /tsutils@3.21.0(typescript@5.4.2): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 5.3.3 + typescript: 5.4.2 dev: true /tsx@4.7.1: @@ -6002,7 +6002,7 @@ packages: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} dev: true - /typedoc@0.25.10(typescript@5.3.3): + /typedoc@0.25.10(typescript@5.4.2): resolution: {integrity: sha512-v10rtOFojrjW9og3T+6wAKeJaGMuojU87DXGZ33sfs+554wgPTRG+s07Ag1BjPZI85Y5QPVouPI63JQ6fcQM5w==} engines: {node: '>= 16'} hasBin: true @@ -6013,11 +6013,11 @@ packages: marked: 4.3.0 minimatch: 9.0.3 shiki: 0.14.7 - typescript: 5.3.3 + typescript: 5.4.2 dev: true - /typescript@5.3.3: - resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} + /typescript@5.4.2: + resolution: {integrity: sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==} engines: {node: '>=14.17'} hasBin: true dev: true @@ -6193,7 +6193,7 @@ packages: fsevents: 2.3.3 dev: true - /vitepress@1.0.0-rc.44(@algolia/client-search@4.22.1)(@types/node@20.11.24)(search-insights@2.13.0)(typescript@5.3.3): + /vitepress@1.0.0-rc.44(@algolia/client-search@4.22.1)(@types/node@20.11.24)(search-insights@2.13.0)(typescript@5.4.2): resolution: {integrity: sha512-tO5taxGI7fSpBK1D8zrZTyJJERlyU9nnt0jHSt3fywfq3VKn977Hg0wUuTkEmwXlFYwuW26+6+3xorf4nD3XvA==} hasBin: true peerDependencies: @@ -6219,7 +6219,7 @@ packages: minisearch: 6.3.0 shiki: 1.1.7 vite: 5.1.4(@types/node@20.11.24) - vue: 3.4.21(typescript@5.3.3) + vue: 3.4.21(typescript@5.4.2) transitivePeerDependencies: - '@algolia/client-search' - '@types/node' @@ -6325,10 +6325,10 @@ packages: '@vue/composition-api': optional: true dependencies: - vue: 3.4.21(typescript@5.3.3) + vue: 3.4.21(typescript@5.4.2) dev: true - /vue@3.4.21(typescript@5.3.3): + /vue@3.4.21(typescript@5.4.2): resolution: {integrity: sha512-5hjyV/jLEIKD/jYl4cavMcnzKwjMKohureP8ejn3hhEjwhWIhWeuzL2kJAjzl/WyVsgPY56Sy4Z40C3lVshxXA==} peerDependencies: typescript: '*' @@ -6341,7 +6341,7 @@ packages: '@vue/runtime-dom': 3.4.21 '@vue/server-renderer': 3.4.21(vue@3.4.21) '@vue/shared': 3.4.21 - typescript: 5.3.3 + typescript: 5.4.2 dev: true /webidl-conversions@4.0.2: From 01a64a338f3520b870aadf067e0b74d4c4c1c657 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 10:13:35 +0100 Subject: [PATCH 14/17] chore(deps): update devdependencies (#2730) --- package.json | 8 +-- pnpm-lock.yaml | 132 ++++++++++++++++++++++++++++++++++++------------- 2 files changed, 101 insertions(+), 39 deletions(-) diff --git a/package.json b/package.json index 348d6f5bd51..b27ad29ea58 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,7 @@ "@eslint-types/typescript-eslint": "~7.0.2", "@eslint-types/unicorn": "~51.0.1", "@types/markdown-it": "~13.0.7", - "@types/node": "~20.11.24", + "@types/node": "~20.11.25", "@types/sanitize-html": "~2.11.0", "@types/semver": "~7.5.8", "@types/validator": "~13.11.9", @@ -107,10 +107,10 @@ "eslint-define-config": "~2.1.0", "eslint-gitignore": "~0.1.0", "eslint-plugin-deprecation": "~2.0.0", - "eslint-plugin-jsdoc": "~48.2.0", + "eslint-plugin-jsdoc": "~48.2.1", "eslint-plugin-prettier": "~5.1.3", "eslint-plugin-unicorn": "~51.0.1", - "eslint-plugin-vitest": "~0.3.22", + "eslint-plugin-vitest": "~0.3.25", "glob": "~10.3.10", "npm-run-all2": "~6.1.2", "prettier": "3.2.5", @@ -124,7 +124,7 @@ "typedoc": "~0.25.10", "typescript": "~5.4.2", "validator": "~13.11.0", - "vite": "~5.1.4", + "vite": "~5.1.5", "vitepress": "1.0.0-rc.44", "vitest": "~1.3.1", "vue": "~3.4.21" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 311fb6d233f..93664a3f7b2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,8 +30,8 @@ devDependencies: specifier: ~13.0.7 version: 13.0.7 '@types/node': - specifier: ~20.11.24 - version: 20.11.24 + specifier: ~20.11.25 + version: 20.11.25 '@types/sanitize-html': specifier: ~2.11.0 version: 2.11.0 @@ -78,8 +78,8 @@ devDependencies: specifier: ~2.0.0 version: 2.0.0(eslint@8.57.0)(typescript@5.4.2) eslint-plugin-jsdoc: - specifier: ~48.2.0 - version: 48.2.0(eslint@8.57.0) + specifier: ~48.2.1 + version: 48.2.1(eslint@8.57.0) eslint-plugin-prettier: specifier: ~5.1.3 version: 5.1.3(eslint-config-prettier@9.1.0)(eslint@8.57.0)(prettier@3.2.5) @@ -87,8 +87,8 @@ devDependencies: specifier: ~51.0.1 version: 51.0.1(eslint@8.57.0) eslint-plugin-vitest: - specifier: ~0.3.22 - version: 0.3.22(@typescript-eslint/eslint-plugin@7.1.0)(eslint@8.57.0)(typescript@5.4.2)(vitest@1.3.1) + specifier: ~0.3.25 + version: 0.3.25(@typescript-eslint/eslint-plugin@7.1.0)(eslint@8.57.0)(typescript@5.4.2)(vitest@1.3.1) glob: specifier: ~10.3.10 version: 10.3.10 @@ -129,14 +129,14 @@ devDependencies: specifier: ~13.11.0 version: 13.11.0 vite: - specifier: ~5.1.4 - version: 5.1.4(@types/node@20.11.24) + specifier: ~5.1.5 + version: 5.1.5(@types/node@20.11.25) vitepress: specifier: 1.0.0-rc.44 - version: 1.0.0-rc.44(@algolia/client-search@4.22.1)(@types/node@20.11.24)(search-insights@2.13.0)(typescript@5.4.2) + version: 1.0.0-rc.44(@algolia/client-search@4.22.1)(@types/node@20.11.25)(search-insights@2.13.0)(typescript@5.4.2) vitest: specifier: ~1.3.1 - version: 1.3.1(@types/node@20.11.24)(@vitest/ui@1.3.1) + version: 1.3.1(@types/node@20.11.25)(@vitest/ui@1.3.1) vue: specifier: ~3.4.21 version: 3.4.21(typescript@5.4.2) @@ -1069,8 +1069,8 @@ packages: resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} dev: true - /@types/node@20.11.24: - resolution: {integrity: sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==} + /@types/node@20.11.25: + resolution: {integrity: sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==} dependencies: undici-types: 5.26.5 dev: true @@ -1109,7 +1109,7 @@ packages: resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} requiresBuild: true dependencies: - '@types/node': 20.11.24 + '@types/node': 20.11.25 dev: true optional: true @@ -1179,6 +1179,14 @@ packages: '@typescript-eslint/visitor-keys': 7.1.0 dev: true + /@typescript-eslint/scope-manager@7.1.1: + resolution: {integrity: sha512-cirZpA8bJMRb4WZ+rO6+mnOJrGFDd38WoXCEI57+CYBqta8Yc8aJym2i7vyqLL1vVYljgw0X27axkUXz32T8TA==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 7.1.1 + '@typescript-eslint/visitor-keys': 7.1.1 + dev: true + /@typescript-eslint/type-utils@7.1.0(eslint@8.57.0)(typescript@5.4.2): resolution: {integrity: sha512-UZIhv8G+5b5skkcuhgvxYWHjk7FW7/JP5lPASMEUoliAPwIH/rxoUSQPia2cuOj9AmDZmwUl1usKm85t5VUMew==} engines: {node: ^16.0.0 || >=18.0.0} @@ -1209,6 +1217,11 @@ packages: engines: {node: ^16.0.0 || >=18.0.0} dev: true + /@typescript-eslint/types@7.1.1: + resolution: {integrity: sha512-KhewzrlRMrgeKm1U9bh2z5aoL4s7K3tK5DwHDn8MHv0yQfWFz/0ZR6trrIHHa5CsF83j/GgHqzdbzCXJ3crx0Q==} + engines: {node: ^16.0.0 || >=18.0.0} + dev: true + /@typescript-eslint/typescript-estree@6.21.0(typescript@5.4.2): resolution: {integrity: sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -1253,6 +1266,28 @@ packages: - supports-color dev: true + /@typescript-eslint/typescript-estree@7.1.1(typescript@5.4.2): + resolution: {integrity: sha512-9ZOncVSfr+sMXVxxca2OJOPagRwT0u/UHikM2Rd6L/aB+kL/QAuTnsv6MeXtjzCJYb8PzrXarypSGIPx3Jemxw==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 7.1.1 + '@typescript-eslint/visitor-keys': 7.1.1 + debug: 4.3.4(supports-color@8.1.1) + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.3 + semver: 7.6.0 + ts-api-utils: 1.2.1(typescript@5.4.2) + typescript: 5.4.2 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/utils@6.21.0(eslint@8.57.0)(typescript@5.4.2): resolution: {integrity: sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -1291,6 +1326,25 @@ packages: - typescript dev: true + /@typescript-eslint/utils@7.1.1(eslint@8.57.0)(typescript@5.4.2): + resolution: {integrity: sha512-thOXM89xA03xAE0lW7alstvnyoBUbBX38YtY+zAUcpRPcq9EIhXPuJ0YTv948MbzmKh6e1AUszn5cBFK49Umqg==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^8.56.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@types/json-schema': 7.0.15 + '@types/semver': 7.5.8 + '@typescript-eslint/scope-manager': 7.1.1 + '@typescript-eslint/types': 7.1.1 + '@typescript-eslint/typescript-estree': 7.1.1(typescript@5.4.2) + eslint: 8.57.0 + semver: 7.6.0 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + /@typescript-eslint/visitor-keys@6.21.0: resolution: {integrity: sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==} engines: {node: ^16.0.0 || >=18.0.0} @@ -1307,18 +1361,26 @@ packages: eslint-visitor-keys: 3.4.3 dev: true + /@typescript-eslint/visitor-keys@7.1.1: + resolution: {integrity: sha512-yTdHDQxY7cSoCcAtiBzVzxleJhkGB9NncSIyMYe2+OGON1ZsP9zOPws/Pqgopa65jvknOjlk/w7ulPlZ78PiLQ==} + engines: {node: ^16.0.0 || >=18.0.0} + dependencies: + '@typescript-eslint/types': 7.1.1 + eslint-visitor-keys: 3.4.3 + dev: true + /@ungap/structured-clone@1.2.0: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true - /@vitejs/plugin-vue@5.0.4(vite@5.1.4)(vue@3.4.21): + /@vitejs/plugin-vue@5.0.4(vite@5.1.5)(vue@3.4.21): resolution: {integrity: sha512-WS3hevEszI6CEVEx28F8RjTX97k3KsrcY6kvTg7+Whm5y3oYvcqzVeGCU3hxSAn4uY2CLCkeokkGKpoctccilQ==} engines: {node: ^18.0.0 || >=20.0.0} peerDependencies: vite: ^5.0.0 vue: ^3.2.25 dependencies: - vite: 5.1.4(@types/node@20.11.24) + vite: 5.1.5(@types/node@20.11.25) vue: 3.4.21(typescript@5.4.2) dev: true @@ -1340,7 +1402,7 @@ packages: std-env: 3.7.0 test-exclude: 6.0.0 v8-to-istanbul: 9.2.0 - vitest: 1.3.1(@types/node@20.11.24)(@vitest/ui@1.3.1) + vitest: 1.3.1(@types/node@20.11.25)(@vitest/ui@1.3.1) transitivePeerDependencies: - supports-color dev: true @@ -1387,7 +1449,7 @@ packages: pathe: 1.1.2 picocolors: 1.0.0 sirv: 2.0.4 - vitest: 1.3.1(@types/node@20.11.24)(@vitest/ui@1.3.1) + vitest: 1.3.1(@types/node@20.11.25)(@vitest/ui@1.3.1) dev: true /@vitest/utils@1.3.1: @@ -2905,8 +2967,8 @@ packages: - supports-color dev: true - /eslint-plugin-jsdoc@48.2.0(eslint@8.57.0): - resolution: {integrity: sha512-O2B1XLBJnUCRkggFzUQ+PBYJDit8iAgXdlu8ucolqGrbmOWPvttZQZX8d1sC0MbqDMSLs8SHSQxaNPRY1RQREg==} + /eslint-plugin-jsdoc@48.2.1(eslint@8.57.0): + resolution: {integrity: sha512-iUvbcyDZSO/9xSuRv2HQBw++8VkV/pt3UWtX9cpPH0l7GKPq78QC/6+PmyQHHvNZaTjAce6QVciEbnc6J/zH5g==} engines: {node: '>=18'} peerDependencies: eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 @@ -2973,8 +3035,8 @@ packages: - supports-color dev: true - /eslint-plugin-vitest@0.3.22(@typescript-eslint/eslint-plugin@7.1.0)(eslint@8.57.0)(typescript@5.4.2)(vitest@1.3.1): - resolution: {integrity: sha512-atkFGQ7aVgcuSeSMDqnyevIyUpfBPMnosksgEPrKE7Y8xQlqG/5z2IQ6UDau05zXaaFv7Iz8uzqvIuKshjZ0Zw==} + /eslint-plugin-vitest@0.3.25(@typescript-eslint/eslint-plugin@7.1.0)(eslint@8.57.0)(typescript@5.4.2)(vitest@1.3.1): + resolution: {integrity: sha512-18iXBQmSeLSkFYlzPDACodtJb1AlyuLkCi+zweBotdeKeALY3TC7dEmPuU8zKuySihHURbIojhJwGevcFC8ojw==} engines: {node: ^18.0.0 || >= 20.0.0} peerDependencies: '@typescript-eslint/eslint-plugin': '*' @@ -2987,9 +3049,9 @@ packages: optional: true dependencies: '@typescript-eslint/eslint-plugin': 7.1.0(@typescript-eslint/parser@7.1.0)(eslint@8.57.0)(typescript@5.4.2) - '@typescript-eslint/utils': 6.21.0(eslint@8.57.0)(typescript@5.4.2) + '@typescript-eslint/utils': 7.1.1(eslint@8.57.0)(typescript@5.4.2) eslint: 8.57.0 - vitest: 1.3.1(@types/node@20.11.24)(@vitest/ui@1.3.1) + vitest: 1.3.1(@types/node@20.11.25)(@vitest/ui@1.3.1) transitivePeerDependencies: - supports-color - typescript @@ -6136,7 +6198,7 @@ packages: extsprintf: 1.3.0 dev: true - /vite-node@1.3.1(@types/node@20.11.24): + /vite-node@1.3.1(@types/node@20.11.25): resolution: {integrity: sha512-azbRrqRxlWTJEVbzInZCTchx0X69M/XPTCz4H+TLvlTcR/xH/3hkRqhOakT41fMJCMzXTu4UvegkZiEoJAWvng==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -6145,7 +6207,7 @@ packages: debug: 4.3.4(supports-color@8.1.1) pathe: 1.1.2 picocolors: 1.0.0 - vite: 5.1.4(@types/node@20.11.24) + vite: 5.1.5(@types/node@20.11.25) transitivePeerDependencies: - '@types/node' - less @@ -6157,8 +6219,8 @@ packages: - terser dev: true - /vite@5.1.4(@types/node@20.11.24): - resolution: {integrity: sha512-n+MPqzq+d9nMVTKyewqw6kSt+R3CkvF9QAKY8obiQn8g1fwTscKxyfaYnC632HtBXAQGc1Yjomphwn1dtwGAHg==} + /vite@5.1.5(@types/node@20.11.25): + resolution: {integrity: sha512-BdN1xh0Of/oQafhU+FvopafUp6WaYenLU/NFoL5WyJL++GxkNfieKzBhM24H3HVsPQrlAqB7iJYTHabzaRed5Q==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -6185,7 +6247,7 @@ packages: terser: optional: true dependencies: - '@types/node': 20.11.24 + '@types/node': 20.11.25 esbuild: 0.19.12 postcss: 8.4.35 rollup: 4.12.0 @@ -6193,7 +6255,7 @@ packages: fsevents: 2.3.3 dev: true - /vitepress@1.0.0-rc.44(@algolia/client-search@4.22.1)(@types/node@20.11.24)(search-insights@2.13.0)(typescript@5.4.2): + /vitepress@1.0.0-rc.44(@algolia/client-search@4.22.1)(@types/node@20.11.25)(search-insights@2.13.0)(typescript@5.4.2): resolution: {integrity: sha512-tO5taxGI7fSpBK1D8zrZTyJJERlyU9nnt0jHSt3fywfq3VKn977Hg0wUuTkEmwXlFYwuW26+6+3xorf4nD3XvA==} hasBin: true peerDependencies: @@ -6210,7 +6272,7 @@ packages: '@shikijs/core': 1.1.7 '@shikijs/transformers': 1.1.7 '@types/markdown-it': 13.0.7 - '@vitejs/plugin-vue': 5.0.4(vite@5.1.4)(vue@3.4.21) + '@vitejs/plugin-vue': 5.0.4(vite@5.1.5)(vue@3.4.21) '@vue/devtools-api': 7.0.16(vue@3.4.21) '@vueuse/core': 10.9.0(vue@3.4.21) '@vueuse/integrations': 10.9.0(focus-trap@7.5.4)(vue@3.4.21) @@ -6218,7 +6280,7 @@ packages: mark.js: 8.11.1 minisearch: 6.3.0 shiki: 1.1.7 - vite: 5.1.4(@types/node@20.11.24) + vite: 5.1.5(@types/node@20.11.25) vue: 3.4.21(typescript@5.4.2) transitivePeerDependencies: - '@algolia/client-search' @@ -6248,7 +6310,7 @@ packages: - universal-cookie dev: true - /vitest@1.3.1(@types/node@20.11.24)(@vitest/ui@1.3.1): + /vitest@1.3.1(@types/node@20.11.25)(@vitest/ui@1.3.1): resolution: {integrity: sha512-/1QJqXs8YbCrfv/GPQ05wAZf2eakUPLPa18vkJAKE7RXOKfVHqMZZ1WlTjiwl6Gcn65M5vpNUB6EFLnEdRdEXQ==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -6273,7 +6335,7 @@ packages: jsdom: optional: true dependencies: - '@types/node': 20.11.24 + '@types/node': 20.11.25 '@vitest/expect': 1.3.1 '@vitest/runner': 1.3.1 '@vitest/snapshot': 1.3.1 @@ -6292,8 +6354,8 @@ packages: strip-literal: 2.0.0 tinybench: 2.6.0 tinypool: 0.8.2 - vite: 5.1.4(@types/node@20.11.24) - vite-node: 1.3.1(@types/node@20.11.24) + vite: 5.1.5(@types/node@20.11.25) + vite-node: 1.3.1(@types/node@20.11.25) why-is-node-running: 2.2.2 transitivePeerDependencies: - less From 4bb106c298e70b5b031452e57755b142710b7f88 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 10:25:25 +0100 Subject: [PATCH 15/17] chore(deps): update typescript-eslint to ~7.1.1 (#2732) --- package.json | 4 +- pnpm-lock.yaml | 110 +++++++++++-------------------------------------- 2 files changed, 26 insertions(+), 88 deletions(-) diff --git a/package.json b/package.json index b27ad29ea58..d8787ebc689 100644 --- a/package.json +++ b/package.json @@ -95,8 +95,8 @@ "@types/sanitize-html": "~2.11.0", "@types/semver": "~7.5.8", "@types/validator": "~13.11.9", - "@typescript-eslint/eslint-plugin": "~7.1.0", - "@typescript-eslint/parser": "~7.1.0", + "@typescript-eslint/eslint-plugin": "~7.1.1", + "@typescript-eslint/parser": "~7.1.1", "@vitest/coverage-v8": "~1.3.1", "@vitest/ui": "~1.3.1", "@vueuse/core": "~10.9.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 93664a3f7b2..69b39b8cf8a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,11 +42,11 @@ devDependencies: specifier: ~13.11.9 version: 13.11.9 '@typescript-eslint/eslint-plugin': - specifier: ~7.1.0 - version: 7.1.0(@typescript-eslint/parser@7.1.0)(eslint@8.57.0)(typescript@5.4.2) + specifier: ~7.1.1 + version: 7.1.1(@typescript-eslint/parser@7.1.1)(eslint@8.57.0)(typescript@5.4.2) '@typescript-eslint/parser': - specifier: ~7.1.0 - version: 7.1.0(eslint@8.57.0)(typescript@5.4.2) + specifier: ~7.1.1 + version: 7.1.1(eslint@8.57.0)(typescript@5.4.2) '@vitest/coverage-v8': specifier: ~1.3.1 version: 1.3.1(vitest@1.3.1) @@ -88,7 +88,7 @@ devDependencies: version: 51.0.1(eslint@8.57.0) eslint-plugin-vitest: specifier: ~0.3.25 - version: 0.3.25(@typescript-eslint/eslint-plugin@7.1.0)(eslint@8.57.0)(typescript@5.4.2)(vitest@1.3.1) + version: 0.3.25(@typescript-eslint/eslint-plugin@7.1.1)(eslint@8.57.0)(typescript@5.4.2)(vitest@1.3.1) glob: specifier: ~10.3.10 version: 10.3.10 @@ -1113,8 +1113,8 @@ packages: dev: true optional: true - /@typescript-eslint/eslint-plugin@7.1.0(@typescript-eslint/parser@7.1.0)(eslint@8.57.0)(typescript@5.4.2): - resolution: {integrity: sha512-j6vT/kCulhG5wBmGtstKeiVr1rdXE4nk+DT1k6trYkwlrvW9eOF5ZbgKnd/YR6PcM4uTEXa0h6Fcvf6X7Dxl0w==} + /@typescript-eslint/eslint-plugin@7.1.1(@typescript-eslint/parser@7.1.1)(eslint@8.57.0)(typescript@5.4.2): + resolution: {integrity: sha512-zioDz623d0RHNhvx0eesUmGfIjzrk18nSBC8xewepKXbBvN/7c1qImV7Hg8TI1URTxKax7/zxfxj3Uph8Chcuw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: '@typescript-eslint/parser': ^7.0.0 @@ -1125,11 +1125,11 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.1.0(eslint@8.57.0)(typescript@5.4.2) - '@typescript-eslint/scope-manager': 7.1.0 - '@typescript-eslint/type-utils': 7.1.0(eslint@8.57.0)(typescript@5.4.2) - '@typescript-eslint/utils': 7.1.0(eslint@8.57.0)(typescript@5.4.2) - '@typescript-eslint/visitor-keys': 7.1.0 + '@typescript-eslint/parser': 7.1.1(eslint@8.57.0)(typescript@5.4.2) + '@typescript-eslint/scope-manager': 7.1.1 + '@typescript-eslint/type-utils': 7.1.1(eslint@8.57.0)(typescript@5.4.2) + '@typescript-eslint/utils': 7.1.1(eslint@8.57.0)(typescript@5.4.2) + '@typescript-eslint/visitor-keys': 7.1.1 debug: 4.3.4(supports-color@8.1.1) eslint: 8.57.0 graphemer: 1.4.0 @@ -1142,8 +1142,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@7.1.0(eslint@8.57.0)(typescript@5.4.2): - resolution: {integrity: sha512-V1EknKUubZ1gWFjiOZhDSNToOjs63/9O0puCgGS8aDOgpZY326fzFu15QAUjwaXzRZjf/qdsdBrckYdv9YxB8w==} + /@typescript-eslint/parser@7.1.1(eslint@8.57.0)(typescript@5.4.2): + resolution: {integrity: sha512-ZWUFyL0z04R1nAEgr9e79YtV5LbafdOtN7yapNbn1ansMyaegl2D4bL7vHoJ4HPSc4CaLwuCVas8CVuneKzplQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^8.56.0 @@ -1152,10 +1152,10 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 7.1.0 - '@typescript-eslint/types': 7.1.0 - '@typescript-eslint/typescript-estree': 7.1.0(typescript@5.4.2) - '@typescript-eslint/visitor-keys': 7.1.0 + '@typescript-eslint/scope-manager': 7.1.1 + '@typescript-eslint/types': 7.1.1 + '@typescript-eslint/typescript-estree': 7.1.1(typescript@5.4.2) + '@typescript-eslint/visitor-keys': 7.1.1 debug: 4.3.4(supports-color@8.1.1) eslint: 8.57.0 typescript: 5.4.2 @@ -1171,14 +1171,6 @@ packages: '@typescript-eslint/visitor-keys': 6.21.0 dev: true - /@typescript-eslint/scope-manager@7.1.0: - resolution: {integrity: sha512-6TmN4OJiohHfoOdGZ3huuLhpiUgOGTpgXNUPJgeZOZR3DnIpdSgtt83RS35OYNNXxM4TScVlpVKC9jyQSETR1A==} - engines: {node: ^16.0.0 || >=18.0.0} - dependencies: - '@typescript-eslint/types': 7.1.0 - '@typescript-eslint/visitor-keys': 7.1.0 - dev: true - /@typescript-eslint/scope-manager@7.1.1: resolution: {integrity: sha512-cirZpA8bJMRb4WZ+rO6+mnOJrGFDd38WoXCEI57+CYBqta8Yc8aJym2i7vyqLL1vVYljgw0X27axkUXz32T8TA==} engines: {node: ^16.0.0 || >=18.0.0} @@ -1187,8 +1179,8 @@ packages: '@typescript-eslint/visitor-keys': 7.1.1 dev: true - /@typescript-eslint/type-utils@7.1.0(eslint@8.57.0)(typescript@5.4.2): - resolution: {integrity: sha512-UZIhv8G+5b5skkcuhgvxYWHjk7FW7/JP5lPASMEUoliAPwIH/rxoUSQPia2cuOj9AmDZmwUl1usKm85t5VUMew==} + /@typescript-eslint/type-utils@7.1.1(eslint@8.57.0)(typescript@5.4.2): + resolution: {integrity: sha512-5r4RKze6XHEEhlZnJtR3GYeCh1IueUHdbrukV2KSlLXaTjuSfeVF8mZUVPLovidCuZfbVjfhi4c0DNSa/Rdg5g==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^8.56.0 @@ -1197,8 +1189,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 7.1.0(typescript@5.4.2) - '@typescript-eslint/utils': 7.1.0(eslint@8.57.0)(typescript@5.4.2) + '@typescript-eslint/typescript-estree': 7.1.1(typescript@5.4.2) + '@typescript-eslint/utils': 7.1.1(eslint@8.57.0)(typescript@5.4.2) debug: 4.3.4(supports-color@8.1.1) eslint: 8.57.0 ts-api-utils: 1.2.1(typescript@5.4.2) @@ -1212,11 +1204,6 @@ packages: engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/types@7.1.0: - resolution: {integrity: sha512-qTWjWieJ1tRJkxgZYXx6WUYtWlBc48YRxgY2JN1aGeVpkhmnopq+SUC8UEVGNXIvWH7XyuTjwALfG6bFEgCkQA==} - engines: {node: ^16.0.0 || >=18.0.0} - dev: true - /@typescript-eslint/types@7.1.1: resolution: {integrity: sha512-KhewzrlRMrgeKm1U9bh2z5aoL4s7K3tK5DwHDn8MHv0yQfWFz/0ZR6trrIHHa5CsF83j/GgHqzdbzCXJ3crx0Q==} engines: {node: ^16.0.0 || >=18.0.0} @@ -1244,28 +1231,6 @@ packages: - supports-color dev: true - /@typescript-eslint/typescript-estree@7.1.0(typescript@5.4.2): - resolution: {integrity: sha512-k7MyrbD6E463CBbSpcOnwa8oXRdHzH1WiVzOipK3L5KSML92ZKgUBrTlehdi7PEIMT8k0bQixHUGXggPAlKnOQ==} - engines: {node: ^16.0.0 || >=18.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/types': 7.1.0 - '@typescript-eslint/visitor-keys': 7.1.0 - debug: 4.3.4(supports-color@8.1.1) - globby: 11.1.0 - is-glob: 4.0.3 - minimatch: 9.0.3 - semver: 7.6.0 - ts-api-utils: 1.2.1(typescript@5.4.2) - typescript: 5.4.2 - transitivePeerDependencies: - - supports-color - dev: true - /@typescript-eslint/typescript-estree@7.1.1(typescript@5.4.2): resolution: {integrity: sha512-9ZOncVSfr+sMXVxxca2OJOPagRwT0u/UHikM2Rd6L/aB+kL/QAuTnsv6MeXtjzCJYb8PzrXarypSGIPx3Jemxw==} engines: {node: ^16.0.0 || >=18.0.0} @@ -1307,25 +1272,6 @@ packages: - typescript dev: true - /@typescript-eslint/utils@7.1.0(eslint@8.57.0)(typescript@5.4.2): - resolution: {integrity: sha512-WUFba6PZC5OCGEmbweGpnNJytJiLG7ZvDBJJoUcX4qZYf1mGZ97mO2Mps6O2efxJcJdRNpqweCistDbZMwIVHw==} - engines: {node: ^16.0.0 || >=18.0.0} - peerDependencies: - eslint: ^8.56.0 - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) - '@types/json-schema': 7.0.15 - '@types/semver': 7.5.8 - '@typescript-eslint/scope-manager': 7.1.0 - '@typescript-eslint/types': 7.1.0 - '@typescript-eslint/typescript-estree': 7.1.0(typescript@5.4.2) - eslint: 8.57.0 - semver: 7.6.0 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - /@typescript-eslint/utils@7.1.1(eslint@8.57.0)(typescript@5.4.2): resolution: {integrity: sha512-thOXM89xA03xAE0lW7alstvnyoBUbBX38YtY+zAUcpRPcq9EIhXPuJ0YTv948MbzmKh6e1AUszn5cBFK49Umqg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -1353,14 +1299,6 @@ packages: eslint-visitor-keys: 3.4.3 dev: true - /@typescript-eslint/visitor-keys@7.1.0: - resolution: {integrity: sha512-FhUqNWluiGNzlvnDZiXad4mZRhtghdoKW6e98GoEOYSu5cND+E39rG5KwJMUzeENwm1ztYBRqof8wMLP+wNPIA==} - engines: {node: ^16.0.0 || >=18.0.0} - dependencies: - '@typescript-eslint/types': 7.1.0 - eslint-visitor-keys: 3.4.3 - dev: true - /@typescript-eslint/visitor-keys@7.1.1: resolution: {integrity: sha512-yTdHDQxY7cSoCcAtiBzVzxleJhkGB9NncSIyMYe2+OGON1ZsP9zOPws/Pqgopa65jvknOjlk/w7ulPlZ78PiLQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -3035,7 +2973,7 @@ packages: - supports-color dev: true - /eslint-plugin-vitest@0.3.25(@typescript-eslint/eslint-plugin@7.1.0)(eslint@8.57.0)(typescript@5.4.2)(vitest@1.3.1): + /eslint-plugin-vitest@0.3.25(@typescript-eslint/eslint-plugin@7.1.1)(eslint@8.57.0)(typescript@5.4.2)(vitest@1.3.1): resolution: {integrity: sha512-18iXBQmSeLSkFYlzPDACodtJb1AlyuLkCi+zweBotdeKeALY3TC7dEmPuU8zKuySihHURbIojhJwGevcFC8ojw==} engines: {node: ^18.0.0 || >= 20.0.0} peerDependencies: @@ -3048,7 +2986,7 @@ packages: vitest: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 7.1.0(@typescript-eslint/parser@7.1.0)(eslint@8.57.0)(typescript@5.4.2) + '@typescript-eslint/eslint-plugin': 7.1.1(@typescript-eslint/parser@7.1.1)(eslint@8.57.0)(typescript@5.4.2) '@typescript-eslint/utils': 7.1.1(eslint@8.57.0)(typescript@5.4.2) eslint: 8.57.0 vitest: 1.3.1(@types/node@20.11.25)(@vitest/ui@1.3.1) From ce846ccae5aac7b78fc7b8a497a27504e78fe6ca Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 10:51:30 +0100 Subject: [PATCH 16/17] chore(deps): update doc-dependencies (#2731) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 4 ++-- pnpm-lock.yaml | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index d8787ebc689..d75dc75c7b5 100644 --- a/package.json +++ b/package.json @@ -121,11 +121,11 @@ "standard-version": "~9.5.0", "tsup": "~8.0.2", "tsx": "~4.7.1", - "typedoc": "~0.25.10", + "typedoc": "~0.25.12", "typescript": "~5.4.2", "validator": "~13.11.0", "vite": "~5.1.5", - "vitepress": "1.0.0-rc.44", + "vitepress": "1.0.0-rc.45", "vitest": "~1.3.1", "vue": "~3.4.21" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 69b39b8cf8a..6653a850b6a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -120,8 +120,8 @@ devDependencies: specifier: ~4.7.1 version: 4.7.1 typedoc: - specifier: ~0.25.10 - version: 0.25.10(typescript@5.4.2) + specifier: ~0.25.12 + version: 0.25.12(typescript@5.4.2) typescript: specifier: ~5.4.2 version: 5.4.2 @@ -132,8 +132,8 @@ devDependencies: specifier: ~5.1.5 version: 5.1.5(@types/node@20.11.25) vitepress: - specifier: 1.0.0-rc.44 - version: 1.0.0-rc.44(@algolia/client-search@4.22.1)(@types/node@20.11.25)(search-insights@2.13.0)(typescript@5.4.2) + specifier: 1.0.0-rc.45 + version: 1.0.0-rc.45(@algolia/client-search@4.22.1)(@types/node@20.11.25)(search-insights@2.13.0)(typescript@5.4.2) vitest: specifier: ~1.3.1 version: 1.3.1(@types/node@20.11.25)(@vitest/ui@1.3.1) @@ -6002,12 +6002,12 @@ packages: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} dev: true - /typedoc@0.25.10(typescript@5.4.2): - resolution: {integrity: sha512-v10rtOFojrjW9og3T+6wAKeJaGMuojU87DXGZ33sfs+554wgPTRG+s07Ag1BjPZI85Y5QPVouPI63JQ6fcQM5w==} + /typedoc@0.25.12(typescript@5.4.2): + resolution: {integrity: sha512-F+qhkK2VoTweDXd1c42GS/By2DvI2uDF4/EpG424dTexSHdtCH52C6IcAvMA6jR3DzAWZjHpUOW+E02kyPNUNw==} engines: {node: '>= 16'} hasBin: true peerDependencies: - typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x + typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x dependencies: lunr: 2.3.9 marked: 4.3.0 @@ -6193,8 +6193,8 @@ packages: fsevents: 2.3.3 dev: true - /vitepress@1.0.0-rc.44(@algolia/client-search@4.22.1)(@types/node@20.11.25)(search-insights@2.13.0)(typescript@5.4.2): - resolution: {integrity: sha512-tO5taxGI7fSpBK1D8zrZTyJJERlyU9nnt0jHSt3fywfq3VKn977Hg0wUuTkEmwXlFYwuW26+6+3xorf4nD3XvA==} + /vitepress@1.0.0-rc.45(@algolia/client-search@4.22.1)(@types/node@20.11.25)(search-insights@2.13.0)(typescript@5.4.2): + resolution: {integrity: sha512-/OiYsu5UKpQKA2c0BAZkfyywjfauDjvXyv6Mo4Ra57m5n4Bxg1HgUGoth1CLH2vwUbR/BHvDA9zOM0RDvgeSVQ==} hasBin: true peerDependencies: markdown-it-mathjax3: ^4.3.2 From 98e3cec5181ea4bbd4c4441202243757341f6f26 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 11 Mar 2024 11:36:12 +0100 Subject: [PATCH 17/17] chore(deps): lock file maintenance (#2734) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- pnpm-lock.yaml | 198 ++++++++++++++++++++++++------------------------- 1 file changed, 99 insertions(+), 99 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6653a850b6a..d3727545d38 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -151,14 +151,14 @@ packages: /@actions/github@6.0.0: resolution: {integrity: sha512-alScpSVnYmjNEXboZjarjukQEzgCRmjMv6Xj47fsdnqGS73bjJNDpiiXmp8jr0UZLdUB6d9jW63IcmddUP+l0g==} dependencies: - '@actions/http-client': 2.2.0 + '@actions/http-client': 2.2.1 '@octokit/core': 5.1.0 '@octokit/plugin-paginate-rest': 9.2.1(@octokit/core@5.1.0) '@octokit/plugin-rest-endpoint-methods': 10.4.1(@octokit/core@5.1.0) dev: true - /@actions/http-client@2.2.0: - resolution: {integrity: sha512-q+epW0trjVUUHboliPb4UF9g2msf+w61b32tAkFEwL/IwP0DQWgbCMM0Hbe3e3WXSKz5VcUXbzJQgy8Hkra/Lg==} + /@actions/http-client@2.2.1: + resolution: {integrity: sha512-KhC/cZsq7f8I4LfZSJKgCvEwfkE8o1538VoBeoGzokVLLnbFDEAdFD3UhoMklxo2un9NJVBdANOresx7vTHlHw==} dependencies: tunnel: 0.0.6 undici: 5.28.3 @@ -394,14 +394,14 @@ packages: - supports-color dev: true - /@docsearch/css@3.5.2: - resolution: {integrity: sha512-SPiDHaWKQZpwR2siD0KQUwlStvIAnEyK6tAE2h2Wuoq8ue9skzhlyVQ1ddzOxX6khULnAALDiR/isSF3bnuciA==} + /@docsearch/css@3.6.0: + resolution: {integrity: sha512-+sbxb71sWre+PwDK7X2T8+bhS6clcVMLwBPznX45Qu6opJcgRjAp7gYSDzVFp187J+feSj5dNBN1mJoi6ckkUQ==} dev: true - /@docsearch/js@3.5.2(@algolia/client-search@4.22.1)(search-insights@2.13.0): - resolution: {integrity: sha512-p1YFTCDflk8ieHgFJYfmyHBki1D61+U9idwrLh+GQQMrBSP3DLGKpy0XUJtPjAOPltcVbqsTjiPFfH7JImjUNg==} + /@docsearch/js@3.6.0(@algolia/client-search@4.22.1)(search-insights@2.13.0): + resolution: {integrity: sha512-QujhqINEElrkIfKwyyyTfbsfMAYCkylInLYMRqHy7PHc8xTBQCow73tlo/Kc7oIwBrCLf0P3YhjlOeV4v8hevQ==} dependencies: - '@docsearch/react': 3.5.2(@algolia/client-search@4.22.1)(search-insights@2.13.0) + '@docsearch/react': 3.6.0(@algolia/client-search@4.22.1)(search-insights@2.13.0) preact: 10.19.6 transitivePeerDependencies: - '@algolia/client-search' @@ -411,8 +411,8 @@ packages: - search-insights dev: true - /@docsearch/react@3.5.2(@algolia/client-search@4.22.1)(search-insights@2.13.0): - resolution: {integrity: sha512-9Ahcrs5z2jq/DcAvYtvlqEBHImbm4YJI8M9y0x6Tqg598P40HTEkX7hsMcIuThI+hTFxRGZ9hll0Wygm2yEjng==} + /@docsearch/react@3.6.0(@algolia/client-search@4.22.1)(search-insights@2.13.0): + resolution: {integrity: sha512-HUFut4ztcVNmqy9gp/wxNbC7pTOHhgVVkHVGCACTuLhUKUhKAF9KYHJtMiLUJxEqiFLQiuri1fWF8zqwM/cu1w==} peerDependencies: '@types/react': '>= 16.8.0 < 19.0.0' react: '>= 16.8.0 < 19.0.0' @@ -430,7 +430,7 @@ packages: dependencies: '@algolia/autocomplete-core': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1)(search-insights@2.13.0) '@algolia/autocomplete-preset-algolia': 1.9.3(@algolia/client-search@4.22.1)(algoliasearch@4.22.1) - '@docsearch/css': 3.5.2 + '@docsearch/css': 3.6.0 algoliasearch: 4.22.1 search-insights: 2.13.0 transitivePeerDependencies: @@ -916,108 +916,108 @@ packages: engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} dev: true - /@polka/url@1.0.0-next.24: - resolution: {integrity: sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ==} + /@polka/url@1.0.0-next.25: + resolution: {integrity: sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==} dev: true - /@rollup/rollup-android-arm-eabi@4.12.0: - resolution: {integrity: sha512-+ac02NL/2TCKRrJu2wffk1kZ+RyqxVUlbjSagNgPm94frxtr+XDL12E5Ll1enWskLrtrZ2r8L3wED1orIibV/w==} + /@rollup/rollup-android-arm-eabi@4.12.1: + resolution: {integrity: sha512-iU2Sya8hNn1LhsYyf0N+L4Gf9Qc+9eBTJJJsaOGUp+7x4n2M9dxTt8UvhJl3oeftSjblSlpCfvjA/IfP3g5VjQ==} cpu: [arm] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-android-arm64@4.12.0: - resolution: {integrity: sha512-OBqcX2BMe6nvjQ0Nyp7cC90cnumt8PXmO7Dp3gfAju/6YwG0Tj74z1vKrfRz7qAv23nBcYM8BCbhrsWqO7PzQQ==} + /@rollup/rollup-android-arm64@4.12.1: + resolution: {integrity: sha512-wlzcWiH2Ir7rdMELxFE5vuM7D6TsOcJ2Yw0c3vaBR3VOsJFVTx9xvwnAvhgU5Ii8Gd6+I11qNHwndDscIm0HXg==} cpu: [arm64] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-arm64@4.12.0: - resolution: {integrity: sha512-X64tZd8dRE/QTrBIEs63kaOBG0b5GVEd3ccoLtyf6IdXtHdh8h+I56C2yC3PtC9Ucnv0CpNFJLqKFVgCYe0lOQ==} + /@rollup/rollup-darwin-arm64@4.12.1: + resolution: {integrity: sha512-YRXa1+aZIFN5BaImK+84B3uNK8C6+ynKLPgvn29X9s0LTVCByp54TB7tdSMHDR7GTV39bz1lOmlLDuedgTwwHg==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-x64@4.12.0: - resolution: {integrity: sha512-cc71KUZoVbUJmGP2cOuiZ9HSOP14AzBAThn3OU+9LcA1+IUqswJyR1cAJj3Mg55HbjZP6OLAIscbQsQLrpgTOg==} + /@rollup/rollup-darwin-x64@4.12.1: + resolution: {integrity: sha512-opjWJ4MevxeA8FhlngQWPBOvVWYNPFkq6/25rGgG+KOy0r8clYwL1CFd+PGwRqqMFVQ4/Qd3sQu5t7ucP7C/Uw==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm-gnueabihf@4.12.0: - resolution: {integrity: sha512-a6w/Y3hyyO6GlpKL2xJ4IOh/7d+APaqLYdMf86xnczU3nurFTaVN9s9jOXQg97BE4nYm/7Ga51rjec5nfRdrvA==} + /@rollup/rollup-linux-arm-gnueabihf@4.12.1: + resolution: {integrity: sha512-uBkwaI+gBUlIe+EfbNnY5xNyXuhZbDSx2nzzW8tRMjUmpScd6lCQYKY2V9BATHtv5Ef2OBq6SChEP8h+/cxifQ==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-gnu@4.12.0: - resolution: {integrity: sha512-0fZBq27b+D7Ar5CQMofVN8sggOVhEtzFUwOwPppQt0k+VR+7UHMZZY4y+64WJ06XOhBTKXtQB/Sv0NwQMXyNAA==} + /@rollup/rollup-linux-arm64-gnu@4.12.1: + resolution: {integrity: sha512-0bK9aG1kIg0Su7OcFTlexkVeNZ5IzEsnz1ept87a0TUgZ6HplSgkJAnFpEVRW7GRcikT4GlPV0pbtVedOaXHQQ==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-musl@4.12.0: - resolution: {integrity: sha512-eTvzUS3hhhlgeAv6bfigekzWZjaEX9xP9HhxB0Dvrdbkk5w/b+1Sxct2ZuDxNJKzsRStSq1EaEkVSEe7A7ipgQ==} + /@rollup/rollup-linux-arm64-musl@4.12.1: + resolution: {integrity: sha512-qB6AFRXuP8bdkBI4D7UPUbE7OQf7u5OL+R94JE42Z2Qjmyj74FtDdLGeriRyBDhm4rQSvqAGCGC01b8Fu2LthQ==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-riscv64-gnu@4.12.0: - resolution: {integrity: sha512-ix+qAB9qmrCRiaO71VFfY8rkiAZJL8zQRXveS27HS+pKdjwUfEhqo2+YF2oI+H/22Xsiski+qqwIBxVewLK7sw==} + /@rollup/rollup-linux-riscv64-gnu@4.12.1: + resolution: {integrity: sha512-sHig3LaGlpNgDj5o8uPEoGs98RII8HpNIqFtAI8/pYABO8i0nb1QzT0JDoXF/pxzqO+FkxvwkHZo9k0NJYDedg==} cpu: [riscv64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-gnu@4.12.0: - resolution: {integrity: sha512-TenQhZVOtw/3qKOPa7d+QgkeM6xY0LtwzR8OplmyL5LrgTWIXpTQg2Q2ycBf8jm+SFW2Wt/DTn1gf7nFp3ssVA==} + /@rollup/rollup-linux-x64-gnu@4.12.1: + resolution: {integrity: sha512-nD3YcUv6jBJbBNFvSbp0IV66+ba/1teuBcu+fBBPZ33sidxitc6ErhON3JNavaH8HlswhWMC3s5rgZpM4MtPqQ==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-musl@4.12.0: - resolution: {integrity: sha512-LfFdRhNnW0zdMvdCb5FNuWlls2WbbSridJvxOvYWgSBOYZtgBfW9UGNJG//rwMqTX1xQE9BAodvMH9tAusKDUw==} + /@rollup/rollup-linux-x64-musl@4.12.1: + resolution: {integrity: sha512-7/XVZqgBby2qp/cO0TQ8uJK+9xnSdJ9ct6gSDdEr4MfABrjTyrW6Bau7HQ73a2a5tPB7hno49A0y1jhWGDN9OQ==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-arm64-msvc@4.12.0: - resolution: {integrity: sha512-JPDxovheWNp6d7AHCgsUlkuCKvtu3RB55iNEkaQcf0ttsDU/JZF+iQnYcQJSk/7PtT4mjjVG8N1kpwnI9SLYaw==} + /@rollup/rollup-win32-arm64-msvc@4.12.1: + resolution: {integrity: sha512-CYc64bnICG42UPL7TrhIwsJW4QcKkIt9gGlj21gq3VV0LL6XNb1yAdHVp1pIi9gkts9gGcT3OfUYHjGP7ETAiw==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-ia32-msvc@4.12.0: - resolution: {integrity: sha512-fjtuvMWRGJn1oZacG8IPnzIV6GF2/XG+h71FKn76OYFqySXInJtseAqdprVTDTyqPxQOG9Exak5/E9Z3+EJ8ZA==} + /@rollup/rollup-win32-ia32-msvc@4.12.1: + resolution: {integrity: sha512-LN+vnlZ9g0qlHGlS920GR4zFCqAwbv2lULrR29yGaWP9u7wF5L7GqWu9Ah6/kFZPXPUkpdZwd//TNR+9XC9hvA==} cpu: [ia32] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-x64-msvc@4.12.0: - resolution: {integrity: sha512-ZYmr5mS2wd4Dew/JjT0Fqi2NPB/ZhZ2VvPp7SmvPZb4Y1CG/LRcS6tcRo2cYU7zLK5A7cdbhWnnWmUjoI4qapg==} + /@rollup/rollup-win32-x64-msvc@4.12.1: + resolution: {integrity: sha512-n+vkrSyphvmU0qkQ6QBNXCGr2mKjhP08mPRM/Xp5Ck2FV4NrHU+y6axzDeixUrCBHVUS51TZhjqrKBBsHLKb2Q==} cpu: [x64] os: [win32] requiresBuild: true @@ -1136,7 +1136,7 @@ packages: ignore: 5.3.1 natural-compare: 1.4.0 semver: 7.6.0 - ts-api-utils: 1.2.1(typescript@5.4.2) + ts-api-utils: 1.3.0(typescript@5.4.2) typescript: 5.4.2 transitivePeerDependencies: - supports-color @@ -1193,7 +1193,7 @@ packages: '@typescript-eslint/utils': 7.1.1(eslint@8.57.0)(typescript@5.4.2) debug: 4.3.4(supports-color@8.1.1) eslint: 8.57.0 - ts-api-utils: 1.2.1(typescript@5.4.2) + ts-api-utils: 1.3.0(typescript@5.4.2) typescript: 5.4.2 transitivePeerDependencies: - supports-color @@ -1225,7 +1225,7 @@ packages: is-glob: 4.0.3 minimatch: 9.0.3 semver: 7.6.0 - ts-api-utils: 1.2.1(typescript@5.4.2) + ts-api-utils: 1.3.0(typescript@5.4.2) typescript: 5.4.2 transitivePeerDependencies: - supports-color @@ -1247,7 +1247,7 @@ packages: is-glob: 4.0.3 minimatch: 9.0.3 semver: 7.6.0 - ts-api-utils: 1.2.1(typescript@5.4.2) + ts-api-utils: 1.3.0(typescript@5.4.2) typescript: 5.4.2 transitivePeerDependencies: - supports-color @@ -1866,8 +1866,8 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001593 - electron-to-chromium: 1.4.690 + caniuse-lite: 1.0.30001597 + electron-to-chromium: 1.4.699 node-releases: 2.0.14 update-browserslist-db: 1.0.13(browserslist@4.23.0) dev: true @@ -1920,7 +1920,7 @@ packages: es-errors: 1.3.0 function-bind: 1.1.2 get-intrinsic: 1.2.4 - set-function-length: 1.2.1 + set-function-length: 1.2.2 dev: true /callsites@3.1.0: @@ -1942,8 +1942,8 @@ packages: engines: {node: '>=6'} dev: true - /caniuse-lite@1.0.30001593: - resolution: {integrity: sha512-UWM1zlo3cZfkpBysd7AS+z+v007q9G1+fLTUU42rQnY6t2axoogPW/xol6T7juU5EUoOhML4WgBIdG+9yYqAjQ==} + /caniuse-lite@1.0.30001597: + resolution: {integrity: sha512-7LjJvmQU6Sj7bL0j5b5WY/3n7utXUJvAe1lxhsHDbLmwX9mdL86Yjtr+5SRCyf8qME4M7pU2hswj0FpyBVCv9w==} dev: true /caseless@0.12.0: @@ -2696,8 +2696,8 @@ packages: safer-buffer: 2.1.2 dev: true - /electron-to-chromium@1.4.690: - resolution: {integrity: sha512-+2OAGjUx68xElQhydpcbqH50hE8Vs2K6TkAeLhICYfndb67CVH0UsZaijmRUE3rHlIxU1u0jxwhgVe6fK3YANA==} + /electron-to-chromium@1.4.699: + resolution: {integrity: sha512-I7q3BbQi6e4tJJN5CRcyvxhK0iJb34TV8eJQcgh+fR2fQ8miMgZcEInckCo1U9exDHbfz7DLDnFn8oqH/VcRKw==} dev: true /emoji-regex@8.0.0: @@ -2753,7 +2753,7 @@ packages: has-property-descriptors: 1.0.2 has-proto: 1.0.3 has-symbols: 1.0.3 - hasown: 2.0.1 + hasown: 2.0.2 internal-slot: 1.0.7 is-array-buffer: 3.0.4 is-callable: 1.2.7 @@ -2767,7 +2767,7 @@ packages: object-keys: 1.1.1 object.assign: 4.1.5 regexp.prototype.flags: 1.5.2 - safe-array-concat: 1.1.0 + safe-array-concat: 1.1.2 safe-regex-test: 1.0.3 string.prototype.trim: 1.2.8 string.prototype.trimend: 1.0.7 @@ -2777,7 +2777,7 @@ packages: typed-array-byte-offset: 1.0.2 typed-array-length: 1.0.5 unbox-primitive: 1.0.2 - which-typed-array: 1.1.14 + which-typed-array: 1.1.15 dev: true /es-define-property@1.0.0: @@ -2798,13 +2798,13 @@ packages: dependencies: get-intrinsic: 1.2.4 has-tostringtag: 1.0.2 - hasown: 2.0.1 + hasown: 2.0.2 dev: true /es-shim-unscopables@1.0.2: resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} dependencies: - hasown: 2.0.1 + hasown: 2.0.2 dev: true /es-to-primitive@1.2.1: @@ -3382,7 +3382,7 @@ packages: function-bind: 1.1.2 has-proto: 1.0.3 has-symbols: 1.0.3 - hasown: 2.0.1 + hasown: 2.0.2 dev: true /get-pkg-repo@4.2.1: @@ -3422,8 +3422,8 @@ packages: get-intrinsic: 1.2.4 dev: true - /get-tsconfig@4.7.2: - resolution: {integrity: sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==} + /get-tsconfig@4.7.3: + resolution: {integrity: sha512-ZvkrzoUA0PQZM6fy6+/Hce561s+faD1rsNwhnO5FelNjyy7EMGJ3Rz1AQ8GYDWjhRs/7dBLOEJvhK8MiEJOAFg==} dependencies: resolve-pkg-maps: 1.0.0 dev: true @@ -3633,8 +3633,8 @@ packages: has-symbols: 1.0.3 dev: true - /hasown@2.0.1: - resolution: {integrity: sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==} + /hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} dependencies: function-bind: 1.1.2 @@ -3751,7 +3751,7 @@ packages: engines: {node: '>= 0.4'} dependencies: es-errors: 1.3.0 - hasown: 2.0.1 + hasown: 2.0.2 side-channel: 1.0.6 dev: true @@ -3810,7 +3810,7 @@ packages: /is-core-module@2.13.1: resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} dependencies: - hasown: 2.0.1 + hasown: 2.0.2 dev: true /is-date-object@1.0.5: @@ -3939,7 +3939,7 @@ packages: resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} engines: {node: '>= 0.4'} dependencies: - which-typed-array: 1.1.14 + which-typed-array: 1.1.15 dev: true /is-typedarray@1.0.0: @@ -4887,7 +4887,7 @@ packages: optional: true dependencies: lilconfig: 3.1.1 - yaml: 2.4.0 + yaml: 2.4.1 dev: true /postcss@8.4.35: @@ -5024,7 +5024,7 @@ packages: dependencies: find-up: 6.3.0 read-pkg: 8.1.0 - type-fest: 4.10.3 + type-fest: 4.12.0 dev: true /read-pkg-up@3.0.0: @@ -5070,7 +5070,7 @@ packages: '@types/normalize-package-data': 2.4.4 normalize-package-data: 6.0.0 parse-json: 7.1.1 - type-fest: 4.10.3 + type-fest: 4.12.0 dev: true /readable-stream@2.3.8: @@ -5201,26 +5201,26 @@ packages: glob: 10.3.10 dev: true - /rollup@4.12.0: - resolution: {integrity: sha512-wz66wn4t1OHIJw3+XU7mJJQV/2NAfw5OAk6G6Hoo3zcvz/XOfQ52Vgi+AN4Uxoxi0KBBwk2g8zPrTDA4btSB/Q==} + /rollup@4.12.1: + resolution: {integrity: sha512-ggqQKvx/PsB0FaWXhIvVkSWh7a/PCLQAsMjBc+nA2M8Rv2/HG0X6zvixAB7KyZBRtifBUhy5k8voQX/mRnABPg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true dependencies: '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.12.0 - '@rollup/rollup-android-arm64': 4.12.0 - '@rollup/rollup-darwin-arm64': 4.12.0 - '@rollup/rollup-darwin-x64': 4.12.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.12.0 - '@rollup/rollup-linux-arm64-gnu': 4.12.0 - '@rollup/rollup-linux-arm64-musl': 4.12.0 - '@rollup/rollup-linux-riscv64-gnu': 4.12.0 - '@rollup/rollup-linux-x64-gnu': 4.12.0 - '@rollup/rollup-linux-x64-musl': 4.12.0 - '@rollup/rollup-win32-arm64-msvc': 4.12.0 - '@rollup/rollup-win32-ia32-msvc': 4.12.0 - '@rollup/rollup-win32-x64-msvc': 4.12.0 + '@rollup/rollup-android-arm-eabi': 4.12.1 + '@rollup/rollup-android-arm64': 4.12.1 + '@rollup/rollup-darwin-arm64': 4.12.1 + '@rollup/rollup-darwin-x64': 4.12.1 + '@rollup/rollup-linux-arm-gnueabihf': 4.12.1 + '@rollup/rollup-linux-arm64-gnu': 4.12.1 + '@rollup/rollup-linux-arm64-musl': 4.12.1 + '@rollup/rollup-linux-riscv64-gnu': 4.12.1 + '@rollup/rollup-linux-x64-gnu': 4.12.1 + '@rollup/rollup-linux-x64-musl': 4.12.1 + '@rollup/rollup-win32-arm64-msvc': 4.12.1 + '@rollup/rollup-win32-ia32-msvc': 4.12.1 + '@rollup/rollup-win32-x64-msvc': 4.12.1 fsevents: 2.3.3 dev: true @@ -5236,8 +5236,8 @@ packages: tslib: 2.6.2 dev: true - /safe-array-concat@1.1.0: - resolution: {integrity: sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==} + /safe-array-concat@1.1.2: + resolution: {integrity: sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==} engines: {node: '>=0.4'} dependencies: call-bind: 1.0.7 @@ -5300,8 +5300,8 @@ packages: lru-cache: 6.0.0 dev: true - /set-function-length@1.2.1: - resolution: {integrity: sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==} + /set-function-length@1.2.2: + resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} dependencies: define-data-property: 1.1.4 @@ -5380,7 +5380,7 @@ packages: resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==} engines: {node: '>= 10'} dependencies: - '@polka/url': 1.0.0-next.24 + '@polka/url': 1.0.0-next.25 mrmime: 2.0.0 totalist: 3.0.1 dev: true @@ -5811,8 +5811,8 @@ packages: engines: {node: '>=8'} dev: true - /ts-api-utils@1.2.1(typescript@5.4.2): - resolution: {integrity: sha512-RIYA36cJn2WiH9Hy77hdF9r7oEwxAtB/TS9/S4Qd90Ap4z5FSiin5zEiTL44OII1Y3IIlEvxwxFUVgrHSZ/UpA==} + /ts-api-utils@1.3.0(typescript@5.4.2): + resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} engines: {node: '>=16'} peerDependencies: typescript: '>=4.2.0' @@ -5861,7 +5861,7 @@ packages: joycon: 3.1.1 postcss-load-config: 4.0.2 resolve-from: 5.0.0 - rollup: 4.12.0 + rollup: 4.12.1 source-map: 0.8.0-beta.0 sucrase: 3.35.0 tree-kill: 1.2.2 @@ -5887,7 +5887,7 @@ packages: hasBin: true dependencies: esbuild: 0.19.12 - get-tsconfig: 4.7.2 + get-tsconfig: 4.7.3 optionalDependencies: fsevents: 2.3.3 dev: true @@ -5949,8 +5949,8 @@ packages: engines: {node: '>=14.16'} dev: true - /type-fest@4.10.3: - resolution: {integrity: sha512-JLXyjizi072smKGGcZiAJDCNweT8J+AuRxmPZ1aG7TERg4ijx9REl8CNhbr36RV4qXqL1gO1FF9HL8OkVmmrsA==} + /type-fest@4.12.0: + resolution: {integrity: sha512-5Y2/pp2wtJk8o08G0CMkuFPCO354FGwk/vbidxrdhRGZfd0tFnb4Qb8anp9XxXriwBgVPjdWbKpGl4J9lJY2jQ==} engines: {node: '>=16'} dev: true @@ -6188,7 +6188,7 @@ packages: '@types/node': 20.11.25 esbuild: 0.19.12 postcss: 8.4.35 - rollup: 4.12.0 + rollup: 4.12.1 optionalDependencies: fsevents: 2.3.3 dev: true @@ -6205,8 +6205,8 @@ packages: postcss: optional: true dependencies: - '@docsearch/css': 3.5.2 - '@docsearch/js': 3.5.2(@algolia/client-search@4.22.1)(search-insights@2.13.0) + '@docsearch/css': 3.6.0 + '@docsearch/js': 3.6.0(@algolia/client-search@4.22.1)(search-insights@2.13.0) '@shikijs/core': 1.1.7 '@shikijs/transformers': 1.1.7 '@types/markdown-it': 13.0.7 @@ -6366,8 +6366,8 @@ packages: is-symbol: 1.0.4 dev: true - /which-typed-array@1.1.14: - resolution: {integrity: sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg==} + /which-typed-array@1.1.15: + resolution: {integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==} engines: {node: '>= 0.4'} dependencies: available-typed-arrays: 1.0.7 @@ -6443,8 +6443,8 @@ packages: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} dev: true - /yaml@2.4.0: - resolution: {integrity: sha512-j9iR8g+/t0lArF4V6NE/QCfT+CO7iLqrXAHZbJdo+LfjqP1vR8Fg5bSiaq6Q2lOD1AUEVrEVIgABvBFYojJVYQ==} + /yaml@2.4.1: + resolution: {integrity: sha512-pIXzoImaqmfOrL7teGUBt/T7ZDnyeGBWyXQBvOVhLkWLN37GXv8NMLK406UY6dS51JfcQHsmcW5cJ441bHg6Lg==} engines: {node: '>= 14'} hasBin: true dev: true