From 255423eefb6368c0231be23039d08bf88a8c5b10 Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Mon, 27 Nov 2023 09:38:10 +0330 Subject: [PATCH 01/35] add vitest test file --- script/migrate-test-e2e.js | 8 ++++++++ script/verify-changes.test.ts | 10 ++++++++++ 2 files changed, 18 insertions(+) create mode 100644 script/verify-changes.test.ts diff --git a/script/migrate-test-e2e.js b/script/migrate-test-e2e.js index 24afec867..f64b155d1 100644 --- a/script/migrate-test-e2e.js +++ b/script/migrate-test-e2e.js @@ -1,5 +1,11 @@ import chalk from "chalk"; import { $, execaCommand } from "execa"; +import { createVitest } from "vitest/node"; + +const vitest = await createVitest("test", { + include: [new URL("./verify-changes.test.ts", import.meta.url).pathname], + watch: false, +}); import packageData from "../package.json" assert { type: "json" }; @@ -13,6 +19,8 @@ await $({ stdio: "inherit", })`c8 -o ./coverage-migrate -r html -r lcov --src src node ./bin/index.js --base everything --mode migrate --description ${description} --email-github ${emailGithub} --email-npm ${emailNpm} --owner ${owner} --title ${title} --repository ${repository} --skip-all-contributors-api --skip-github-api --skip-install`; +await vitest.start(); + const { stdout: gitStatus } = await $`git status`; console.log(`Stdout from running \`git status\`:\n${gitStatus}`); diff --git a/script/verify-changes.test.ts b/script/verify-changes.test.ts new file mode 100644 index 000000000..a9311cee7 --- /dev/null +++ b/script/verify-changes.test.ts @@ -0,0 +1,10 @@ +import fs from "fs/promises"; +import { expect } from "vitest"; +import { test } from "vitest"; + +test("knip.jsonc", async () => { + const content = await fs.readFile("knip.jsonc"); + console.log(content); + + expect(); +}); From 094710aa95ad6efdf6b5e2d01894d66fc7aed2eb Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Mon, 27 Nov 2023 09:54:17 +0330 Subject: [PATCH 02/35] add vitest test file --- script/verify-changes.test.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/script/verify-changes.test.ts b/script/verify-changes.test.ts index a9311cee7..e928f2858 100644 --- a/script/verify-changes.test.ts +++ b/script/verify-changes.test.ts @@ -3,8 +3,13 @@ import { expect } from "vitest"; import { test } from "vitest"; test("knip.jsonc", async () => { - const content = await fs.readFile("knip.jsonc"); + const content = await fs.readFile("knip.jsonc", "utf-8"); + const knipJSONC: Record = JSON.parse(content); console.log(content); - expect(); + expect(Array.isArray(knipJSONC.project)).toBeTruthy(); + expect(Array.isArray(knipJSONC.entry)).toBeTruthy(); + + expect(knipJSONC.$schema).toMatchInlineSnapshot(); + expect(knipJSONC.ignoreExportsUsedInFile).toMatchInlineSnapshot(); }); From cc7d20fb78fc1af7251805e6eaf0d7052df60743 Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Mon, 27 Nov 2023 10:00:37 +0330 Subject: [PATCH 03/35] add vitest test file --- script/verify-changes.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/script/verify-changes.test.ts b/script/verify-changes.test.ts index e928f2858..067335b20 100644 --- a/script/verify-changes.test.ts +++ b/script/verify-changes.test.ts @@ -5,11 +5,12 @@ import { test } from "vitest"; test("knip.jsonc", async () => { const content = await fs.readFile("knip.jsonc", "utf-8"); const knipJSONC: Record = JSON.parse(content); - console.log(content); expect(Array.isArray(knipJSONC.project)).toBeTruthy(); expect(Array.isArray(knipJSONC.entry)).toBeTruthy(); - expect(knipJSONC.$schema).toMatchInlineSnapshot(); + expect(knipJSONC.$schema).toMatchInlineSnapshot( + '"https://unpkg.com/knip@latest/schema.json"', + ); expect(knipJSONC.ignoreExportsUsedInFile).toMatchInlineSnapshot(); }); From 8b92ae48acf46c37c61a455abf9c1e7ed79cfc48 Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Mon, 27 Nov 2023 10:13:31 +0330 Subject: [PATCH 04/35] add vitest test file --- script/verify-changes.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/script/verify-changes.test.ts b/script/verify-changes.test.ts index 067335b20..858953c18 100644 --- a/script/verify-changes.test.ts +++ b/script/verify-changes.test.ts @@ -12,5 +12,10 @@ test("knip.jsonc", async () => { expect(knipJSONC.$schema).toMatchInlineSnapshot( '"https://unpkg.com/knip@latest/schema.json"', ); - expect(knipJSONC.ignoreExportsUsedInFile).toMatchInlineSnapshot(); + expect(knipJSONC.ignoreExportsUsedInFile).toMatchInlineSnapshot(` + { + "interface": true, + "type": true, + } + `); }); From acf2aebb8e7f33d74f50795b573162924acde6df Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Sat, 9 Dec 2023 06:30:42 +0330 Subject: [PATCH 05/35] small update --- script/constants.js | 16 ++++++++++++++++ script/migrate-test-e2e.js | 18 +----------------- script/verify-changes.test.ts | 21 +++++---------------- 3 files changed, 22 insertions(+), 33 deletions(-) create mode 100644 script/constants.js diff --git a/script/constants.js b/script/constants.js new file mode 100644 index 000000000..6e879c8df --- /dev/null +++ b/script/constants.js @@ -0,0 +1,16 @@ +export const filesExpectedToBeChanged = new Set([ + ".all-contributorsrc", + "bin/index.js", + "README.md", + "knip.jsonc", + "package.json", + "pnpm-lock.yaml", + ".eslintignore", + ".eslintrc.cjs", + ".github/DEVELOPMENT.md", + ".github/workflows/lint-knip.yml", + ".github/workflows/test.yml", + ".gitignore", + ".prettierignore", + "cspell.json", +]); diff --git a/script/migrate-test-e2e.js b/script/migrate-test-e2e.js index f64b155d1..dd0b01114 100644 --- a/script/migrate-test-e2e.js +++ b/script/migrate-test-e2e.js @@ -8,6 +8,7 @@ const vitest = await createVitest("test", { }); import packageData from "../package.json" assert { type: "json" }; +import { filesExpectedToBeChanged } from "./constants.js"; const { description, name: repository } = packageData; const emailGithub = "github@joshuakgoldberg.com"; @@ -33,23 +34,6 @@ if (indexOfUnstagedFilesMessage === -1) { ); } -const filesExpectedToBeChanged = new Set([ - ".all-contributorsrc", - "bin/index.js", - "README.md", - "knip.jsonc", - "package.json", - "pnpm-lock.yaml", - ".eslintignore", - ".eslintrc.cjs", - ".github/DEVELOPMENT.md", - ".github/workflows/lint-knip.yml", - ".github/workflows/test.yml", - ".gitignore", - ".prettierignore", - "cspell.json", -]); - const unstagedModifiedFiles = gitStatus .slice(indexOfUnstagedFilesMessage) .match(/modified: {3}(\S+)\n/g) diff --git a/script/verify-changes.test.ts b/script/verify-changes.test.ts index 858953c18..6de0b0b5f 100644 --- a/script/verify-changes.test.ts +++ b/script/verify-changes.test.ts @@ -1,21 +1,10 @@ -import fs from "fs/promises"; +import { execaCommand } from "execa"; import { expect } from "vitest"; import { test } from "vitest"; -test("knip.jsonc", async () => { - const content = await fs.readFile("knip.jsonc", "utf-8"); - const knipJSONC: Record = JSON.parse(content); +import { filesExpectedToBeChanged } from "./constants.js"; - expect(Array.isArray(knipJSONC.project)).toBeTruthy(); - expect(Array.isArray(knipJSONC.entry)).toBeTruthy(); - - expect(knipJSONC.$schema).toMatchInlineSnapshot( - '"https://unpkg.com/knip@latest/schema.json"', - ); - expect(knipJSONC.ignoreExportsUsedInFile).toMatchInlineSnapshot(` - { - "interface": true, - "type": true, - } - `); +test.each([...filesExpectedToBeChanged])("verify %s", async (file) => { + const { stdout } = await execaCommand(`git diff HEAD -- ${file}`); + expect(stdout).toMatchSnapshot(); }); From b52a6a3bbfce1be6a8848480c6e5793a290d7d61 Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Sat, 9 Dec 2023 06:41:29 +0330 Subject: [PATCH 06/35] update snapshots --- .../__snapshots__/verify-changes.test.ts.snap | 849 ++++++++++++++++++ 1 file changed, 849 insertions(+) create mode 100644 script/__snapshots__/verify-changes.test.ts.snap diff --git a/script/__snapshots__/verify-changes.test.ts.snap b/script/__snapshots__/verify-changes.test.ts.snap new file mode 100644 index 000000000..8579e90b1 --- /dev/null +++ b/script/__snapshots__/verify-changes.test.ts.snap @@ -0,0 +1,849 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`verify .all-contributorsrc 1`] = ` +"diff --git a/.all-contributorsrc b/.all-contributorsrc +index f4d6216..d0fed87 100644 +--- a/.all-contributorsrc ++++ b/.all-contributorsrc +@@ -1,5 +1,5 @@ + { +- \\"badgeTemplate\\": \\"\\\\\\"All ๐Ÿค\\\\\\" src=\\\\\\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>_๐Ÿค-21bb42.svg\\\\\\" />\\", ++ \\"badgeTemplate\\": \\"\\\\\\"All ๐Ÿ‘ช\\\\\\" src=\\\\\\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>_๐Ÿ‘ช-21bb42.svg\\\\\\" />\\", + \\"commit\\": false, + \\"commitConvention\\": \\"angular\\", + \\"contributors\\": [ +@@ -24,335 +24,253 @@ + \\"name\\": \\"Jeff Wen\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/3297859?v=4\\", + \\"profile\\": \\"https://sinchang.me\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"Pinjasaur\\", + \\"name\\": \\"Paul Esch-Laurent\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/6335792?v=4\\", + \\"profile\\": \\"https://paulisaweso.me/\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"NazCodeland\\", + \\"name\\": \\"NazCodeland\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/113494366?v=4\\", + \\"profile\\": \\"https://github.com/NazCodeland\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"johnnyreilly\\", + \\"name\\": \\"John Reilly\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/1010525?v=4\\", + \\"profile\\": \\"https://blog.johnnyreilly.com/\\", +- \\"contributions\\": [ +- \\"code\\", +- \\"ideas\\" +- ] ++ \\"contributions\\": [\\"code\\", \\"ideas\\"] + }, + { + \\"login\\": \\"webpro\\", + \\"name\\": \\"Lars Kappert\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/456426?v=4\\", + \\"profile\\": \\"https://webpro.nl\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"RebeccaStevens\\", + \\"name\\": \\"Rebecca Stevens\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/7224206?v=4\\", + \\"profile\\": \\"https://github.com/RebeccaStevens\\", +- \\"contributions\\": [ +- \\"code\\", +- \\"infra\\" +- ] ++ \\"contributions\\": [\\"code\\", \\"infra\\"] + }, + { + \\"login\\": \\"ronthetech\\", + \\"name\\": \\"Ron Jean-Francois\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/105710107?v=4\\", + \\"profile\\": \\"http://ronjeanfrancois.com\\", +- \\"contributions\\": [ +- \\"code\\", +- \\"infra\\" +- ] ++ \\"contributions\\": [\\"code\\", \\"infra\\"] + }, + { + \\"login\\": \\"nowyDEV\\", + \\"name\\": \\"Dominik Nowik\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/12304307?v=4\\", + \\"profile\\": \\"https://github.com/nowyDEV\\", +- \\"contributions\\": [ +- \\"tool\\", +- \\"code\\" +- ] ++ \\"contributions\\": [\\"tool\\", \\"code\\"] + }, + { + \\"login\\": \\"TAKANOME-DEV\\", + \\"name\\": \\"takanomedev\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/79809121?v=4\\", + \\"profile\\": \\"https://github.com/TAKANOME-DEV\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"emday4prez\\", + \\"name\\": \\"Emerson\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/35363144?v=4\\", + \\"profile\\": \\"https://github.com/emday4prez\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"jsjoeio\\", + \\"name\\": \\"Joe Previte\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/3806031?v=4\\", + \\"profile\\": \\"https://typescriptcourse.com/tutorials\\", +- \\"contributions\\": [ +- \\"bug\\", +- \\"code\\" +- ] ++ \\"contributions\\": [\\"bug\\", \\"code\\"] + }, + { + \\"login\\": \\"navin-moorthy\\", + \\"name\\": \\"Navin Moorthy\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/39694575?v=4\\", + \\"profile\\": \\"https://navinmoorthy.me/\\", +- \\"contributions\\": [ +- \\"bug\\", +- \\"code\\" +- ] ++ \\"contributions\\": [\\"bug\\", \\"code\\"] + }, + { + \\"login\\": \\"garuna-m6\\", + \\"name\\": \\"Anurag\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/23234342?v=4\\", + \\"profile\\": \\"https://github.com/garuna-m6\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"danielroe\\", + \\"name\\": \\"Daniel Roe\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/28706372?v=4\\", + \\"profile\\": \\"https://roe.dev/\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"the-lazy-learner\\", + \\"name\\": \\"Sudhansu\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/13695177?v=4\\", + \\"profile\\": \\"https://github.com/the-lazy-learner\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"RNR1\\", + \\"name\\": \\"Ron Braha\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/45559220?v=4\\", + \\"profile\\": \\"https://linktr.ee/ronbraha\\", +- \\"contributions\\": [ +- \\"code\\", +- \\"design\\", +- \\"test\\" +- ] ++ \\"contributions\\": [\\"code\\", \\"design\\", \\"test\\"] + }, + { + \\"login\\": \\"tungbq\\", + \\"name\\": \\"Tung Bui (Leo)\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/85242618?v=4\\", + \\"profile\\": \\"https://github.com/tungbq\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"orta\\", + \\"name\\": \\"Orta Therox\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/49038?v=4\\", + \\"profile\\": \\"https://orta.io\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"promise-dash\\", + \\"name\\": \\"Promise Dash\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/86062880?v=4\\", + \\"profile\\": \\"https://github.com/promise-dash\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"jolg42\\", + \\"name\\": \\"Joรซl Galeran\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/1328733?v=4\\", + \\"profile\\": \\"https://twitter.com/Jolg42\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"kristo-baricevic\\", + \\"name\\": \\"Kristo Baricevic\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/108290619?v=4\\", + \\"profile\\": \\"https://kristo-baricevic.github.io/\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"ryota-murakami\\", + \\"name\\": \\"Ryota Murakami\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/5501268?v=4\\", + \\"profile\\": \\"https://ryota-murakami.github.io/\\", +- \\"contributions\\": [ +- \\"code\\", +- \\"bug\\" +- ] ++ \\"contributions\\": [\\"code\\", \\"bug\\"] + }, + { + \\"login\\": \\"ruthwikreddy09\\", + \\"name\\": \\"Ruthwik\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/126862059?v=4\\", + \\"profile\\": \\"https://github.com/RuthwikReddy09\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"jdwilkin4\\", + \\"name\\": \\"Jessica Wilkins \\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/67210629?v=4\\", + \\"profile\\": \\"https://jessicawilkins.dev/\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"vasanth9\\", + \\"name\\": \\"Vasanth Kumar Cheepurupalli\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/42891954?v=4\\", + \\"profile\\": \\"https://github.com/vasanth9\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"conrmahr\\", + \\"name\\": \\"Conor Meagher\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/363781?v=4\\", + \\"profile\\": \\"https://conormeagher.com/\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"DanexQ\\", + \\"name\\": \\"Daniel\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/72567464?v=4\\", + \\"profile\\": \\"https://github.com/DanexQ\\", +- \\"contributions\\": [ +- \\"infra\\" +- ] ++ \\"contributions\\": [\\"infra\\"] + }, + { + \\"login\\": \\"jaas666\\", + \\"name\\": \\"Juan A.\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/30204147?v=4\\", + \\"profile\\": \\"https://github.com/jaas666\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"katt\\", + \\"name\\": \\"Alex / KATT\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/459267?v=4\\", + \\"profile\\": \\"https://katt.dev\\", +- \\"contributions\\": [ +- \\"bug\\" +- ] ++ \\"contributions\\": [\\"bug\\"] + }, + { + \\"login\\": \\"dertimonius\\", + \\"name\\": \\"Timon Jurschitsch\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/103483059?v=4\\", + \\"profile\\": \\"https://www.linkedin.com/in/timonjurschitsch/\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"biplobsd\\", + \\"name\\": \\"Biplob Sutradhar\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/43641536?v=4\\", + \\"profile\\": \\"http://biplobsd.me\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"mrswastik-robot\\", + \\"name\\": \\"Swastik Patel\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/107865087?v=4\\", + \\"profile\\": \\"https://github.com/mrswastik-robot\\", +- \\"contributions\\": [ +- \\"doc\\" +- ] ++ \\"contributions\\": [\\"doc\\"] + }, + { + \\"login\\": \\"gv14982\\", + \\"name\\": \\"Graham Vasquez\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/7041175?v=4\\", + \\"profile\\": \\"https://gvasquez.dev\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"dominicduffin1\\", + \\"name\\": \\"Dominic Duffin\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/26224873?v=4\\", + \\"profile\\": \\"https://dominicduffin.uk\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"5hraddha\\", + \\"name\\": \\"Shraddha\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/27571141?v=4\\", + \\"profile\\": \\"https://www.shraddha.tech\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + } + ], + \\"contributorsPerLine\\": 7, + \\"contributorsSortAlphabetically\\": true, +- \\"files\\": [ +- \\"README.md\\" +- ], ++ \\"files\\": [\\"README.md\\"], + \\"imageSize\\": 100, + \\"projectName\\": \\"create-typescript-app\\", + \\"projectOwner\\": \\"JoshuaKGoldberg\\", + \\"repoHost\\": \\"https://github.com\\", +- \\"repoType\\": \\"github\\", +- \\"commitType\\": \\"docs\\" ++ \\"repoType\\": \\"github\\" + }" +`; + +exports[`verify .eslintignore 1`] = ` +"diff --git a/.eslintignore b/.eslintignore +index 06a1bea..9425b10 100644 +--- a/.eslintignore ++++ b/.eslintignore +@@ -1,5 +1,5 @@ + !.* +-coverage* ++coverage + lib + node_modules + pnpm-lock.yaml" +`; + +exports[`verify .eslintrc.cjs 1`] = ` +"diff --git a/.eslintrc.cjs b/.eslintrc.cjs +index ede5d35..56ee2c5 100644 +--- a/.eslintrc.cjs ++++ b/.eslintrc.cjs +@@ -1,13 +1,3 @@ +-/* +-๐Ÿ‘‹ Hi! This ESLint configuration contains a lot more stuff than many repos'! +-You can read from it to see all sorts of linting goodness, but don't worry - +-it's not something you need to exhaustively understand immediately. ๐Ÿ’™ +- +-If you're interested in learning more, see the 'getting started' docs on: +-- ESLint: https://eslint.org +-- typescript-eslint: https://typescript-eslint.io +-*/ +- + /** @type {import(\\"@types/eslint\\").Linter.Config} */ + module.exports = { + env: { +@@ -76,18 +66,6 @@ module.exports = { + rules: { + // These off-by-default rules work well for this repo and we like them on. + \\"deprecation/deprecation\\": \\"error\\", +- +- // These more-strict-by-default rules don't work well for this repo and we like them less strict. +- \\"@typescript-eslint/no-unnecessary-condition\\": [ +- \\"error\\", +- { +- allowConstantLoopConditions: true, +- }, +- ], +- \\"@typescript-eslint/prefer-nullish-coalescing\\": [ +- \\"error\\", +- { ignorePrimitives: true }, +- ], + }, + }, + {" +`; + +exports[`verify .github/DEVELOPMENT.md 1`] = ` +"diff --git a/.github/DEVELOPMENT.md b/.github/DEVELOPMENT.md +index d85b485..5f7094a 100644 +--- a/.github/DEVELOPMENT.md ++++ b/.github/DEVELOPMENT.md +@@ -1,8 +1,5 @@ + # Development + +-> If you'd like a more guided walkthrough, see [Contributing to a create-typescript-app Repository](https://www.joshuakgoldberg.com/blog/contributing-to-a-create-typescript-app-repository). +-> It'll walk you through the common activities you'll need to contribute. +- + After [forking the repo from GitHub](https://help.github.com/articles/fork-a-repo) and [installing pnpm](https://pnpm.io/installation): + + \`\`\`shell +@@ -99,116 +96,3 @@ Add \`--watch\` to keep the type checker running in a watch mode that updates the + \`\`\`shell + pnpm tsc --watch + \`\`\` +- +-## Setup Scripts +- +-As described in the \`README.md\` file and \`docs/\`, this template repository comes with three scripts that can set up an existing or new repository. +- +-Each follows roughly the same general flow: +- +-1. \`bin/index.ts\` uses \`bin/mode.ts\` to determine which of the three setup scripts to run +-2. \`readOptions\` parses in options from local files, Git commands, npm APIs, and/or files on disk +-3. \`runOrRestore\` wraps the setup script's main logic in a friendly prompt wrapper +-4. The setup script wraps each portion of its main logic with \`withSpinner\` +- - Each step of setup logic is generally imported from within \`src/steps\` +-5. A call to \`outro\` summarizes the results for the user +- +-> **Warning** +-> Each setup script overrides many files in the directory they're run in. +-> Make sure to save any changes you want to preserve before running them. +- +-### The Creation Script +- +-This template's \\"creation\\" script is located in \`src/create/\`. +-You can run it locally with \`node bin/index.js --mode create\`. +-Note that files need to be built with \`pnpm run build\` beforehand. +- +-#### Testing the Creation Script +- +-You can run the end-to-end test for creation locally on the command-line. +-Note that the files need to be built with \`pnpm run build\` beforehand. +- +-\`\`\`shell +-pnpm run test:create +-\`\`\` +- +-That end-to-end test executes \`script/create-test-e2e.js\`, which: +- +-1. Runs the creation script to create a new \`test-repository\` child directory and repository, capturing code coverage +-2. Asserts that commands such as \`build\` and \`lint\` each pass +- +-The \`pnpm run test:create\` script is run in CI to ensure that templating changes are in sync with the template's actual files. +-See \`.github/workflows/test-create.yml\`. +- +-### The Initialization Script +- +-This template's \\"initialization\\" script is located in \`src/initialize/\`. +-You can run it locally with \`pnpm run initialize\`. +-It uses [\`tsx\`](https://github.com/esbuild-kit/tsx) so you don't need to build files before running. +- +-\`\`\`shell +-pnpm run initialize +-\`\`\` +- +-#### Testing the Initialization Script +- +-You can run the end-to-end test for initializing locally on the command-line. +-Note that files need to be built with \`pnpm run build\` beforehand. +- +-\`\`\`shell +-pnpm run test:initialize +-\`\`\` +- +-That end-to-end test executes \`script/initialize-test-e2e.js\`, which: +- +-1. Runs the initialization script using \`--skip-github-api\` and other skip flags +-2. Checks that the local repository's files were changed correctly (e.g. removed initialization-only files) +-3. Runs \`pnpm run lint:knip\` to make sure no excess dependencies or files were left over +-4. Resets everything +-5. Runs initialization a second time, capturing test coverage +- +-The \`pnpm run test:initialize\` script is run in CI to ensure that templating changes are in sync with the template's actual files. +-See \`.github/workflows/test-initialize.yml\`. +- +-### The Migration Script +- +-This template's \\"migration\\" script is located in \`src/migrate/\`. +-Note that files need to be built with \`pnpm run build\` beforehand. +- +-To test out the script locally, run it from a different repository's directory: +- +-\`\`\`shell +-cd ../other-repo +-node ../create-typescript-app/bin/migrate.js +-\`\`\` +- +-The migration script will work on any directory. +-You can try it out in a blank directory with scripts like: +- +-\`\`\`shell +-cd .. +-mkdir temp +-cd temp +-node ../create-typescript-app/bin/migrate.js +-\`\`\` +- +-#### Testing the Migration Script +- +-You can run the end-to-end test for migrating locally on the command-line: +- +-\`\`\`shell +-pnpm run test:migrate +-\`\`\` +- +-That end-to-end test executes \`script/migrate-test-e2e.js\`, which: +- +-1. Runs the migration script using \`--skip-github-api\` and other skip flags, capturing code coverage +-2. Checks that only a small list of allowed files were changed +-3. Checks that the local repository's files were changed correctly (e.g. removed initialization-only files) +- +-The \`pnpm run test:migrate\` script is run in CI to ensure that templating changes are in sync with the template's actual files. +-See \`.github/workflows/test-migrate.yml\`. +- +-> Tip: if the migration test is failing in CI and you don't see any errors, try [downloading the full logs](https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/using-workflow-run-logs#downloading-logs). +-> There'll likely be a list of changed files under a message like _\`Oh no! Running the migrate script modified some files:\`_. +-> You can also try running the test script locally." +`; + +exports[`verify .github/workflows/lint-knip.yml 1`] = ` +"diff --git a/.github/workflows/lint-knip.yml b/.github/workflows/lint-knip.yml +index df3f955..781d52e 100644 +--- a/.github/workflows/lint-knip.yml ++++ b/.github/workflows/lint-knip.yml +@@ -4,7 +4,6 @@ jobs: + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/prepare +- - run: pnpm build || true + - run: pnpm lint:knip + + name: Lint Knip" +`; + +exports[`verify .github/workflows/test.yml 1`] = ` +"diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml +index 48af822..0c7400b 100644 +--- a/.github/workflows/test.yml ++++ b/.github/workflows/test.yml +@@ -7,14 +7,6 @@ jobs: + - run: pnpm run test --coverage + - name: Codecov + uses: codecov/codecov-action@v3 +- with: +- flags: unit +- - if: always() +- name: Archive code coverage results +- uses: actions/upload-artifact@v3 +- with: +- name: code-coverage-report +- path: coverage + + name: Test + " +`; + +exports[`verify .gitignore 1`] = ` +"diff --git a/.gitignore b/.gitignore +index 32ffbca..a8bff3b 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -1,3 +1,3 @@ +-coverage*/ ++coverage/ + lib/ + node_modules/" +`; + +exports[`verify .prettierignore 1`] = ` +"diff --git a/.prettierignore b/.prettierignore +index 613eedd..32ca0f2 100644 +--- a/.prettierignore ++++ b/.prettierignore +@@ -1,4 +1,4 @@ + .all-contributorsrc +-coverage*/ ++coverage/ + lib/ + pnpm-lock.yaml" +`; + +exports[`verify README.md 1`] = ` +"diff --git a/README.md b/README.md +index 04e5c51..5c60b4e 100644 +--- a/README.md ++++ b/README.md +@@ -5,57 +5,20 @@ +

+ + +-\\"All ++\\"All + + + \\"Codecov +- \\"Code +- \\"License: +- \\"Sponsor: +- \\"Style: +- \\"TypeScript: ++ \\"Contributor ++ \\"License: ++ \\"Sponsor: ++ \\"Style: ++ \\"TypeScript: + \\"npm ++ \\"All ++ \\"Sponsor: +

+ +-\\"Project +- +-\`create-typescript-app\` is a one-stop-shop solution to set up a new or existing repository with the latest and greatest TypeScript tooling. +-It includes options not just for building and testing but also GitHub repository templates, contributor recognition, automated release management, and more. +- +-## Getting Started +- +-First make sure you have the following installed: +- +-- [GitHub CLI](https://cli.github.com) _(you'll need to be logged in)_ +-- [Node.js](https://nodejs.org) +-- [pnpm](https://pnpm.io) +- +-Then in an existing repository or in your directory where you'd like to make a new repository: +- +-\`\`\`shell +-npx create-typescript-app +-\`\`\` +- +-That setup script will walk you through using the template. +-You can read more about the supported setup modes in their docs pages: +- +-- [**Creating from the terminal**](./docs/Creation.md): creating a new repository locally on the command-line _(recommended)_ +-- [**Initializing from the template**](./docs/Initialization.md): creating a new repository with the [_Use this template_](https://github.com/JoshuaKGoldberg/create-typescript-app/generate) button on GitHub +-- [**Migrating an existing repository**](./docs/Migration.md): adding this template's tooling on top of an existing repository +- +-## Documentation +- +-You can read more about \`create-typescript-app\` and the tooling it supports: +- +-1. [**Tooling**](./docs/Tooling.md): a breakdown of all the pieces this template can set up. +-2. [**Options**](./docs/Options.md): granular options to customize how the template is run. +-3. [**FAQs**](./docs/FAQs.md): frequently asked questions +- +-> [!NOTE] +-> This template is early stage, opinionated, and not endorsed by the TypeScript team. +-> It can be configured to set up a _lot_ of tooling out of the box. +-> If you don't want to use any particular tool, you can always remove it manually. +- + ## Development + + See [\`.github/CONTRIBUTING.md\`](./.github/CONTRIBUTING.md), then [\`.github/DEVELOPMENT.md\`](./.github/DEVELOPMENT.md). +@@ -125,3 +88,7 @@ Thanks! ๐Ÿ’– + + + ++ ++ ++ ++> ๐Ÿ’™ This package was templated with [create-typescript-app](https://github.com/JoshuaKGoldberg/create-typescript-app)." +`; + +exports[`verify bin/index.js 1`] = `""`; + +exports[`verify cspell.json 1`] = ` +"diff --git a/cspell.json b/cspell.json +index 386ca42..494dd2e 100644 +--- a/cspell.json ++++ b/cspell.json +@@ -1,39 +1,27 @@ + { + \\"dictionaries\\": [\\"typescript\\"], + \\"ignorePaths\\": [ +- \\"./coverage*\\", + \\".github\\", + \\"CHANGELOG.md\\", ++ \\"coverage\\", + \\"lib\\", + \\"node_modules\\", + \\"pnpm-lock.yaml\\" + ], + \\"words\\": [ +- \\"allcontributors\\", +- \\"apexskier\\", +- \\"arethetypeswrong\\", + \\"Codecov\\", + \\"codespace\\", + \\"commitlint\\", + \\"contributorsrc\\", + \\"conventionalcommits\\", +- \\"execa\\", +- \\"infile\\", +- \\"joshuakgoldberg\\", + \\"knip\\", + \\"lcov\\", + \\"markdownlintignore\\", +- \\"mtfoley\\", +- \\"npmignore\\", +- \\"npmjs\\", + \\"npmpackagejsonlintrc\\", + \\"outro\\", + \\"packagejson\\", + \\"quickstart\\", +- \\"tada\\", + \\"tsup\\", +- \\"Unstaged\\", +- \\"vitest\\", + \\"wontfix\\" + ] + }" +`; + +exports[`verify knip.jsonc 1`] = ` +"diff --git a/knip.jsonc b/knip.jsonc +index 83c8537..d73a20f 100644 +--- a/knip.jsonc ++++ b/knip.jsonc +@@ -1,16 +1,6 @@ + { + \\"$schema\\": \\"https://unpkg.com/knip@latest/schema.json\\", +- \\"entry\\": [ +- \\"src/index.ts!\\", +- \\"src/guide/index.ts\\", +- \\"src/initialize/index.ts\\", +- \\"src/migrate/index.ts\\", +- \\"script/*e2e.js\\" +- ], +- \\"ignoreBinaries\\": [\\"gh\\"], +- \\"ignoreExportsUsedInFile\\": { +- \\"interface\\": true, +- \\"type\\": true +- }, +- \\"project\\": [\\"src/**/*.ts!\\", \\"script/**/*.js\\"] ++ \\"entry\\": [\\"src/index.ts!\\"], ++ \\"ignoreExportsUsedInFile\\": { \\"interface\\": true, \\"type\\": true }, ++ \\"project\\": [\\"src/**/*.ts!\\"] + }" +`; + +exports[`verify package.json 1`] = ` +"diff --git a/package.json b/package.json +index 7a0e08a..0c382e9 100644 +--- a/package.json ++++ b/package.json +@@ -8,14 +8,13 @@ + }, + \\"license\\": \\"MIT\\", + \\"author\\": { +- \\"name\\": \\"Josh Goldberg\\", ++ \\"name\\": \\"Aslemammad\\", + \\"email\\": \\"npm@joshuakgoldberg.com\\" + }, + \\"type\\": \\"module\\", + \\"main\\": \\"./lib/index.js\\", + \\"bin\\": \\"./bin/index.js\\", + \\"files\\": [ +- \\"bin/\\", + \\"lib/\\", + \\"package.json\\", + \\"LICENSE.md\\", +@@ -24,8 +23,7 @@ + \\"scripts\\": { + \\"build\\": \\"tsup\\", + \\"format\\": \\"prettier \\\\\\"**/*\\\\\\" --ignore-unknown\\", +- \\"initialize\\": \\"tsx ./src/bin/index.js --mode initialize\\", +- \\"lint\\": \\"eslint . .*js --max-warnings 0\\", ++ \\"lint\\": \\"eslint . .*js --max-warnings 0 --report-unused-disable-directives\\", + \\"lint:knip\\": \\"knip\\", + \\"lint:md\\": \\"markdownlint \\\\\\"**/*.md\\\\\\" \\\\\\".github/**/*.md\\\\\\" --rules sentences-per-line\\", + \\"lint:package-json\\": \\"npmPkgJsonLint .\\", +@@ -34,9 +32,6 @@ + \\"prepare\\": \\"husky install\\", + \\"should-semantic-release\\": \\"should-semantic-release --verbose\\", + \\"test\\": \\"vitest\\", +- \\"test:create\\": \\"node script/create-test-e2e.js\\", +- \\"test:initialize\\": \\"node script/initialize-test-e2e.js\\", +- \\"test:migrate\\": \\"node script/migrate-test-e2e.js\\", + \\"tsc\\": \\"tsc\\" + }, + \\"lint-staged\\": { +@@ -107,7 +102,7 @@ + \\"vitest\\": \\"^0.34.3\\", + \\"yaml-eslint-parser\\": \\"^1.2.2\\" + }, +- \\"packageManager\\": \\"pnpm@8.10.5\\", ++ \\"packageManager\\": \\"pnpm@8.7.0\\", + \\"engines\\": { + \\"node\\": \\">=18\\" + }," +`; + +exports[`verify pnpm-lock.yaml 1`] = `""`; From 7b2a432bd86846a6ecc23f009ecec1c1a56a2454 Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Wed, 13 Dec 2023 23:38:28 +0330 Subject: [PATCH 07/35] exit vitest --- script/migrate-test-e2e.js | 1 + 1 file changed, 1 insertion(+) diff --git a/script/migrate-test-e2e.js b/script/migrate-test-e2e.js index dd0b01114..c68086a85 100644 --- a/script/migrate-test-e2e.js +++ b/script/migrate-test-e2e.js @@ -21,6 +21,7 @@ await $({ })`c8 -o ./coverage-migrate -r html -r lcov --src src node ./bin/index.js --base everything --mode migrate --description ${description} --email-github ${emailGithub} --email-npm ${emailNpm} --owner ${owner} --title ${title} --repository ${repository} --skip-all-contributors-api --skip-github-api --skip-install`; await vitest.start(); +await vitest.exit(); const { stdout: gitStatus } = await $`git status`; console.log(`Stdout from running \`git status\`:\n${gitStatus}`); From 7a3967ff4b209f15e10c9e42a8649cd8d510c5b5 Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Sat, 16 Dec 2023 14:48:34 +0330 Subject: [PATCH 08/35] feat: -u --- script/migrate-test-e2e.js | 1 + 1 file changed, 1 insertion(+) diff --git a/script/migrate-test-e2e.js b/script/migrate-test-e2e.js index c68086a85..4f60b0b12 100644 --- a/script/migrate-test-e2e.js +++ b/script/migrate-test-e2e.js @@ -4,6 +4,7 @@ import { createVitest } from "vitest/node"; const vitest = await createVitest("test", { include: [new URL("./verify-changes.test.ts", import.meta.url).pathname], + update: process.argv.includes("-u"), watch: false, }); From fcb2e6ff3e390ac1d14a2fff26868e845a80509c Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Sat, 16 Dec 2023 14:59:36 +0330 Subject: [PATCH 09/35] fix: author --- script/migrate-test-e2e.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/script/migrate-test-e2e.js b/script/migrate-test-e2e.js index 4f60b0b12..ca9b0430e 100644 --- a/script/migrate-test-e2e.js +++ b/script/migrate-test-e2e.js @@ -15,11 +15,12 @@ const { description, name: repository } = packageData; const emailGithub = "github@joshuakgoldberg.com"; const emailNpm = "npm@joshuakgoldberg.com"; const owner = "JoshuaKGoldberg"; +const author = "Josh Goldberg"; const title = "Create TypeScript App"; await $({ stdio: "inherit", -})`c8 -o ./coverage-migrate -r html -r lcov --src src node ./bin/index.js --base everything --mode migrate --description ${description} --email-github ${emailGithub} --email-npm ${emailNpm} --owner ${owner} --title ${title} --repository ${repository} --skip-all-contributors-api --skip-github-api --skip-install`; +})`c8 -o ./coverage-migrate -r html -r lcov --src src node ./bin/index.js --base everything --author ${author} --mode migrate --description ${description} --email-github ${emailGithub} --email-npm ${emailNpm} --owner ${owner} --title ${title} --repository ${repository} --skip-all-contributors-api --skip-github-api --skip-install`; await vitest.start(); await vitest.exit(); From 4b6ceb8c3eb0c33b234059e0c533237cc8a92f84 Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Sat, 16 Dec 2023 15:18:13 +0330 Subject: [PATCH 10/35] Revert "fix: author" This reverts commit fcb2e6ff3e390ac1d14a2fff26868e845a80509c. --- script/migrate-test-e2e.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/script/migrate-test-e2e.js b/script/migrate-test-e2e.js index ca9b0430e..4f60b0b12 100644 --- a/script/migrate-test-e2e.js +++ b/script/migrate-test-e2e.js @@ -15,12 +15,11 @@ const { description, name: repository } = packageData; const emailGithub = "github@joshuakgoldberg.com"; const emailNpm = "npm@joshuakgoldberg.com"; const owner = "JoshuaKGoldberg"; -const author = "Josh Goldberg"; const title = "Create TypeScript App"; await $({ stdio: "inherit", -})`c8 -o ./coverage-migrate -r html -r lcov --src src node ./bin/index.js --base everything --author ${author} --mode migrate --description ${description} --email-github ${emailGithub} --email-npm ${emailNpm} --owner ${owner} --title ${title} --repository ${repository} --skip-all-contributors-api --skip-github-api --skip-install`; +})`c8 -o ./coverage-migrate -r html -r lcov --src src node ./bin/index.js --base everything --mode migrate --description ${description} --email-github ${emailGithub} --email-npm ${emailNpm} --owner ${owner} --title ${title} --repository ${repository} --skip-all-contributors-api --skip-github-api --skip-install`; await vitest.start(); await vitest.exit(); From 293f4a9ef0cf83c52417375720b6761aa43e2201 Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Sat, 16 Dec 2023 15:35:18 +0330 Subject: [PATCH 11/35] chore: update snapshot --- .../__snapshots__/verify-changes.test.ts.snap | 65 ++++++++++++------- 1 file changed, 42 insertions(+), 23 deletions(-) diff --git a/script/__snapshots__/verify-changes.test.ts.snap b/script/__snapshots__/verify-changes.test.ts.snap index 8579e90b1..955d6dbdf 100644 --- a/script/__snapshots__/verify-changes.test.ts.snap +++ b/script/__snapshots__/verify-changes.test.ts.snap @@ -2,17 +2,17 @@ exports[`verify .all-contributorsrc 1`] = ` "diff --git a/.all-contributorsrc b/.all-contributorsrc -index f4d6216..d0fed87 100644 +index 1f1f278..4822422 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1,5 +1,5 @@ { - \\"badgeTemplate\\": \\"\\\\\\"All ๐Ÿค\\\\\\" src=\\\\\\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>_๐Ÿค-21bb42.svg\\\\\\" />\\", -+ \\"badgeTemplate\\": \\"\\\\\\"All ๐Ÿ‘ช\\\\\\" src=\\\\\\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>_๐Ÿ‘ช-21bb42.svg\\\\\\" />\\", ++ \\"badgeTemplate\\": \\"\\\\t\\\\\\"All ๐Ÿ‘ช\\\\\\" src=\\\\\\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>_๐Ÿ‘ช-21bb42.svg\\\\\\" />\\", \\"commit\\": false, \\"commitConvention\\": \\"angular\\", \\"contributors\\": [ -@@ -24,335 +24,253 @@ +@@ -24,345 +24,260 @@ \\"name\\": \\"Jeff Wen\\", \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/3297859?v=4\\", \\"profile\\": \\"https://sinchang.me\\", @@ -296,9 +296,10 @@ index f4d6216..d0fed87 100644 \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/30204147?v=4\\", \\"profile\\": \\"https://github.com/jaas666\\", - \\"contributions\\": [ -- \\"code\\" +- \\"code\\", +- \\"doc\\" - ] -+ \\"contributions\\": [\\"code\\"] ++ \\"contributions\\": [\\"code\\", \\"doc\\"] }, { \\"login\\": \\"katt\\", @@ -368,6 +369,16 @@ index f4d6216..d0fed87 100644 - \\"contributions\\": [ - \\"code\\" - ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"xl4624\\", + \\"name\\": \\"Xiaomin Liu\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/116298054?v=4\\", + \\"profile\\": \\"https://github.com/xl4624\\", +- \\"contributions\\": [ +- \\"code\\" +- ] + \\"contributions\\": [\\"code\\"] } ], @@ -638,15 +649,15 @@ index 613eedd..32ca0f2 100644 exports[`verify README.md 1`] = ` "diff --git a/README.md b/README.md -index 04e5c51..5c60b4e 100644 +index fcdab3c..aabb1ae 100644 --- a/README.md +++ b/README.md @@ -5,57 +5,20 @@

--\\"All -+\\"All +-\\"All ++ \\"All \\"Codecov @@ -661,7 +672,7 @@ index 04e5c51..5c60b4e 100644 + \\"Style: + \\"TypeScript: \\"npm -+ \\"All ++ \\"All + \\"Sponsor:

@@ -707,17 +718,27 @@ index 04e5c51..5c60b4e 100644 ## Development See [\`.github/CONTRIBUTING.md\`](./.github/CONTRIBUTING.md), then [\`.github/DEVELOPMENT.md\`](./.github/DEVELOPMENT.md). -@@ -125,3 +88,7 @@ Thanks! ๐Ÿ’– +@@ -126,3 +89,7 @@ Thanks! ๐Ÿ’– + + + -+> ๐Ÿ’™ This package was templated with [create-typescript-app](https://github.com/JoshuaKGoldberg/create-typescript-app)." ++> ๐Ÿ’™ This package was templated with [\`create-typescript-app\`](https://github.com/JoshuaKGoldberg/create-typescript-app)." `; -exports[`verify bin/index.js 1`] = `""`; +exports[`verify bin/index.js 1`] = ` +"diff --git a/bin/index.js b/bin/index.js +index 1b7a284..c482970 100755 +--- a/bin/index.js ++++ b/bin/index.js +@@ -1,4 +1,3 @@ +-#!/usr/bin/env node + import { bin } from \\"../lib/bin/index.js\\"; + + process.exitCode = await bin(process.argv.slice(2));" +`; exports[`verify cspell.json 1`] = ` "diff --git a/cspell.json b/cspell.json @@ -796,10 +817,10 @@ index 83c8537..d73a20f 100644 exports[`verify package.json 1`] = ` "diff --git a/package.json b/package.json -index 7a0e08a..0c382e9 100644 +index 006a21c..4e4cea7 100644 --- a/package.json +++ b/package.json -@@ -8,14 +8,13 @@ +@@ -8,14 +8,12 @@ }, \\"license\\": \\"MIT\\", \\"author\\": { @@ -809,23 +830,21 @@ index 7a0e08a..0c382e9 100644 }, \\"type\\": \\"module\\", \\"main\\": \\"./lib/index.js\\", - \\"bin\\": \\"./bin/index.js\\", +- \\"bin\\": \\"./bin/index.js\\", \\"files\\": [ - \\"bin/\\", \\"lib/\\", \\"package.json\\", \\"LICENSE.md\\", -@@ -24,8 +23,7 @@ +@@ -24,7 +22,6 @@ \\"scripts\\": { \\"build\\": \\"tsup\\", \\"format\\": \\"prettier \\\\\\"**/*\\\\\\" --ignore-unknown\\", - \\"initialize\\": \\"tsx ./src/bin/index.js --mode initialize\\", -- \\"lint\\": \\"eslint . .*js --max-warnings 0\\", -+ \\"lint\\": \\"eslint . .*js --max-warnings 0 --report-unused-disable-directives\\", + \\"lint\\": \\"eslint . .*js --max-warnings 0\\", \\"lint:knip\\": \\"knip\\", \\"lint:md\\": \\"markdownlint \\\\\\"**/*.md\\\\\\" \\\\\\".github/**/*.md\\\\\\" --rules sentences-per-line\\", - \\"lint:package-json\\": \\"npmPkgJsonLint .\\", -@@ -34,9 +32,6 @@ +@@ -34,9 +31,6 @@ \\"prepare\\": \\"husky install\\", \\"should-semantic-release\\": \\"should-semantic-release --verbose\\", \\"test\\": \\"vitest\\", @@ -835,11 +854,11 @@ index 7a0e08a..0c382e9 100644 \\"tsc\\": \\"tsc\\" }, \\"lint-staged\\": { -@@ -107,7 +102,7 @@ - \\"vitest\\": \\"^0.34.3\\", +@@ -107,7 +101,7 @@ + \\"vitest\\": \\"^1.0.2\\", \\"yaml-eslint-parser\\": \\"^1.2.2\\" }, -- \\"packageManager\\": \\"pnpm@8.10.5\\", +- \\"packageManager\\": \\"pnpm@8.12.0\\", + \\"packageManager\\": \\"pnpm@8.7.0\\", \\"engines\\": { \\"node\\": \\">=18\\" From 8c6d07c7a486b259ee5d2e05a1a958b2249dc687 Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Sat, 16 Dec 2023 16:00:29 +0330 Subject: [PATCH 12/35] chore: remove few files from expected files to change --- script/constants.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/script/constants.js b/script/constants.js index 6e879c8df..c16f59bd4 100644 --- a/script/constants.js +++ b/script/constants.js @@ -1,10 +1,8 @@ export const filesExpectedToBeChanged = new Set([ ".all-contributorsrc", - "bin/index.js", "README.md", "knip.jsonc", "package.json", - "pnpm-lock.yaml", ".eslintignore", ".eslintrc.cjs", ".github/DEVELOPMENT.md", From da560f1488333ed619827b8724d67812f19ce474 Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Sun, 24 Dec 2023 08:33:52 +0330 Subject: [PATCH 13/35] update --- script/migrate-test-e2e.js | 113 +++++++++++++++++++------------------ 1 file changed, 58 insertions(+), 55 deletions(-) diff --git a/script/migrate-test-e2e.js b/script/migrate-test-e2e.js index 4f60b0b12..da579e4d2 100644 --- a/script/migrate-test-e2e.js +++ b/script/migrate-test-e2e.js @@ -1,70 +1,73 @@ import chalk from "chalk"; import { $, execaCommand } from "execa"; -import { createVitest } from "vitest/node"; - -const vitest = await createVitest("test", { - include: [new URL("./verify-changes.test.ts", import.meta.url).pathname], - update: process.argv.includes("-u"), - watch: false, -}); +import { test } from "vitest"; +import { assert, beforeAll, expect } from "vitest"; import packageData from "../package.json" assert { type: "json" }; import { filesExpectedToBeChanged } from "./constants.js"; -const { description, name: repository } = packageData; -const emailGithub = "github@joshuakgoldberg.com"; -const emailNpm = "npm@joshuakgoldberg.com"; -const owner = "JoshuaKGoldberg"; -const title = "Create TypeScript App"; +beforeAll(async () => { + const { description, name: repository } = packageData; + const emailGithub = "github@joshuakgoldberg.com"; + const emailNpm = "npm@joshuakgoldberg.com"; + const owner = "JoshuaKGoldberg"; + const title = "Create TypeScript App"; -await $({ - stdio: "inherit", -})`c8 -o ./coverage-migrate -r html -r lcov --src src node ./bin/index.js --base everything --mode migrate --description ${description} --email-github ${emailGithub} --email-npm ${emailNpm} --owner ${owner} --title ${title} --repository ${repository} --skip-all-contributors-api --skip-github-api --skip-install`; + await $({ + stdio: "inherit", + })`c8 -o ./coverage-migrate -r html -r lcov --src src node ./bin/index.js --base everything --mode migrate --description ${description} --email-github ${emailGithub} --email-npm ${emailNpm} --owner ${owner} --title ${title} --repository ${repository} --skip-all-contributors-api --skip-github-api --skip-install`; +}); -await vitest.start(); -await vitest.exit(); +test.each([...filesExpectedToBeChanged])("verify %s", async (file) => { + const { stdout } = await execaCommand(`git diff HEAD -- ${file}`); + expect(stdout).toMatchSnapshot(); +}); -const { stdout: gitStatus } = await $`git status`; -console.log(`Stdout from running \`git status\`:\n${gitStatus}`); +test("check for unstagedModifiedFiles", async () => { + const { stdout: gitStatus } = await $`git status`; + console.log(`Stdout from running \`git status\`:\n${gitStatus}`); -const indexOfUnstagedFilesMessage = gitStatus.indexOf( - "Changes not staged for commit:", -); -if (indexOfUnstagedFilesMessage === -1) { - throw new Error( + const indexOfUnstagedFilesMessage = gitStatus.indexOf( + "Changes not staged for commit:", + ); + assert( + indexOfUnstagedFilesMessage !== -1, `Looks like migrate didn't cause any file changes? That's ...probably incorrect? ๐Ÿ˜ฌ`, ); -} -const unstagedModifiedFiles = gitStatus - .slice(indexOfUnstagedFilesMessage) - .match(/modified: {3}(\S+)\n/g) - .map((match) => match.split(/\s+/g)[1]) - .filter((filePath) => !filesExpectedToBeChanged.has(filePath)); + const unstagedModifiedFiles = gitStatus + .slice(indexOfUnstagedFilesMessage) + .match(/modified: {3}(\S+)\n/g) + .map((match) => match.split(/\s+/g)[1]) + .filter((filePath) => !filesExpectedToBeChanged.has(filePath)); -console.log("Unexpected modified files are:", unstagedModifiedFiles); + console.log("Unexpected modified files are:", unstagedModifiedFiles); -if (unstagedModifiedFiles.length) { - const gitDiffCommand = `git diff HEAD -- ${unstagedModifiedFiles.join(" ")}`; - console.log( - `Stdout from running \`${gitDiffCommand}\`:\n${ - (await execaCommand(gitDiffCommand)).stdout - }`, - ); - console.error( - [ - "", - "Oh no! Running the migrate script modified some files:", - ...unstagedModifiedFiles.map((filePath) => ` - ${filePath}`), - "", - "That likely indicates changes made to the repository without", - "corresponding updates to templates in src/.", - "", - "Please search for those file(s)' name(s) under src/migrate for", - "the corresponding template and update those as well.", - ] - .map((line) => chalk.red(line)) - .join("\n"), - ); - process.exitCode = 1; -} + if (unstagedModifiedFiles.length) { + const gitDiffCommand = `git diff HEAD -- ${unstagedModifiedFiles.join( + " ", + )}`; + console.log( + `Stdout from running \`${gitDiffCommand}\`:\n${ + (await execaCommand(gitDiffCommand)).stdout + }`, + ); + console.error( + [ + "", + "Oh no! Running the migrate script modified some files:", + ...unstagedModifiedFiles.map((filePath) => ` - ${filePath}`), + "", + "That likely indicates changes made to the repository without", + "corresponding updates to templates in src/.", + "", + "Please search for those file(s)' name(s) under src/migrate for", + "the corresponding template and update those as well.", + ] + .map((line) => chalk.red(line)) + .join("\n"), + ); + } + + expect(unstagedModifiedFiles.length).toBe(0); +}); From 90aafe4ba9104bc520538dbd0d6d481f5a5850e3 Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Sun, 24 Dec 2023 08:39:12 +0330 Subject: [PATCH 14/35] update --- cspell.json | 3 ++- package.json | 2 +- script/{migrate-test-e2e.js => migrate-test-e2e.test.js} | 0 3 files changed, 3 insertions(+), 2 deletions(-) rename script/{migrate-test-e2e.js => migrate-test-e2e.test.js} (100%) diff --git a/cspell.json b/cspell.json index 386ca4223..8210d612e 100644 --- a/cspell.json +++ b/cspell.json @@ -6,7 +6,8 @@ "CHANGELOG.md", "lib", "node_modules", - "pnpm-lock.yaml" + "pnpm-lock.yaml", + "./script/__snapshots__" ], "words": [ "allcontributors", diff --git a/package.json b/package.json index 006a21c9f..a47ac69a0 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "test": "vitest", "test:create": "node script/create-test-e2e.js", "test:initialize": "node script/initialize-test-e2e.js", - "test:migrate": "node script/migrate-test-e2e.js", + "test:migrate": "vitest run script/migrate-test-e2e.test.js", "tsc": "tsc" }, "lint-staged": { diff --git a/script/migrate-test-e2e.js b/script/migrate-test-e2e.test.js similarity index 100% rename from script/migrate-test-e2e.js rename to script/migrate-test-e2e.test.js From 2302edbc9ddad78cf1a947a97a8426e5bf23fd82 Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Sun, 24 Dec 2023 08:45:56 +0330 Subject: [PATCH 15/35] update --- script/migrate-test-e2e.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/migrate-test-e2e.test.js b/script/migrate-test-e2e.test.js index da579e4d2..cf1271245 100644 --- a/script/migrate-test-e2e.test.js +++ b/script/migrate-test-e2e.test.js @@ -16,7 +16,7 @@ beforeAll(async () => { await $({ stdio: "inherit", })`c8 -o ./coverage-migrate -r html -r lcov --src src node ./bin/index.js --base everything --mode migrate --description ${description} --email-github ${emailGithub} --email-npm ${emailNpm} --owner ${owner} --title ${title} --repository ${repository} --skip-all-contributors-api --skip-github-api --skip-install`; -}); +}, Infinity); test.each([...filesExpectedToBeChanged])("verify %s", async (file) => { const { stdout } = await execaCommand(`git diff HEAD -- ${file}`); From a1353be7621a492ee441e7aa3e9789f569babfe3 Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Sun, 24 Dec 2023 08:53:09 +0330 Subject: [PATCH 16/35] remove verify-changes.test.ts --- ....ts.snap => migrate-test-e2e.test.js.snap} | 26 +++++-------------- script/verify-changes.test.ts | 10 ------- 2 files changed, 7 insertions(+), 29 deletions(-) rename script/__snapshots__/{verify-changes.test.ts.snap => migrate-test-e2e.test.js.snap} (98%) delete mode 100644 script/verify-changes.test.ts diff --git a/script/__snapshots__/verify-changes.test.ts.snap b/script/__snapshots__/migrate-test-e2e.test.js.snap similarity index 98% rename from script/__snapshots__/verify-changes.test.ts.snap rename to script/__snapshots__/migrate-test-e2e.test.js.snap index 955d6dbdf..e11a18133 100644 --- a/script/__snapshots__/verify-changes.test.ts.snap +++ b/script/__snapshots__/migrate-test-e2e.test.js.snap @@ -728,24 +728,12 @@ index fcdab3c..aabb1ae 100644 +> ๐Ÿ’™ This package was templated with [\`create-typescript-app\`](https://github.com/JoshuaKGoldberg/create-typescript-app)." `; -exports[`verify bin/index.js 1`] = ` -"diff --git a/bin/index.js b/bin/index.js -index 1b7a284..c482970 100755 ---- a/bin/index.js -+++ b/bin/index.js -@@ -1,4 +1,3 @@ --#!/usr/bin/env node - import { bin } from \\"../lib/bin/index.js\\"; - - process.exitCode = await bin(process.argv.slice(2));" -`; - exports[`verify cspell.json 1`] = ` "diff --git a/cspell.json b/cspell.json -index 386ca42..494dd2e 100644 +index 8210d61..494dd2e 100644 --- a/cspell.json +++ b/cspell.json -@@ -1,39 +1,27 @@ +@@ -1,40 +1,27 @@ { \\"dictionaries\\": [\\"typescript\\"], \\"ignorePaths\\": [ @@ -755,7 +743,9 @@ index 386ca42..494dd2e 100644 + \\"coverage\\", \\"lib\\", \\"node_modules\\", - \\"pnpm-lock.yaml\\" +- \\"pnpm-lock.yaml\\", +- \\"./script/__snapshots__\\" ++ \\"pnpm-lock.yaml\\" ], \\"words\\": [ - \\"allcontributors\\", @@ -817,7 +807,7 @@ index 83c8537..d73a20f 100644 exports[`verify package.json 1`] = ` "diff --git a/package.json b/package.json -index 006a21c..4e4cea7 100644 +index a47ac69..4e4cea7 100644 --- a/package.json +++ b/package.json @@ -8,14 +8,12 @@ @@ -850,7 +840,7 @@ index 006a21c..4e4cea7 100644 \\"test\\": \\"vitest\\", - \\"test:create\\": \\"node script/create-test-e2e.js\\", - \\"test:initialize\\": \\"node script/initialize-test-e2e.js\\", -- \\"test:migrate\\": \\"node script/migrate-test-e2e.js\\", +- \\"test:migrate\\": \\"vitest run script/migrate-test-e2e.test.js\\", \\"tsc\\": \\"tsc\\" }, \\"lint-staged\\": { @@ -864,5 +854,3 @@ index 006a21c..4e4cea7 100644 \\"node\\": \\">=18\\" }," `; - -exports[`verify pnpm-lock.yaml 1`] = `""`; diff --git a/script/verify-changes.test.ts b/script/verify-changes.test.ts deleted file mode 100644 index 6de0b0b5f..000000000 --- a/script/verify-changes.test.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { execaCommand } from "execa"; -import { expect } from "vitest"; -import { test } from "vitest"; - -import { filesExpectedToBeChanged } from "./constants.js"; - -test.each([...filesExpectedToBeChanged])("verify %s", async (file) => { - const { stdout } = await execaCommand(`git diff HEAD -- ${file}`); - expect(stdout).toMatchSnapshot(); -}); From e849ce45175aa4da6687770535b550563abe1507 Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Sun, 24 Dec 2023 09:06:49 +0330 Subject: [PATCH 17/35] update snapshots --- .../migrate-test-e2e.test.js.snap | 42 ++++++++++++++----- 1 file changed, 31 insertions(+), 11 deletions(-) diff --git a/script/__snapshots__/migrate-test-e2e.test.js.snap b/script/__snapshots__/migrate-test-e2e.test.js.snap index e11a18133..f17e6991e 100644 --- a/script/__snapshots__/migrate-test-e2e.test.js.snap +++ b/script/__snapshots__/migrate-test-e2e.test.js.snap @@ -2,7 +2,7 @@ exports[`verify .all-contributorsrc 1`] = ` "diff --git a/.all-contributorsrc b/.all-contributorsrc -index 1f1f278..4822422 100644 +index 084b7ee..0ed629e 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1,5 +1,5 @@ @@ -12,7 +12,7 @@ index 1f1f278..4822422 100644 \\"commit\\": false, \\"commitConvention\\": \\"angular\\", \\"contributors\\": [ -@@ -24,345 +24,260 @@ +@@ -24,363 +24,274 @@ \\"name\\": \\"Jeff Wen\\", \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/3297859?v=4\\", \\"profile\\": \\"https://sinchang.me\\", @@ -379,6 +379,26 @@ index 1f1f278..4822422 100644 - \\"contributions\\": [ - \\"code\\" - ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"jamiemagee\\", + \\"name\\": \\"Jamie Magee\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/1358764?v=4\\", + \\"profile\\": \\"https://jamiemagee.co.uk\\", +- \\"contributions\\": [ +- \\"ideas\\" +- ] ++ \\"contributions\\": [\\"ideas\\"] + }, + { + \\"login\\": \\"praveenshinde3\\", + \\"name\\": \\"Praveen Shinde\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/107350270?v=4\\", + \\"profile\\": \\"https://praveenshinde.vercel.app/\\", +- \\"contributions\\": [ +- \\"code\\" +- ] + \\"contributions\\": [\\"code\\"] } ], @@ -602,7 +622,7 @@ index df3f955..781d52e 100644 exports[`verify .github/workflows/test.yml 1`] = ` "diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml -index 48af822..0c7400b 100644 +index e2fd6ee..0c7400b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,14 +7,6 @@ jobs: @@ -613,7 +633,7 @@ index 48af822..0c7400b 100644 - flags: unit - - if: always() - name: Archive code coverage results -- uses: actions/upload-artifact@v3 +- uses: actions/upload-artifact@v4 - with: - name: code-coverage-report - path: coverage @@ -649,15 +669,15 @@ index 613eedd..32ca0f2 100644 exports[`verify README.md 1`] = ` "diff --git a/README.md b/README.md -index fcdab3c..aabb1ae 100644 +index 38d676e..4077451 100644 --- a/README.md +++ b/README.md @@ -5,57 +5,20 @@

--\\"All -+ \\"All +-\\"All ++ \\"All \\"Codecov @@ -672,7 +692,7 @@ index fcdab3c..aabb1ae 100644 + \\"Style: + \\"TypeScript: \\"npm -+ \\"All ++ \\"All + \\"Sponsor:

@@ -718,7 +738,7 @@ index fcdab3c..aabb1ae 100644 ## Development See [\`.github/CONTRIBUTING.md\`](./.github/CONTRIBUTING.md), then [\`.github/DEVELOPMENT.md\`](./.github/DEVELOPMENT.md). -@@ -126,3 +89,7 @@ Thanks! ๐Ÿ’– +@@ -128,3 +91,7 @@ Thanks! ๐Ÿ’– @@ -807,7 +827,7 @@ index 83c8537..d73a20f 100644 exports[`verify package.json 1`] = ` "diff --git a/package.json b/package.json -index a47ac69..4e4cea7 100644 +index 65accab..e2aa424 100644 --- a/package.json +++ b/package.json @@ -8,14 +8,12 @@ @@ -848,7 +868,7 @@ index a47ac69..4e4cea7 100644 \\"vitest\\": \\"^1.0.2\\", \\"yaml-eslint-parser\\": \\"^1.2.2\\" }, -- \\"packageManager\\": \\"pnpm@8.12.0\\", +- \\"packageManager\\": \\"pnpm@8.12.1\\", + \\"packageManager\\": \\"pnpm@8.7.0\\", \\"engines\\": { \\"node\\": \\">=18\\" From 7aa4c6e948dc8b018e912f3e45ffb190a2d06d34 Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Sun, 24 Dec 2023 09:48:42 +0330 Subject: [PATCH 18/35] fake update --- script/migrate-test-e2e.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/migrate-test-e2e.test.js b/script/migrate-test-e2e.test.js index cf1271245..301c3147a 100644 --- a/script/migrate-test-e2e.test.js +++ b/script/migrate-test-e2e.test.js @@ -18,7 +18,7 @@ beforeAll(async () => { })`c8 -o ./coverage-migrate -r html -r lcov --src src node ./bin/index.js --base everything --mode migrate --description ${description} --email-github ${emailGithub} --email-npm ${emailNpm} --owner ${owner} --title ${title} --repository ${repository} --skip-all-contributors-api --skip-github-api --skip-install`; }, Infinity); -test.each([...filesExpectedToBeChanged])("verify %s", async (file) => { +test.each([...filesExpectedToBeChanged])("verify %s", async (file) => { const { stdout } = await execaCommand(`git diff HEAD -- ${file}`); expect(stdout).toMatchSnapshot(); }); From b0caa2b5671dfbd644f1f2d0b7abf79e89fd8f1e Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Sun, 24 Dec 2023 09:48:56 +0330 Subject: [PATCH 19/35] update --- script/migrate-test-e2e.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/migrate-test-e2e.test.js b/script/migrate-test-e2e.test.js index 301c3147a..cf1271245 100644 --- a/script/migrate-test-e2e.test.js +++ b/script/migrate-test-e2e.test.js @@ -18,7 +18,7 @@ beforeAll(async () => { })`c8 -o ./coverage-migrate -r html -r lcov --src src node ./bin/index.js --base everything --mode migrate --description ${description} --email-github ${emailGithub} --email-npm ${emailNpm} --owner ${owner} --title ${title} --repository ${repository} --skip-all-contributors-api --skip-github-api --skip-install`; }, Infinity); -test.each([...filesExpectedToBeChanged])("verify %s", async (file) => { +test.each([...filesExpectedToBeChanged])("verify %s", async (file) => { const { stdout } = await execaCommand(`git diff HEAD -- ${file}`); expect(stdout).toMatchSnapshot(); }); From 3199aea3ddbed74a7a85a3fcc52e640c59fe4068 Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Sun, 24 Dec 2023 12:06:58 +0330 Subject: [PATCH 20/35] update --- ...e-test-e2e.test.js => migrate-test-e2e.js} | 20 +++++++++---------- script/vitest.config.ts | 3 +++ 2 files changed, 12 insertions(+), 11 deletions(-) rename script/{migrate-test-e2e.test.js => migrate-test-e2e.js} (74%) create mode 100644 script/vitest.config.ts diff --git a/script/migrate-test-e2e.test.js b/script/migrate-test-e2e.js similarity index 74% rename from script/migrate-test-e2e.test.js rename to script/migrate-test-e2e.js index cf1271245..8b5492ec5 100644 --- a/script/migrate-test-e2e.test.js +++ b/script/migrate-test-e2e.js @@ -1,22 +1,20 @@ import chalk from "chalk"; import { $, execaCommand } from "execa"; import { test } from "vitest"; -import { assert, beforeAll, expect } from "vitest"; +import { assert, expect } from "vitest"; import packageData from "../package.json" assert { type: "json" }; import { filesExpectedToBeChanged } from "./constants.js"; -beforeAll(async () => { - const { description, name: repository } = packageData; - const emailGithub = "github@joshuakgoldberg.com"; - const emailNpm = "npm@joshuakgoldberg.com"; - const owner = "JoshuaKGoldberg"; - const title = "Create TypeScript App"; +const { description, name: repository } = packageData; +const emailGithub = "github@joshuakgoldberg.com"; +const emailNpm = "npm@joshuakgoldberg.com"; +const owner = "JoshuaKGoldberg"; +const title = "Create TypeScript App"; - await $({ - stdio: "inherit", - })`c8 -o ./coverage-migrate -r html -r lcov --src src node ./bin/index.js --base everything --mode migrate --description ${description} --email-github ${emailGithub} --email-npm ${emailNpm} --owner ${owner} --title ${title} --repository ${repository} --skip-all-contributors-api --skip-github-api --skip-install`; -}, Infinity); +await $({ + stdio: "inherit", +})`c8 -o ./coverage-migrate -r html -r lcov --src src node ./bin/index.js --base everything --mode migrate --description ${description} --email-github ${emailGithub} --email-npm ${emailNpm} --owner ${owner} --title ${title} --repository ${repository} --skip-all-contributors-api --skip-github-api --skip-install`; test.each([...filesExpectedToBeChanged])("verify %s", async (file) => { const { stdout } = await execaCommand(`git diff HEAD -- ${file}`); diff --git a/script/vitest.config.ts b/script/vitest.config.ts new file mode 100644 index 000000000..2e458efaf --- /dev/null +++ b/script/vitest.config.ts @@ -0,0 +1,3 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ test: { include: ["./migrate-test-e2e.js"] } }); From f06909abd304cc66e8794655e71242a886c840b1 Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Sun, 24 Dec 2023 12:10:09 +0330 Subject: [PATCH 21/35] update --- package.json | 2 +- .../migrate-test-e2e.test.js.snap | 876 ------------------ 2 files changed, 1 insertion(+), 877 deletions(-) delete mode 100644 script/__snapshots__/migrate-test-e2e.test.js.snap diff --git a/package.json b/package.json index 65accab60..516b1bd45 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "test": "vitest", "test:create": "node script/create-test-e2e.js", "test:initialize": "node script/initialize-test-e2e.js", - "test:migrate": "vitest run script/migrate-test-e2e.test.js", + "test:migrate": "vitest -r script/", "tsc": "tsc" }, "lint-staged": { diff --git a/script/__snapshots__/migrate-test-e2e.test.js.snap b/script/__snapshots__/migrate-test-e2e.test.js.snap deleted file mode 100644 index f17e6991e..000000000 --- a/script/__snapshots__/migrate-test-e2e.test.js.snap +++ /dev/null @@ -1,876 +0,0 @@ -// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html - -exports[`verify .all-contributorsrc 1`] = ` -"diff --git a/.all-contributorsrc b/.all-contributorsrc -index 084b7ee..0ed629e 100644 ---- a/.all-contributorsrc -+++ b/.all-contributorsrc -@@ -1,5 +1,5 @@ - { -- \\"badgeTemplate\\": \\"\\\\\\"All ๐Ÿค\\\\\\" src=\\\\\\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>_๐Ÿค-21bb42.svg\\\\\\" />\\", -+ \\"badgeTemplate\\": \\"\\\\t\\\\\\"All ๐Ÿ‘ช\\\\\\" src=\\\\\\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>_๐Ÿ‘ช-21bb42.svg\\\\\\" />\\", - \\"commit\\": false, - \\"commitConvention\\": \\"angular\\", - \\"contributors\\": [ -@@ -24,363 +24,274 @@ - \\"name\\": \\"Jeff Wen\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/3297859?v=4\\", - \\"profile\\": \\"https://sinchang.me\\", -- \\"contributions\\": [ -- \\"code\\" -- ] -+ \\"contributions\\": [\\"code\\"] - }, - { - \\"login\\": \\"Pinjasaur\\", - \\"name\\": \\"Paul Esch-Laurent\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/6335792?v=4\\", - \\"profile\\": \\"https://paulisaweso.me/\\", -- \\"contributions\\": [ -- \\"code\\" -- ] -+ \\"contributions\\": [\\"code\\"] - }, - { - \\"login\\": \\"NazCodeland\\", - \\"name\\": \\"NazCodeland\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/113494366?v=4\\", - \\"profile\\": \\"https://github.com/NazCodeland\\", -- \\"contributions\\": [ -- \\"code\\" -- ] -+ \\"contributions\\": [\\"code\\"] - }, - { - \\"login\\": \\"johnnyreilly\\", - \\"name\\": \\"John Reilly\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/1010525?v=4\\", - \\"profile\\": \\"https://blog.johnnyreilly.com/\\", -- \\"contributions\\": [ -- \\"code\\", -- \\"ideas\\" -- ] -+ \\"contributions\\": [\\"code\\", \\"ideas\\"] - }, - { - \\"login\\": \\"webpro\\", - \\"name\\": \\"Lars Kappert\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/456426?v=4\\", - \\"profile\\": \\"https://webpro.nl\\", -- \\"contributions\\": [ -- \\"code\\" -- ] -+ \\"contributions\\": [\\"code\\"] - }, - { - \\"login\\": \\"RebeccaStevens\\", - \\"name\\": \\"Rebecca Stevens\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/7224206?v=4\\", - \\"profile\\": \\"https://github.com/RebeccaStevens\\", -- \\"contributions\\": [ -- \\"code\\", -- \\"infra\\" -- ] -+ \\"contributions\\": [\\"code\\", \\"infra\\"] - }, - { - \\"login\\": \\"ronthetech\\", - \\"name\\": \\"Ron Jean-Francois\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/105710107?v=4\\", - \\"profile\\": \\"http://ronjeanfrancois.com\\", -- \\"contributions\\": [ -- \\"code\\", -- \\"infra\\" -- ] -+ \\"contributions\\": [\\"code\\", \\"infra\\"] - }, - { - \\"login\\": \\"nowyDEV\\", - \\"name\\": \\"Dominik Nowik\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/12304307?v=4\\", - \\"profile\\": \\"https://github.com/nowyDEV\\", -- \\"contributions\\": [ -- \\"tool\\", -- \\"code\\" -- ] -+ \\"contributions\\": [\\"tool\\", \\"code\\"] - }, - { - \\"login\\": \\"TAKANOME-DEV\\", - \\"name\\": \\"takanomedev\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/79809121?v=4\\", - \\"profile\\": \\"https://github.com/TAKANOME-DEV\\", -- \\"contributions\\": [ -- \\"code\\" -- ] -+ \\"contributions\\": [\\"code\\"] - }, - { - \\"login\\": \\"emday4prez\\", - \\"name\\": \\"Emerson\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/35363144?v=4\\", - \\"profile\\": \\"https://github.com/emday4prez\\", -- \\"contributions\\": [ -- \\"code\\" -- ] -+ \\"contributions\\": [\\"code\\"] - }, - { - \\"login\\": \\"jsjoeio\\", - \\"name\\": \\"Joe Previte\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/3806031?v=4\\", - \\"profile\\": \\"https://typescriptcourse.com/tutorials\\", -- \\"contributions\\": [ -- \\"bug\\", -- \\"code\\" -- ] -+ \\"contributions\\": [\\"bug\\", \\"code\\"] - }, - { - \\"login\\": \\"navin-moorthy\\", - \\"name\\": \\"Navin Moorthy\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/39694575?v=4\\", - \\"profile\\": \\"https://navinmoorthy.me/\\", -- \\"contributions\\": [ -- \\"bug\\", -- \\"code\\" -- ] -+ \\"contributions\\": [\\"bug\\", \\"code\\"] - }, - { - \\"login\\": \\"garuna-m6\\", - \\"name\\": \\"Anurag\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/23234342?v=4\\", - \\"profile\\": \\"https://github.com/garuna-m6\\", -- \\"contributions\\": [ -- \\"code\\" -- ] -+ \\"contributions\\": [\\"code\\"] - }, - { - \\"login\\": \\"danielroe\\", - \\"name\\": \\"Daniel Roe\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/28706372?v=4\\", - \\"profile\\": \\"https://roe.dev/\\", -- \\"contributions\\": [ -- \\"code\\" -- ] -+ \\"contributions\\": [\\"code\\"] - }, - { - \\"login\\": \\"the-lazy-learner\\", - \\"name\\": \\"Sudhansu\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/13695177?v=4\\", - \\"profile\\": \\"https://github.com/the-lazy-learner\\", -- \\"contributions\\": [ -- \\"code\\" -- ] -+ \\"contributions\\": [\\"code\\"] - }, - { - \\"login\\": \\"RNR1\\", - \\"name\\": \\"Ron Braha\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/45559220?v=4\\", - \\"profile\\": \\"https://linktr.ee/ronbraha\\", -- \\"contributions\\": [ -- \\"code\\", -- \\"design\\", -- \\"test\\" -- ] -+ \\"contributions\\": [\\"code\\", \\"design\\", \\"test\\"] - }, - { - \\"login\\": \\"tungbq\\", - \\"name\\": \\"Tung Bui (Leo)\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/85242618?v=4\\", - \\"profile\\": \\"https://github.com/tungbq\\", -- \\"contributions\\": [ -- \\"code\\" -- ] -+ \\"contributions\\": [\\"code\\"] - }, - { - \\"login\\": \\"orta\\", - \\"name\\": \\"Orta Therox\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/49038?v=4\\", - \\"profile\\": \\"https://orta.io\\", -- \\"contributions\\": [ -- \\"code\\" -- ] -+ \\"contributions\\": [\\"code\\"] - }, - { - \\"login\\": \\"promise-dash\\", - \\"name\\": \\"Promise Dash\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/86062880?v=4\\", - \\"profile\\": \\"https://github.com/promise-dash\\", -- \\"contributions\\": [ -- \\"code\\" -- ] -+ \\"contributions\\": [\\"code\\"] - }, - { - \\"login\\": \\"jolg42\\", - \\"name\\": \\"Joรซl Galeran\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/1328733?v=4\\", - \\"profile\\": \\"https://twitter.com/Jolg42\\", -- \\"contributions\\": [ -- \\"code\\" -- ] -+ \\"contributions\\": [\\"code\\"] - }, - { - \\"login\\": \\"kristo-baricevic\\", - \\"name\\": \\"Kristo Baricevic\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/108290619?v=4\\", - \\"profile\\": \\"https://kristo-baricevic.github.io/\\", -- \\"contributions\\": [ -- \\"code\\" -- ] -+ \\"contributions\\": [\\"code\\"] - }, - { - \\"login\\": \\"ryota-murakami\\", - \\"name\\": \\"Ryota Murakami\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/5501268?v=4\\", - \\"profile\\": \\"https://ryota-murakami.github.io/\\", -- \\"contributions\\": [ -- \\"code\\", -- \\"bug\\" -- ] -+ \\"contributions\\": [\\"code\\", \\"bug\\"] - }, - { - \\"login\\": \\"ruthwikreddy09\\", - \\"name\\": \\"Ruthwik\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/126862059?v=4\\", - \\"profile\\": \\"https://github.com/RuthwikReddy09\\", -- \\"contributions\\": [ -- \\"code\\" -- ] -+ \\"contributions\\": [\\"code\\"] - }, - { - \\"login\\": \\"jdwilkin4\\", - \\"name\\": \\"Jessica Wilkins \\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/67210629?v=4\\", - \\"profile\\": \\"https://jessicawilkins.dev/\\", -- \\"contributions\\": [ -- \\"code\\" -- ] -+ \\"contributions\\": [\\"code\\"] - }, - { - \\"login\\": \\"vasanth9\\", - \\"name\\": \\"Vasanth Kumar Cheepurupalli\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/42891954?v=4\\", - \\"profile\\": \\"https://github.com/vasanth9\\", -- \\"contributions\\": [ -- \\"code\\" -- ] -+ \\"contributions\\": [\\"code\\"] - }, - { - \\"login\\": \\"conrmahr\\", - \\"name\\": \\"Conor Meagher\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/363781?v=4\\", - \\"profile\\": \\"https://conormeagher.com/\\", -- \\"contributions\\": [ -- \\"code\\" -- ] -+ \\"contributions\\": [\\"code\\"] - }, - { - \\"login\\": \\"DanexQ\\", - \\"name\\": \\"Daniel\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/72567464?v=4\\", - \\"profile\\": \\"https://github.com/DanexQ\\", -- \\"contributions\\": [ -- \\"infra\\" -- ] -+ \\"contributions\\": [\\"infra\\"] - }, - { - \\"login\\": \\"jaas666\\", - \\"name\\": \\"Juan A.\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/30204147?v=4\\", - \\"profile\\": \\"https://github.com/jaas666\\", -- \\"contributions\\": [ -- \\"code\\", -- \\"doc\\" -- ] -+ \\"contributions\\": [\\"code\\", \\"doc\\"] - }, - { - \\"login\\": \\"katt\\", - \\"name\\": \\"Alex / KATT\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/459267?v=4\\", - \\"profile\\": \\"https://katt.dev\\", -- \\"contributions\\": [ -- \\"bug\\" -- ] -+ \\"contributions\\": [\\"bug\\"] - }, - { - \\"login\\": \\"dertimonius\\", - \\"name\\": \\"Timon Jurschitsch\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/103483059?v=4\\", - \\"profile\\": \\"https://www.linkedin.com/in/timonjurschitsch/\\", -- \\"contributions\\": [ -- \\"code\\" -- ] -+ \\"contributions\\": [\\"code\\"] - }, - { - \\"login\\": \\"biplobsd\\", - \\"name\\": \\"Biplob Sutradhar\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/43641536?v=4\\", - \\"profile\\": \\"http://biplobsd.me\\", -- \\"contributions\\": [ -- \\"code\\" -- ] -+ \\"contributions\\": [\\"code\\"] - }, - { - \\"login\\": \\"mrswastik-robot\\", - \\"name\\": \\"Swastik Patel\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/107865087?v=4\\", - \\"profile\\": \\"https://github.com/mrswastik-robot\\", -- \\"contributions\\": [ -- \\"doc\\" -- ] -+ \\"contributions\\": [\\"doc\\"] - }, - { - \\"login\\": \\"gv14982\\", - \\"name\\": \\"Graham Vasquez\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/7041175?v=4\\", - \\"profile\\": \\"https://gvasquez.dev\\", -- \\"contributions\\": [ -- \\"code\\" -- ] -+ \\"contributions\\": [\\"code\\"] - }, - { - \\"login\\": \\"dominicduffin1\\", - \\"name\\": \\"Dominic Duffin\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/26224873?v=4\\", - \\"profile\\": \\"https://dominicduffin.uk\\", -- \\"contributions\\": [ -- \\"code\\" -- ] -+ \\"contributions\\": [\\"code\\"] - }, - { - \\"login\\": \\"5hraddha\\", - \\"name\\": \\"Shraddha\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/27571141?v=4\\", - \\"profile\\": \\"https://www.shraddha.tech\\", -- \\"contributions\\": [ -- \\"code\\" -- ] -+ \\"contributions\\": [\\"code\\"] - }, - { - \\"login\\": \\"xl4624\\", - \\"name\\": \\"Xiaomin Liu\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/116298054?v=4\\", - \\"profile\\": \\"https://github.com/xl4624\\", -- \\"contributions\\": [ -- \\"code\\" -- ] -+ \\"contributions\\": [\\"code\\"] - }, - { - \\"login\\": \\"jamiemagee\\", - \\"name\\": \\"Jamie Magee\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/1358764?v=4\\", - \\"profile\\": \\"https://jamiemagee.co.uk\\", -- \\"contributions\\": [ -- \\"ideas\\" -- ] -+ \\"contributions\\": [\\"ideas\\"] - }, - { - \\"login\\": \\"praveenshinde3\\", - \\"name\\": \\"Praveen Shinde\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/107350270?v=4\\", - \\"profile\\": \\"https://praveenshinde.vercel.app/\\", -- \\"contributions\\": [ -- \\"code\\" -- ] -+ \\"contributions\\": [\\"code\\"] - } - ], - \\"contributorsPerLine\\": 7, - \\"contributorsSortAlphabetically\\": true, -- \\"files\\": [ -- \\"README.md\\" -- ], -+ \\"files\\": [\\"README.md\\"], - \\"imageSize\\": 100, - \\"projectName\\": \\"create-typescript-app\\", - \\"projectOwner\\": \\"JoshuaKGoldberg\\", - \\"repoHost\\": \\"https://github.com\\", -- \\"repoType\\": \\"github\\", -- \\"commitType\\": \\"docs\\" -+ \\"repoType\\": \\"github\\" - }" -`; - -exports[`verify .eslintignore 1`] = ` -"diff --git a/.eslintignore b/.eslintignore -index 06a1bea..9425b10 100644 ---- a/.eslintignore -+++ b/.eslintignore -@@ -1,5 +1,5 @@ - !.* --coverage* -+coverage - lib - node_modules - pnpm-lock.yaml" -`; - -exports[`verify .eslintrc.cjs 1`] = ` -"diff --git a/.eslintrc.cjs b/.eslintrc.cjs -index ede5d35..56ee2c5 100644 ---- a/.eslintrc.cjs -+++ b/.eslintrc.cjs -@@ -1,13 +1,3 @@ --/* --๐Ÿ‘‹ Hi! This ESLint configuration contains a lot more stuff than many repos'! --You can read from it to see all sorts of linting goodness, but don't worry - --it's not something you need to exhaustively understand immediately. ๐Ÿ’™ -- --If you're interested in learning more, see the 'getting started' docs on: --- ESLint: https://eslint.org --- typescript-eslint: https://typescript-eslint.io --*/ -- - /** @type {import(\\"@types/eslint\\").Linter.Config} */ - module.exports = { - env: { -@@ -76,18 +66,6 @@ module.exports = { - rules: { - // These off-by-default rules work well for this repo and we like them on. - \\"deprecation/deprecation\\": \\"error\\", -- -- // These more-strict-by-default rules don't work well for this repo and we like them less strict. -- \\"@typescript-eslint/no-unnecessary-condition\\": [ -- \\"error\\", -- { -- allowConstantLoopConditions: true, -- }, -- ], -- \\"@typescript-eslint/prefer-nullish-coalescing\\": [ -- \\"error\\", -- { ignorePrimitives: true }, -- ], - }, - }, - {" -`; - -exports[`verify .github/DEVELOPMENT.md 1`] = ` -"diff --git a/.github/DEVELOPMENT.md b/.github/DEVELOPMENT.md -index d85b485..5f7094a 100644 ---- a/.github/DEVELOPMENT.md -+++ b/.github/DEVELOPMENT.md -@@ -1,8 +1,5 @@ - # Development - --> If you'd like a more guided walkthrough, see [Contributing to a create-typescript-app Repository](https://www.joshuakgoldberg.com/blog/contributing-to-a-create-typescript-app-repository). --> It'll walk you through the common activities you'll need to contribute. -- - After [forking the repo from GitHub](https://help.github.com/articles/fork-a-repo) and [installing pnpm](https://pnpm.io/installation): - - \`\`\`shell -@@ -99,116 +96,3 @@ Add \`--watch\` to keep the type checker running in a watch mode that updates the - \`\`\`shell - pnpm tsc --watch - \`\`\` -- --## Setup Scripts -- --As described in the \`README.md\` file and \`docs/\`, this template repository comes with three scripts that can set up an existing or new repository. -- --Each follows roughly the same general flow: -- --1. \`bin/index.ts\` uses \`bin/mode.ts\` to determine which of the three setup scripts to run --2. \`readOptions\` parses in options from local files, Git commands, npm APIs, and/or files on disk --3. \`runOrRestore\` wraps the setup script's main logic in a friendly prompt wrapper --4. The setup script wraps each portion of its main logic with \`withSpinner\` -- - Each step of setup logic is generally imported from within \`src/steps\` --5. A call to \`outro\` summarizes the results for the user -- --> **Warning** --> Each setup script overrides many files in the directory they're run in. --> Make sure to save any changes you want to preserve before running them. -- --### The Creation Script -- --This template's \\"creation\\" script is located in \`src/create/\`. --You can run it locally with \`node bin/index.js --mode create\`. --Note that files need to be built with \`pnpm run build\` beforehand. -- --#### Testing the Creation Script -- --You can run the end-to-end test for creation locally on the command-line. --Note that the files need to be built with \`pnpm run build\` beforehand. -- --\`\`\`shell --pnpm run test:create --\`\`\` -- --That end-to-end test executes \`script/create-test-e2e.js\`, which: -- --1. Runs the creation script to create a new \`test-repository\` child directory and repository, capturing code coverage --2. Asserts that commands such as \`build\` and \`lint\` each pass -- --The \`pnpm run test:create\` script is run in CI to ensure that templating changes are in sync with the template's actual files. --See \`.github/workflows/test-create.yml\`. -- --### The Initialization Script -- --This template's \\"initialization\\" script is located in \`src/initialize/\`. --You can run it locally with \`pnpm run initialize\`. --It uses [\`tsx\`](https://github.com/esbuild-kit/tsx) so you don't need to build files before running. -- --\`\`\`shell --pnpm run initialize --\`\`\` -- --#### Testing the Initialization Script -- --You can run the end-to-end test for initializing locally on the command-line. --Note that files need to be built with \`pnpm run build\` beforehand. -- --\`\`\`shell --pnpm run test:initialize --\`\`\` -- --That end-to-end test executes \`script/initialize-test-e2e.js\`, which: -- --1. Runs the initialization script using \`--skip-github-api\` and other skip flags --2. Checks that the local repository's files were changed correctly (e.g. removed initialization-only files) --3. Runs \`pnpm run lint:knip\` to make sure no excess dependencies or files were left over --4. Resets everything --5. Runs initialization a second time, capturing test coverage -- --The \`pnpm run test:initialize\` script is run in CI to ensure that templating changes are in sync with the template's actual files. --See \`.github/workflows/test-initialize.yml\`. -- --### The Migration Script -- --This template's \\"migration\\" script is located in \`src/migrate/\`. --Note that files need to be built with \`pnpm run build\` beforehand. -- --To test out the script locally, run it from a different repository's directory: -- --\`\`\`shell --cd ../other-repo --node ../create-typescript-app/bin/migrate.js --\`\`\` -- --The migration script will work on any directory. --You can try it out in a blank directory with scripts like: -- --\`\`\`shell --cd .. --mkdir temp --cd temp --node ../create-typescript-app/bin/migrate.js --\`\`\` -- --#### Testing the Migration Script -- --You can run the end-to-end test for migrating locally on the command-line: -- --\`\`\`shell --pnpm run test:migrate --\`\`\` -- --That end-to-end test executes \`script/migrate-test-e2e.js\`, which: -- --1. Runs the migration script using \`--skip-github-api\` and other skip flags, capturing code coverage --2. Checks that only a small list of allowed files were changed --3. Checks that the local repository's files were changed correctly (e.g. removed initialization-only files) -- --The \`pnpm run test:migrate\` script is run in CI to ensure that templating changes are in sync with the template's actual files. --See \`.github/workflows/test-migrate.yml\`. -- --> Tip: if the migration test is failing in CI and you don't see any errors, try [downloading the full logs](https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/using-workflow-run-logs#downloading-logs). --> There'll likely be a list of changed files under a message like _\`Oh no! Running the migrate script modified some files:\`_. --> You can also try running the test script locally." -`; - -exports[`verify .github/workflows/lint-knip.yml 1`] = ` -"diff --git a/.github/workflows/lint-knip.yml b/.github/workflows/lint-knip.yml -index df3f955..781d52e 100644 ---- a/.github/workflows/lint-knip.yml -+++ b/.github/workflows/lint-knip.yml -@@ -4,7 +4,6 @@ jobs: - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/prepare -- - run: pnpm build || true - - run: pnpm lint:knip - - name: Lint Knip" -`; - -exports[`verify .github/workflows/test.yml 1`] = ` -"diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml -index e2fd6ee..0c7400b 100644 ---- a/.github/workflows/test.yml -+++ b/.github/workflows/test.yml -@@ -7,14 +7,6 @@ jobs: - - run: pnpm run test --coverage - - name: Codecov - uses: codecov/codecov-action@v3 -- with: -- flags: unit -- - if: always() -- name: Archive code coverage results -- uses: actions/upload-artifact@v4 -- with: -- name: code-coverage-report -- path: coverage - - name: Test - " -`; - -exports[`verify .gitignore 1`] = ` -"diff --git a/.gitignore b/.gitignore -index 32ffbca..a8bff3b 100644 ---- a/.gitignore -+++ b/.gitignore -@@ -1,3 +1,3 @@ --coverage*/ -+coverage/ - lib/ - node_modules/" -`; - -exports[`verify .prettierignore 1`] = ` -"diff --git a/.prettierignore b/.prettierignore -index 613eedd..32ca0f2 100644 ---- a/.prettierignore -+++ b/.prettierignore -@@ -1,4 +1,4 @@ - .all-contributorsrc --coverage*/ -+coverage/ - lib/ - pnpm-lock.yaml" -`; - -exports[`verify README.md 1`] = ` -"diff --git a/README.md b/README.md -index 38d676e..4077451 100644 ---- a/README.md -+++ b/README.md -@@ -5,57 +5,20 @@ -

- - --\\"All -+ \\"All - - - \\"Codecov -- \\"Code -- \\"License: -- \\"Sponsor: -- \\"Style: -- \\"TypeScript: -+ \\"Contributor -+ \\"License: -+ \\"Sponsor: -+ \\"Style: -+ \\"TypeScript: - \\"npm -+ \\"All -+ \\"Sponsor: -

- --\\"Project -- --\`create-typescript-app\` is a one-stop-shop solution to set up a new or existing repository with the latest and greatest TypeScript tooling. --It includes options not just for building and testing but also GitHub repository templates, contributor recognition, automated release management, and more. -- --## Getting Started -- --First make sure you have the following installed: -- --- [GitHub CLI](https://cli.github.com) _(you'll need to be logged in)_ --- [Node.js](https://nodejs.org) --- [pnpm](https://pnpm.io) -- --Then in an existing repository or in your directory where you'd like to make a new repository: -- --\`\`\`shell --npx create-typescript-app --\`\`\` -- --That setup script will walk you through using the template. --You can read more about the supported setup modes in their docs pages: -- --- [**Creating from the terminal**](./docs/Creation.md): creating a new repository locally on the command-line _(recommended)_ --- [**Initializing from the template**](./docs/Initialization.md): creating a new repository with the [_Use this template_](https://github.com/JoshuaKGoldberg/create-typescript-app/generate) button on GitHub --- [**Migrating an existing repository**](./docs/Migration.md): adding this template's tooling on top of an existing repository -- --## Documentation -- --You can read more about \`create-typescript-app\` and the tooling it supports: -- --1. [**Tooling**](./docs/Tooling.md): a breakdown of all the pieces this template can set up. --2. [**Options**](./docs/Options.md): granular options to customize how the template is run. --3. [**FAQs**](./docs/FAQs.md): frequently asked questions -- --> [!NOTE] --> This template is early stage, opinionated, and not endorsed by the TypeScript team. --> It can be configured to set up a _lot_ of tooling out of the box. --> If you don't want to use any particular tool, you can always remove it manually. -- - ## Development - - See [\`.github/CONTRIBUTING.md\`](./.github/CONTRIBUTING.md), then [\`.github/DEVELOPMENT.md\`](./.github/DEVELOPMENT.md). -@@ -128,3 +91,7 @@ Thanks! ๐Ÿ’– - - - -+ -+ -+ -+> ๐Ÿ’™ This package was templated with [\`create-typescript-app\`](https://github.com/JoshuaKGoldberg/create-typescript-app)." -`; - -exports[`verify cspell.json 1`] = ` -"diff --git a/cspell.json b/cspell.json -index 8210d61..494dd2e 100644 ---- a/cspell.json -+++ b/cspell.json -@@ -1,40 +1,27 @@ - { - \\"dictionaries\\": [\\"typescript\\"], - \\"ignorePaths\\": [ -- \\"./coverage*\\", - \\".github\\", - \\"CHANGELOG.md\\", -+ \\"coverage\\", - \\"lib\\", - \\"node_modules\\", -- \\"pnpm-lock.yaml\\", -- \\"./script/__snapshots__\\" -+ \\"pnpm-lock.yaml\\" - ], - \\"words\\": [ -- \\"allcontributors\\", -- \\"apexskier\\", -- \\"arethetypeswrong\\", - \\"Codecov\\", - \\"codespace\\", - \\"commitlint\\", - \\"contributorsrc\\", - \\"conventionalcommits\\", -- \\"execa\\", -- \\"infile\\", -- \\"joshuakgoldberg\\", - \\"knip\\", - \\"lcov\\", - \\"markdownlintignore\\", -- \\"mtfoley\\", -- \\"npmignore\\", -- \\"npmjs\\", - \\"npmpackagejsonlintrc\\", - \\"outro\\", - \\"packagejson\\", - \\"quickstart\\", -- \\"tada\\", - \\"tsup\\", -- \\"Unstaged\\", -- \\"vitest\\", - \\"wontfix\\" - ] - }" -`; - -exports[`verify knip.jsonc 1`] = ` -"diff --git a/knip.jsonc b/knip.jsonc -index 83c8537..d73a20f 100644 ---- a/knip.jsonc -+++ b/knip.jsonc -@@ -1,16 +1,6 @@ - { - \\"$schema\\": \\"https://unpkg.com/knip@latest/schema.json\\", -- \\"entry\\": [ -- \\"src/index.ts!\\", -- \\"src/guide/index.ts\\", -- \\"src/initialize/index.ts\\", -- \\"src/migrate/index.ts\\", -- \\"script/*e2e.js\\" -- ], -- \\"ignoreBinaries\\": [\\"gh\\"], -- \\"ignoreExportsUsedInFile\\": { -- \\"interface\\": true, -- \\"type\\": true -- }, -- \\"project\\": [\\"src/**/*.ts!\\", \\"script/**/*.js\\"] -+ \\"entry\\": [\\"src/index.ts!\\"], -+ \\"ignoreExportsUsedInFile\\": { \\"interface\\": true, \\"type\\": true }, -+ \\"project\\": [\\"src/**/*.ts!\\"] - }" -`; - -exports[`verify package.json 1`] = ` -"diff --git a/package.json b/package.json -index 65accab..e2aa424 100644 ---- a/package.json -+++ b/package.json -@@ -8,14 +8,12 @@ - }, - \\"license\\": \\"MIT\\", - \\"author\\": { -- \\"name\\": \\"Josh Goldberg\\", -+ \\"name\\": \\"Aslemammad\\", - \\"email\\": \\"npm@joshuakgoldberg.com\\" - }, - \\"type\\": \\"module\\", - \\"main\\": \\"./lib/index.js\\", -- \\"bin\\": \\"./bin/index.js\\", - \\"files\\": [ -- \\"bin/\\", - \\"lib/\\", - \\"package.json\\", - \\"LICENSE.md\\", -@@ -24,7 +22,6 @@ - \\"scripts\\": { - \\"build\\": \\"tsup\\", - \\"format\\": \\"prettier \\\\\\"**/*\\\\\\" --ignore-unknown\\", -- \\"initialize\\": \\"tsx ./src/bin/index.js --mode initialize\\", - \\"lint\\": \\"eslint . .*js --max-warnings 0\\", - \\"lint:knip\\": \\"knip\\", - \\"lint:md\\": \\"markdownlint \\\\\\"**/*.md\\\\\\" \\\\\\".github/**/*.md\\\\\\" --rules sentences-per-line\\", -@@ -34,9 +31,6 @@ - \\"prepare\\": \\"husky install\\", - \\"should-semantic-release\\": \\"should-semantic-release --verbose\\", - \\"test\\": \\"vitest\\", -- \\"test:create\\": \\"node script/create-test-e2e.js\\", -- \\"test:initialize\\": \\"node script/initialize-test-e2e.js\\", -- \\"test:migrate\\": \\"vitest run script/migrate-test-e2e.test.js\\", - \\"tsc\\": \\"tsc\\" - }, - \\"lint-staged\\": { -@@ -107,7 +101,7 @@ - \\"vitest\\": \\"^1.0.2\\", - \\"yaml-eslint-parser\\": \\"^1.2.2\\" - }, -- \\"packageManager\\": \\"pnpm@8.12.1\\", -+ \\"packageManager\\": \\"pnpm@8.7.0\\", - \\"engines\\": { - \\"node\\": \\">=18\\" - }," -`; From 1f1c2d0b40699968ada5767319fd114a0c5fc515 Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Sun, 24 Dec 2023 12:49:18 +0330 Subject: [PATCH 22/35] update --- script/__snapshots__/migrate-test-e2e.js.snap | 876 ++++++++++++++++++ 1 file changed, 876 insertions(+) create mode 100644 script/__snapshots__/migrate-test-e2e.js.snap diff --git a/script/__snapshots__/migrate-test-e2e.js.snap b/script/__snapshots__/migrate-test-e2e.js.snap new file mode 100644 index 000000000..222fe002c --- /dev/null +++ b/script/__snapshots__/migrate-test-e2e.js.snap @@ -0,0 +1,876 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`verify .all-contributorsrc 1`] = ` +"diff --git a/.all-contributorsrc b/.all-contributorsrc +index 084b7ee..0ed629e 100644 +--- a/.all-contributorsrc ++++ b/.all-contributorsrc +@@ -1,5 +1,5 @@ + { +- \\"badgeTemplate\\": \\"\\\\\\"All ๐Ÿค\\\\\\" src=\\\\\\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>_๐Ÿค-21bb42.svg\\\\\\" />\\", ++ \\"badgeTemplate\\": \\"\\\\t\\\\\\"All ๐Ÿ‘ช\\\\\\" src=\\\\\\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>_๐Ÿ‘ช-21bb42.svg\\\\\\" />\\", + \\"commit\\": false, + \\"commitConvention\\": \\"angular\\", + \\"contributors\\": [ +@@ -24,363 +24,274 @@ + \\"name\\": \\"Jeff Wen\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/3297859?v=4\\", + \\"profile\\": \\"https://sinchang.me\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"Pinjasaur\\", + \\"name\\": \\"Paul Esch-Laurent\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/6335792?v=4\\", + \\"profile\\": \\"https://paulisaweso.me/\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"NazCodeland\\", + \\"name\\": \\"NazCodeland\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/113494366?v=4\\", + \\"profile\\": \\"https://github.com/NazCodeland\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"johnnyreilly\\", + \\"name\\": \\"John Reilly\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/1010525?v=4\\", + \\"profile\\": \\"https://blog.johnnyreilly.com/\\", +- \\"contributions\\": [ +- \\"code\\", +- \\"ideas\\" +- ] ++ \\"contributions\\": [\\"code\\", \\"ideas\\"] + }, + { + \\"login\\": \\"webpro\\", + \\"name\\": \\"Lars Kappert\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/456426?v=4\\", + \\"profile\\": \\"https://webpro.nl\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"RebeccaStevens\\", + \\"name\\": \\"Rebecca Stevens\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/7224206?v=4\\", + \\"profile\\": \\"https://github.com/RebeccaStevens\\", +- \\"contributions\\": [ +- \\"code\\", +- \\"infra\\" +- ] ++ \\"contributions\\": [\\"code\\", \\"infra\\"] + }, + { + \\"login\\": \\"ronthetech\\", + \\"name\\": \\"Ron Jean-Francois\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/105710107?v=4\\", + \\"profile\\": \\"http://ronjeanfrancois.com\\", +- \\"contributions\\": [ +- \\"code\\", +- \\"infra\\" +- ] ++ \\"contributions\\": [\\"code\\", \\"infra\\"] + }, + { + \\"login\\": \\"nowyDEV\\", + \\"name\\": \\"Dominik Nowik\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/12304307?v=4\\", + \\"profile\\": \\"https://github.com/nowyDEV\\", +- \\"contributions\\": [ +- \\"tool\\", +- \\"code\\" +- ] ++ \\"contributions\\": [\\"tool\\", \\"code\\"] + }, + { + \\"login\\": \\"TAKANOME-DEV\\", + \\"name\\": \\"takanomedev\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/79809121?v=4\\", + \\"profile\\": \\"https://github.com/TAKANOME-DEV\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"emday4prez\\", + \\"name\\": \\"Emerson\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/35363144?v=4\\", + \\"profile\\": \\"https://github.com/emday4prez\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"jsjoeio\\", + \\"name\\": \\"Joe Previte\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/3806031?v=4\\", + \\"profile\\": \\"https://typescriptcourse.com/tutorials\\", +- \\"contributions\\": [ +- \\"bug\\", +- \\"code\\" +- ] ++ \\"contributions\\": [\\"bug\\", \\"code\\"] + }, + { + \\"login\\": \\"navin-moorthy\\", + \\"name\\": \\"Navin Moorthy\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/39694575?v=4\\", + \\"profile\\": \\"https://navinmoorthy.me/\\", +- \\"contributions\\": [ +- \\"bug\\", +- \\"code\\" +- ] ++ \\"contributions\\": [\\"bug\\", \\"code\\"] + }, + { + \\"login\\": \\"garuna-m6\\", + \\"name\\": \\"Anurag\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/23234342?v=4\\", + \\"profile\\": \\"https://github.com/garuna-m6\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"danielroe\\", + \\"name\\": \\"Daniel Roe\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/28706372?v=4\\", + \\"profile\\": \\"https://roe.dev/\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"the-lazy-learner\\", + \\"name\\": \\"Sudhansu\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/13695177?v=4\\", + \\"profile\\": \\"https://github.com/the-lazy-learner\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"RNR1\\", + \\"name\\": \\"Ron Braha\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/45559220?v=4\\", + \\"profile\\": \\"https://linktr.ee/ronbraha\\", +- \\"contributions\\": [ +- \\"code\\", +- \\"design\\", +- \\"test\\" +- ] ++ \\"contributions\\": [\\"code\\", \\"design\\", \\"test\\"] + }, + { + \\"login\\": \\"tungbq\\", + \\"name\\": \\"Tung Bui (Leo)\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/85242618?v=4\\", + \\"profile\\": \\"https://github.com/tungbq\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"orta\\", + \\"name\\": \\"Orta Therox\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/49038?v=4\\", + \\"profile\\": \\"https://orta.io\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"promise-dash\\", + \\"name\\": \\"Promise Dash\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/86062880?v=4\\", + \\"profile\\": \\"https://github.com/promise-dash\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"jolg42\\", + \\"name\\": \\"Joรซl Galeran\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/1328733?v=4\\", + \\"profile\\": \\"https://twitter.com/Jolg42\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"kristo-baricevic\\", + \\"name\\": \\"Kristo Baricevic\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/108290619?v=4\\", + \\"profile\\": \\"https://kristo-baricevic.github.io/\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"ryota-murakami\\", + \\"name\\": \\"Ryota Murakami\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/5501268?v=4\\", + \\"profile\\": \\"https://ryota-murakami.github.io/\\", +- \\"contributions\\": [ +- \\"code\\", +- \\"bug\\" +- ] ++ \\"contributions\\": [\\"code\\", \\"bug\\"] + }, + { + \\"login\\": \\"ruthwikreddy09\\", + \\"name\\": \\"Ruthwik\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/126862059?v=4\\", + \\"profile\\": \\"https://github.com/RuthwikReddy09\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"jdwilkin4\\", + \\"name\\": \\"Jessica Wilkins \\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/67210629?v=4\\", + \\"profile\\": \\"https://jessicawilkins.dev/\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"vasanth9\\", + \\"name\\": \\"Vasanth Kumar Cheepurupalli\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/42891954?v=4\\", + \\"profile\\": \\"https://github.com/vasanth9\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"conrmahr\\", + \\"name\\": \\"Conor Meagher\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/363781?v=4\\", + \\"profile\\": \\"https://conormeagher.com/\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"DanexQ\\", + \\"name\\": \\"Daniel\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/72567464?v=4\\", + \\"profile\\": \\"https://github.com/DanexQ\\", +- \\"contributions\\": [ +- \\"infra\\" +- ] ++ \\"contributions\\": [\\"infra\\"] + }, + { + \\"login\\": \\"jaas666\\", + \\"name\\": \\"Juan A.\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/30204147?v=4\\", + \\"profile\\": \\"https://github.com/jaas666\\", +- \\"contributions\\": [ +- \\"code\\", +- \\"doc\\" +- ] ++ \\"contributions\\": [\\"code\\", \\"doc\\"] + }, + { + \\"login\\": \\"katt\\", + \\"name\\": \\"Alex / KATT\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/459267?v=4\\", + \\"profile\\": \\"https://katt.dev\\", +- \\"contributions\\": [ +- \\"bug\\" +- ] ++ \\"contributions\\": [\\"bug\\"] + }, + { + \\"login\\": \\"dertimonius\\", + \\"name\\": \\"Timon Jurschitsch\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/103483059?v=4\\", + \\"profile\\": \\"https://www.linkedin.com/in/timonjurschitsch/\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"biplobsd\\", + \\"name\\": \\"Biplob Sutradhar\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/43641536?v=4\\", + \\"profile\\": \\"http://biplobsd.me\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"mrswastik-robot\\", + \\"name\\": \\"Swastik Patel\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/107865087?v=4\\", + \\"profile\\": \\"https://github.com/mrswastik-robot\\", +- \\"contributions\\": [ +- \\"doc\\" +- ] ++ \\"contributions\\": [\\"doc\\"] + }, + { + \\"login\\": \\"gv14982\\", + \\"name\\": \\"Graham Vasquez\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/7041175?v=4\\", + \\"profile\\": \\"https://gvasquez.dev\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"dominicduffin1\\", + \\"name\\": \\"Dominic Duffin\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/26224873?v=4\\", + \\"profile\\": \\"https://dominicduffin.uk\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"5hraddha\\", + \\"name\\": \\"Shraddha\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/27571141?v=4\\", + \\"profile\\": \\"https://www.shraddha.tech\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"xl4624\\", + \\"name\\": \\"Xiaomin Liu\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/116298054?v=4\\", + \\"profile\\": \\"https://github.com/xl4624\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + }, + { + \\"login\\": \\"jamiemagee\\", + \\"name\\": \\"Jamie Magee\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/1358764?v=4\\", + \\"profile\\": \\"https://jamiemagee.co.uk\\", +- \\"contributions\\": [ +- \\"ideas\\" +- ] ++ \\"contributions\\": [\\"ideas\\"] + }, + { + \\"login\\": \\"praveenshinde3\\", + \\"name\\": \\"Praveen Shinde\\", + \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/107350270?v=4\\", + \\"profile\\": \\"https://praveenshinde.vercel.app/\\", +- \\"contributions\\": [ +- \\"code\\" +- ] ++ \\"contributions\\": [\\"code\\"] + } + ], + \\"contributorsPerLine\\": 7, + \\"contributorsSortAlphabetically\\": true, +- \\"files\\": [ +- \\"README.md\\" +- ], ++ \\"files\\": [\\"README.md\\"], + \\"imageSize\\": 100, + \\"projectName\\": \\"create-typescript-app\\", + \\"projectOwner\\": \\"JoshuaKGoldberg\\", + \\"repoHost\\": \\"https://github.com\\", +- \\"repoType\\": \\"github\\", +- \\"commitType\\": \\"docs\\" ++ \\"repoType\\": \\"github\\" + }" +`; + +exports[`verify .eslintignore 1`] = ` +"diff --git a/.eslintignore b/.eslintignore +index 06a1bea..9425b10 100644 +--- a/.eslintignore ++++ b/.eslintignore +@@ -1,5 +1,5 @@ + !.* +-coverage* ++coverage + lib + node_modules + pnpm-lock.yaml" +`; + +exports[`verify .eslintrc.cjs 1`] = ` +"diff --git a/.eslintrc.cjs b/.eslintrc.cjs +index ede5d35..56ee2c5 100644 +--- a/.eslintrc.cjs ++++ b/.eslintrc.cjs +@@ -1,13 +1,3 @@ +-/* +-๐Ÿ‘‹ Hi! This ESLint configuration contains a lot more stuff than many repos'! +-You can read from it to see all sorts of linting goodness, but don't worry - +-it's not something you need to exhaustively understand immediately. ๐Ÿ’™ +- +-If you're interested in learning more, see the 'getting started' docs on: +-- ESLint: https://eslint.org +-- typescript-eslint: https://typescript-eslint.io +-*/ +- + /** @type {import(\\"@types/eslint\\").Linter.Config} */ + module.exports = { + env: { +@@ -76,18 +66,6 @@ module.exports = { + rules: { + // These off-by-default rules work well for this repo and we like them on. + \\"deprecation/deprecation\\": \\"error\\", +- +- // These more-strict-by-default rules don't work well for this repo and we like them less strict. +- \\"@typescript-eslint/no-unnecessary-condition\\": [ +- \\"error\\", +- { +- allowConstantLoopConditions: true, +- }, +- ], +- \\"@typescript-eslint/prefer-nullish-coalescing\\": [ +- \\"error\\", +- { ignorePrimitives: true }, +- ], + }, + }, + {" +`; + +exports[`verify .github/DEVELOPMENT.md 1`] = ` +"diff --git a/.github/DEVELOPMENT.md b/.github/DEVELOPMENT.md +index d85b485..5f7094a 100644 +--- a/.github/DEVELOPMENT.md ++++ b/.github/DEVELOPMENT.md +@@ -1,8 +1,5 @@ + # Development + +-> If you'd like a more guided walkthrough, see [Contributing to a create-typescript-app Repository](https://www.joshuakgoldberg.com/blog/contributing-to-a-create-typescript-app-repository). +-> It'll walk you through the common activities you'll need to contribute. +- + After [forking the repo from GitHub](https://help.github.com/articles/fork-a-repo) and [installing pnpm](https://pnpm.io/installation): + + \`\`\`shell +@@ -99,116 +96,3 @@ Add \`--watch\` to keep the type checker running in a watch mode that updates the + \`\`\`shell + pnpm tsc --watch + \`\`\` +- +-## Setup Scripts +- +-As described in the \`README.md\` file and \`docs/\`, this template repository comes with three scripts that can set up an existing or new repository. +- +-Each follows roughly the same general flow: +- +-1. \`bin/index.ts\` uses \`bin/mode.ts\` to determine which of the three setup scripts to run +-2. \`readOptions\` parses in options from local files, Git commands, npm APIs, and/or files on disk +-3. \`runOrRestore\` wraps the setup script's main logic in a friendly prompt wrapper +-4. The setup script wraps each portion of its main logic with \`withSpinner\` +- - Each step of setup logic is generally imported from within \`src/steps\` +-5. A call to \`outro\` summarizes the results for the user +- +-> **Warning** +-> Each setup script overrides many files in the directory they're run in. +-> Make sure to save any changes you want to preserve before running them. +- +-### The Creation Script +- +-This template's \\"creation\\" script is located in \`src/create/\`. +-You can run it locally with \`node bin/index.js --mode create\`. +-Note that files need to be built with \`pnpm run build\` beforehand. +- +-#### Testing the Creation Script +- +-You can run the end-to-end test for creation locally on the command-line. +-Note that the files need to be built with \`pnpm run build\` beforehand. +- +-\`\`\`shell +-pnpm run test:create +-\`\`\` +- +-That end-to-end test executes \`script/create-test-e2e.js\`, which: +- +-1. Runs the creation script to create a new \`test-repository\` child directory and repository, capturing code coverage +-2. Asserts that commands such as \`build\` and \`lint\` each pass +- +-The \`pnpm run test:create\` script is run in CI to ensure that templating changes are in sync with the template's actual files. +-See \`.github/workflows/test-create.yml\`. +- +-### The Initialization Script +- +-This template's \\"initialization\\" script is located in \`src/initialize/\`. +-You can run it locally with \`pnpm run initialize\`. +-It uses [\`tsx\`](https://github.com/esbuild-kit/tsx) so you don't need to build files before running. +- +-\`\`\`shell +-pnpm run initialize +-\`\`\` +- +-#### Testing the Initialization Script +- +-You can run the end-to-end test for initializing locally on the command-line. +-Note that files need to be built with \`pnpm run build\` beforehand. +- +-\`\`\`shell +-pnpm run test:initialize +-\`\`\` +- +-That end-to-end test executes \`script/initialize-test-e2e.js\`, which: +- +-1. Runs the initialization script using \`--skip-github-api\` and other skip flags +-2. Checks that the local repository's files were changed correctly (e.g. removed initialization-only files) +-3. Runs \`pnpm run lint:knip\` to make sure no excess dependencies or files were left over +-4. Resets everything +-5. Runs initialization a second time, capturing test coverage +- +-The \`pnpm run test:initialize\` script is run in CI to ensure that templating changes are in sync with the template's actual files. +-See \`.github/workflows/test-initialize.yml\`. +- +-### The Migration Script +- +-This template's \\"migration\\" script is located in \`src/migrate/\`. +-Note that files need to be built with \`pnpm run build\` beforehand. +- +-To test out the script locally, run it from a different repository's directory: +- +-\`\`\`shell +-cd ../other-repo +-node ../create-typescript-app/bin/migrate.js +-\`\`\` +- +-The migration script will work on any directory. +-You can try it out in a blank directory with scripts like: +- +-\`\`\`shell +-cd .. +-mkdir temp +-cd temp +-node ../create-typescript-app/bin/migrate.js +-\`\`\` +- +-#### Testing the Migration Script +- +-You can run the end-to-end test for migrating locally on the command-line: +- +-\`\`\`shell +-pnpm run test:migrate +-\`\`\` +- +-That end-to-end test executes \`script/migrate-test-e2e.js\`, which: +- +-1. Runs the migration script using \`--skip-github-api\` and other skip flags, capturing code coverage +-2. Checks that only a small list of allowed files were changed +-3. Checks that the local repository's files were changed correctly (e.g. removed initialization-only files) +- +-The \`pnpm run test:migrate\` script is run in CI to ensure that templating changes are in sync with the template's actual files. +-See \`.github/workflows/test-migrate.yml\`. +- +-> Tip: if the migration test is failing in CI and you don't see any errors, try [downloading the full logs](https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/using-workflow-run-logs#downloading-logs). +-> There'll likely be a list of changed files under a message like _\`Oh no! Running the migrate script modified some files:\`_. +-> You can also try running the test script locally." +`; + +exports[`verify .github/workflows/lint-knip.yml 1`] = ` +"diff --git a/.github/workflows/lint-knip.yml b/.github/workflows/lint-knip.yml +index df3f955..781d52e 100644 +--- a/.github/workflows/lint-knip.yml ++++ b/.github/workflows/lint-knip.yml +@@ -4,7 +4,6 @@ jobs: + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/prepare +- - run: pnpm build || true + - run: pnpm lint:knip + + name: Lint Knip" +`; + +exports[`verify .github/workflows/test.yml 1`] = ` +"diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml +index e2fd6ee..0c7400b 100644 +--- a/.github/workflows/test.yml ++++ b/.github/workflows/test.yml +@@ -7,14 +7,6 @@ jobs: + - run: pnpm run test --coverage + - name: Codecov + uses: codecov/codecov-action@v3 +- with: +- flags: unit +- - if: always() +- name: Archive code coverage results +- uses: actions/upload-artifact@v4 +- with: +- name: code-coverage-report +- path: coverage + + name: Test + " +`; + +exports[`verify .gitignore 1`] = ` +"diff --git a/.gitignore b/.gitignore +index 32ffbca..a8bff3b 100644 +--- a/.gitignore ++++ b/.gitignore +@@ -1,3 +1,3 @@ +-coverage*/ ++coverage/ + lib/ + node_modules/" +`; + +exports[`verify .prettierignore 1`] = ` +"diff --git a/.prettierignore b/.prettierignore +index 613eedd..32ca0f2 100644 +--- a/.prettierignore ++++ b/.prettierignore +@@ -1,4 +1,4 @@ + .all-contributorsrc +-coverage*/ ++coverage/ + lib/ + pnpm-lock.yaml" +`; + +exports[`verify README.md 1`] = ` +"diff --git a/README.md b/README.md +index 38d676e..4077451 100644 +--- a/README.md ++++ b/README.md +@@ -5,57 +5,20 @@ +

+ + +-\\"All ++ \\"All + + + \\"Codecov +- \\"Code +- \\"License: +- \\"Sponsor: +- \\"Style: +- \\"TypeScript: ++ \\"Contributor ++ \\"License: ++ \\"Sponsor: ++ \\"Style: ++ \\"TypeScript: + \\"npm ++ \\"All ++ \\"Sponsor: +

+ +-\\"Project +- +-\`create-typescript-app\` is a one-stop-shop solution to set up a new or existing repository with the latest and greatest TypeScript tooling. +-It includes options not just for building and testing but also GitHub repository templates, contributor recognition, automated release management, and more. +- +-## Getting Started +- +-First make sure you have the following installed: +- +-- [GitHub CLI](https://cli.github.com) _(you'll need to be logged in)_ +-- [Node.js](https://nodejs.org) +-- [pnpm](https://pnpm.io) +- +-Then in an existing repository or in your directory where you'd like to make a new repository: +- +-\`\`\`shell +-npx create-typescript-app +-\`\`\` +- +-That setup script will walk you through using the template. +-You can read more about the supported setup modes in their docs pages: +- +-- [**Creating from the terminal**](./docs/Creation.md): creating a new repository locally on the command-line _(recommended)_ +-- [**Initializing from the template**](./docs/Initialization.md): creating a new repository with the [_Use this template_](https://github.com/JoshuaKGoldberg/create-typescript-app/generate) button on GitHub +-- [**Migrating an existing repository**](./docs/Migration.md): adding this template's tooling on top of an existing repository +- +-## Documentation +- +-You can read more about \`create-typescript-app\` and the tooling it supports: +- +-1. [**Tooling**](./docs/Tooling.md): a breakdown of all the pieces this template can set up. +-2. [**Options**](./docs/Options.md): granular options to customize how the template is run. +-3. [**FAQs**](./docs/FAQs.md): frequently asked questions +- +-> [!NOTE] +-> This template is early stage, opinionated, and not endorsed by the TypeScript team. +-> It can be configured to set up a _lot_ of tooling out of the box. +-> If you don't want to use any particular tool, you can always remove it manually. +- + ## Development + + See [\`.github/CONTRIBUTING.md\`](./.github/CONTRIBUTING.md), then [\`.github/DEVELOPMENT.md\`](./.github/DEVELOPMENT.md). +@@ -128,3 +91,7 @@ Thanks! ๐Ÿ’– + + + ++ ++ ++ ++> ๐Ÿ’™ This package was templated with [\`create-typescript-app\`](https://github.com/JoshuaKGoldberg/create-typescript-app)." +`; + +exports[`verify cspell.json 1`] = ` +"diff --git a/cspell.json b/cspell.json +index 8210d61..494dd2e 100644 +--- a/cspell.json ++++ b/cspell.json +@@ -1,40 +1,27 @@ + { + \\"dictionaries\\": [\\"typescript\\"], + \\"ignorePaths\\": [ +- \\"./coverage*\\", + \\".github\\", + \\"CHANGELOG.md\\", ++ \\"coverage\\", + \\"lib\\", + \\"node_modules\\", +- \\"pnpm-lock.yaml\\", +- \\"./script/__snapshots__\\" ++ \\"pnpm-lock.yaml\\" + ], + \\"words\\": [ +- \\"allcontributors\\", +- \\"apexskier\\", +- \\"arethetypeswrong\\", + \\"Codecov\\", + \\"codespace\\", + \\"commitlint\\", + \\"contributorsrc\\", + \\"conventionalcommits\\", +- \\"execa\\", +- \\"infile\\", +- \\"joshuakgoldberg\\", + \\"knip\\", + \\"lcov\\", + \\"markdownlintignore\\", +- \\"mtfoley\\", +- \\"npmignore\\", +- \\"npmjs\\", + \\"npmpackagejsonlintrc\\", + \\"outro\\", + \\"packagejson\\", + \\"quickstart\\", +- \\"tada\\", + \\"tsup\\", +- \\"Unstaged\\", +- \\"vitest\\", + \\"wontfix\\" + ] + }" +`; + +exports[`verify knip.jsonc 1`] = ` +"diff --git a/knip.jsonc b/knip.jsonc +index 83c8537..d73a20f 100644 +--- a/knip.jsonc ++++ b/knip.jsonc +@@ -1,16 +1,6 @@ + { + \\"$schema\\": \\"https://unpkg.com/knip@latest/schema.json\\", +- \\"entry\\": [ +- \\"src/index.ts!\\", +- \\"src/guide/index.ts\\", +- \\"src/initialize/index.ts\\", +- \\"src/migrate/index.ts\\", +- \\"script/*e2e.js\\" +- ], +- \\"ignoreBinaries\\": [\\"gh\\"], +- \\"ignoreExportsUsedInFile\\": { +- \\"interface\\": true, +- \\"type\\": true +- }, +- \\"project\\": [\\"src/**/*.ts!\\", \\"script/**/*.js\\"] ++ \\"entry\\": [\\"src/index.ts!\\"], ++ \\"ignoreExportsUsedInFile\\": { \\"interface\\": true, \\"type\\": true }, ++ \\"project\\": [\\"src/**/*.ts!\\"] + }" +`; + +exports[`verify package.json 1`] = ` +"diff --git a/package.json b/package.json +index 516b1bd..e2aa424 100644 +--- a/package.json ++++ b/package.json +@@ -8,14 +8,12 @@ + }, + \\"license\\": \\"MIT\\", + \\"author\\": { +- \\"name\\": \\"Josh Goldberg\\", ++ \\"name\\": \\"Aslemammad\\", + \\"email\\": \\"npm@joshuakgoldberg.com\\" + }, + \\"type\\": \\"module\\", + \\"main\\": \\"./lib/index.js\\", +- \\"bin\\": \\"./bin/index.js\\", + \\"files\\": [ +- \\"bin/\\", + \\"lib/\\", + \\"package.json\\", + \\"LICENSE.md\\", +@@ -24,7 +22,6 @@ + \\"scripts\\": { + \\"build\\": \\"tsup\\", + \\"format\\": \\"prettier \\\\\\"**/*\\\\\\" --ignore-unknown\\", +- \\"initialize\\": \\"tsx ./src/bin/index.js --mode initialize\\", + \\"lint\\": \\"eslint . .*js --max-warnings 0\\", + \\"lint:knip\\": \\"knip\\", + \\"lint:md\\": \\"markdownlint \\\\\\"**/*.md\\\\\\" \\\\\\".github/**/*.md\\\\\\" --rules sentences-per-line\\", +@@ -34,9 +31,6 @@ + \\"prepare\\": \\"husky install\\", + \\"should-semantic-release\\": \\"should-semantic-release --verbose\\", + \\"test\\": \\"vitest\\", +- \\"test:create\\": \\"node script/create-test-e2e.js\\", +- \\"test:initialize\\": \\"node script/initialize-test-e2e.js\\", +- \\"test:migrate\\": \\"vitest -r script/\\", + \\"tsc\\": \\"tsc\\" + }, + \\"lint-staged\\": { +@@ -107,7 +101,7 @@ + \\"vitest\\": \\"^1.0.2\\", + \\"yaml-eslint-parser\\": \\"^1.2.2\\" + }, +- \\"packageManager\\": \\"pnpm@8.12.1\\", ++ \\"packageManager\\": \\"pnpm@8.7.0\\", + \\"engines\\": { + \\"node\\": \\">=18\\" + }," +`; From 0a57ec1c571b1d428f2e0c529b90f287676c5eeb Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Sun, 24 Dec 2023 13:00:00 +0330 Subject: [PATCH 23/35] update --- script/__snapshots__/migrate-test-e2e.js.snap | 812 +++++++++--------- script/constants.js | 14 - script/migrate-test-e2e.js | 16 +- 3 files changed, 421 insertions(+), 421 deletions(-) delete mode 100644 script/constants.js diff --git a/script/__snapshots__/migrate-test-e2e.js.snap b/script/__snapshots__/migrate-test-e2e.js.snap index 222fe002c..6ab51dcc5 100644 --- a/script/__snapshots__/migrate-test-e2e.js.snap +++ b/script/__snapshots__/migrate-test-e2e.js.snap @@ -7,414 +7,414 @@ index 084b7ee..0ed629e 100644 +++ b/.all-contributorsrc @@ -1,5 +1,5 @@ { -- \\"badgeTemplate\\": \\"\\\\\\"All ๐Ÿค\\\\\\" src=\\\\\\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>_๐Ÿค-21bb42.svg\\\\\\" />\\", -+ \\"badgeTemplate\\": \\"\\\\t\\\\\\"All ๐Ÿ‘ช\\\\\\" src=\\\\\\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>_๐Ÿ‘ช-21bb42.svg\\\\\\" />\\", - \\"commit\\": false, - \\"commitConvention\\": \\"angular\\", - \\"contributors\\": [ +- "badgeTemplate": "\\"All ๐Ÿค\\" src=\\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>_๐Ÿค-21bb42.svg\\" />", ++ "badgeTemplate": "\\t\\"All ๐Ÿ‘ช\\" src=\\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>_๐Ÿ‘ช-21bb42.svg\\" />", + "commit": false, + "commitConvention": "angular", + "contributors": [ @@ -24,363 +24,274 @@ - \\"name\\": \\"Jeff Wen\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/3297859?v=4\\", - \\"profile\\": \\"https://sinchang.me\\", -- \\"contributions\\": [ -- \\"code\\" + "name": "Jeff Wen", + "avatar_url": "https://avatars.githubusercontent.com/u/3297859?v=4", + "profile": "https://sinchang.me", +- "contributions": [ +- "code" - ] -+ \\"contributions\\": [\\"code\\"] ++ "contributions": ["code"] }, { - \\"login\\": \\"Pinjasaur\\", - \\"name\\": \\"Paul Esch-Laurent\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/6335792?v=4\\", - \\"profile\\": \\"https://paulisaweso.me/\\", -- \\"contributions\\": [ -- \\"code\\" + "login": "Pinjasaur", + "name": "Paul Esch-Laurent", + "avatar_url": "https://avatars.githubusercontent.com/u/6335792?v=4", + "profile": "https://paulisaweso.me/", +- "contributions": [ +- "code" - ] -+ \\"contributions\\": [\\"code\\"] ++ "contributions": ["code"] }, { - \\"login\\": \\"NazCodeland\\", - \\"name\\": \\"NazCodeland\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/113494366?v=4\\", - \\"profile\\": \\"https://github.com/NazCodeland\\", -- \\"contributions\\": [ -- \\"code\\" + "login": "NazCodeland", + "name": "NazCodeland", + "avatar_url": "https://avatars.githubusercontent.com/u/113494366?v=4", + "profile": "https://github.com/NazCodeland", +- "contributions": [ +- "code" - ] -+ \\"contributions\\": [\\"code\\"] ++ "contributions": ["code"] }, { - \\"login\\": \\"johnnyreilly\\", - \\"name\\": \\"John Reilly\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/1010525?v=4\\", - \\"profile\\": \\"https://blog.johnnyreilly.com/\\", -- \\"contributions\\": [ -- \\"code\\", -- \\"ideas\\" + "login": "johnnyreilly", + "name": "John Reilly", + "avatar_url": "https://avatars.githubusercontent.com/u/1010525?v=4", + "profile": "https://blog.johnnyreilly.com/", +- "contributions": [ +- "code", +- "ideas" - ] -+ \\"contributions\\": [\\"code\\", \\"ideas\\"] ++ "contributions": ["code", "ideas"] }, { - \\"login\\": \\"webpro\\", - \\"name\\": \\"Lars Kappert\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/456426?v=4\\", - \\"profile\\": \\"https://webpro.nl\\", -- \\"contributions\\": [ -- \\"code\\" + "login": "webpro", + "name": "Lars Kappert", + "avatar_url": "https://avatars.githubusercontent.com/u/456426?v=4", + "profile": "https://webpro.nl", +- "contributions": [ +- "code" - ] -+ \\"contributions\\": [\\"code\\"] ++ "contributions": ["code"] }, { - \\"login\\": \\"RebeccaStevens\\", - \\"name\\": \\"Rebecca Stevens\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/7224206?v=4\\", - \\"profile\\": \\"https://github.com/RebeccaStevens\\", -- \\"contributions\\": [ -- \\"code\\", -- \\"infra\\" + "login": "RebeccaStevens", + "name": "Rebecca Stevens", + "avatar_url": "https://avatars.githubusercontent.com/u/7224206?v=4", + "profile": "https://github.com/RebeccaStevens", +- "contributions": [ +- "code", +- "infra" - ] -+ \\"contributions\\": [\\"code\\", \\"infra\\"] ++ "contributions": ["code", "infra"] }, { - \\"login\\": \\"ronthetech\\", - \\"name\\": \\"Ron Jean-Francois\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/105710107?v=4\\", - \\"profile\\": \\"http://ronjeanfrancois.com\\", -- \\"contributions\\": [ -- \\"code\\", -- \\"infra\\" + "login": "ronthetech", + "name": "Ron Jean-Francois", + "avatar_url": "https://avatars.githubusercontent.com/u/105710107?v=4", + "profile": "http://ronjeanfrancois.com", +- "contributions": [ +- "code", +- "infra" - ] -+ \\"contributions\\": [\\"code\\", \\"infra\\"] ++ "contributions": ["code", "infra"] }, { - \\"login\\": \\"nowyDEV\\", - \\"name\\": \\"Dominik Nowik\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/12304307?v=4\\", - \\"profile\\": \\"https://github.com/nowyDEV\\", -- \\"contributions\\": [ -- \\"tool\\", -- \\"code\\" + "login": "nowyDEV", + "name": "Dominik Nowik", + "avatar_url": "https://avatars.githubusercontent.com/u/12304307?v=4", + "profile": "https://github.com/nowyDEV", +- "contributions": [ +- "tool", +- "code" - ] -+ \\"contributions\\": [\\"tool\\", \\"code\\"] ++ "contributions": ["tool", "code"] }, { - \\"login\\": \\"TAKANOME-DEV\\", - \\"name\\": \\"takanomedev\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/79809121?v=4\\", - \\"profile\\": \\"https://github.com/TAKANOME-DEV\\", -- \\"contributions\\": [ -- \\"code\\" + "login": "TAKANOME-DEV", + "name": "takanomedev", + "avatar_url": "https://avatars.githubusercontent.com/u/79809121?v=4", + "profile": "https://github.com/TAKANOME-DEV", +- "contributions": [ +- "code" - ] -+ \\"contributions\\": [\\"code\\"] ++ "contributions": ["code"] }, { - \\"login\\": \\"emday4prez\\", - \\"name\\": \\"Emerson\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/35363144?v=4\\", - \\"profile\\": \\"https://github.com/emday4prez\\", -- \\"contributions\\": [ -- \\"code\\" + "login": "emday4prez", + "name": "Emerson", + "avatar_url": "https://avatars.githubusercontent.com/u/35363144?v=4", + "profile": "https://github.com/emday4prez", +- "contributions": [ +- "code" - ] -+ \\"contributions\\": [\\"code\\"] ++ "contributions": ["code"] }, { - \\"login\\": \\"jsjoeio\\", - \\"name\\": \\"Joe Previte\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/3806031?v=4\\", - \\"profile\\": \\"https://typescriptcourse.com/tutorials\\", -- \\"contributions\\": [ -- \\"bug\\", -- \\"code\\" + "login": "jsjoeio", + "name": "Joe Previte", + "avatar_url": "https://avatars.githubusercontent.com/u/3806031?v=4", + "profile": "https://typescriptcourse.com/tutorials", +- "contributions": [ +- "bug", +- "code" - ] -+ \\"contributions\\": [\\"bug\\", \\"code\\"] ++ "contributions": ["bug", "code"] }, { - \\"login\\": \\"navin-moorthy\\", - \\"name\\": \\"Navin Moorthy\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/39694575?v=4\\", - \\"profile\\": \\"https://navinmoorthy.me/\\", -- \\"contributions\\": [ -- \\"bug\\", -- \\"code\\" + "login": "navin-moorthy", + "name": "Navin Moorthy", + "avatar_url": "https://avatars.githubusercontent.com/u/39694575?v=4", + "profile": "https://navinmoorthy.me/", +- "contributions": [ +- "bug", +- "code" - ] -+ \\"contributions\\": [\\"bug\\", \\"code\\"] ++ "contributions": ["bug", "code"] }, { - \\"login\\": \\"garuna-m6\\", - \\"name\\": \\"Anurag\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/23234342?v=4\\", - \\"profile\\": \\"https://github.com/garuna-m6\\", -- \\"contributions\\": [ -- \\"code\\" + "login": "garuna-m6", + "name": "Anurag", + "avatar_url": "https://avatars.githubusercontent.com/u/23234342?v=4", + "profile": "https://github.com/garuna-m6", +- "contributions": [ +- "code" - ] -+ \\"contributions\\": [\\"code\\"] ++ "contributions": ["code"] }, { - \\"login\\": \\"danielroe\\", - \\"name\\": \\"Daniel Roe\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/28706372?v=4\\", - \\"profile\\": \\"https://roe.dev/\\", -- \\"contributions\\": [ -- \\"code\\" + "login": "danielroe", + "name": "Daniel Roe", + "avatar_url": "https://avatars.githubusercontent.com/u/28706372?v=4", + "profile": "https://roe.dev/", +- "contributions": [ +- "code" - ] -+ \\"contributions\\": [\\"code\\"] ++ "contributions": ["code"] }, { - \\"login\\": \\"the-lazy-learner\\", - \\"name\\": \\"Sudhansu\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/13695177?v=4\\", - \\"profile\\": \\"https://github.com/the-lazy-learner\\", -- \\"contributions\\": [ -- \\"code\\" + "login": "the-lazy-learner", + "name": "Sudhansu", + "avatar_url": "https://avatars.githubusercontent.com/u/13695177?v=4", + "profile": "https://github.com/the-lazy-learner", +- "contributions": [ +- "code" - ] -+ \\"contributions\\": [\\"code\\"] ++ "contributions": ["code"] }, { - \\"login\\": \\"RNR1\\", - \\"name\\": \\"Ron Braha\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/45559220?v=4\\", - \\"profile\\": \\"https://linktr.ee/ronbraha\\", -- \\"contributions\\": [ -- \\"code\\", -- \\"design\\", -- \\"test\\" + "login": "RNR1", + "name": "Ron Braha", + "avatar_url": "https://avatars.githubusercontent.com/u/45559220?v=4", + "profile": "https://linktr.ee/ronbraha", +- "contributions": [ +- "code", +- "design", +- "test" - ] -+ \\"contributions\\": [\\"code\\", \\"design\\", \\"test\\"] ++ "contributions": ["code", "design", "test"] }, { - \\"login\\": \\"tungbq\\", - \\"name\\": \\"Tung Bui (Leo)\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/85242618?v=4\\", - \\"profile\\": \\"https://github.com/tungbq\\", -- \\"contributions\\": [ -- \\"code\\" + "login": "tungbq", + "name": "Tung Bui (Leo)", + "avatar_url": "https://avatars.githubusercontent.com/u/85242618?v=4", + "profile": "https://github.com/tungbq", +- "contributions": [ +- "code" - ] -+ \\"contributions\\": [\\"code\\"] ++ "contributions": ["code"] }, { - \\"login\\": \\"orta\\", - \\"name\\": \\"Orta Therox\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/49038?v=4\\", - \\"profile\\": \\"https://orta.io\\", -- \\"contributions\\": [ -- \\"code\\" + "login": "orta", + "name": "Orta Therox", + "avatar_url": "https://avatars.githubusercontent.com/u/49038?v=4", + "profile": "https://orta.io", +- "contributions": [ +- "code" - ] -+ \\"contributions\\": [\\"code\\"] ++ "contributions": ["code"] }, { - \\"login\\": \\"promise-dash\\", - \\"name\\": \\"Promise Dash\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/86062880?v=4\\", - \\"profile\\": \\"https://github.com/promise-dash\\", -- \\"contributions\\": [ -- \\"code\\" + "login": "promise-dash", + "name": "Promise Dash", + "avatar_url": "https://avatars.githubusercontent.com/u/86062880?v=4", + "profile": "https://github.com/promise-dash", +- "contributions": [ +- "code" - ] -+ \\"contributions\\": [\\"code\\"] ++ "contributions": ["code"] }, { - \\"login\\": \\"jolg42\\", - \\"name\\": \\"Joรซl Galeran\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/1328733?v=4\\", - \\"profile\\": \\"https://twitter.com/Jolg42\\", -- \\"contributions\\": [ -- \\"code\\" + "login": "jolg42", + "name": "Joรซl Galeran", + "avatar_url": "https://avatars.githubusercontent.com/u/1328733?v=4", + "profile": "https://twitter.com/Jolg42", +- "contributions": [ +- "code" - ] -+ \\"contributions\\": [\\"code\\"] ++ "contributions": ["code"] }, { - \\"login\\": \\"kristo-baricevic\\", - \\"name\\": \\"Kristo Baricevic\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/108290619?v=4\\", - \\"profile\\": \\"https://kristo-baricevic.github.io/\\", -- \\"contributions\\": [ -- \\"code\\" + "login": "kristo-baricevic", + "name": "Kristo Baricevic", + "avatar_url": "https://avatars.githubusercontent.com/u/108290619?v=4", + "profile": "https://kristo-baricevic.github.io/", +- "contributions": [ +- "code" - ] -+ \\"contributions\\": [\\"code\\"] ++ "contributions": ["code"] }, { - \\"login\\": \\"ryota-murakami\\", - \\"name\\": \\"Ryota Murakami\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/5501268?v=4\\", - \\"profile\\": \\"https://ryota-murakami.github.io/\\", -- \\"contributions\\": [ -- \\"code\\", -- \\"bug\\" + "login": "ryota-murakami", + "name": "Ryota Murakami", + "avatar_url": "https://avatars.githubusercontent.com/u/5501268?v=4", + "profile": "https://ryota-murakami.github.io/", +- "contributions": [ +- "code", +- "bug" - ] -+ \\"contributions\\": [\\"code\\", \\"bug\\"] ++ "contributions": ["code", "bug"] }, { - \\"login\\": \\"ruthwikreddy09\\", - \\"name\\": \\"Ruthwik\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/126862059?v=4\\", - \\"profile\\": \\"https://github.com/RuthwikReddy09\\", -- \\"contributions\\": [ -- \\"code\\" + "login": "ruthwikreddy09", + "name": "Ruthwik", + "avatar_url": "https://avatars.githubusercontent.com/u/126862059?v=4", + "profile": "https://github.com/RuthwikReddy09", +- "contributions": [ +- "code" - ] -+ \\"contributions\\": [\\"code\\"] ++ "contributions": ["code"] }, { - \\"login\\": \\"jdwilkin4\\", - \\"name\\": \\"Jessica Wilkins \\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/67210629?v=4\\", - \\"profile\\": \\"https://jessicawilkins.dev/\\", -- \\"contributions\\": [ -- \\"code\\" + "login": "jdwilkin4", + "name": "Jessica Wilkins ", + "avatar_url": "https://avatars.githubusercontent.com/u/67210629?v=4", + "profile": "https://jessicawilkins.dev/", +- "contributions": [ +- "code" - ] -+ \\"contributions\\": [\\"code\\"] ++ "contributions": ["code"] }, { - \\"login\\": \\"vasanth9\\", - \\"name\\": \\"Vasanth Kumar Cheepurupalli\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/42891954?v=4\\", - \\"profile\\": \\"https://github.com/vasanth9\\", -- \\"contributions\\": [ -- \\"code\\" + "login": "vasanth9", + "name": "Vasanth Kumar Cheepurupalli", + "avatar_url": "https://avatars.githubusercontent.com/u/42891954?v=4", + "profile": "https://github.com/vasanth9", +- "contributions": [ +- "code" - ] -+ \\"contributions\\": [\\"code\\"] ++ "contributions": ["code"] }, { - \\"login\\": \\"conrmahr\\", - \\"name\\": \\"Conor Meagher\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/363781?v=4\\", - \\"profile\\": \\"https://conormeagher.com/\\", -- \\"contributions\\": [ -- \\"code\\" + "login": "conrmahr", + "name": "Conor Meagher", + "avatar_url": "https://avatars.githubusercontent.com/u/363781?v=4", + "profile": "https://conormeagher.com/", +- "contributions": [ +- "code" - ] -+ \\"contributions\\": [\\"code\\"] ++ "contributions": ["code"] }, { - \\"login\\": \\"DanexQ\\", - \\"name\\": \\"Daniel\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/72567464?v=4\\", - \\"profile\\": \\"https://github.com/DanexQ\\", -- \\"contributions\\": [ -- \\"infra\\" + "login": "DanexQ", + "name": "Daniel", + "avatar_url": "https://avatars.githubusercontent.com/u/72567464?v=4", + "profile": "https://github.com/DanexQ", +- "contributions": [ +- "infra" - ] -+ \\"contributions\\": [\\"infra\\"] ++ "contributions": ["infra"] }, { - \\"login\\": \\"jaas666\\", - \\"name\\": \\"Juan A.\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/30204147?v=4\\", - \\"profile\\": \\"https://github.com/jaas666\\", -- \\"contributions\\": [ -- \\"code\\", -- \\"doc\\" + "login": "jaas666", + "name": "Juan A.", + "avatar_url": "https://avatars.githubusercontent.com/u/30204147?v=4", + "profile": "https://github.com/jaas666", +- "contributions": [ +- "code", +- "doc" - ] -+ \\"contributions\\": [\\"code\\", \\"doc\\"] ++ "contributions": ["code", "doc"] }, { - \\"login\\": \\"katt\\", - \\"name\\": \\"Alex / KATT\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/459267?v=4\\", - \\"profile\\": \\"https://katt.dev\\", -- \\"contributions\\": [ -- \\"bug\\" + "login": "katt", + "name": "Alex / KATT", + "avatar_url": "https://avatars.githubusercontent.com/u/459267?v=4", + "profile": "https://katt.dev", +- "contributions": [ +- "bug" - ] -+ \\"contributions\\": [\\"bug\\"] ++ "contributions": ["bug"] }, { - \\"login\\": \\"dertimonius\\", - \\"name\\": \\"Timon Jurschitsch\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/103483059?v=4\\", - \\"profile\\": \\"https://www.linkedin.com/in/timonjurschitsch/\\", -- \\"contributions\\": [ -- \\"code\\" + "login": "dertimonius", + "name": "Timon Jurschitsch", + "avatar_url": "https://avatars.githubusercontent.com/u/103483059?v=4", + "profile": "https://www.linkedin.com/in/timonjurschitsch/", +- "contributions": [ +- "code" - ] -+ \\"contributions\\": [\\"code\\"] ++ "contributions": ["code"] }, { - \\"login\\": \\"biplobsd\\", - \\"name\\": \\"Biplob Sutradhar\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/43641536?v=4\\", - \\"profile\\": \\"http://biplobsd.me\\", -- \\"contributions\\": [ -- \\"code\\" + "login": "biplobsd", + "name": "Biplob Sutradhar", + "avatar_url": "https://avatars.githubusercontent.com/u/43641536?v=4", + "profile": "http://biplobsd.me", +- "contributions": [ +- "code" - ] -+ \\"contributions\\": [\\"code\\"] ++ "contributions": ["code"] }, { - \\"login\\": \\"mrswastik-robot\\", - \\"name\\": \\"Swastik Patel\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/107865087?v=4\\", - \\"profile\\": \\"https://github.com/mrswastik-robot\\", -- \\"contributions\\": [ -- \\"doc\\" + "login": "mrswastik-robot", + "name": "Swastik Patel", + "avatar_url": "https://avatars.githubusercontent.com/u/107865087?v=4", + "profile": "https://github.com/mrswastik-robot", +- "contributions": [ +- "doc" - ] -+ \\"contributions\\": [\\"doc\\"] ++ "contributions": ["doc"] }, { - \\"login\\": \\"gv14982\\", - \\"name\\": \\"Graham Vasquez\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/7041175?v=4\\", - \\"profile\\": \\"https://gvasquez.dev\\", -- \\"contributions\\": [ -- \\"code\\" + "login": "gv14982", + "name": "Graham Vasquez", + "avatar_url": "https://avatars.githubusercontent.com/u/7041175?v=4", + "profile": "https://gvasquez.dev", +- "contributions": [ +- "code" - ] -+ \\"contributions\\": [\\"code\\"] ++ "contributions": ["code"] }, { - \\"login\\": \\"dominicduffin1\\", - \\"name\\": \\"Dominic Duffin\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/26224873?v=4\\", - \\"profile\\": \\"https://dominicduffin.uk\\", -- \\"contributions\\": [ -- \\"code\\" + "login": "dominicduffin1", + "name": "Dominic Duffin", + "avatar_url": "https://avatars.githubusercontent.com/u/26224873?v=4", + "profile": "https://dominicduffin.uk", +- "contributions": [ +- "code" - ] -+ \\"contributions\\": [\\"code\\"] ++ "contributions": ["code"] }, { - \\"login\\": \\"5hraddha\\", - \\"name\\": \\"Shraddha\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/27571141?v=4\\", - \\"profile\\": \\"https://www.shraddha.tech\\", -- \\"contributions\\": [ -- \\"code\\" + "login": "5hraddha", + "name": "Shraddha", + "avatar_url": "https://avatars.githubusercontent.com/u/27571141?v=4", + "profile": "https://www.shraddha.tech", +- "contributions": [ +- "code" - ] -+ \\"contributions\\": [\\"code\\"] ++ "contributions": ["code"] }, { - \\"login\\": \\"xl4624\\", - \\"name\\": \\"Xiaomin Liu\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/116298054?v=4\\", - \\"profile\\": \\"https://github.com/xl4624\\", -- \\"contributions\\": [ -- \\"code\\" + "login": "xl4624", + "name": "Xiaomin Liu", + "avatar_url": "https://avatars.githubusercontent.com/u/116298054?v=4", + "profile": "https://github.com/xl4624", +- "contributions": [ +- "code" - ] -+ \\"contributions\\": [\\"code\\"] ++ "contributions": ["code"] }, { - \\"login\\": \\"jamiemagee\\", - \\"name\\": \\"Jamie Magee\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/1358764?v=4\\", - \\"profile\\": \\"https://jamiemagee.co.uk\\", -- \\"contributions\\": [ -- \\"ideas\\" + "login": "jamiemagee", + "name": "Jamie Magee", + "avatar_url": "https://avatars.githubusercontent.com/u/1358764?v=4", + "profile": "https://jamiemagee.co.uk", +- "contributions": [ +- "ideas" - ] -+ \\"contributions\\": [\\"ideas\\"] ++ "contributions": ["ideas"] }, { - \\"login\\": \\"praveenshinde3\\", - \\"name\\": \\"Praveen Shinde\\", - \\"avatar_url\\": \\"https://avatars.githubusercontent.com/u/107350270?v=4\\", - \\"profile\\": \\"https://praveenshinde.vercel.app/\\", -- \\"contributions\\": [ -- \\"code\\" + "login": "praveenshinde3", + "name": "Praveen Shinde", + "avatar_url": "https://avatars.githubusercontent.com/u/107350270?v=4", + "profile": "https://praveenshinde.vercel.app/", +- "contributions": [ +- "code" - ] -+ \\"contributions\\": [\\"code\\"] ++ "contributions": ["code"] } ], - \\"contributorsPerLine\\": 7, - \\"contributorsSortAlphabetically\\": true, -- \\"files\\": [ -- \\"README.md\\" + "contributorsPerLine": 7, + "contributorsSortAlphabetically": true, +- "files": [ +- "README.md" - ], -+ \\"files\\": [\\"README.md\\"], - \\"imageSize\\": 100, - \\"projectName\\": \\"create-typescript-app\\", - \\"projectOwner\\": \\"JoshuaKGoldberg\\", - \\"repoHost\\": \\"https://github.com\\", -- \\"repoType\\": \\"github\\", -- \\"commitType\\": \\"docs\\" -+ \\"repoType\\": \\"github\\" ++ "files": ["README.md"], + "imageSize": 100, + "projectName": "create-typescript-app", + "projectOwner": "JoshuaKGoldberg", + "repoHost": "https://github.com", +- "repoType": "github", +- "commitType": "docs" ++ "repoType": "github" }" `; @@ -448,23 +448,23 @@ index ede5d35..56ee2c5 100644 -- typescript-eslint: https://typescript-eslint.io -*/ - - /** @type {import(\\"@types/eslint\\").Linter.Config} */ + /** @type {import("@types/eslint").Linter.Config} */ module.exports = { env: { @@ -76,18 +66,6 @@ module.exports = { rules: { // These off-by-default rules work well for this repo and we like them on. - \\"deprecation/deprecation\\": \\"error\\", + "deprecation/deprecation": "error", - - // These more-strict-by-default rules don't work well for this repo and we like them less strict. -- \\"@typescript-eslint/no-unnecessary-condition\\": [ -- \\"error\\", +- "@typescript-eslint/no-unnecessary-condition": [ +- "error", - { - allowConstantLoopConditions: true, - }, - ], -- \\"@typescript-eslint/prefer-nullish-coalescing\\": [ -- \\"error\\", +- "@typescript-eslint/prefer-nullish-coalescing": [ +- "error", - { ignorePrimitives: true }, - ], }, @@ -510,7 +510,7 @@ index d85b485..5f7094a 100644 - -### The Creation Script - --This template's \\"creation\\" script is located in \`src/create/\`. +-This template's "creation" script is located in \`src/create/\`. -You can run it locally with \`node bin/index.js --mode create\`. -Note that files need to be built with \`pnpm run build\` beforehand. - @@ -533,7 +533,7 @@ index d85b485..5f7094a 100644 - -### The Initialization Script - --This template's \\"initialization\\" script is located in \`src/initialize/\`. +-This template's "initialization" script is located in \`src/initialize/\`. -You can run it locally with \`pnpm run initialize\`. -It uses [\`tsx\`](https://github.com/esbuild-kit/tsx) so you don't need to build files before running. - @@ -563,7 +563,7 @@ index d85b485..5f7094a 100644 - -### The Migration Script - --This template's \\"migration\\" script is located in \`src/migrate/\`. +-This template's "migration" script is located in \`src/migrate/\`. -Note that files need to be built with \`pnpm run build\` beforehand. - -To test out the script locally, run it from a different repository's directory: @@ -673,30 +673,30 @@ index 38d676e..4077451 100644 --- a/README.md +++ b/README.md @@ -5,57 +5,20 @@ -

+

--\\"All -+ \\"All +-All Contributors: 39 ๐Ÿค ++ All Contributors: 39 ๐Ÿ‘ช - \\"Codecov -- \\"Code -- \\"License: -- \\"Sponsor: -- \\"Style: -- \\"TypeScript: -+ \\"Contributor -+ \\"License: -+ \\"Sponsor: -+ \\"Style: -+ \\"TypeScript: - \\"npm -+ \\"All -+ \\"Sponsor: + Codecov Test Coverage +- Code of Conduct: Enforced ๐Ÿค +- License: MIT ๐Ÿ“ +- Sponsor: On GitHub ๐Ÿ’ธ +- Style: Prettier ๐Ÿงน +- TypeScript: Strict ๐Ÿ’ช ++ Contributor Covenant ++ License: MIT ++ Sponsor: On GitHub ++ Style: Prettier ++ TypeScript: Strict + npm package version ++ All Contributors: 39 ๐Ÿค ++ Sponsor: On GitHub ๐Ÿ’ธ

--\\"Project +-Project logo: the TypeScript blue square with rounded corners, but a plus sign instead of 'TS' - -\`create-typescript-app\` is a one-stop-shop solution to set up a new or existing repository with the latest and greatest TypeScript tooling. -It includes options not just for building and testing but also GitHub repository templates, contributor recognition, automated release management, and more. @@ -755,45 +755,45 @@ index 8210d61..494dd2e 100644 +++ b/cspell.json @@ -1,40 +1,27 @@ { - \\"dictionaries\\": [\\"typescript\\"], - \\"ignorePaths\\": [ -- \\"./coverage*\\", - \\".github\\", - \\"CHANGELOG.md\\", -+ \\"coverage\\", - \\"lib\\", - \\"node_modules\\", -- \\"pnpm-lock.yaml\\", -- \\"./script/__snapshots__\\" -+ \\"pnpm-lock.yaml\\" + "dictionaries": ["typescript"], + "ignorePaths": [ +- "./coverage*", + ".github", + "CHANGELOG.md", ++ "coverage", + "lib", + "node_modules", +- "pnpm-lock.yaml", +- "./script/__snapshots__" ++ "pnpm-lock.yaml" ], - \\"words\\": [ -- \\"allcontributors\\", -- \\"apexskier\\", -- \\"arethetypeswrong\\", - \\"Codecov\\", - \\"codespace\\", - \\"commitlint\\", - \\"contributorsrc\\", - \\"conventionalcommits\\", -- \\"execa\\", -- \\"infile\\", -- \\"joshuakgoldberg\\", - \\"knip\\", - \\"lcov\\", - \\"markdownlintignore\\", -- \\"mtfoley\\", -- \\"npmignore\\", -- \\"npmjs\\", - \\"npmpackagejsonlintrc\\", - \\"outro\\", - \\"packagejson\\", - \\"quickstart\\", -- \\"tada\\", - \\"tsup\\", -- \\"Unstaged\\", -- \\"vitest\\", - \\"wontfix\\" + "words": [ +- "allcontributors", +- "apexskier", +- "arethetypeswrong", + "Codecov", + "codespace", + "commitlint", + "contributorsrc", + "conventionalcommits", +- "execa", +- "infile", +- "joshuakgoldberg", + "knip", + "lcov", + "markdownlintignore", +- "mtfoley", +- "npmignore", +- "npmjs", + "npmpackagejsonlintrc", + "outro", + "packagejson", + "quickstart", +- "tada", + "tsup", +- "Unstaged", +- "vitest", + "wontfix" ] }" `; @@ -805,23 +805,23 @@ index 83c8537..d73a20f 100644 +++ b/knip.jsonc @@ -1,16 +1,6 @@ { - \\"$schema\\": \\"https://unpkg.com/knip@latest/schema.json\\", -- \\"entry\\": [ -- \\"src/index.ts!\\", -- \\"src/guide/index.ts\\", -- \\"src/initialize/index.ts\\", -- \\"src/migrate/index.ts\\", -- \\"script/*e2e.js\\" + "$schema": "https://unpkg.com/knip@latest/schema.json", +- "entry": [ +- "src/index.ts!", +- "src/guide/index.ts", +- "src/initialize/index.ts", +- "src/migrate/index.ts", +- "script/*e2e.js" - ], -- \\"ignoreBinaries\\": [\\"gh\\"], -- \\"ignoreExportsUsedInFile\\": { -- \\"interface\\": true, -- \\"type\\": true +- "ignoreBinaries": ["gh"], +- "ignoreExportsUsedInFile": { +- "interface": true, +- "type": true - }, -- \\"project\\": [\\"src/**/*.ts!\\", \\"script/**/*.js\\"] -+ \\"entry\\": [\\"src/index.ts!\\"], -+ \\"ignoreExportsUsedInFile\\": { \\"interface\\": true, \\"type\\": true }, -+ \\"project\\": [\\"src/**/*.ts!\\"] +- "project": ["src/**/*.ts!", "script/**/*.js"] ++ "entry": ["src/index.ts!"], ++ "ignoreExportsUsedInFile": { "interface": true, "type": true }, ++ "project": ["src/**/*.ts!"] }" `; @@ -832,45 +832,45 @@ index 516b1bd..e2aa424 100644 +++ b/package.json @@ -8,14 +8,12 @@ }, - \\"license\\": \\"MIT\\", - \\"author\\": { -- \\"name\\": \\"Josh Goldberg\\", -+ \\"name\\": \\"Aslemammad\\", - \\"email\\": \\"npm@joshuakgoldberg.com\\" + "license": "MIT", + "author": { +- "name": "Josh Goldberg", ++ "name": "Aslemammad", + "email": "npm@joshuakgoldberg.com" }, - \\"type\\": \\"module\\", - \\"main\\": \\"./lib/index.js\\", -- \\"bin\\": \\"./bin/index.js\\", - \\"files\\": [ -- \\"bin/\\", - \\"lib/\\", - \\"package.json\\", - \\"LICENSE.md\\", + "type": "module", + "main": "./lib/index.js", +- "bin": "./bin/index.js", + "files": [ +- "bin/", + "lib/", + "package.json", + "LICENSE.md", @@ -24,7 +22,6 @@ - \\"scripts\\": { - \\"build\\": \\"tsup\\", - \\"format\\": \\"prettier \\\\\\"**/*\\\\\\" --ignore-unknown\\", -- \\"initialize\\": \\"tsx ./src/bin/index.js --mode initialize\\", - \\"lint\\": \\"eslint . .*js --max-warnings 0\\", - \\"lint:knip\\": \\"knip\\", - \\"lint:md\\": \\"markdownlint \\\\\\"**/*.md\\\\\\" \\\\\\".github/**/*.md\\\\\\" --rules sentences-per-line\\", + "scripts": { + "build": "tsup", + "format": "prettier \\"**/*\\" --ignore-unknown", +- "initialize": "tsx ./src/bin/index.js --mode initialize", + "lint": "eslint . .*js --max-warnings 0", + "lint:knip": "knip", + "lint:md": "markdownlint \\"**/*.md\\" \\".github/**/*.md\\" --rules sentences-per-line", @@ -34,9 +31,6 @@ - \\"prepare\\": \\"husky install\\", - \\"should-semantic-release\\": \\"should-semantic-release --verbose\\", - \\"test\\": \\"vitest\\", -- \\"test:create\\": \\"node script/create-test-e2e.js\\", -- \\"test:initialize\\": \\"node script/initialize-test-e2e.js\\", -- \\"test:migrate\\": \\"vitest -r script/\\", - \\"tsc\\": \\"tsc\\" + "prepare": "husky install", + "should-semantic-release": "should-semantic-release --verbose", + "test": "vitest", +- "test:create": "node script/create-test-e2e.js", +- "test:initialize": "node script/initialize-test-e2e.js", +- "test:migrate": "vitest -r script/", + "tsc": "tsc" }, - \\"lint-staged\\": { + "lint-staged": { @@ -107,7 +101,7 @@ - \\"vitest\\": \\"^1.0.2\\", - \\"yaml-eslint-parser\\": \\"^1.2.2\\" + "vitest": "^1.0.2", + "yaml-eslint-parser": "^1.2.2" }, -- \\"packageManager\\": \\"pnpm@8.12.1\\", -+ \\"packageManager\\": \\"pnpm@8.7.0\\", - \\"engines\\": { - \\"node\\": \\">=18\\" +- "packageManager": "pnpm@8.12.1", ++ "packageManager": "pnpm@8.7.0", + "engines": { + "node": ">=18" }," `; diff --git a/script/constants.js b/script/constants.js deleted file mode 100644 index c16f59bd4..000000000 --- a/script/constants.js +++ /dev/null @@ -1,14 +0,0 @@ -export const filesExpectedToBeChanged = new Set([ - ".all-contributorsrc", - "README.md", - "knip.jsonc", - "package.json", - ".eslintignore", - ".eslintrc.cjs", - ".github/DEVELOPMENT.md", - ".github/workflows/lint-knip.yml", - ".github/workflows/test.yml", - ".gitignore", - ".prettierignore", - "cspell.json", -]); diff --git a/script/migrate-test-e2e.js b/script/migrate-test-e2e.js index 8b5492ec5..926a3a9c9 100644 --- a/script/migrate-test-e2e.js +++ b/script/migrate-test-e2e.js @@ -4,7 +4,21 @@ import { test } from "vitest"; import { assert, expect } from "vitest"; import packageData from "../package.json" assert { type: "json" }; -import { filesExpectedToBeChanged } from "./constants.js"; + +const filesExpectedToBeChanged = new Set([ + ".all-contributorsrc", + "README.md", + "knip.jsonc", + "package.json", + ".eslintignore", + ".eslintrc.cjs", + ".github/DEVELOPMENT.md", + ".github/workflows/lint-knip.yml", + ".github/workflows/test.yml", + ".gitignore", + ".prettierignore", + "cspell.json", +]); const { description, name: repository } = packageData; const emailGithub = "github@joshuakgoldberg.com"; From ee2145dc45521c3a055e85981bceae8215ca0a1a Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Sun, 24 Dec 2023 20:03:15 +0330 Subject: [PATCH 24/35] update --- knip.jsonc | 1 + script/migrate-test-e2e.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/knip.jsonc b/knip.jsonc index 83c853705..3b1a0801e 100644 --- a/knip.jsonc +++ b/knip.jsonc @@ -8,6 +8,7 @@ "script/*e2e.js" ], "ignoreBinaries": ["gh"], + "ignoreDependencies": ["script"], "ignoreExportsUsedInFile": { "interface": true, "type": true diff --git a/script/migrate-test-e2e.js b/script/migrate-test-e2e.js index 926a3a9c9..15e382cc6 100644 --- a/script/migrate-test-e2e.js +++ b/script/migrate-test-e2e.js @@ -32,7 +32,7 @@ await $({ test.each([...filesExpectedToBeChanged])("verify %s", async (file) => { const { stdout } = await execaCommand(`git diff HEAD -- ${file}`); - expect(stdout).toMatchSnapshot(); + expect(stdout.slice(2)).toMatchSnapshot(); }); test("check for unstagedModifiedFiles", async () => { From e9185f87c505f8d6093e3f7324512dd417c8f1b4 Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Sun, 24 Dec 2023 20:10:52 +0330 Subject: [PATCH 25/35] update --- script/migrate-test-e2e.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/migrate-test-e2e.js b/script/migrate-test-e2e.js index 15e382cc6..91e28d882 100644 --- a/script/migrate-test-e2e.js +++ b/script/migrate-test-e2e.js @@ -32,7 +32,7 @@ await $({ test.each([...filesExpectedToBeChanged])("verify %s", async (file) => { const { stdout } = await execaCommand(`git diff HEAD -- ${file}`); - expect(stdout.slice(2)).toMatchSnapshot(); + expect(stdout.split("\n").slice(2).join("\n")).toMatchSnapshot(); }); test("check for unstagedModifiedFiles", async () => { From 6fab790e99bb14c72037c21aa6324887fd6af7e2 Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Sun, 24 Dec 2023 20:17:51 +0330 Subject: [PATCH 26/35] update snapshot --- script/__snapshots__/migrate-test-e2e.js.snap | 51 +++++-------------- 1 file changed, 14 insertions(+), 37 deletions(-) diff --git a/script/__snapshots__/migrate-test-e2e.js.snap b/script/__snapshots__/migrate-test-e2e.js.snap index 6ab51dcc5..0a7e72839 100644 --- a/script/__snapshots__/migrate-test-e2e.js.snap +++ b/script/__snapshots__/migrate-test-e2e.js.snap @@ -1,9 +1,7 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html exports[`verify .all-contributorsrc 1`] = ` -"diff --git a/.all-contributorsrc b/.all-contributorsrc -index 084b7ee..0ed629e 100644 ---- a/.all-contributorsrc +"--- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1,5 +1,5 @@ { @@ -419,9 +417,7 @@ index 084b7ee..0ed629e 100644 `; exports[`verify .eslintignore 1`] = ` -"diff --git a/.eslintignore b/.eslintignore -index 06a1bea..9425b10 100644 ---- a/.eslintignore +"--- a/.eslintignore +++ b/.eslintignore @@ -1,5 +1,5 @@ !.* @@ -433,9 +429,7 @@ index 06a1bea..9425b10 100644 `; exports[`verify .eslintrc.cjs 1`] = ` -"diff --git a/.eslintrc.cjs b/.eslintrc.cjs -index ede5d35..56ee2c5 100644 ---- a/.eslintrc.cjs +"--- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,13 +1,3 @@ -/* @@ -473,9 +467,7 @@ index ede5d35..56ee2c5 100644 `; exports[`verify .github/DEVELOPMENT.md 1`] = ` -"diff --git a/.github/DEVELOPMENT.md b/.github/DEVELOPMENT.md -index d85b485..5f7094a 100644 ---- a/.github/DEVELOPMENT.md +"--- a/.github/DEVELOPMENT.md +++ b/.github/DEVELOPMENT.md @@ -1,8 +1,5 @@ # Development @@ -606,9 +598,7 @@ index d85b485..5f7094a 100644 `; exports[`verify .github/workflows/lint-knip.yml 1`] = ` -"diff --git a/.github/workflows/lint-knip.yml b/.github/workflows/lint-knip.yml -index df3f955..781d52e 100644 ---- a/.github/workflows/lint-knip.yml +"--- a/.github/workflows/lint-knip.yml +++ b/.github/workflows/lint-knip.yml @@ -4,7 +4,6 @@ jobs: steps: @@ -621,9 +611,7 @@ index df3f955..781d52e 100644 `; exports[`verify .github/workflows/test.yml 1`] = ` -"diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml -index e2fd6ee..0c7400b 100644 ---- a/.github/workflows/test.yml +"--- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,14 +7,6 @@ jobs: - run: pnpm run test --coverage @@ -643,9 +631,7 @@ index e2fd6ee..0c7400b 100644 `; exports[`verify .gitignore 1`] = ` -"diff --git a/.gitignore b/.gitignore -index 32ffbca..a8bff3b 100644 ---- a/.gitignore +"--- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -coverage*/ @@ -655,9 +641,7 @@ index 32ffbca..a8bff3b 100644 `; exports[`verify .prettierignore 1`] = ` -"diff --git a/.prettierignore b/.prettierignore -index 613eedd..32ca0f2 100644 ---- a/.prettierignore +"--- a/.prettierignore +++ b/.prettierignore @@ -1,4 +1,4 @@ .all-contributorsrc @@ -668,9 +652,7 @@ index 613eedd..32ca0f2 100644 `; exports[`verify README.md 1`] = ` -"diff --git a/README.md b/README.md -index 38d676e..4077451 100644 ---- a/README.md +"--- a/README.md +++ b/README.md @@ -5,57 +5,20 @@

@@ -749,9 +731,7 @@ index 38d676e..4077451 100644 `; exports[`verify cspell.json 1`] = ` -"diff --git a/cspell.json b/cspell.json -index 8210d61..494dd2e 100644 ---- a/cspell.json +"--- a/cspell.json +++ b/cspell.json @@ -1,40 +1,27 @@ { @@ -799,11 +779,9 @@ index 8210d61..494dd2e 100644 `; exports[`verify knip.jsonc 1`] = ` -"diff --git a/knip.jsonc b/knip.jsonc -index 83c8537..d73a20f 100644 ---- a/knip.jsonc +"--- a/knip.jsonc +++ b/knip.jsonc -@@ -1,16 +1,6 @@ +@@ -1,17 +1,6 @@ { "$schema": "https://unpkg.com/knip@latest/schema.json", - "entry": [ @@ -814,6 +792,7 @@ index 83c8537..d73a20f 100644 - "script/*e2e.js" - ], - "ignoreBinaries": ["gh"], +- "ignoreDependencies": ["script"], - "ignoreExportsUsedInFile": { - "interface": true, - "type": true @@ -826,9 +805,7 @@ index 83c8537..d73a20f 100644 `; exports[`verify package.json 1`] = ` -"diff --git a/package.json b/package.json -index 516b1bd..e2aa424 100644 ---- a/package.json +"--- a/package.json +++ b/package.json @@ -8,14 +8,12 @@ }, From 801c6338093c9ff23ee17a16b9974acc483a05ef Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Mon, 25 Dec 2023 00:13:04 +0330 Subject: [PATCH 27/35] vitest run and throwing error --- package.json | 2 +- script/migrate-test-e2e.js | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 516b1bd45..dd6a2fcb4 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "test": "vitest", "test:create": "node script/create-test-e2e.js", "test:initialize": "node script/initialize-test-e2e.js", - "test:migrate": "vitest -r script/", + "test:migrate": "vitest run -r script/", "tsc": "tsc" }, "lint-staged": { diff --git a/script/migrate-test-e2e.js b/script/migrate-test-e2e.js index 91e28d882..25ec7e77a 100644 --- a/script/migrate-test-e2e.js +++ b/script/migrate-test-e2e.js @@ -35,6 +35,7 @@ test.each([...filesExpectedToBeChanged])("verify %s", async (file) => { expect(stdout.split("\n").slice(2).join("\n")).toMatchSnapshot(); }); +// eslint-disable-next-line vitest/expect-expect test("check for unstagedModifiedFiles", async () => { const { stdout: gitStatus } = await $`git status`; console.log(`Stdout from running \`git status\`:\n${gitStatus}`); @@ -64,7 +65,7 @@ test("check for unstagedModifiedFiles", async () => { (await execaCommand(gitDiffCommand)).stdout }`, ); - console.error( + throw new Error( [ "", "Oh no! Running the migrate script modified some files:", @@ -80,6 +81,4 @@ test("check for unstagedModifiedFiles", async () => { .join("\n"), ); } - - expect(unstagedModifiedFiles.length).toBe(0); }); From 6fc44501cca33daf03df99b6f0674fe28a030d9b Mon Sep 17 00:00:00 2001 From: Mohammad Bagher Abiyat Date: Mon, 25 Dec 2023 00:28:24 +0330 Subject: [PATCH 28/35] vitest run and throwing error --- script/__snapshots__/migrate-test-e2e.js.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/__snapshots__/migrate-test-e2e.js.snap b/script/__snapshots__/migrate-test-e2e.js.snap index 0a7e72839..5c9573699 100644 --- a/script/__snapshots__/migrate-test-e2e.js.snap +++ b/script/__snapshots__/migrate-test-e2e.js.snap @@ -837,7 +837,7 @@ exports[`verify package.json 1`] = ` "test": "vitest", - "test:create": "node script/create-test-e2e.js", - "test:initialize": "node script/initialize-test-e2e.js", -- "test:migrate": "vitest -r script/", +- "test:migrate": "vitest run -r script/", "tsc": "tsc" }, "lint-staged": { From 3efcf07d0a4eb769e0e11b0adb4a675fbe1e771d Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 30 Dec 2023 01:28:55 -0500 Subject: [PATCH 29/35] add bin/index.js to filesExpectedToBeChanged --- script/migrate-test-e2e.js | 1 + 1 file changed, 1 insertion(+) diff --git a/script/migrate-test-e2e.js b/script/migrate-test-e2e.js index 25ec7e77a..235d5d4a0 100644 --- a/script/migrate-test-e2e.js +++ b/script/migrate-test-e2e.js @@ -7,6 +7,7 @@ import packageData from "../package.json" assert { type: "json" }; const filesExpectedToBeChanged = new Set([ ".all-contributorsrc", + "bin/index.js", "README.md", "knip.jsonc", "package.json", From caf4793368e87509968e300d280168abf0532c3d Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 30 Dec 2023 01:36:55 -0500 Subject: [PATCH 30/35] Set --author manually from packageData --- script/migrate-test-e2e.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/script/migrate-test-e2e.js b/script/migrate-test-e2e.js index 235d5d4a0..ab51934cc 100644 --- a/script/migrate-test-e2e.js +++ b/script/migrate-test-e2e.js @@ -21,15 +21,18 @@ const filesExpectedToBeChanged = new Set([ "cspell.json", ]); -const { description, name: repository } = packageData; +const { + author: { email: emailNpm, name: authorName }, + description, + name: repository, +} = packageData; const emailGithub = "github@joshuakgoldberg.com"; -const emailNpm = "npm@joshuakgoldberg.com"; const owner = "JoshuaKGoldberg"; const title = "Create TypeScript App"; await $({ stdio: "inherit", -})`c8 -o ./coverage-migrate -r html -r lcov --src src node ./bin/index.js --base everything --mode migrate --description ${description} --email-github ${emailGithub} --email-npm ${emailNpm} --owner ${owner} --title ${title} --repository ${repository} --skip-all-contributors-api --skip-github-api --skip-install`; +})`c8 -o ./coverage-migrate -r html -r lcov --src src node ./bin/index.js --base everything --author ${authorName} --mode migrate --description ${description} --email-github ${emailGithub} --email-npm ${emailNpm} --owner ${owner} --title ${title} --repository ${repository} --skip-all-contributors-api --skip-github-api --skip-install`; test.each([...filesExpectedToBeChanged])("verify %s", async (file) => { const { stdout } = await execaCommand(`git diff HEAD -- ${file}`); From 25a103dd0c87a338f9281a36eca9fa4759559f1f Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 30 Dec 2023 01:45:10 -0500 Subject: [PATCH 31/35] Updated migrate-test-e2e.js.snap for new author --- script/__snapshots__/migrate-test-e2e.js.snap | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/script/__snapshots__/migrate-test-e2e.js.snap b/script/__snapshots__/migrate-test-e2e.js.snap index 5c9573699..d92c78ce9 100644 --- a/script/__snapshots__/migrate-test-e2e.js.snap +++ b/script/__snapshots__/migrate-test-e2e.js.snap @@ -807,13 +807,7 @@ exports[`verify knip.jsonc 1`] = ` exports[`verify package.json 1`] = ` "--- a/package.json +++ b/package.json -@@ -8,14 +8,12 @@ - }, - "license": "MIT", - "author": { -- "name": "Josh Goldberg", -+ "name": "Aslemammad", - "email": "npm@joshuakgoldberg.com" +@@ -13,9 +13,7 @@ }, "type": "module", "main": "./lib/index.js", From 2d7a66b243109189fe77e61b6cce7e156440fd7a Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 30 Dec 2023 01:50:40 -0500 Subject: [PATCH 32/35] pnpm@8.13.1 --- script/__snapshots__/migrate-test-e2e.js.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/__snapshots__/migrate-test-e2e.js.snap b/script/__snapshots__/migrate-test-e2e.js.snap index d92c78ce9..4b5790146 100644 --- a/script/__snapshots__/migrate-test-e2e.js.snap +++ b/script/__snapshots__/migrate-test-e2e.js.snap @@ -839,7 +839,7 @@ exports[`verify package.json 1`] = ` "vitest": "^1.0.2", "yaml-eslint-parser": "^1.2.2" }, -- "packageManager": "pnpm@8.12.1", +- "packageManager": "pnpm@8.13.1", + "packageManager": "pnpm@8.7.0", "engines": { "node": ">=18" From b35f4e69e55c83c67fd29103057464d0b4ae988b Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 30 Dec 2023 02:57:40 -0500 Subject: [PATCH 33/35] Update snapshot --- script/__snapshots__/migrate-test-e2e.js.snap | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/script/__snapshots__/migrate-test-e2e.js.snap b/script/__snapshots__/migrate-test-e2e.js.snap index 4b5790146..13ea56f3a 100644 --- a/script/__snapshots__/migrate-test-e2e.js.snap +++ b/script/__snapshots__/migrate-test-e2e.js.snap @@ -730,6 +730,8 @@ exports[`verify README.md 1`] = ` +> ๐Ÿ’™ This package was templated with [\`create-typescript-app\`](https://github.com/JoshuaKGoldberg/create-typescript-app)." `; +exports[`verify bin/index.js 1`] = `""`; + exports[`verify cspell.json 1`] = ` "--- a/cspell.json +++ b/cspell.json @@ -807,17 +809,15 @@ exports[`verify knip.jsonc 1`] = ` exports[`verify package.json 1`] = ` "--- a/package.json +++ b/package.json -@@ -13,9 +13,7 @@ - }, - "type": "module", +@@ -15,7 +15,6 @@ "main": "./lib/index.js", -- "bin": "./bin/index.js", + "bin": "./bin/index.js", "files": [ - "bin/", "lib/", "package.json", "LICENSE.md", -@@ -24,7 +22,6 @@ +@@ -24,7 +23,6 @@ "scripts": { "build": "tsup", "format": "prettier \\"**/*\\" --ignore-unknown", @@ -825,7 +825,7 @@ exports[`verify package.json 1`] = ` "lint": "eslint . .*js --max-warnings 0", "lint:knip": "knip", "lint:md": "markdownlint \\"**/*.md\\" \\".github/**/*.md\\" --rules sentences-per-line", -@@ -34,9 +31,6 @@ +@@ -34,9 +32,6 @@ "prepare": "husky install", "should-semantic-release": "should-semantic-release --verbose", "test": "vitest", @@ -835,7 +835,7 @@ exports[`verify package.json 1`] = ` "tsc": "tsc" }, "lint-staged": { -@@ -107,7 +101,7 @@ +@@ -107,7 +102,7 @@ "vitest": "^1.0.2", "yaml-eslint-parser": "^1.2.2" }, From ac3c2aca0a6295d9cca1570a2768908a9e909619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josh=20Goldberg=20=E2=9C=A8?= Date: Sat, 30 Dec 2023 03:51:27 -0500 Subject: [PATCH 34/35] Update script/migrate-test-e2e.js --- script/migrate-test-e2e.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/script/migrate-test-e2e.js b/script/migrate-test-e2e.js index 709d38d71..79483d7d5 100644 --- a/script/migrate-test-e2e.js +++ b/script/migrate-test-e2e.js @@ -1,7 +1,6 @@ import chalk from "chalk"; import { $, execaCommand } from "execa"; -import { test } from "vitest"; -import { assert, expect } from "vitest"; +import { assert, expect, test } from "vitest"; import packageData from "../package.json" assert { type: "json" }; From 838340b8c0ee2bbbd2eaa45ec4d17195ec4ffd85 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 30 Dec 2023 03:57:01 -0500 Subject: [PATCH 35/35] Update test snapshot --- script/__snapshots__/migrate-test-e2e.js.snap | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/script/__snapshots__/migrate-test-e2e.js.snap b/script/__snapshots__/migrate-test-e2e.js.snap index 13ea56f3a..48dda1835 100644 --- a/script/__snapshots__/migrate-test-e2e.js.snap +++ b/script/__snapshots__/migrate-test-e2e.js.snap @@ -469,16 +469,7 @@ exports[`verify .eslintrc.cjs 1`] = ` exports[`verify .github/DEVELOPMENT.md 1`] = ` "--- a/.github/DEVELOPMENT.md +++ b/.github/DEVELOPMENT.md -@@ -1,8 +1,5 @@ - # Development - --> If you'd like a more guided walkthrough, see [Contributing to a create-typescript-app Repository](https://www.joshuakgoldberg.com/blog/contributing-to-a-create-typescript-app-repository). --> It'll walk you through the common activities you'll need to contribute. -- - After [forking the repo from GitHub](https://help.github.com/articles/fork-a-repo) and [installing pnpm](https://pnpm.io/installation): - - \`\`\`shell -@@ -99,116 +96,3 @@ Add \`--watch\` to keep the type checker running in a watch mode that updates the +@@ -99,116 +99,3 @@ Add \`--watch\` to keep the type checker running in a watch mode that updates the \`\`\`shell pnpm tsc --watch \`\`\`