Skip to content

Commit

Permalink
⬆️ Update dependency prettier to v3.1.0 (#4434)
Browse files Browse the repository at this point in the history
* ⬆️ Update dependency prettier to v3.1.0

* format

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Nicolas DUBIEN <github@dubien.org>
  • Loading branch information
renovate[bot] and dubzzz authored Nov 19, 2023
1 parent 170a880 commit f2c6006
Show file tree
Hide file tree
Showing 14 changed files with 44 additions and 44 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/scripts/generate-changelog.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ function extractReleaseKind(oldTagName, newTagName) {
newTagVersion.major !== oldTagVersion.major
? 'major'
: newTagVersion.minor !== oldTagVersion.minor
? 'minor'
: 'patch';
? 'minor'
: 'patch';
return releaseKind;
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"all-contributors-cli": "^6.26.1",
"eslint": "^8.54.0",
"eslint-config-prettier": "^9.0.0",
"prettier": "3.0.3",
"prettier": "3.1.0",
"publint": "^0.2.5",
"typescript": "~5.2.2"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}

/**
Expand Down Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions packages/fast-check/src/arbitrary/clone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { CloneArbitrary } from './_internals/CloneArbitrary';
export type CloneValue<T, N extends number, Rest extends T[] = []> = [number] extends [N] // N is number itself?
? T[]
: Rest['length'] extends N // End of the recursion?
? Rest
: CloneValue<T, N, [T, ...Rest]>;
? Rest
: CloneValue<T, N, [T, ...Rest]>;

/**
* Clone the values generated by `arb` in order to produce fully equal values (might not be equal in terms of === or ==)
Expand Down
4 changes: 2 additions & 2 deletions packages/fast-check/src/arbitrary/hexa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

/**
Expand Down
8 changes: 4 additions & 4 deletions packages/fast-check/src/arbitrary/record.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ export type RecordConstraints<T = unknown> = (
export type RecordValue<T, TConstraints = {}> = TConstraints extends { withDeletedKeys: boolean; requiredKeys: any[] }
? never
: TConstraints extends { withDeletedKeys: true }
? Partial<T>
: TConstraints extends { requiredKeys: (infer TKeys)[] }
? Partial<T> & Pick<T, TKeys & keyof T>
: T;
? Partial<T>
: TConstraints extends { requiredKeys: (infer TKeys)[] }
? Partial<T> & Pick<T, TKeys & keyof T>
: T;

/**
* For records following the `recordModel` schema
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ function formatExecutionSummary<Ts>(executionTrees: ExecutionTree<Ts>[], 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)}`);

Expand Down
4 changes: 2 additions & 2 deletions packages/fast-check/src/utils/stringify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ export function stringifyInternal<Ts>(
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 = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions packages/fast-check/test/unit/arbitrary/stringMatching.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,14 @@ function regexBasedOnChunks(): fc.Arbitrary<Extra> {
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('');
Expand Down
4 changes: 2 additions & 2 deletions packages/jest/test/jest-fast-check.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 +
Expand Down
4 changes: 2 additions & 2 deletions packages/worker/src/internals/MainThreadRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ export function runMainThread<Ts extends [unknown, ...unknown[]]>(
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<boolean | void, Ts> | undefined = undefined;
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2819,7 +2819,7 @@ __metadata:
all-contributors-cli: "npm:^6.26.1"
eslint: "npm:^8.54.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
Expand Down Expand Up @@ -13912,12 +13912,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

Expand Down

0 comments on commit f2c6006

Please sign in to comment.