Skip to content

Commit a13839b

Browse files
chore(deps): update dependency prettier to v3 (#656)
Co-authored-by: wolfy1339 <[email protected]>
1 parent ecf360f commit a13839b

12 files changed

+926
-925
lines changed

docs/packages/getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ octokit.rest.packages.getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUse
1919
{
2020
package_type,
2121
package_name,
22-
}
22+
},
2323
);
2424
```
2525

package-lock.json

Lines changed: 6 additions & 5 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
@@ -44,7 +44,7 @@
4444
"lodash.upperfirst": "^4.3.1",
4545
"mustache": "^4.0.0",
4646
"npm-run-all": "^4.1.5",
47-
"prettier": "2.8.8",
47+
"prettier": "3.0.0",
4848
"semantic-release-plugin-update-version-in-files": "^1.0.0",
4949
"sort-keys": "^4.2.0",
5050
"string-to-jsdoc-comment": "^1.0.0",

scripts/update-endpoints/code.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ async function generateRoutes() {
118118

119119
writeFileSync(
120120
ROUTES_PATH,
121-
prettier.format(
121+
await prettier.format(
122122
`import type { EndpointsDefaultsAndDecorations } from "../types";
123123
const Endpoints: EndpointsDefaultsAndDecorations = ${JSON.stringify(
124124
sortKeys(newRoutes, { deep: true })

scripts/update-endpoints/docs.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ async function generateRoutes() {
1515

1616
for (const endpoint of endpoints) {
1717
const path = `docs/${endpoint.scope}/${endpoint.id}.md`;
18-
outputFileSync(path, template(endpoint));
18+
outputFileSync(path, await template(endpoint));
1919
console.log(`${path} written`);
2020
}
2121
}
2222

23-
function template(endpoint) {
23+
async function template(endpoint) {
2424
const deprecationNotice = endpoint.isDeprecated
2525
? "**This method is deprecated.**"
2626
: "";
@@ -96,7 +96,7 @@ ${parameters}
9696
9797
See also: [GitHub Developer Guide documentation](${endpoint.documentationUrl}).`;
9898

99-
return prettier.format(content, {
99+
return await prettier.format(content, {
100100
parser: "markdown",
101101
});
102102
}

scripts/update-endpoints/fetch-json.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ async function main() {
7878

7979
writeFileSync(
8080
path.resolve(__dirname, "generated", "endpoints.json"),
81-
prettier.format(JSON.stringify(endpoints), {
81+
await prettier.format(JSON.stringify(endpoints), {
8282
parser: "json",
8383
})
8484
);

scripts/update-endpoints/types.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ async function generateTypes() {
8080
}`);
8181
}
8282

83-
const methodTypesSource = prettier.format(
83+
const methodTypesSource = await prettier.format(
8484
[
8585
`import type { EndpointInterface, RequestInterface } from "@octokit/types";`,
8686
`import type { RestEndpointMethodTypes } from "./parameters-and-response-types";`,
@@ -93,7 +93,7 @@ async function generateTypes() {
9393
parser: "typescript",
9494
}
9595
);
96-
const parametersAndResponsesTypes = prettier.format(
96+
const parametersAndResponsesTypes = await prettier.format(
9797
[
9898
`import type { Endpoints, RequestParameters } from "@octokit/types";`,
9999
"",

src/endpoints-to-methods.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ for (const [scope, endpoints] of Object.entries(ENDPOINTS)) {
2525
method,
2626
url,
2727
},
28-
defaults
28+
defaults,
2929
);
3030

3131
if (!endpointMethodsMap.has(scope)) {
@@ -63,7 +63,7 @@ const handler = {
6363
scope,
6464
methodName,
6565
endpointDefaults,
66-
decorations
66+
decorations,
6767
);
6868
} else {
6969
cache[methodName] = octokit.request.defaults(endpointDefaults);
@@ -88,7 +88,7 @@ function decorate(
8888
scope: string,
8989
methodName: string,
9090
defaults: EndpointOptions,
91-
decorations: EndpointDecorations
91+
decorations: EndpointDecorations,
9292
) {
9393
const requestWithDefaults = octokit.request.defaults(defaults);
9494

@@ -111,7 +111,7 @@ function decorate(
111111
if (decorations.renamed) {
112112
const [newScope, newMethodName] = decorations.renamed;
113113
octokit.log.warn(
114-
`octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`
114+
`octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`,
115115
);
116116
}
117117
if (decorations.deprecated) {
@@ -123,11 +123,11 @@ function decorate(
123123
const options = requestWithDefaults.endpoint.merge(...args);
124124

125125
for (const [name, alias] of Object.entries(
126-
decorations.renamedParameters
126+
decorations.renamedParameters,
127127
)) {
128128
if (name in options) {
129129
octokit.log.warn(
130-
`"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead`
130+
`"${name}" parameter is deprecated for "octokit.${scope}.${methodName}()". Use "${alias}" instead`,
131131
);
132132
if (!(alias in options)) {
133133
options[alias] = options[name];

0 commit comments

Comments
 (0)