Skip to content

Commit

Permalink
chore(deps): update dependency prettier to v3 (#347)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
3 people authored Jul 6, 2023
1 parent 25326a1 commit dc8e686
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"esbuild": "^0.18.0",
"glob": "^10.2.6",
"jest": "^29.0.0",
"prettier": "2.8.8",
"prettier": "3.0.0",
"ts-jest": "^29.0.0",
"typescript": "^5.0.0"
},
Expand Down
12 changes: 6 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class RequestError extends Error {
constructor(
message: string,
statusCode: number,
options: RequestErrorOptions
options: RequestErrorOptions,
) {
super(message);

Expand Down Expand Up @@ -77,7 +77,7 @@ export class RequestError extends Error {
requestCopy.headers = Object.assign({}, options.request.headers, {
authorization: options.request.headers.authorization.replace(
/ .*$/,
" [REDACTED]"
" [REDACTED]",
),
});
}
Expand All @@ -97,8 +97,8 @@ export class RequestError extends Error {
get() {
logOnceCode(
new Deprecation(
"[@octokit/request-error] `error.code` is deprecated, use `error.status`."
)
"[@octokit/request-error] `error.code` is deprecated, use `error.status`.",
),
);
return statusCode;
},
Expand All @@ -107,8 +107,8 @@ export class RequestError extends Error {
get() {
logOnceHeaders(
new Deprecation(
"[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`."
)
"[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`.",
),
);
return headers || {};
},
Expand Down
12 changes: 6 additions & 6 deletions test/request-error.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe("RequestError", () => {
const error = new RequestError("test", 123, options);

expect(error.request.url).toEqual(
"https://api.github.com/?client_id=123&client_secret=[REDACTED]"
"https://api.github.com/?client_id=123&client_secret=[REDACTED]",
);
});

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

expect(error.request.url).toEqual(
"https://api.github.com/?client_id=123&client_secret=[REDACTED]"
"https://api.github.com/?client_id=123&client_secret=[REDACTED]",
);
});

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

expect(error.request.url).toEqual(
"https://api.github.com/?access_token=[REDACTED]"
"https://api.github.com/?access_token=[REDACTED]",
);
});

Expand Down Expand Up @@ -141,15 +141,15 @@ describe("RequestError", () => {
test("deprecates .headers", () => {
global.console.warn = jest.fn();
expect(new RequestError("test", 123, mockOptions).headers).toStrictEqual(
{}
{},
);
expect(
new RequestError("test", 404, { ...mockOptions, headers: { foo: "bar" } })
.headers
.headers,
).toStrictEqual({ foo: "bar" });
expect(
new RequestError("test", 404, { ...mockOptions, headers: undefined })
.headers
.headers,
).toStrictEqual({});
expect(console.warn).toHaveBeenCalledTimes(1);
});
Expand Down

0 comments on commit dc8e686

Please sign in to comment.