diff --git a/.github/workflows/scripts/generate-changelog.cjs b/.github/workflows/scripts/generate-changelog.cjs index cd1c98ea3e6..2cd6e2da287 100644 --- a/.github/workflows/scripts/generate-changelog.cjs +++ b/.github/workflows/scripts/generate-changelog.cjs @@ -202,8 +202,8 @@ function extractReleaseKind(oldTagName, newTagName) { newTagVersion.major !== oldTagVersion.major ? 'major' : newTagVersion.minor !== oldTagVersion.minor - ? 'minor' - : 'patch'; + ? 'minor' + : 'patch'; return releaseKind; } diff --git a/package.json b/package.json index b21a5303df5..b3d29cbbe0a 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "all-contributors-cli": "^6.26.1", "eslint": "^8.53.0", "eslint-config-prettier": "^9.0.0", - "prettier": "3.0.3", + "prettier": "3.1.0", "publint": "^0.2.5", "typescript": "~5.2.2" }, diff --git a/packages/fast-check/src/arbitrary/_internals/helpers/MaxLengthFromMinLength.ts b/packages/fast-check/src/arbitrary/_internals/helpers/MaxLengthFromMinLength.ts index 876bf3ca1c3..aa9723ca9dd 100644 --- a/packages/fast-check/src/arbitrary/_internals/helpers/MaxLengthFromMinLength.ts +++ b/packages/fast-check/src/arbitrary/_internals/helpers/MaxLengthFromMinLength.ts @@ -111,8 +111,8 @@ export function relativeSizeToSize(size: Size | RelativeSize, defaultSize: Size) return resultingSizeInSize < 0 ? orderedSize[0] : resultingSizeInSize >= orderedSize.length - ? orderedSize[orderedSize.length - 1] - : orderedSize[resultingSizeInSize]; + ? orderedSize[orderedSize.length - 1] + : orderedSize[resultingSizeInSize]; } /** @@ -161,8 +161,8 @@ export function depthBiasFromSizeForArbitrary(depthSizeOrSize: DepthSize, specif depthSizeOrSize !== undefined ? depthSizeOrSize : specifiedMaxDepth && defaultSizeToMaxWhenMaxSpecified - ? 'max' - : defaultSize; + ? 'max' + : defaultSize; if (definedSize === 'max') { return 0; // 1 / +infinity } diff --git a/packages/fast-check/src/arbitrary/_internals/helpers/TokenizeRegex.ts b/packages/fast-check/src/arbitrary/_internals/helpers/TokenizeRegex.ts index 588368f1406..ed6d6701472 100644 --- a/packages/fast-check/src/arbitrary/_internals/helpers/TokenizeRegex.ts +++ b/packages/fast-check/src/arbitrary/_internals/helpers/TokenizeRegex.ts @@ -303,8 +303,8 @@ function pushTokens( quantifierTokens.length === 1 ? from // to = from, only {from} characters accepted, not less not more : quantifierTokens[1].length !== 0 - ? Number(quantifierTokens[1]) // from and to may diverge - : undefined; // to is accepting anything >=from + ? Number(quantifierTokens[1]) // from and to may diverge + : undefined; // to is accepting anything >=from tokens.push({ type: 'Repetition', expression: previous, diff --git a/packages/fast-check/src/arbitrary/clone.ts b/packages/fast-check/src/arbitrary/clone.ts index 4c96a0d7cb5..8990a402c27 100644 --- a/packages/fast-check/src/arbitrary/clone.ts +++ b/packages/fast-check/src/arbitrary/clone.ts @@ -9,8 +9,8 @@ import { CloneArbitrary } from './_internals/CloneArbitrary'; export type CloneValue = [number] extends [N] // N is number itself? ? T[] : Rest['length'] extends N // End of the recursion? - ? Rest - : CloneValue; + ? Rest + : CloneValue; /** * Clone the values generated by `arb` in order to produce fully equal values (might not be equal in terms of === or ==) diff --git a/packages/fast-check/src/arbitrary/hexa.ts b/packages/fast-check/src/arbitrary/hexa.ts index 0ae3b771eb3..5a33a6add78 100644 --- a/packages/fast-check/src/arbitrary/hexa.ts +++ b/packages/fast-check/src/arbitrary/hexa.ts @@ -13,8 +13,8 @@ function hexaUnmapper(v: number): number { return v < 58 ? v - 48 // 0-9 : v >= 97 && v < 103 - ? v - 97 + 10 // a-f - : -1; // invalid: out of scope + ? v - 97 + 10 // a-f + : -1; // invalid: out of scope } /** diff --git a/packages/fast-check/src/arbitrary/record.ts b/packages/fast-check/src/arbitrary/record.ts index 85977c6e951..36169c9d279 100644 --- a/packages/fast-check/src/arbitrary/record.ts +++ b/packages/fast-check/src/arbitrary/record.ts @@ -55,10 +55,10 @@ export type RecordConstraints = ( export type RecordValue = TConstraints extends { withDeletedKeys: boolean; requiredKeys: any[] } ? never : TConstraints extends { withDeletedKeys: true } - ? Partial - : TConstraints extends { requiredKeys: (infer TKeys)[] } - ? Partial & Pick - : T; + ? Partial + : TConstraints extends { requiredKeys: (infer TKeys)[] } + ? Partial & Pick + : T; /** * For records following the `recordModel` schema diff --git a/packages/fast-check/src/check/runner/utils/RunDetailsFormatter.ts b/packages/fast-check/src/check/runner/utils/RunDetailsFormatter.ts index e673601af8f..dcc40e89b6b 100644 --- a/packages/fast-check/src/check/runner/utils/RunDetailsFormatter.ts +++ b/packages/fast-check/src/check/runner/utils/RunDetailsFormatter.ts @@ -45,8 +45,8 @@ function formatExecutionSummary(executionTrees: ExecutionTree[], stringi currentTree.status === ExecutionStatus.Success ? '\x1b[32m\u221A\x1b[0m' : currentTree.status === ExecutionStatus.Failure - ? '\x1b[31m\xD7\x1b[0m' - : '\x1b[33m!\x1b[0m'; + ? '\x1b[31m\xD7\x1b[0m' + : '\x1b[33m!\x1b[0m'; const leftPadding = Array(currentDepth).join('. '); summaryLines.push(`${leftPadding}${statusIcon} ${stringifyOne(currentTree.value)}`); diff --git a/packages/fast-check/src/utils/stringify.ts b/packages/fast-check/src/utils/stringify.ts index 280dcb2800b..57b688e6869 100644 --- a/packages/fast-check/src/utils/stringify.ts +++ b/packages/fast-check/src/utils/stringify.ts @@ -220,8 +220,8 @@ export function stringifyInternal( k === '__proto__' ? '["__proto__"]' : typeof k === 'symbol' - ? `[${stringifyInternal(k, currentValues, getAsyncContent)}]` - : safeJsonStringify(k) + ? `[${stringifyInternal(k, currentValues, getAsyncContent)}]` + : safeJsonStringify(k) }:${stringifyInternal((value as any)[k], currentValues, getAsyncContent)}`; const stringifiedProperties = [ diff --git a/packages/fast-check/test/unit/arbitrary/_internals/AdapterArbitrary.spec.ts b/packages/fast-check/test/unit/arbitrary/_internals/AdapterArbitrary.spec.ts index e1af9d4f3c4..491f50d40b1 100644 --- a/packages/fast-check/test/unit/arbitrary/_internals/AdapterArbitrary.spec.ts +++ b/packages/fast-check/test/unit/arbitrary/_internals/AdapterArbitrary.spec.ts @@ -225,12 +225,12 @@ describe('AdapterArbitrary', () => { Object.is(v, vA) ? adaptedA : Object.is(v, vAA) - ? adaptedAA - : Object.is(v, vAB) - ? adaptedAB - : Object.is(v, vAC) - ? adaptedAC - : adaptedABC, + ? adaptedAA + : Object.is(v, vAB) + ? adaptedAB + : Object.is(v, vAC) + ? adaptedAC + : adaptedABC, ); // Act diff --git a/packages/fast-check/test/unit/arbitrary/stringMatching.spec.ts b/packages/fast-check/test/unit/arbitrary/stringMatching.spec.ts index 259e541d4c7..10af6beef1c 100644 --- a/packages/fast-check/test/unit/arbitrary/stringMatching.spec.ts +++ b/packages/fast-check/test/unit/arbitrary/stringMatching.spec.ts @@ -147,14 +147,14 @@ function regexBasedOnChunks(): fc.Arbitrary { quantifier === undefined ? '' : typeof quantifier === 'string' - ? quantifier - : typeof quantifier === 'number' - ? `{${quantifier}}` - : typeof quantifier[1] === 'number' - ? `{${Math.min(...(quantifier as [number, number]))},${Math.max( - ...(quantifier as [number, number]), - )}}` - : `{${quantifier[0]},}`; + ? quantifier + : typeof quantifier === 'number' + ? `{${quantifier}}` + : typeof quantifier[1] === 'number' + ? `{${Math.min(...(quantifier as [number, number]))},${Math.max( + ...(quantifier as [number, number]), + )}}` + : `{${quantifier[0]},}`; return chunk.matcher + quantifierString; }) .join(''); diff --git a/packages/jest/test/jest-fast-check.spec.ts b/packages/jest/test/jest-fast-check.spec.ts index cf697064d18..c3846229e36 100644 --- a/packages/jest/test/jest-fast-check.spec.ts +++ b/packages/jest/test/jest-fast-check.spec.ts @@ -612,8 +612,8 @@ async function writeToFile( const importFromFastCheckJest = useLegacySignatures ? `const {${runner}Prop: runnerProp} = require('@fast-check/jest');\n` : useWorkers - ? `const {pathToFileURL} = require('node:url');\nconst {${runner}: runner, expect} = require('@fast-check/jest/worker').init(pathToFileURL(__filename));\n` - : `const {${runner}: runner} = require('@fast-check/jest');\n`; + ? `const {pathToFileURL} = require('node:url');\nconst {${runner}: runner, expect} = require('@fast-check/jest/worker').init(pathToFileURL(__filename));\n` + : `const {${runner}: runner} = require('@fast-check/jest');\n`; const specContent = "const fc = require('fast-check');\n" + importFromFastCheckJest + diff --git a/packages/worker/src/internals/MainThreadRunner.ts b/packages/worker/src/internals/MainThreadRunner.ts index 67aef412537..ce90ef64c8d 100644 --- a/packages/worker/src/internals/MainThreadRunner.ts +++ b/packages/worker/src/internals/MainThreadRunner.ts @@ -25,8 +25,8 @@ export function runMainThread( isolationLevel === 'predicate' ? new OneTimePool(workerFileUrl) : isolationLevel === 'property' - ? new BasicPool(workerFileUrl) - : new GlobalPool(workerFileUrl); + ? new BasicPool(workerFileUrl) + : new GlobalPool(workerFileUrl); let releaseLock: (() => void) | undefined = undefined; let worker: PooledWorker | undefined = undefined; diff --git a/yarn.lock b/yarn.lock index a051fc41cb4..8d425b87b9c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2818,7 +2818,7 @@ __metadata: all-contributors-cli: "npm:^6.26.1" eslint: "npm:^8.53.0" eslint-config-prettier: "npm:^9.0.0" - prettier: "npm:3.0.3" + prettier: "npm:3.1.0" publint: "npm:^0.2.5" typescript: "npm:~5.2.2" languageName: unknown @@ -14045,12 +14045,12 @@ __metadata: languageName: node linkType: hard -"prettier@npm:3.0.3": - version: 3.0.3 - resolution: "prettier@npm:3.0.3" +"prettier@npm:3.1.0": + version: 3.1.0 + resolution: "prettier@npm:3.1.0" bin: prettier: bin/prettier.cjs - checksum: f950887bc03c5b970d8c6dd129364acfbbc61e7b46aec5d5ce17f4adf6404e2ef43072c98b51c4786e0eaca949b307d362a773fd47502862d754b5a328fa2b26 + checksum: a45ea70aa97fde162ea4c4aba3dfc7859aa6a732a1db34458d9535dc3c2c16d3bc3fb5689e6cd76aa835562555303b02d9449fd2e15af3b73c8053557e25c5b6 languageName: node linkType: hard