Skip to content

Commit

Permalink
chore(deps): update dependency prettier to v3 (#289)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency prettier to v3

* npm run lint:fix

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Keegan Campbell <me@kfcampbell.com>
  • Loading branch information
renovate[bot] and kfcampbell authored Jul 5, 2023
1 parent 2ecee60 commit 284491f
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
12 changes: 6 additions & 6 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 @@ -29,7 +29,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
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ export type {

export function oauthAuthorizationUrl(options: OAuthAppOptions): OAuthAppResult;
export function oauthAuthorizationUrl(
options: GitHubAppOptions
options: GitHubAppOptions,
): GitHubAppResult;

export function oauthAuthorizationUrl(
options: Record<string, unknown>
options: Record<string, unknown>,
): Record<string, unknown> {
const clientType = options.clientType || "oauth-app";
const baseUrl = options.baseUrl || "https://github.com";
Expand Down Expand Up @@ -47,7 +47,7 @@ export function oauthAuthorizationUrl(

function urlBuilderAuthorize(
base: string,
options: Record<string, unknown>
options: Record<string, unknown>,
): string {
const map = {
allowSignup: "allow_signup",
Expand Down
24 changes: 12 additions & 12 deletions test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ test('oauthAuthorizationUrl({clientId: "1234567890abcdef1234"})', () => {
expect(
oauthAuthorizationUrl({
clientId: "1234567890abcdef1234",
})
}),
).toEqual({
allowSignup: true,
clientId: "1234567890abcdef1234",
Expand All @@ -25,7 +25,7 @@ test('oauthAuthorizationUrl({clientId: "1234567890abcdef1234", clientType: "oaut
expect(
oauthAuthorizationUrl({
clientId: "1234567890abcdef1234",
})
}),
).toEqual({
allowSignup: true,
clientId: "1234567890abcdef1234",
Expand All @@ -43,7 +43,7 @@ test('oauthAuthorizationUrl({clientId: "lv1.1234567890abcdef", clientType: "gith
oauthAuthorizationUrl({
clientId: "lv1.1234567890abcdef",
clientType: "github-app",
})
}),
).toEqual({
allowSignup: true,
clientId: "lv1.1234567890abcdef",
Expand All @@ -59,7 +59,7 @@ test('oauthAuthorizationUrl({clientId: "4321fedcba0987654321"})', () => {
expect(
oauthAuthorizationUrl({
clientId: "4321fedcba0987654321",
})
}),
).toEqual({
allowSignup: true,
clientId: "4321fedcba0987654321",
Expand All @@ -77,7 +77,7 @@ test("redirectUrl option", () => {
oauthAuthorizationUrl({
clientId: "1234567890abcdef1234",
redirectUrl: "https://example.com?q=octocat&sort=date",
})
}),
).toEqual({
allowSignup: true,
clientId: "1234567890abcdef1234",
Expand All @@ -95,7 +95,7 @@ test("login option", () => {
oauthAuthorizationUrl({
clientId: "1234567890abcdef1234",
login: "octocat",
})
}),
).toEqual({
allowSignup: true,
clientId: "1234567890abcdef1234",
Expand All @@ -114,7 +114,7 @@ test("scopes = []", () => {
clientId: "1234567890abcdef1234",
login: "octocat",
scopes: [],
})
}),
).toEqual({
allowSignup: true,
clientId: "1234567890abcdef1234",
Expand All @@ -133,7 +133,7 @@ test('scopes = ""', () => {
clientId: "1234567890abcdef1234",
login: "octocat",
scopes: "",
})
}),
).toEqual({
allowSignup: true,
clientId: "1234567890abcdef1234",
Expand All @@ -152,7 +152,7 @@ test('scopes = "user,public_repo, gist notifications"', () => {
clientId: "1234567890abcdef1234",
login: "octocat",
scopes: "user,public_repo, gist notifications",
})
}),
).toEqual({
allowSignup: true,
clientId: "1234567890abcdef1234",
Expand All @@ -172,7 +172,7 @@ test("allowSignup = false", () => {
clientId: "1234567890abcdef1234",
login: "octocat",
scopes: "user,public_repo, gist notifications",
})
}),
).toEqual({
allowSignup: false,
clientId: "1234567890abcdef1234",
Expand All @@ -191,7 +191,7 @@ test("state = Sjn2oMwNFZPiVm6Mtjn2o9b3xxZ4sVEI", () => {
clientId: "1234567890abcdef1234",
login: "octocat",
state: "Sjn2oMwNFZPiVm6Mtjn2o9b3xxZ4sVEI",
})
}),
).toEqual({
allowSignup: true,
clientId: "1234567890abcdef1234",
Expand All @@ -209,7 +209,7 @@ test('oauthAuthorizationUrl({clientId: "1234567890abcdef1234", baseUrl: "https:/
oauthAuthorizationUrl({
clientId: "1234567890abcdef1234",
baseUrl: "https://github.my-enterprise.com",
})
}),
).toEqual({
allowSignup: true,
clientId: "1234567890abcdef1234",
Expand Down

0 comments on commit 284491f

Please sign in to comment.