Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/renovate-d6fb694.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'counterfact': patch
---

Updated dependency `prettier` to `3.9.0`.
2 changes: 1 addition & 1 deletion .github/workflows/renovate-copilot-fix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
startsWith(github.event.workflow_run.head_branch, 'renovate/')

permissions:
pull-requests: read
pull-requests: write
issues: write
steps:
- name: Find PR and post Copilot comment
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"open": "11.0.0",
"posthog-node": "5.45.2",
"precinct": "13.0.1",
"prettier": "3.8.5",
"prettier": "3.9.0",
"recast": "0.23.12",
"tsx": "4.23.1",
"typescript": "6.0.3"
Expand Down
6 changes: 3 additions & 3 deletions src/counterfact-types/omit-all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* response builder after one has already been called.
*/
export type OmitAll<T, K extends readonly string[]> = {
[P in keyof T as P extends `${string}${K[number]}${string}`
? never
: P]: T[P];
[
P in keyof T as P extends `${string}${K[number]}${string}` ? never : P
]: T[P];
};
3 changes: 1 addition & 2 deletions src/server/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ type UserDefinedResponse =

interface Module {
[method: string]:
| ((requestData: RequestDataWithBody) => UserDefinedResponse)
| undefined;
((requestData: RequestDataWithBody) => UserDefinedResponse) | undefined;
DELETE?: (requestData: RequestData) => UserDefinedResponse;
GET?: (requestData: RequestData) => UserDefinedResponse;
HEAD?: (requestData: RequestData) => UserDefinedResponse;
Expand Down
7 changes: 3 additions & 4 deletions src/typescript-generator/coder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,9 @@ export class Coder {

const requirement = await this.requirement.reference();

return new (this.constructor as new (
req: Requirement,
version: string,
) => Coder)(requirement, this.version);
return new (
this.constructor as new (req: Requirement, version: string) => Coder
)(requirement, this.version);
}

/**
Expand Down
3 changes: 1 addition & 2 deletions src/typescript-generator/jsdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ export function buildJsDoc(data: unknown): string {
const summary = record["summary"] as string | undefined;
const example = record["example"];
const examples = record["examples"] as
| Record<string, { value?: unknown }>
| undefined;
Record<string, { value?: unknown }> | undefined;
const defaultValue = record["default"];
const format = record["format"] as string | undefined;
const deprecated = record["deprecated"] as boolean | undefined;
Expand Down
3 changes: 1 addition & 2 deletions src/typescript-generator/operation-coder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ export class OperationCoder extends Coder {

// Detect streaming responses (OpenAPI 3.2 itemSchema)
const content = firstResponse.content as
| Record<string, { itemSchema?: unknown }>
| undefined;
Record<string, { itemSchema?: unknown }> | undefined;
const hasStreamingContent =
content !== undefined &&
Object.keys(content).some(
Expand Down
3 changes: 1 addition & 2 deletions src/typescript-generator/operation-type-coder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ export class OperationTypeCoder extends TypeCoder {
*/
public getOperationBaseName(): string {
const operationId = this.requirement.get("operationId")?.data as
| string
| undefined;
string | undefined;

return operationId
? sanitizeIdentifier(operationId)
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6735,10 +6735,10 @@ prettier-linter-helpers@^1.0.1:
dependencies:
fast-diff "^1.1.2"

prettier@3.8.5:
version "3.8.5"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.8.5.tgz#81cf9de0cf46db973fa85103ff06dfcdb0d9bc39"
integrity sha512-zxcTTCedNGJM4R8sj/Cq/F0W/c4iE0afWBcBwMTRtw4WHYP9TWkYjdiH3npPRUYsXQCPR0hTU9yjovOu+E6EQA==
prettier@3.9.0:
version "3.9.0"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.9.0.tgz#287fabfbf20161611aa3b2db8de2a7d8c88ecb2d"
integrity sha512-LjIqSIC5VYLzs9WedVmJ2ljNAGnU+DteIClbahu4L/DBeWjZ6iT/k1lAYyu9JUh+1xINxWadaPw/Pl63y/agAw==

prettier@^2.7.1:
version "2.8.8"
Expand Down