diff --git a/package.json b/package.json index 4796ea06..fae9b653 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "oxlint": "^1.73.0", "oxlint-tsgolint": "^0.24.0", "pkg-pr-new": "^0.0.75", - "prettier": "3.8.4", + "prettier": "3.9.4", "publint": "^0.3.21", "rolldown": "^1.1.4", "rolldown-plugin-dts": "^0.27.1", diff --git a/packages/fast-check/src/arbitrary/_internals/implementations/SchedulerImplem.ts b/packages/fast-check/src/arbitrary/_internals/implementations/SchedulerImplem.ts index 29c0dd3e..f9c1215e 100644 --- a/packages/fast-check/src/arbitrary/_internals/implementations/SchedulerImplem.ts +++ b/packages/fast-check/src/arbitrary/_internals/implementations/SchedulerImplem.ts @@ -410,15 +410,13 @@ export class SchedulerImplem implements Scheduler { report(): SchedulerReportItem[] { return [ ...this.triggeredTasks, - ...this.scheduledTasks.map( - (t): SchedulerReportItem => ({ - status: 'pending', - schedulingType: t.schedulingType, - taskId: t.taskId, - label: t.label, - metadata: t.metadata, - }), - ), + ...this.scheduledTasks.map((t): SchedulerReportItem => ({ + status: 'pending', + schedulingType: t.schedulingType, + taskId: t.taskId, + label: t.label, + metadata: t.metadata, + })), ]; } diff --git a/packages/fast-check/src/arbitrary/_internals/mappers/UintToBase32String.ts b/packages/fast-check/src/arbitrary/_internals/mappers/UintToBase32String.ts index 5e8a3228..6552c766 100644 --- a/packages/fast-check/src/arbitrary/_internals/mappers/UintToBase32String.ts +++ b/packages/fast-check/src/arbitrary/_internals/mappers/UintToBase32String.ts @@ -81,7 +81,7 @@ function smallUintToBase32StringMapper(num: number): string { let base32Str = ''; // num must be in 0 (incl.), 0x7fff_ffff (incl.) // >>5 is equivalent to /32 and <<5 to x32 - for (let remaining = num; remaining !== 0; ) { + for (let remaining = num; remaining !== 0;) { const next = remaining >> 5; const current = remaining - (next << 5); base32Str = encodeSymbol(current) + base32Str; diff --git a/packages/fast-check/src/arbitrary/falsy.ts b/packages/fast-check/src/arbitrary/falsy.ts index caad5641..9e0d1f73 100644 --- a/packages/fast-check/src/arbitrary/falsy.ts +++ b/packages/fast-check/src/arbitrary/falsy.ts @@ -21,13 +21,7 @@ export interface FalsyContraints { * @public */ export type FalsyValue = - | false - | null - | 0 - | '' - | typeof NaN - | undefined - | (TConstraints extends { withBigInt: true } ? 0n : never); + false | null | 0 | '' | typeof NaN | undefined | (TConstraints extends { withBigInt: true } ? 0n : never); /** * For falsy values: diff --git a/packages/fast-check/test/unit/arbitrary/_internals/OnTheFlyLinksForEntityGraphArbitrary.spec.ts b/packages/fast-check/test/unit/arbitrary/_internals/OnTheFlyLinksForEntityGraphArbitrary.spec.ts index 71af68bb..7582de90 100644 --- a/packages/fast-check/test/unit/arbitrary/_internals/OnTheFlyLinksForEntityGraphArbitrary.spec.ts +++ b/packages/fast-check/test/unit/arbitrary/_internals/OnTheFlyLinksForEntityGraphArbitrary.spec.ts @@ -34,9 +34,8 @@ describe('onTheFlyLinksForEntityGraph (integration)', () => { type: fc.constantFrom(...allKinds), strategy: fc.constantFrom(undefined, 'any'), }) - .map( - (rel: Relationship & { arity: Exclude }): Relationship => - rel.type === 'kind-e' ? { ...rel, strategy: 'exclusive' } : rel, + .map((rel: Relationship & { arity: Exclude }): Relationship => + rel.type === 'kind-e' ? { ...rel, strategy: 'exclusive' } : rel, ), weight: allKinds.length, }, diff --git a/packages/jest/src/jest-fast-check-worker.ts b/packages/jest/src/jest-fast-check-worker.ts index 4d9eaeb3..f1442722 100644 --- a/packages/jest/src/jest-fast-check-worker.ts +++ b/packages/jest/src/jest-fast-check-worker.ts @@ -71,13 +71,11 @@ export const init = (url: URL, options?: PropertyForOptions): InitOutput => { // But root import of it is failing in the context of workers, so only dynamic version is acceptable // oxlint-disable-next-line typescript/ban-ts-comment // @ts-ignore - Dynamic imports cause TS1323 error only in ESM build (not CJS), so @ts-expect-error would fail CJS build - return import('@jest/globals').then( - ({ jest }): InitOutput => ({ - test: buildTest(test as It, jest, fcExtra), - it: buildTest(it as It, jest, fcExtra), - expect: jestExpect, - }), - ) as any; + return import('@jest/globals').then(({ jest }): InitOutput => ({ + test: buildTest(test as It, jest, fcExtra), + it: buildTest(it as It, jest, fcExtra), + expect: jestExpect, + })) as any; } } const dummyJest: JestExtra = {}; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 242848e2..aca6258b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -248,8 +248,8 @@ importers: specifier: ^0.0.75 version: 0.0.75 prettier: - specifier: 3.8.4 - version: 3.8.4 + specifier: 3.9.4 + version: 3.9.4 publint: specifier: ^0.3.21 version: 0.3.21 @@ -8188,8 +8188,8 @@ packages: engines: {node: '>=10.13.0'} hasBin: true - prettier@3.8.4: - resolution: {integrity: sha512-N2MylSdi48+5N/6S5j+maeHbUSIzzZ5uOcX5Hm4QpV8Dkb1HFjfAKTKX6yNPJQD9AhcT3ifHNB66tWTTJDi11Q==} + prettier@3.9.4: + resolution: {integrity: sha512-yWG/o/4oJfo036EKAfK6ACAoDOfHeRHx4tuxkfBZiauURiaSmYwlpOr5LQqKtIkRD2z1PLteme2WoxEnj4tHTg==} engines: {node: '>=14'} hasBin: true @@ -19613,7 +19613,7 @@ snapshots: prettier@2.8.8: {} - prettier@3.8.4: {} + prettier@3.9.4: {} pretty-bytes@5.6.0: {} diff --git a/website/docs/advanced/fuzzing.md b/website/docs/advanced/fuzzing.md index bc4fb4f2..9538f803 100644 --- a/website/docs/advanced/fuzzing.md +++ b/website/docs/advanced/fuzzing.md @@ -96,11 +96,7 @@ In contrast to normal runs, when using the `neverFailingPredicate` function, the test('replay reported error and shrink it', () => { fc.assert(fc.property(...arbitraries, predicate), { numRuns: 1, - examples: [ - [ - /* reported error */ - ], - ], + examples: [[/* reported error */]], }); }); ``` diff --git a/website/docs/advanced/race-conditions.md b/website/docs/advanced/race-conditions.md index ac3418c0..6f730b7b 100644 --- a/website/docs/advanced/race-conditions.md +++ b/website/docs/advanced/race-conditions.md @@ -38,8 +38,7 @@ With: ```ts type SchedulerSequenceItem = - | { builder: () => Promise; label: string; metadata?: TMetadata } - | (() => Promise); + { builder: () => Promise; label: string; metadata?: TMetadata } | (() => Promise); ``` You can also define an hardcoded scheduler by using `fc.schedulerFor(ordering: number[])` - _should be passed through `fc.constant` if you want to use it as an arbitrary_. For instance: `fc.schedulerFor([1,3,2])` means that the first scheduled promise will resolve first, the third one second and at the end we will resolve the second one that have been scheduled.