Skip to content

Commit 60e9b57

Browse files
renovate[bot]prettier-toc-me[bot]Create or Update Pull Request Actionkfcampbell
authored
chore(deps): update dependency prettier to v3 (#600)
* docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * style: prettier * docs: update ToC for README.md * Last word on trailing comma --------- Co-authored-by: prettier-toc-me[bot] <56236715+prettier-toc-me[bot]@users.noreply.github.com> Co-authored-by: Create or Update Pull Request Action <[email protected]> Co-authored-by: Keegan Campbell <[email protected]>
1 parent 91beddd commit 60e9b57

7 files changed

+47
-47
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ const { data: app } = await requestWithAuth(
185185
owner: "octocat",
186186
repo: "hello-world",
187187
title: "Hello from the engine room",
188-
}
188+
},
189189
);
190190
```
191191

@@ -533,7 +533,7 @@ request(
533533
authorization: `token 0000000000000000000000000000000000000001`,
534534
},
535535
data: "Hello, world!",
536-
}
536+
},
537537
);
538538
```
539539

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"glob": "^10.2.4",
4242
"jest": "^29.0.0",
4343
"lolex": "^6.0.0",
44-
"prettier": "2.8.8",
44+
"prettier": "3.0.0",
4545
"semantic-release-plugin-update-version-in-files": "^1.0.0",
4646
"string-to-arraybuffer": "^1.0.2",
4747
"ts-jest": "^29.0.0",

src/fetch-wrapper.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import getBuffer from "./get-buffer-response";
77
export default function fetchWrapper(
88
requestOptions: ReturnType<EndpointInterface> & {
99
redirect?: "error" | "follow" | "manual";
10-
}
10+
},
1111
) {
1212
const log =
1313
requestOptions.request && requestOptions.request.log
@@ -32,7 +32,7 @@ export default function fetchWrapper(
3232

3333
if (!fetch) {
3434
throw new Error(
35-
'Global "fetch" not found. Please provide `options.request.fetch` to octokit or upgrade to node@18 or newer.'
35+
'Global "fetch" not found. Please provide `options.request.fetch` to octokit or upgrade to node@18 or newer.',
3636
);
3737
}
3838

@@ -50,8 +50,8 @@ export default function fetchWrapper(
5050
},
5151
// `requestOptions.request.agent` type is incompatible
5252
// see https://github.com/octokit/types.ts/pull/264
53-
requestOptions.request as any
54-
)
53+
requestOptions.request as any,
54+
),
5555
)
5656
.then(async (response) => {
5757
url = response.url;
@@ -70,7 +70,7 @@ export default function fetchWrapper(
7070
requestOptions.url
7171
}" is deprecated. It is scheduled to be removed on ${headers.sunset}${
7272
deprecationLink ? `. See ${deprecationLink}` : ""
73-
}`
73+
}`,
7474
);
7575
}
7676

src/with-defaults.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import type {
1010

1111
export default function withDefaults(
1212
oldEndpoint: EndpointInterface,
13-
newDefaults: RequestParameters
13+
newDefaults: RequestParameters,
1414
): RequestInterface {
1515
const endpoint = oldEndpoint.defaults(newDefaults);
1616
const newApi = function (
1717
route: Route | EndpointOptions,
18-
parameters?: RequestParameters
18+
parameters?: RequestParameters,
1919
): Promise<OctokitResponse<any>> {
2020
const endpointOptions = endpoint.merge(<Route>route, parameters);
2121

@@ -25,10 +25,10 @@ export default function withDefaults(
2525

2626
const request = (
2727
route: Route | EndpointOptions,
28-
parameters?: RequestParameters
28+
parameters?: RequestParameters,
2929
) => {
3030
return fetchWrapper(
31-
endpoint.parse(endpoint.merge(<Route>route, parameters))
31+
endpoint.parse(endpoint.merge(<Route>route, parameters)),
3232
);
3333
};
3434

test/defaults.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe("endpoint.defaults()", () => {
1919
authorization: "token 0000000000000000000000000000000000000001",
2020
"user-agent": "myApp/1.2.3",
2121
},
22-
}
22+
},
2323
);
2424

2525
const myRequest = request.defaults({
@@ -52,7 +52,7 @@ describe("endpoint.defaults()", () => {
5252
authorization: "token 0000000000000000000000000000000000000001",
5353
"user-agent": "myApp/1.2.3",
5454
},
55-
}
55+
},
5656
);
5757

5858
const myProjectRequest = request.defaults({
@@ -77,7 +77,7 @@ describe("endpoint.defaults()", () => {
7777
return myProjectRequestWithAuth(`GET /orgs/{org}/repos`).then(
7878
(response) => {
7979
expect(response.status).toEqual(200);
80-
}
80+
},
8181
);
8282
});
8383
});

test/request.test.ts

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
122122
"user-agent": userAgent,
123123
authorization: `bearer ${BEARER}`,
124124
},
125-
}
125+
},
126126
)
127127
.postOnce(
128128
"https://api.github.com/repos/octocat/hello-world/issues",
@@ -133,7 +133,7 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
133133
"user-agent": userAgent,
134134
authorization: `token secret123`,
135135
},
136-
}
136+
},
137137
);
138138
const auth = createAppAuth({
139139
appId: APP_ID,
@@ -238,7 +238,7 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
238238

239239
return request(
240240
`HEAD /repos/{owner}/{repo}/pulls/{number}`,
241-
Object.assign(options, { number: 2 })
241+
Object.assign(options, { number: 2 }),
242242
);
243243
})
244244

@@ -260,13 +260,13 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
260260
status: 200,
261261
body: Buffer.from(
262262
"1f8b0800000000000003cb4f2ec9cfce2cd14dcbac28292d4ad5cd2f4ad74d4f2dd14d2c4acec82c4bd53580007d060a0050bfb9b9a90203c428741ac2313436343307222320dbc010a8dc5c81c194124b8905a5c525894540a714e5e797e05347481edd734304e41319ff41ae8e2ebeae7ab92964d801d46f66668227fe0d4d51e3dfc8d0c8d808284f75df6201233cfe951590627ba01d330a46c1281805a3806e000024cb59d6000a0000",
263-
"hex"
263+
"hex",
264264
),
265265
headers: {
266266
"content-type": "application/x-gzip",
267267
"content-length": "172",
268268
},
269-
}
269+
},
270270
);
271271

272272
return request("GET /repos/{owner}/{repo}/{archive_format}/{ref}", {
@@ -295,13 +295,13 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
295295
// body: Buffer.from('1f8b0800000000000003cb4f2ec9cfce2cd14dcbac28292d4ad5cd2f4ad74d4f2dd14d2c4acec82c4bd53580007d060a0050bfb9b9a90203c428741ac2313436343307222320dbc010a8dc5c81c194124b8905a5c525894540a714e5e797e05347481edd734304e41319ff41ae8e2ebeae7ab92964d801d46f66668227fe0d4d51e3dfc8d0c8d808284f75df6201233cfe951590627ba01d330a46c1281805a3806e000024cb59d6000a0000', 'hex'),
296296
body: Buffer.from(
297297
"1f8b0800000000000003cb4f2ec9cfce2cd14dcbac28292d4ad5cd2f4ad74d4f2dd14d2c4acec82c4bd53580007d060a0050bfb9b9a90203c428741ac2313436343307222320dbc010a8dc5c81c194124b8905a5c525894540a714e5e797e05347481edd734304e41319ff41ae8e2ebeae7ab92964d801d46f66668227fe0d4d51e3dfc8d0c8d808284f75df6201233cfe951590627ba01d330a46c1281805a3806e000024cb59d6000a0000",
298-
"hex"
298+
"hex",
299299
),
300300
headers: {
301301
"content-type": "application/x-gzip",
302302
"content-length": "172",
303303
},
304-
}
304+
},
305305
);
306306

307307
return request(
@@ -310,7 +310,7 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
310310
request: {
311311
fetch: mock,
312312
},
313-
}
313+
},
314314
);
315315
});
316316

@@ -396,7 +396,7 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
396396
}
397397
globalThis.fetch = originalFetch;
398398
expect(error?.message).toEqual(
399-
'Global "fetch" not found. Please provide `options.request.fetch` to octokit or upgrade to node@18 or newer.'
399+
'Global "fetch" not found. Please provide `options.request.fetch` to octokit or upgrade to node@18 or newer.',
400400
);
401401
});
402402

@@ -445,7 +445,7 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
445445
.get(
446446
(_url, { headers }) =>
447447
(headers as ResponseHeaders)["user-agent"] === "funky boom boom pow",
448-
200
448+
200,
449449
);
450450

451451
return request("GET /", {
@@ -491,7 +491,7 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
491491
expect(error.status).toEqual(422);
492492
expect(error.response.headers["x-foo"]).toEqual("bar");
493493
expect(error.response.data.documentation_url).toEqual(
494-
"https://developer.github.com/v3/issues/labels/#create-a-label"
494+
"https://developer.github.com/v3/issues/labels/#create-a-label",
495495
);
496496
expect(error.response.data.errors).toEqual([
497497
{ resource: "Label", code: "invalid", field: "color" },
@@ -531,7 +531,7 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
531531
},
532532
}).catch((error) => {
533533
expect(error.request.url).toEqual(
534-
"https://api.github.com/?client_id=123&client_secret=[REDACTED]"
534+
"https://api.github.com/?client_id=123&client_secret=[REDACTED]",
535535
);
536536
});
537537
});
@@ -557,7 +557,7 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
557557
return request("https://www.githubstatus.com/api/v2/status.json").then(
558558
({ url }) => {
559559
expect(url).toEqual("https://www.githubstatus.com/api/v2/status.json");
560-
}
560+
},
561561
);
562562
});
563563

@@ -608,7 +608,7 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
608608
headers: {
609609
"x-foo": "bar",
610610
},
611-
}
611+
},
612612
);
613613

614614
const hook = (request: RequestInterface, options: EndpointOptions) => {
@@ -728,7 +728,7 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
728728
accept: "application/vnd.github.v3+json",
729729
authorization: "token secret123",
730730
},
731-
}
731+
},
732732
);
733733

734734
return request("PUT /repos/{owner}/{repo}/branches/{branch}/protection", {
@@ -758,7 +758,7 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
758758
.catch((error) => {
759759
expect(error).toHaveProperty(
760760
"message",
761-
`Validation failed: "Only organization repositories can have users and team restrictions", {"resource":"Search","field":"q","code":"invalid"}`
761+
`Validation failed: "Only organization repositories can have users and team restrictions", {"resource":"Search","field":"q","code":"invalid"}`,
762762
);
763763
});
764764
});
@@ -782,7 +782,7 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
782782
authorization: "token 0000000000000000000000000000000000000001",
783783
"user-agent": userAgent,
784784
},
785-
}
785+
},
786786
);
787787

788788
const warn = jest.fn();
@@ -797,7 +797,7 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
797797
expect(response.data).toEqual({ id: 123 });
798798
expect(warn).toHaveBeenCalledTimes(1);
799799
expect(warn).toHaveBeenCalledWith(
800-
'[@octokit/request] "GET https://api.github.com/teams/123" is deprecated. It is scheduled to be removed on Mon, 01 Feb 2021 00:00:00 GMT. See https://developer.github.com/changes/2020-01-21-moving-the-team-api-endpoints/'
800+
'[@octokit/request] "GET https://api.github.com/teams/123" is deprecated. It is scheduled to be removed on Mon, 01 Feb 2021 00:00:00 GMT. See https://developer.github.com/changes/2020-01-21-moving-the-team-api-endpoints/',
801801
);
802802
});
803803
});
@@ -820,7 +820,7 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
820820
authorization: "token 0000000000000000000000000000000000000001",
821821
"user-agent": userAgent,
822822
},
823-
}
823+
},
824824
);
825825

826826
const warn = jest.fn();
@@ -835,7 +835,7 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
835835
expect(response.data).toEqual({ id: 123 });
836836
expect(warn).toHaveBeenCalledTimes(1);
837837
expect(warn).toHaveBeenCalledWith(
838-
'[@octokit/request] "GET https://api.github.com/teams/123" is deprecated. It is scheduled to be removed on Mon, 01 Feb 2021 00:00:00 GMT'
838+
'[@octokit/request] "GET https://api.github.com/teams/123" is deprecated. It is scheduled to be removed on Mon, 01 Feb 2021 00:00:00 GMT',
839839
);
840840
});
841841
});
@@ -861,7 +861,7 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
861861
expect(error.status).toEqual(404);
862862
expect(error.response.data.message).toEqual("Not Found");
863863
expect(error.response.data.documentation_url).toEqual(
864-
"https://docs.github.com/en/rest/reference/repos#get-a-repository"
864+
"https://docs.github.com/en/rest/reference/repos#get-a-repository",
865865
);
866866
});
867867
});
@@ -908,7 +908,7 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
908908
"https://api.github.com/repos/octokit-fixture-org/release-assets/releases/v1.0.0/assets",
909909
{
910910
status: 200,
911-
}
911+
},
912912
);
913913

914914
return request("POST /repos/{owner}/{repo}/releases/{release_id}/assets", {
@@ -939,7 +939,7 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
939939
"https://api.github.com/repos/octokit-fixture-org/release-assets/releases/tags/v1.0.0",
940940
{
941941
status: 200,
942-
}
942+
},
943943
);
944944

945945
return request("POST /repos/{owner}/{repo}/releases/tags/{tag}", {
@@ -969,7 +969,7 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
969969
"https://api.github.com/repos/octokit-fixture-org/release-assets/releases/tags/v1.0.0",
970970
{
971971
status: 200,
972-
}
972+
},
973973
);
974974

975975
return request("POST /repos/{owner}/{repo}/releases/tags/{tag}", {
@@ -988,7 +988,7 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
988988
}).then((response) => {
989989
expect(response.status).toEqual(200);
990990
expect(mock.lastOptions()?.body).toEqual(
991-
stringToArrayBuffer("Hello, world!\n")
991+
stringToArrayBuffer("Hello, world!\n"),
992992
);
993993
expect(mock.done()).toBe(true);
994994
});
@@ -1019,7 +1019,7 @@ x//0u+zd/R/QRUzLOw4N72/Hu+UG6MNt5iDZFCtapRaKt6OvSBwy8w==
10191019
"https://api.github.com/repos/octokit-fixture-org/release-assets/releases/tags/v1.0.0",
10201020
new Promise(() => {
10211021
abortController.abort();
1022-
})
1022+
}),
10231023
);
10241024

10251025
return request("POST /repos/{owner}/{repo}/releases/tags/{tag}", {

0 commit comments

Comments
 (0)