Skip to content

Commit 25849b1

Browse files
chore(deps): bump prettier from 2.8.0 to 3.3.3 (#480)
* Bump prettier from 2.8.0 to 3.3.3 Bumps [prettier](https://github.com/prettier/prettier) from 2.8.0 to 3.3.3. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](prettier/prettier@2.8.0...3.3.3) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * run fmt Signed-off-by: Rui Chen <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Rui Chen <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Rui Chen <[email protected]>
1 parent 6206056 commit 25849b1

File tree

6 files changed

+44
-44
lines changed

6 files changed

+44
-44
lines changed

__tests__/util.test.ts

+17-17
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ describe("util", () => {
1414
it("strips template", () => {
1515
assert.equal(
1616
uploadUrl(
17-
"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}"
17+
"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets{?name,label}",
1818
),
19-
"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets"
19+
"https://uploads.github.com/repos/octocat/Hello-World/releases/1/assets",
2020
);
2121
});
2222
});
@@ -30,7 +30,7 @@ describe("util", () => {
3030
it("parses newline and comma-delimited (and then some)", () => {
3131
assert.deepStrictEqual(
3232
parseInputFiles("foo,bar\nbaz,boom,\n\ndoom,loom "),
33-
["foo", "bar", "baz", "boom", "doom", "loom"]
33+
["foo", "bar", "baz", "boom", "doom", "loom"],
3434
);
3535
});
3636
});
@@ -53,7 +53,7 @@ describe("util", () => {
5353
input_discussion_category_name: undefined,
5454
input_generate_release_notes: false,
5555
input_make_latest: undefined,
56-
})
56+
}),
5757
);
5858
});
5959
it("uses input body path", () => {
@@ -74,7 +74,7 @@ describe("util", () => {
7474
input_discussion_category_name: undefined,
7575
input_generate_release_notes: false,
7676
input_make_latest: undefined,
77-
})
77+
}),
7878
);
7979
});
8080
it("defaults to body path when both body and body path are provided", () => {
@@ -95,7 +95,7 @@ describe("util", () => {
9595
input_discussion_category_name: undefined,
9696
input_generate_release_notes: false,
9797
input_make_latest: undefined,
98-
})
98+
}),
9999
);
100100
});
101101
});
@@ -129,7 +129,7 @@ describe("util", () => {
129129
input_discussion_category_name: undefined,
130130
input_generate_release_notes: false,
131131
input_make_latest: undefined,
132-
}
132+
},
133133
);
134134
});
135135

@@ -155,7 +155,7 @@ describe("util", () => {
155155
input_discussion_category_name: undefined,
156156
input_generate_release_notes: false,
157157
input_make_latest: undefined,
158-
}
158+
},
159159
);
160160
});
161161
it("supports discussion category names", () => {
@@ -180,7 +180,7 @@ describe("util", () => {
180180
input_discussion_category_name: "releases",
181181
input_generate_release_notes: false,
182182
input_make_latest: undefined,
183-
}
183+
},
184184
);
185185
});
186186

@@ -206,7 +206,7 @@ describe("util", () => {
206206
input_discussion_category_name: undefined,
207207
input_generate_release_notes: true,
208208
input_make_latest: undefined,
209-
}
209+
},
210210
);
211211
});
212212

@@ -235,7 +235,7 @@ describe("util", () => {
235235
input_discussion_category_name: undefined,
236236
input_generate_release_notes: false,
237237
input_make_latest: undefined,
238-
}
238+
},
239239
);
240240
});
241241
it("uses input token as the source of GITHUB_TOKEN by default", () => {
@@ -262,7 +262,7 @@ describe("util", () => {
262262
input_discussion_category_name: undefined,
263263
input_generate_release_notes: false,
264264
input_make_latest: undefined,
265-
}
265+
},
266266
);
267267
});
268268
it("parses basic config with draft and prerelease", () => {
@@ -288,7 +288,7 @@ describe("util", () => {
288288
input_discussion_category_name: undefined,
289289
input_generate_release_notes: false,
290290
input_make_latest: undefined,
291-
}
291+
},
292292
);
293293
});
294294
it("parses basic config where make_latest is passed", () => {
@@ -313,7 +313,7 @@ describe("util", () => {
313313
input_discussion_category_name: undefined,
314314
input_generate_release_notes: false,
315315
input_make_latest: "false",
316-
}
316+
},
317317
);
318318
});
319319
it("parses basic config with append_body", () => {
@@ -338,7 +338,7 @@ describe("util", () => {
338338
input_discussion_category_name: undefined,
339339
input_generate_release_notes: false,
340340
input_make_latest: undefined,
341-
}
341+
},
342342
);
343343
});
344344
});
@@ -355,7 +355,7 @@ describe("util", () => {
355355
it("resolves files given a set of paths", async () => {
356356
assert.deepStrictEqual(
357357
paths(["tests/data/**/*", "tests/data/does/not/exist/*"]),
358-
["tests/data/foo/bar.txt"]
358+
["tests/data/foo/bar.txt"],
359359
);
360360
});
361361
});
@@ -364,7 +364,7 @@ describe("util", () => {
364364
it("returns the patterns that don't match any files", async () => {
365365
assert.deepStrictEqual(
366366
unmatchedPatterns(["tests/data/**/*", "tests/data/does/not/exist/*"]),
367-
["tests/data/does/not/exist/*"]
367+
["tests/data/does/not/exist/*"],
368368
);
369369
});
370370
});

package-lock.json

+6-6
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
@@ -36,7 +36,7 @@
3636
"@vercel/ncc": "^0.38.1",
3737
"jest": "^29.3.1",
3838
"jest-circus": "^29.3.1",
39-
"prettier": "2.8.0",
39+
"prettier": "3.3.3",
4040
"ts-jest": "^29.2.2",
4141
"typescript": "^5.5.3",
4242
"typescript-formatter": "^7.2.2"

src/github.ts

+13-13
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export class GitHubReleaser implements Releaser {
121121
}): AsyncIterableIterator<{ data: Release[] }> {
122122
const updatedParams = { per_page: 100, ...params };
123123
return this.github.paginate.iterator(
124-
this.github.rest.repos.listReleases.endpoint.merge(updatedParams)
124+
this.github.rest.repos.listReleases.endpoint.merge(updatedParams),
125125
);
126126
}
127127
}
@@ -144,15 +144,15 @@ export const upload = async (
144144
github: GitHub,
145145
url: string,
146146
path: string,
147-
currentAssets: Array<{ id: number; name: string }>
147+
currentAssets: Array<{ id: number; name: string }>,
148148
): Promise<any> => {
149149
const [owner, repo] = config.github_repository.split("/");
150150
const { name, size, mime, data: body } = asset(path);
151151
const currentAsset = currentAssets.find(
152152
// note: GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "List release assets" endpoint lists the renamed filenames.
153153
// due to this renaming we need to be mindful when we compare the file name we're uploading with a name github may already have rewritten for logical comparison
154154
// see https://docs.github.com/en/rest/releases/assets?apiVersion=2022-11-28#upload-a-release-asset
155-
({ name: currentName }) => currentName == name.replace(" ", ".")
155+
({ name: currentName }) => currentName == name.replace(" ", "."),
156156
);
157157
if (currentAsset) {
158158
console.log(`♻️ Deleting previously uploaded asset ${name}...`);
@@ -180,7 +180,7 @@ export const upload = async (
180180
throw new Error(
181181
`Failed to upload release asset ${name}. received status code ${
182182
resp.status
183-
}\n${json.message}\n${JSON.stringify(json.errors)}`
183+
}\n${json.message}\n${JSON.stringify(json.errors)}`,
184184
);
185185
}
186186
return json;
@@ -189,7 +189,7 @@ export const upload = async (
189189
export const release = async (
190190
config: Config,
191191
releaser: Releaser,
192-
maxRetries: number = 3
192+
maxRetries: number = 3,
193193
): Promise<Release> => {
194194
if (maxRetries <= 0) {
195195
console.log(`❌ Too many retries. Aborting...`);
@@ -234,13 +234,13 @@ export const release = async (
234234
repo,
235235
discussion_category_name,
236236
generate_release_notes,
237-
maxRetries
237+
maxRetries,
238238
);
239239
}
240240

241241
let existingRelease: Release = _release!;
242242
console.log(
243-
`Found release ${existingRelease.name} (with id=${existingRelease.id})`
243+
`Found release ${existingRelease.name} (with id=${existingRelease.id})`,
244244
);
245245

246246
const release_id = existingRelease.id;
@@ -250,7 +250,7 @@ export const release = async (
250250
config.input_target_commitish !== existingRelease.target_commitish
251251
) {
252252
console.log(
253-
`Updating commit from "${existingRelease.target_commitish}" to "${config.input_target_commitish}"`
253+
`Updating commit from "${existingRelease.target_commitish}" to "${config.input_target_commitish}"`,
254254
);
255255
target_commitish = config.input_target_commitish;
256256
} else {
@@ -301,7 +301,7 @@ export const release = async (
301301
} catch (error) {
302302
if (error.status !== 404) {
303303
console.log(
304-
`⚠️ Unexpected error fetching GitHub release for tag ${config.github_ref}: ${error}`
304+
`⚠️ Unexpected error fetching GitHub release for tag ${config.github_ref}: ${error}`,
305305
);
306306
throw error;
307307
}
@@ -314,7 +314,7 @@ export const release = async (
314314
repo,
315315
discussion_category_name,
316316
generate_release_notes,
317-
maxRetries
317+
maxRetries,
318318
);
319319
}
320320
};
@@ -327,7 +327,7 @@ async function createRelease(
327327
repo: string,
328328
discussion_category_name: string | undefined,
329329
generate_release_notes: boolean | undefined,
330-
maxRetries: number
330+
maxRetries: number,
331331
) {
332332
const tag_name = tag;
333333
const name = config.input_name || tag;
@@ -341,7 +341,7 @@ async function createRelease(
341341
commitMessage = ` using commit "${target_commitish}"`;
342342
}
343343
console.log(
344-
`👩‍🏭 Creating new GitHub release for tag ${tag_name}${commitMessage}...`
344+
`👩‍🏭 Creating new GitHub release for tag ${tag_name}${commitMessage}...`,
345345
);
346346
try {
347347
let release = await releaser.createRelease({
@@ -366,7 +366,7 @@ async function createRelease(
366366
switch (error.status) {
367367
case 403:
368368
console.log(
369-
"Skip retry — your GitHub token/PAT does not have the required permission to create a release"
369+
"Skip retry — your GitHub token/PAT does not have the required permission to create a release",
370370
);
371371
throw error;
372372

src/main.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ async function run() {
4646
throttle: {
4747
onRateLimit: (retryAfter, options) => {
4848
console.warn(
49-
`Request quota exhausted for request ${options.method} ${options.url}`
49+
`Request quota exhausted for request ${options.method} ${options.url}`,
5050
);
5151
if (options.request.retryCount === 0) {
5252
// only retries once
@@ -57,7 +57,7 @@ async function run() {
5757
onAbuseLimit: (retryAfter, options) => {
5858
// does not retry, only logs a warning
5959
console.warn(
60-
`Abuse detected for request ${options.method} ${options.url}`
60+
`Abuse detected for request ${options.method} ${options.url}`,
6161
);
6262
},
6363
},
@@ -81,11 +81,11 @@ async function run() {
8181
gh,
8282
uploadUrl(rel.upload_url),
8383
path,
84-
currentAssets
84+
currentAssets,
8585
);
8686
delete json.uploader;
8787
return json;
88-
})
88+
}),
8989
).catch((error) => {
9090
throw error;
9191
});

src/util.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const parseInputFiles = (files: string): string[] => {
4747
.concat(line.split(","))
4848
.filter((pat) => pat)
4949
.map((pat) => pat.trim()),
50-
[]
50+
[],
5151
);
5252
};
5353

@@ -80,7 +80,7 @@ export const parseConfig = (env: Env): Config => {
8080
export const paths = (patterns: string[]): string[] => {
8181
return patterns.reduce((acc: string[], pattern: string): string[] => {
8282
return acc.concat(
83-
glob.sync(pattern).filter((path) => statSync(path).isFile())
83+
glob.sync(pattern).filter((path) => statSync(path).isFile()),
8484
);
8585
}, []);
8686
};
@@ -90,7 +90,7 @@ export const unmatchedPatterns = (patterns: string[]): string[] => {
9090
return acc.concat(
9191
glob.sync(pattern).filter((path) => statSync(path).isFile()).length == 0
9292
? [pattern]
93-
: []
93+
: [],
9494
);
9595
}, []);
9696
};

0 commit comments

Comments
 (0)