From a092c93b2050320b31d74ef88e9bbf40270f882a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 5 Jul 2023 16:58:16 +0000 Subject: [PATCH 1/2] fix(deps): update dependency prettier to v3 --- package-lock.json | 12 ++++++------ package.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 197ddc5c9..1a8741d7b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "clipboardy": "^3.0.0", "execa": "^7.1.1", "inquirer": "^9.2.7", - "prettier": "^2.7.1", + "prettier": "^3.0.0", "spdx-license-list": "^6.3.0" }, "bin": { @@ -6371,14 +6371,14 @@ } }, "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.0.tgz", + "integrity": "sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==", "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" diff --git a/package.json b/package.json index 7b3f6b849..285b3be8b 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "clipboardy": "^3.0.0", "execa": "^7.1.1", "inquirer": "^9.2.7", - "prettier": "^2.7.1", + "prettier": "^3.0.0", "spdx-license-list": "^6.3.0" }, "devDependencies": { From d5bdd53b69fde49c4fa96cb2a6ff1ce0248b3206 Mon Sep 17 00:00:00 2001 From: Create or Update Pull Request Action Date: Wed, 5 Jul 2023 16:58:38 +0000 Subject: [PATCH 2/2] style: prettier --- index.js | 32 ++++++++++++++-------------- lib/create-branch-protection.js | 2 +- lib/create-coc.js | 4 ++-- lib/create-contributing.js | 2 +- lib/create-esbuild-script.js | 2 +- lib/create-issue-templates.js | 12 +++++------ lib/create-pull-request.js | 2 +- lib/create-release-action.js | 2 +- lib/create-repository.js | 2 +- lib/create-test-action.js | 2 +- lib/create-update-prettier-action.js | 2 +- lib/write-pretty-file.js | 2 +- 12 files changed, 33 insertions(+), 33 deletions(-) diff --git a/index.js b/index.js index 2544b6962..04f0dd252 100644 --- a/index.js +++ b/index.js @@ -137,7 +137,7 @@ export async function main() { await command("git add CODE_OF_CONDUCT.md"); await command( - "git commit -m 'docs(CODE_OF_CONDUCT): Contributor Covenant'" + "git commit -m 'docs(CODE_OF_CONDUCT): Contributor Covenant'", ); await command("git add CONTRIBUTING.md"); @@ -160,7 +160,7 @@ export async function main() { }); await command( - `git remote add origin git@github.com:${answers.repository}.git` + `git remote add origin git@github.com:${answers.repository}.git`, ); await command(`git push -u origin HEAD`); await command(`git checkout -b initial-version`); @@ -224,11 +224,11 @@ export async function main() { await writePrettyFile( ".gitignore", - ["coverage/", "node_modules/", "pkg/"].join("\n") + ["coverage/", "node_modules/", "pkg/"].join("\n"), ); await command(`git add .gitignore`); await command( - `git commit -m 'build(gitignore): coverage, node_modules, pkg'` + `git commit -m 'build(gitignore): coverage, node_modules, pkg'`, ); writePrettyFile( @@ -242,11 +242,11 @@ export async function main() { emitDeclarationOnly: true, sourceMap: true, }, - }) + }), ); await command(`git add tsconfig.json`); await command( - `git commit -m 'build(typescript): configuration for esbuild'` + `git commit -m 'build(typescript): configuration for esbuild'`, ); console.log("create smoke test"); @@ -275,7 +275,7 @@ export async function main() { }).not.toThrow(); }); }); - ` + `, ); } else { await writePrettyFile( @@ -292,7 +292,7 @@ export async function main() { expect(${answers.exportName}.VERSION).toEqual("0.0.0-development"); }); }); - ` + `, ); } @@ -302,7 +302,7 @@ export async function main() { console.log("create src"); await writePrettyFile( "src/version.ts", - 'export const VERSION = "0.0.0-development"' + 'export const VERSION = "0.0.0-development"', ); if (answers.isPlugin) { @@ -320,7 +320,7 @@ export async function main() { */ export function ${answers.exportName}(octokit: Octokit, options: Options) {} ${answers.exportName}.VERSION = VERSION; - ` + `, ); } else if (answers.isAuthenticationStrategy) { await writePrettyFile( @@ -345,7 +345,7 @@ export async function main() { }); }; - ` + `, ); await writePrettyFile( "src/types.ts", @@ -355,7 +355,7 @@ export async function main() { AuthOptions: any; Authentication: any; }; - ` + `, ); await writePrettyFile( "src/auth.ts", @@ -365,7 +365,7 @@ export async function main() { export async function auth(options: AuthOptions): Promise { // TODO: add implementation } - ` + `, ); await writePrettyFile( "src/hook.ts", @@ -392,7 +392,7 @@ export async function main() { // probably something like setting the authorization header return request(route, parameters); } - ` + `, ); } else { const isClass = /^[A-Z]/.test(answers.exportName); @@ -406,7 +406,7 @@ export async function main() { export class ${answers.exportName} { static VERSION = VERSION } - ` + `, ); } else { await writePrettyFile( @@ -416,7 +416,7 @@ export async function main() { export function ${answers.exportName}() {} ${answers.exportName}.VERSION = VERSION - ` + `, ); } } diff --git a/lib/create-branch-protection.js b/lib/create-branch-protection.js index 6a73fc461..d812c18bf 100644 --- a/lib/create-branch-protection.js +++ b/lib/create-branch-protection.js @@ -17,6 +17,6 @@ export async function createBranchProtection(octokit, { owner, repo }) { contexts: ["WIP", "test"], }, restrictions: null, - } + }, ); } diff --git a/lib/create-coc.js b/lib/create-coc.js index e37eeeca9..d65c6efa4 100644 --- a/lib/create-coc.js +++ b/lib/create-coc.js @@ -10,13 +10,13 @@ const __dirname = fileURLToPath(new URL(".", import.meta.url)); const cocText = readFileSync( pathJoin(__dirname, "..", "vendor", "code-of-conduct.en.md"), - "utf8" + "utf8", ); async function createCoc(email) { const contributorCovenantText = cocText.replace( "[INSERT EMAIL ADDRESS]", - email + email, ); await writePrettyFile("CODE_OF_CONDUCT.md", contributorCovenantText); } diff --git a/lib/create-contributing.js b/lib/create-contributing.js index 85c4c623a..578f0c9b8 100644 --- a/lib/create-contributing.js +++ b/lib/create-contributing.js @@ -77,6 +77,6 @@ on GitHub, generates changelogs from the commit messages and puts them into the Before the publish it runs the \`npm run build\` script which creates a \`pkg/\` folder with distributions for browsers, node and Typescript definitions. The contents of the \`pkg/\` folder are published to the npm registry. If the pull request looks good but does not follow the commit conventions, use the Squash & merge button. -` +`, ); } diff --git a/lib/create-esbuild-script.js b/lib/create-esbuild-script.js index 95f82b9cf..90a82a161 100644 --- a/lib/create-esbuild-script.js +++ b/lib/create-esbuild-script.js @@ -124,6 +124,6 @@ async function main() { ); } main(); -` +`, ); } diff --git a/lib/create-issue-templates.js b/lib/create-issue-templates.js index ad460972c..fde376683 100644 --- a/lib/create-issue-templates.js +++ b/lib/create-issue-templates.js @@ -25,7 +25,7 @@ async function createIssueTemplates(isOctokitOrg) { **What the problem might be** - ` + `, ); await writePrettyFile( ".github/ISSUE_TEMPLATE/02_feature_request.md", @@ -48,7 +48,7 @@ async function createIssueTemplates(isOctokitOrg) { **Alternatives you tried** - ` + `, ); await writePrettyFile( @@ -57,7 +57,7 @@ async function createIssueTemplates(isOctokitOrg) { contact_links: - name: 🆘 I need Help url: https://github.com/octokit/octokit.js/discussions - about: Got a question? An idea? Feedback? Start here.` + about: Got a question? An idea? Feedback? Start here.`, ); return; } @@ -69,7 +69,7 @@ name: "🆘 Help" about: "How does this even work 🤷‍♂️" labels: support --- -` +`, ); await writePrettyFile( @@ -93,7 +93,7 @@ labels: bug **What the problem might be** -` +`, ); await writePrettyFile( ".github/ISSUE_TEMPLATE/03_feature_request.md", @@ -116,6 +116,6 @@ labels: feature **Alternatives you tried** -` +`, ); } diff --git a/lib/create-pull-request.js b/lib/create-pull-request.js index f9f9645f7..700a47dae 100644 --- a/lib/create-pull-request.js +++ b/lib/create-pull-request.js @@ -2,7 +2,7 @@ export { createPullRequest }; async function createPullRequest( octokit, - { owner, repo, ownerId, repositoryId } + { owner, repo, ownerId, repositoryId }, ) { let body = `- [ ] Implement features. Create separate \`feat: ...\` commits for each feature of the initial version - [ ] 100% test coverage diff --git a/lib/create-release-action.js b/lib/create-release-action.js index e82bde536..3b9dd4fc3 100644 --- a/lib/create-release-action.js +++ b/lib/create-release-action.js @@ -32,6 +32,6 @@ jobs: env: GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: \${{ secrets.${npmTokenSecretName} }} -` +`, ); } diff --git a/lib/create-repository.js b/lib/create-repository.js index f2d400313..29a13b240 100644 --- a/lib/create-repository.js +++ b/lib/create-repository.js @@ -2,7 +2,7 @@ export { createRepository }; async function createRepository( octokit, - { isUserRepo, owner, repo, description } + { isUserRepo, owner, repo, description }, ) { const createRepoOptions = { name: repo, diff --git a/lib/create-test-action.js b/lib/create-test-action.js index e11d39a9a..f4214075a 100644 --- a/lib/create-test-action.js +++ b/lib/create-test-action.js @@ -40,6 +40,6 @@ jobs: - run: npm ci - run: npm run lint if: \${{ always() }} -` +`, ); } diff --git a/lib/create-update-prettier-action.js b/lib/create-update-prettier-action.js index b54432db7..312dc6985 100644 --- a/lib/create-update-prettier-action.js +++ b/lib/create-update-prettier-action.js @@ -33,6 +33,6 @@ jobs: body: "An update to prettier required updates to your code." branch: \${{ github.ref }} commit-message: "style: prettier" -` +`, ); } diff --git a/lib/write-pretty-file.js b/lib/write-pretty-file.js index db17633c8..f503a38ac 100644 --- a/lib/write-pretty-file.js +++ b/lib/write-pretty-file.js @@ -30,6 +30,6 @@ async function writePrettyFile(path, content) { path, prettier.format(content, { parser, - }) + }), ); }