Skip to content

Commit a8855a0

Browse files
renovate[bot]Create or Update Pull Request Actionkfcampbell
authored
chore(deps): update dependency prettier to v3 (#168)
* 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 351e3bf commit a8855a0

8 files changed

+38
-38
lines changed

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
@@ -31,7 +31,7 @@
3131
"fetch-mock": "^9.11.0",
3232
"glob": "^10.2.7",
3333
"jest": "^29.5.0",
34-
"prettier": "2.8.8",
34+
"prettier": "3.0.0",
3535
"semantic-release": "^21.0.0",
3636
"semantic-release-plugin-update-version-in-files": "^1.1.0",
3737
"ts-jest": "^29.0.0",

src/compose-create-or-update-text-file.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { utf8ToBase64 } from "./utils";
1111
*/
1212
export async function composeCreateOrUpdateTextFile(
1313
octokit: Octokit,
14-
options: Options
14+
options: Options,
1515
): Promise<Response> {
1616
const {
1717
content: contentOrFn,
@@ -50,7 +50,7 @@ export async function composeCreateOrUpdateTextFile(
5050
...getOptions,
5151
message,
5252
sha: currentFile.sha,
53-
}
53+
},
5454
);
5555

5656
return {
@@ -69,7 +69,7 @@ export async function composeCreateOrUpdateTextFile(
6969
message,
7070
...currentFile,
7171
content: utf8ToBase64(content as string),
72-
}
72+
},
7373
);
7474

7575
return {

src/get-file-content.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ type Result = {
4040
*/
4141
export async function getFileContents(
4242
octokit: Octokit,
43-
options: Options
43+
options: Options,
4444
): Promise<Result> {
4545
const route = "GET /repos/{owner}/{repo}/contents/{path}";
4646

@@ -73,7 +73,7 @@ export async function getFileContents(
7373
403,
7474
{
7575
request: requestOptions,
76-
}
76+
},
7777
);
7878
}
7979

@@ -83,7 +83,7 @@ export async function getFileContents(
8383
403,
8484
{
8585
request: requestOptions,
86-
}
86+
},
8787
);
8888
}
8989

@@ -108,7 +108,7 @@ export async function getFileContents(
108108
403,
109109
{
110110
request: requestOptions,
111-
}
111+
},
112112
);
113113
}
114114
}

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export type ContentUpdateFunctionOptions =
2828
};
2929

3030
export type ContentUpdateFunction = (
31-
options: ContentUpdateFunctionOptions
31+
options: ContentUpdateFunctionOptions,
3232
) => string | null | Promise<string | null>;
3333

3434
export type Response =

src/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ function browserUtf8ToBase64(data: string) {
3636
function toSolidBytes(_match, p1) {
3737
// @ts-expect-error - we know what we are doing here
3838
return String.fromCharCode("0x" + p1);
39-
}
40-
)
39+
},
40+
),
4141
);
4242
}
4343

@@ -49,7 +49,7 @@ function browserBase64ToUtf8(data: string) {
4949
.map(function (c) {
5050
return "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2);
5151
})
52-
.join("")
52+
.join(""),
5353
);
5454
}
5555

test/create-or-update-text-file.test.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe("README usage examples", () => {
1919
{
2020
body: {},
2121
status: 404,
22-
}
22+
},
2323
)
2424

2525
// create file
@@ -36,7 +36,7 @@ describe("README usage examples", () => {
3636
content: utf8ToBase64("content here"),
3737
message: "update test.txt",
3838
},
39-
}
39+
},
4040
);
4141

4242
const octokit = new MyOctokit({
@@ -70,7 +70,7 @@ describe("README usage examples", () => {
7070
sha: "sha123",
7171
},
7272
status: 200,
73-
}
73+
},
7474
)
7575

7676
// update file
@@ -88,7 +88,7 @@ describe("README usage examples", () => {
8888
message: "update test.txt",
8989
sha: "sha123",
9090
},
91-
}
91+
},
9292
);
9393

9494
const octokit = new MyOctokit({
@@ -119,7 +119,7 @@ describe("README usage examples", () => {
119119
{
120120
body: {},
121121
status: 404,
122-
}
122+
},
123123
);
124124

125125
const octokit = new MyOctokit({
@@ -154,7 +154,7 @@ describe("README usage examples", () => {
154154
sha: "sha123",
155155
},
156156
status: 200,
157-
}
157+
},
158158
)
159159

160160
// delete file
@@ -171,7 +171,7 @@ describe("README usage examples", () => {
171171
sha: "sha123",
172172
message: "delete test.txt",
173173
},
174-
}
174+
},
175175
);
176176

177177
const octokit = new MyOctokit({
@@ -205,7 +205,7 @@ describe("README usage examples", () => {
205205
{
206206
body: {},
207207
status: 404,
208-
}
208+
},
209209
);
210210

211211
const octokit = new MyOctokit({
@@ -245,7 +245,7 @@ describe("README usage examples", () => {
245245
sha: "sha123",
246246
},
247247
status: 200,
248-
}
248+
},
249249
)
250250

251251
// update file
@@ -263,7 +263,7 @@ describe("README usage examples", () => {
263263
message: "update test.txt",
264264
sha: "sha123",
265265
},
266-
}
266+
},
267267
);
268268

269269
const octokit = new MyOctokit({
@@ -304,7 +304,7 @@ describe("README usage examples", () => {
304304
ref: "custom-branch",
305305
},
306306
status: 200,
307-
}
307+
},
308308
)
309309

310310
// update file
@@ -323,7 +323,7 @@ describe("README usage examples", () => {
323323
sha: "sha123",
324324
branch: "custom-branch",
325325
},
326-
}
326+
},
327327
);
328328

329329
const octokit = new MyOctokit({

test/errors.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe("README usage examples", () => {
1818
{
1919
body: [],
2020
status: 200,
21-
}
21+
},
2222
);
2323

2424
const octokit = new MyOctokit({
@@ -34,9 +34,9 @@ describe("README usage examples", () => {
3434
path: "test.txt",
3535
content: "content here",
3636
message: "update test.txt",
37-
})
37+
}),
3838
).rejects.toThrow(
39-
"[@octokit/plugin-create-or-update-text-file] https://api.github.com/repos/octocat/hello-world/contents/test.txt is a directory"
39+
"[@octokit/plugin-create-or-update-text-file] https://api.github.com/repos/octocat/hello-world/contents/test.txt is a directory",
4040
);
4141
});
4242

@@ -52,7 +52,7 @@ describe("README usage examples", () => {
5252
type: "symlink",
5353
},
5454
status: 200,
55-
}
55+
},
5656
);
5757

5858
const octokit = new MyOctokit({
@@ -68,9 +68,9 @@ describe("README usage examples", () => {
6868
path: "test.txt",
6969
content: "content here",
7070
message: "update test.txt",
71-
})
71+
}),
7272
).rejects.toThrow(
73-
"[@octokit/plugin-create-or-update-text-file] https://api.github.com/repos/octocat/hello-world/contents/test.txt is not a file, but a symlink"
73+
"[@octokit/plugin-create-or-update-text-file] https://api.github.com/repos/octocat/hello-world/contents/test.txt is not a file, but a symlink",
7474
);
7575
});
7676

@@ -89,7 +89,7 @@ describe("README usage examples", () => {
8989
content: BLACK_GIF_BASE64,
9090
},
9191
status: 200,
92-
}
92+
},
9393
);
9494

9595
const octokit = new MyOctokit({
@@ -105,7 +105,7 @@ describe("README usage examples", () => {
105105
path: "test.txt",
106106
content: "content here",
107107
message: "update test.txt",
108-
})
108+
}),
109109
).rejects.toThrow("[@octokit/plugin-create-or-update-text-file]");
110110
});
111111
});

0 commit comments

Comments
 (0)