Skip to content

Commit dc8e686

Browse files
renovate[bot]Create or Update Pull Request Actionkfcampbell
authored
chore(deps): update dependency prettier to v3 (#347)
* chore(deps): update dependency prettier to v3 * style: prettier * Empty commit to trigger test run --------- Co-authored-by: renovate[bot] <29139614+renovate[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 25326a1 commit dc8e686

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed

package-lock.json

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"esbuild": "^0.18.0",
3535
"glob": "^10.2.6",
3636
"jest": "^29.0.0",
37-
"prettier": "2.8.8",
37+
"prettier": "3.0.0",
3838
"ts-jest": "^29.0.0",
3939
"typescript": "^5.0.0"
4040
},

src/index.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class RequestError extends Error {
4848
constructor(
4949
message: string,
5050
statusCode: number,
51-
options: RequestErrorOptions
51+
options: RequestErrorOptions,
5252
) {
5353
super(message);
5454

@@ -77,7 +77,7 @@ export class RequestError extends Error {
7777
requestCopy.headers = Object.assign({}, options.request.headers, {
7878
authorization: options.request.headers.authorization.replace(
7979
/ .*$/,
80-
" [REDACTED]"
80+
" [REDACTED]",
8181
),
8282
});
8383
}
@@ -97,8 +97,8 @@ export class RequestError extends Error {
9797
get() {
9898
logOnceCode(
9999
new Deprecation(
100-
"[@octokit/request-error] `error.code` is deprecated, use `error.status`."
101-
)
100+
"[@octokit/request-error] `error.code` is deprecated, use `error.status`.",
101+
),
102102
);
103103
return statusCode;
104104
},
@@ -107,8 +107,8 @@ export class RequestError extends Error {
107107
get() {
108108
logOnceHeaders(
109109
new Deprecation(
110-
"[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`."
111-
)
110+
"[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.",
111+
),
112112
);
113113
return headers || {};
114114
},

test/request-error.test.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ describe("RequestError", () => {
6868
const error = new RequestError("test", 123, options);
6969

7070
expect(error.request.url).toEqual(
71-
"https://api.github.com/?client_id=123&client_secret=[REDACTED]"
71+
"https://api.github.com/?client_id=123&client_secret=[REDACTED]",
7272
);
7373
});
7474

@@ -84,7 +84,7 @@ describe("RequestError", () => {
8484
const error = new RequestError("test", 123, options);
8585

8686
expect(error.request.url).toEqual(
87-
"https://api.github.com/?client_id=123&client_secret=[REDACTED]"
87+
"https://api.github.com/?client_id=123&client_secret=[REDACTED]",
8888
);
8989
});
9090

@@ -100,7 +100,7 @@ describe("RequestError", () => {
100100
const error = new RequestError("test", 123, options);
101101

102102
expect(error.request.url).toEqual(
103-
"https://api.github.com/?access_token=[REDACTED]"
103+
"https://api.github.com/?access_token=[REDACTED]",
104104
);
105105
});
106106

@@ -141,15 +141,15 @@ describe("RequestError", () => {
141141
test("deprecates .headers", () => {
142142
global.console.warn = jest.fn();
143143
expect(new RequestError("test", 123, mockOptions).headers).toStrictEqual(
144-
{}
144+
{},
145145
);
146146
expect(
147147
new RequestError("test", 404, { ...mockOptions, headers: { foo: "bar" } })
148-
.headers
148+
.headers,
149149
).toStrictEqual({ foo: "bar" });
150150
expect(
151151
new RequestError("test", 404, { ...mockOptions, headers: undefined })
152-
.headers
152+
.headers,
153153
).toStrictEqual({});
154154
expect(console.warn).toHaveBeenCalledTimes(1);
155155
});

0 commit comments

Comments
 (0)