Skip to content

Commit

Permalink
chore(deps): update dependency prettier to v3 (#583)
Browse files Browse the repository at this point in the history
* 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 <create-or-update-pull-request@users.noreply.github.com>
Co-authored-by: Keegan Campbell <me@kfcampbell.com>
  • Loading branch information
4 people committed Jul 6, 2023
1 parent b445021 commit 2d2f69f
Show file tree
Hide file tree
Showing 12 changed files with 52 additions and 52 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const response = await octokit.graphql(
}
}
}`,
{ login: "octokit" }
{ login: "octokit" },
);
```

Expand Down Expand Up @@ -425,7 +425,7 @@ const { Octokit } = require("@octokit/core");
const MyActionOctokit = Octokit.plugin(
require("@octokit/plugin-paginate-rest").paginateRest,
require("@octokit/plugin-throttling").throttling,
require("@octokit/plugin-retry").retry
require("@octokit/plugin-retry").retry,
).defaults({
throttle: {
onAbuseLimit: (retryAfter, options) => {
Expand Down
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 @@ -45,7 +45,7 @@
"http-proxy-agent": "^7.0.0",
"jest": "^29.0.0",
"lolex": "^6.0.0",
"prettier": "2.8.8",
"prettier": "3.0.0",
"proxy": "^2.0.0",
"semantic-release": "^21.0.0",
"semantic-release-plugin-update-version-in-files": "^1.0.0",
Expand Down
16 changes: 8 additions & 8 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class Octokit {
static VERSION = VERSION;
static defaults<S extends Constructor<any>>(
this: S,
defaults: OctokitOptions | Function
defaults: OctokitOptions | Function,
) {
const OctokitWithDefaults = class extends this {
constructor(...args: any[]) {
Expand All @@ -40,8 +40,8 @@ export class Octokit {
? {
userAgent: `${options.userAgent} ${defaults.userAgent}`,
}
: null
)
: null,
),
);
}
};
Expand All @@ -58,12 +58,12 @@ export class Octokit {
*/
static plugin<
S extends Constructor<any> & { plugins: any[] },
T extends OctokitPlugin[]
T extends OctokitPlugin[],
>(this: S, ...newPlugins: T) {
const currentPlugins = this.plugins;
const NewOctokit = class extends this {
static plugins = currentPlugins.concat(
newPlugins.filter((plugin) => !currentPlugins.includes(plugin))
newPlugins.filter((plugin) => !currentPlugins.includes(plugin)),
);
};

Expand Down Expand Up @@ -115,7 +115,7 @@ export class Octokit {
warn: console.warn.bind(console),
error: console.error.bind(console),
},
options.log
options.log,
);
this.hook = hook;

Expand Down Expand Up @@ -152,8 +152,8 @@ export class Octokit {
octokit: this,
octokitOptions: otherOptions,
},
options.auth
)
options.auth,
),
);
// @ts-ignore ¯\_(ツ)_/¯
hook.wrap("request", auth.hook);
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type AnyFunction = (...args: any) => any;

export type OctokitPlugin = (
octokit: Octokit,
options: OctokitOptions
options: OctokitOptions,
) => { [key: string]: any } | void;

export type Hooks = {
Expand Down
2 changes: 1 addition & 1 deletion test/agent-ca/agent-ca-test.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe("custom client certificate", () => {
response.writeHead(200);
response.write("ok");
response.end();
}
},
);

server.listen(0, done);
Expand Down
24 changes: 12 additions & 12 deletions test/auth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe("Authentication", () => {
authorization: "token secret123",
"user-agent": userAgent,
},
}
},
);

const octokit = new Octokit({
Expand All @@ -98,7 +98,7 @@ describe("Authentication", () => {
authorization: "token secret123",
"user-agent": userAgent,
},
}
},
);

const octokit = new Octokit({
Expand All @@ -121,7 +121,7 @@ describe("Authentication", () => {
authorization: "token secret123",
"user-agent": userAgent,
},
}
},
);

const octokit = new Octokit({
Expand All @@ -146,7 +146,7 @@ describe("Authentication", () => {
authorization: `bearer ${BEARER_TOKEN}`,
"user-agent": userAgent,
},
}
},
);

const octokit = new Octokit({
Expand Down Expand Up @@ -179,7 +179,7 @@ describe("Authentication", () => {
code: CODE,
state: STATE,
},
}
},
);

const MyOctokit = Octokit.defaults({
Expand Down Expand Up @@ -224,7 +224,7 @@ describe("Authentication", () => {
authorization: "token secret123",
},
repeat: 2,
}
},
)
.getOnce(
"https://api.github.com/app",
Expand All @@ -235,7 +235,7 @@ describe("Authentication", () => {
"user-agent": userAgent,
authorization: `bearer ${BEARER}`,
},
}
},
);

const octokit = new Octokit({
Expand Down Expand Up @@ -272,7 +272,7 @@ describe("Authentication", () => {
authorization: `token githubtoken123`,
"user-agent": userAgent,
},
}
},
);
const currentEnv = process.env;
process.env = {
Expand Down Expand Up @@ -321,7 +321,7 @@ describe("Authentication", () => {
metadata: "read",
},
repository_selection: "all",
}
},
)
.postOnce(
"https://fake.github-enterprise.com/api/graphql",
Expand All @@ -330,7 +330,7 @@ describe("Authentication", () => {
headers: {
authorization: "token secret123",
},
}
},
);

const octokit = new Octokit({
Expand Down Expand Up @@ -366,7 +366,7 @@ describe("Authentication", () => {
.getOnce(
"https://api.github.com/repos/octokit/core.js",
{ ok: true },
{ overwriteRoutes: false }
{ overwriteRoutes: false },
);

const mockWarnLogger = jest.fn();
Expand All @@ -393,7 +393,7 @@ describe("Authentication", () => {

expect(mockWarnLogger.mock.calls.length).toBe(1);
expect(mockWarnLogger.mock.calls[0][0]).toBe(
"[@octokit/auth-app] Retrying after 401 response to account for token replication delay (retry: 1, wait: 1s)"
"[@octokit/auth-app] Retrying after 401 response to account for token replication delay (retry: 1, wait: 1s)",
);
});

Expand Down
4 changes: 2 additions & 2 deletions test/constructor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe("Smoke test", () => {
accept:
"application/vnd.github.jean-grey-preview+json,application/vnd.github.symmetra-preview+json",
},
}
},
);

const octokit = new Octokit({
Expand All @@ -37,7 +37,7 @@ describe("Smoke test", () => {
accept: "application/vnd.github.v3+json",
"time-zone": "Europe/Amsterdam",
},
}
},
);

const octokit = new Octokit({
Expand Down
14 changes: 7 additions & 7 deletions test/defaults.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe("Octokit.defaults", () => {
accept: "application/vnd.github.v3+json",
"user-agent": userAgent,
},
}
},
);

const OctokitWithDefaults = Octokit.defaults({
Expand All @@ -44,7 +44,7 @@ describe("Octokit.defaults", () => {
accept: "application/vnd.github.v3+json",
"user-agent": `my-app/1.2.3 ${userAgent}`,
},
}
},
);

const OctokitWithDefaults = Octokit.defaults({
Expand All @@ -68,7 +68,7 @@ describe("Octokit.defaults", () => {
accept: "application/vnd.github.v3+json",
"user-agent": `my-app/1.2.3 my-octokit.js/1.2.3 ${userAgent}`,
},
}
},
);

const OctokitWithDefaults = Octokit.defaults({
Expand All @@ -95,7 +95,7 @@ describe("Octokit.defaults", () => {
"user-agent": userAgent,
"time-zone": "Europe/Amsterdam",
},
}
},
);

const OctokitWithDefaults = Octokit.defaults({
Expand All @@ -120,7 +120,7 @@ describe("Octokit.defaults", () => {
authorization: `token githubtoken123`,
"user-agent": userAgent,
},
}
},
);
const currentEnv = process.env;
process.env = {
Expand Down Expand Up @@ -150,7 +150,7 @@ describe("Octokit.defaults", () => {
accept: "application/vnd.github.v3+json",
"user-agent": `my-app/1.2.3 ${userAgent}`,
},
}
},
);

const OctokitWithDefaults = Octokit.defaults({
Expand All @@ -176,7 +176,7 @@ describe("Octokit.defaults", () => {
accept: "application/vnd.github.v3+json",
"user-agent": userAgent,
},
}
},
);

const OctokitWithPluginAndDefaults = Octokit.plugin(() => {
Expand Down
2 changes: 1 addition & 1 deletion test/hook.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe("octokit.hook", () => {
.sandbox()
.getOnce(
"https://api.github.com/foo/daz/baz?qux=quux&beforeAddition=works",
{ ok: true }
{ ok: true },
);

const octokit = new Octokit({
Expand Down
Loading

0 comments on commit 2d2f69f

Please sign in to comment.