create-typescript-app 1.29.26 → 1.29.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -47,7 +47,7 @@ async function migrateWithOptions({
47
47
  if (!options.excludeContributors) {
48
48
  await withSpinner(
49
49
  "Detecting existing contributors",
50
- detectExistingContributors
50
+ async () => detectExistingContributors(options)
51
51
  );
52
52
  }
53
53
  if (!options.skipInstall) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/migrate/migrateWithOptions.ts"],"sourcesContent":["import { withSpinner, withSpinners } from \"../shared/cli/spinners.js\";\nimport { OctokitAndOptions } from \"../shared/options/readOptions.js\";\nimport { clearUnnecessaryFiles } from \"../steps/clearUnnecessaryFiles.js\";\nimport { detectExistingContributors } from \"../steps/detectExistingContributors.js\";\nimport { finalizeDependencies } from \"../steps/finalizeDependencies.js\";\nimport { initializeGitHubRepository } from \"../steps/initializeGitHubRepository/index.js\";\nimport { runCommands } from \"../steps/runCommands.js\";\nimport { updateAllContributorsTable } from \"../steps/updateAllContributorsTable.js\";\nimport { updateLocalFiles } from \"../steps/updateLocalFiles.js\";\nimport { writeReadme } from \"../steps/writeReadme.js\";\nimport { writeStructure } from \"../steps/writing/writeStructure.js\";\n\nexport async function migrateWithOptions({\n\toctokit,\n\toptions,\n}: OctokitAndOptions) {\n\tawait withSpinners(\"Migrating repository structure\", [\n\t\t[\"Clearing unnecessary files\", clearUnnecessaryFiles],\n\t\t[\n\t\t\t\"Writing structure\",\n\t\t\tasync () => {\n\t\t\t\tawait writeStructure(options);\n\t\t\t},\n\t\t],\n\t\t[\n\t\t\t\"Writing README.md\",\n\t\t\tasync () => {\n\t\t\t\tawait writeReadme(options);\n\t\t\t},\n\t\t],\n\t\t[\n\t\t\t\"Updating local files\",\n\t\t\tasync () => {\n\t\t\t\tawait updateLocalFiles(options);\n\t\t\t},\n\t\t],\n\t\t[\n\t\t\t\"Updating all-contributors table\",\n\t\t\tasync () => {\n\t\t\t\tawait updateAllContributorsTable(options);\n\t\t\t},\n\t\t],\n\t]);\n\n\tif (octokit) {\n\t\tawait withSpinner(\"Initializing GitHub repository\", async () => {\n\t\t\tawait initializeGitHubRepository(octokit, options);\n\t\t});\n\t}\n\n\tif (!options.excludeContributors) {\n\t\tawait withSpinner(\n\t\t\t\"Detecting existing contributors\",\n\t\t\tdetectExistingContributors,\n\t\t);\n\t}\n\n\tif (!options.skipInstall) {\n\t\tawait withSpinner(\"Installing packages\", async () =>\n\t\t\tfinalizeDependencies(options),\n\t\t);\n\t}\n\n\tawait runCommands(\"Cleaning up files\", [\n\t\t\"pnpm lint --fix\",\n\t\t\"pnpm format --write\",\n\t]);\n}\n"],"mappings":"AAAA,SAAS,aAAa,oBAAoB;AAE1C,SAAS,6BAA6B;AACtC,SAAS,kCAAkC;AAC3C,SAAS,4BAA4B;AACrC,SAAS,kCAAkC;AAC3C,SAAS,mBAAmB;AAC5B,SAAS,kCAAkC;AAC3C,SAAS,wBAAwB;AACjC,SAAS,mBAAmB;AAC5B,SAAS,sBAAsB;AAE/B,eAAsB,mBAAmB;AAAA,EACxC;AAAA,EACA;AACD,GAAsB;AACrB,QAAM,aAAa,kCAAkC;AAAA,IACpD,CAAC,8BAA8B,qBAAqB;AAAA,IACpD;AAAA,MACC;AAAA,MACA,YAAY;AACX,cAAM,eAAe,OAAO;AAAA,MAC7B;AAAA,IACD;AAAA,IACA;AAAA,MACC;AAAA,MACA,YAAY;AACX,cAAM,YAAY,OAAO;AAAA,MAC1B;AAAA,IACD;AAAA,IACA;AAAA,MACC;AAAA,MACA,YAAY;AACX,cAAM,iBAAiB,OAAO;AAAA,MAC/B;AAAA,IACD;AAAA,IACA;AAAA,MACC;AAAA,MACA,YAAY;AACX,cAAM,2BAA2B,OAAO;AAAA,MACzC;AAAA,IACD;AAAA,EACD,CAAC;AAED,MAAI,SAAS;AACZ,UAAM,YAAY,kCAAkC,YAAY;AAC/D,YAAM,2BAA2B,SAAS,OAAO;AAAA,IAClD,CAAC;AAAA,EACF;AAEA,MAAI,CAAC,QAAQ,qBAAqB;AACjC,UAAM;AAAA,MACL;AAAA,MACA;AAAA,IACD;AAAA,EACD;AAEA,MAAI,CAAC,QAAQ,aAAa;AACzB,UAAM;AAAA,MAAY;AAAA,MAAuB,YACxC,qBAAqB,OAAO;AAAA,IAC7B;AAAA,EACD;AAEA,QAAM,YAAY,qBAAqB;AAAA,IACtC;AAAA,IACA;AAAA,EACD,CAAC;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/migrate/migrateWithOptions.ts"],"sourcesContent":["import { withSpinner, withSpinners } from \"../shared/cli/spinners.js\";\nimport { OctokitAndOptions } from \"../shared/options/readOptions.js\";\nimport { clearUnnecessaryFiles } from \"../steps/clearUnnecessaryFiles.js\";\nimport { detectExistingContributors } from \"../steps/detectExistingContributors.js\";\nimport { finalizeDependencies } from \"../steps/finalizeDependencies.js\";\nimport { initializeGitHubRepository } from \"../steps/initializeGitHubRepository/index.js\";\nimport { runCommands } from \"../steps/runCommands.js\";\nimport { updateAllContributorsTable } from \"../steps/updateAllContributorsTable.js\";\nimport { updateLocalFiles } from \"../steps/updateLocalFiles.js\";\nimport { writeReadme } from \"../steps/writeReadme.js\";\nimport { writeStructure } from \"../steps/writing/writeStructure.js\";\n\nexport async function migrateWithOptions({\n\toctokit,\n\toptions,\n}: OctokitAndOptions) {\n\tawait withSpinners(\"Migrating repository structure\", [\n\t\t[\"Clearing unnecessary files\", clearUnnecessaryFiles],\n\t\t[\n\t\t\t\"Writing structure\",\n\t\t\tasync () => {\n\t\t\t\tawait writeStructure(options);\n\t\t\t},\n\t\t],\n\t\t[\n\t\t\t\"Writing README.md\",\n\t\t\tasync () => {\n\t\t\t\tawait writeReadme(options);\n\t\t\t},\n\t\t],\n\t\t[\n\t\t\t\"Updating local files\",\n\t\t\tasync () => {\n\t\t\t\tawait updateLocalFiles(options);\n\t\t\t},\n\t\t],\n\t\t[\n\t\t\t\"Updating all-contributors table\",\n\t\t\tasync () => {\n\t\t\t\tawait updateAllContributorsTable(options);\n\t\t\t},\n\t\t],\n\t]);\n\n\tif (octokit) {\n\t\tawait withSpinner(\"Initializing GitHub repository\", async () => {\n\t\t\tawait initializeGitHubRepository(octokit, options);\n\t\t});\n\t}\n\n\tif (!options.excludeContributors) {\n\t\tawait withSpinner(\"Detecting existing contributors\", async () =>\n\t\t\tdetectExistingContributors(options),\n\t\t);\n\t}\n\n\tif (!options.skipInstall) {\n\t\tawait withSpinner(\"Installing packages\", async () =>\n\t\t\tfinalizeDependencies(options),\n\t\t);\n\t}\n\n\tawait runCommands(\"Cleaning up files\", [\n\t\t\"pnpm lint --fix\",\n\t\t\"pnpm format --write\",\n\t]);\n}\n"],"mappings":"AAAA,SAAS,aAAa,oBAAoB;AAE1C,SAAS,6BAA6B;AACtC,SAAS,kCAAkC;AAC3C,SAAS,4BAA4B;AACrC,SAAS,kCAAkC;AAC3C,SAAS,mBAAmB;AAC5B,SAAS,kCAAkC;AAC3C,SAAS,wBAAwB;AACjC,SAAS,mBAAmB;AAC5B,SAAS,sBAAsB;AAE/B,eAAsB,mBAAmB;AAAA,EACxC;AAAA,EACA;AACD,GAAsB;AACrB,QAAM,aAAa,kCAAkC;AAAA,IACpD,CAAC,8BAA8B,qBAAqB;AAAA,IACpD;AAAA,MACC;AAAA,MACA,YAAY;AACX,cAAM,eAAe,OAAO;AAAA,MAC7B;AAAA,IACD;AAAA,IACA;AAAA,MACC;AAAA,MACA,YAAY;AACX,cAAM,YAAY,OAAO;AAAA,MAC1B;AAAA,IACD;AAAA,IACA;AAAA,MACC;AAAA,MACA,YAAY;AACX,cAAM,iBAAiB,OAAO;AAAA,MAC/B;AAAA,IACD;AAAA,IACA;AAAA,MACC;AAAA,MACA,YAAY;AACX,cAAM,2BAA2B,OAAO;AAAA,MACzC;AAAA,IACD;AAAA,EACD,CAAC;AAED,MAAI,SAAS;AACZ,UAAM,YAAY,kCAAkC,YAAY;AAC/D,YAAM,2BAA2B,SAAS,OAAO;AAAA,IAClD,CAAC;AAAA,EACF;AAEA,MAAI,CAAC,QAAQ,qBAAqB;AACjC,UAAM;AAAA,MAAY;AAAA,MAAmC,YACpD,2BAA2B,OAAO;AAAA,IACnC;AAAA,EACD;AAEA,MAAI,CAAC,QAAQ,aAAa;AACzB,UAAM;AAAA,MAAY;AAAA,MAAuB,YACxC,qBAAqB,OAAO;AAAA,IAC7B;AAAA,EACD;AAEA,QAAM,YAAY,qBAAqB;AAAA,IACtC;AAAA,IACA;AAAA,EACD,CAAC;AACF;","names":[]}
@@ -1,3 +1,5 @@
1
- declare function detectExistingContributors(): Promise<void>;
1
+ import { Options } from '../shared/types.js';
2
+
3
+ declare function detectExistingContributors(options: Pick<Options, "owner" | "repository">): Promise<void>;
2
4
 
3
5
  export { detectExistingContributors };
@@ -1,9 +1,9 @@
1
1
  import { getAllContributorsForRepository } from "all-contributors-for-repository";
2
2
  import { $ } from "execa";
3
- async function detectExistingContributors() {
3
+ async function detectExistingContributors(options) {
4
4
  const contributors = await getAllContributorsForRepository({
5
- owner: "JoshuaKGoldberg",
6
- repo: "create-typescript-app"
5
+ owner: options.owner,
6
+ repo: options.repository
7
7
  });
8
8
  for (const [contributor, contributions] of Object.entries(contributors)) {
9
9
  const contributionTypes = Object.keys(contributions).join(",");
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/steps/detectExistingContributors.ts"],"sourcesContent":["import { getAllContributorsForRepository } from \"all-contributors-for-repository\";\nimport { $ } from \"execa\";\n\nexport async function detectExistingContributors() {\n\tconst contributors = await getAllContributorsForRepository({\n\t\towner: \"JoshuaKGoldberg\",\n\t\trepo: \"create-typescript-app\",\n\t});\n\n\tfor (const [contributor, contributions] of Object.entries(contributors)) {\n\t\tconst contributionTypes = Object.keys(contributions).join(\",\");\n\t\tawait $`npx -y all-contributors-cli add ${contributor} ${contributionTypes}`;\n\t}\n}\n"],"mappings":"AAAA,SAAS,uCAAuC;AAChD,SAAS,SAAS;AAElB,eAAsB,6BAA6B;AAClD,QAAM,eAAe,MAAM,gCAAgC;AAAA,IAC1D,OAAO;AAAA,IACP,MAAM;AAAA,EACP,CAAC;AAED,aAAW,CAAC,aAAa,aAAa,KAAK,OAAO,QAAQ,YAAY,GAAG;AACxE,UAAM,oBAAoB,OAAO,KAAK,aAAa,EAAE,KAAK,GAAG;AAC7D,UAAM,oCAAoC,WAAW,IAAI,iBAAiB;AAAA,EAC3E;AACD;","names":[]}
1
+ {"version":3,"sources":["../../src/steps/detectExistingContributors.ts"],"sourcesContent":["import { getAllContributorsForRepository } from \"all-contributors-for-repository\";\nimport { $ } from \"execa\";\n\nimport { Options } from \"../shared/types.js\";\n\nexport async function detectExistingContributors(\n\toptions: Pick<Options, \"owner\" | \"repository\">,\n) {\n\tconst contributors = await getAllContributorsForRepository({\n\t\towner: options.owner,\n\t\trepo: options.repository,\n\t});\n\n\tfor (const [contributor, contributions] of Object.entries(contributors)) {\n\t\tconst contributionTypes = Object.keys(contributions).join(\",\");\n\t\tawait $`npx -y all-contributors-cli add ${contributor} ${contributionTypes}`;\n\t}\n}\n"],"mappings":"AAAA,SAAS,uCAAuC;AAChD,SAAS,SAAS;AAIlB,eAAsB,2BACrB,SACC;AACD,QAAM,eAAe,MAAM,gCAAgC;AAAA,IAC1D,OAAO,QAAQ;AAAA,IACf,MAAM,QAAQ;AAAA,EACf,CAAC;AAED,aAAW,CAAC,aAAa,aAAa,KAAK,OAAO,QAAQ,YAAY,GAAG;AACxE,UAAM,oBAAoB,OAAO,KAAK,aAAa,EAAE,KAAK,GAAG;AAC7D,UAAM,oCAAoC,WAAW,IAAI,iBAAiB;AAAA,EAC3E;AACD;","names":[]}
@@ -0,0 +1,8 @@
1
+ interface GhLabelData {
2
+ color: string;
3
+ description: string;
4
+ name: string;
5
+ }
6
+ declare function getExistingEquivalentLabels(existingLabels: GhLabelData[], outcomeLabelName: string): GhLabelData[];
7
+
8
+ export { GhLabelData, getExistingEquivalentLabels };
@@ -0,0 +1,14 @@
1
+ const aliases = /* @__PURE__ */ new Map([
2
+ ["enhancement", "type: feature"],
3
+ ["help wanted", "status: accepting prs"]
4
+ ]);
5
+ function getExistingEquivalentLabels(existingLabels, outcomeLabelName) {
6
+ const outcomeTrimmed = outcomeLabelName.replace(/\w+: (\w+)/, "$1");
7
+ return existingLabels.filter(({ name: existingName }) => {
8
+ return existingName === outcomeLabelName || existingName === outcomeTrimmed || aliases.get(existingName) === outcomeLabelName || existingName.replace(/\w+: (\w+)/, "$1") === outcomeLabelName;
9
+ });
10
+ }
11
+ export {
12
+ getExistingEquivalentLabels
13
+ };
14
+ //# sourceMappingURL=getExistingEquivalentLabels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/steps/initializeGitHubRepository/labels/getExistingEquivalentLabels.ts"],"sourcesContent":["const aliases = new Map([\n\t[\"enhancement\", \"type: feature\"],\n\t[\"help wanted\", \"status: accepting prs\"],\n]);\n\nexport interface GhLabelData {\n\tcolor: string;\n\tdescription: string;\n\tname: string;\n}\n\nexport function getExistingEquivalentLabels(\n\texistingLabels: GhLabelData[],\n\toutcomeLabelName: string,\n) {\n\tconst outcomeTrimmed = outcomeLabelName.replace(/\\w+: (\\w+)/, \"$1\");\n\n\treturn existingLabels.filter(({ name: existingName }) => {\n\t\treturn (\n\t\t\texistingName === outcomeLabelName ||\n\t\t\texistingName === outcomeTrimmed ||\n\t\t\taliases.get(existingName) === outcomeLabelName ||\n\t\t\texistingName.replace(/\\w+: (\\w+)/, \"$1\") === outcomeLabelName\n\t\t);\n\t});\n}\n"],"mappings":"AAAA,MAAM,UAAU,oBAAI,IAAI;AAAA,EACvB,CAAC,eAAe,eAAe;AAAA,EAC/B,CAAC,eAAe,uBAAuB;AACxC,CAAC;AAQM,SAAS,4BACf,gBACA,kBACC;AACD,QAAM,iBAAiB,iBAAiB,QAAQ,cAAc,IAAI;AAElE,SAAO,eAAe,OAAO,CAAC,EAAE,MAAM,aAAa,MAAM;AACxD,WACC,iBAAiB,oBACjB,iBAAiB,kBACjB,QAAQ,IAAI,YAAY,MAAM,oBAC9B,aAAa,QAAQ,cAAc,IAAI,MAAM;AAAA,EAE/C,CAAC;AACF;","names":[]}
@@ -1,23 +1,29 @@
1
1
  import { $ } from "execa";
2
2
  import {
3
- getExistingEquivalentLabel
4
- } from "./getExistingEquivalentLabel.js";
3
+ getExistingEquivalentLabels
4
+ } from "./getExistingEquivalentLabels.js";
5
5
  import { outcomeLabels } from "./outcomeLabels.js";
6
6
  async function initializeRepositoryLabels() {
7
7
  const existingLabels = JSON.parse(
8
8
  (await $`gh label list --json color,description,name`).stdout || "[]"
9
9
  );
10
10
  for (const outcome of outcomeLabels) {
11
- const existingEquivalent = getExistingEquivalentLabel(
11
+ const existingEquivalents = getExistingEquivalentLabels(
12
12
  existingLabels,
13
13
  outcome.name
14
14
  );
15
- if (existingEquivalent) {
16
- if (outcome.color !== existingEquivalent.color || outcome.description !== existingEquivalent.description) {
17
- await $`gh label edit ${existingEquivalent.name} --color ${outcome.color} --description ${outcome.description} --name ${outcome.name}`;
18
- }
19
- } else {
15
+ if (!existingEquivalents.length) {
20
16
  await $`gh label create ${outcome.name} --color ${outcome.color} --description ${outcome.description}`;
17
+ continue;
18
+ }
19
+ for (const existingEquivalent of existingEquivalents) {
20
+ if (existingEquivalent.name !== outcome.name && existingLabels.some((existing) => existing.name === outcome.name)) {
21
+ await $`gh label delete ${existingEquivalent.name} --yes`;
22
+ continue;
23
+ }
24
+ if (outcome.color !== existingEquivalent.color || outcome.description !== existingEquivalent.description || outcome.name !== existingEquivalent.name) {
25
+ await $`gh label edit ${existingEquivalent.name} --color ${outcome.color} --description ${outcome.description} --name ${outcome.name} --yes`;
26
+ }
21
27
  }
22
28
  }
23
29
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/steps/initializeGitHubRepository/labels/initializeRepositoryLabels.ts"],"sourcesContent":["import { $ } from \"execa\";\n\nimport {\n\tGhLabelData,\n\tgetExistingEquivalentLabel,\n} from \"./getExistingEquivalentLabel.js\";\nimport { outcomeLabels } from \"./outcomeLabels.js\";\n\nexport async function initializeRepositoryLabels() {\n\tconst existingLabels = JSON.parse(\n\t\t(await $`gh label list --json color,description,name`).stdout || \"[]\",\n\t) as GhLabelData[];\n\n\tfor (const outcome of outcomeLabels) {\n\t\tconst existingEquivalent = getExistingEquivalentLabel(\n\t\t\texistingLabels,\n\t\t\toutcome.name,\n\t\t);\n\n\t\tif (existingEquivalent) {\n\t\t\tif (\n\t\t\t\toutcome.color !== existingEquivalent.color ||\n\t\t\t\toutcome.description !== existingEquivalent.description\n\t\t\t) {\n\t\t\t\tawait $`gh label edit ${existingEquivalent.name} --color ${outcome.color} --description ${outcome.description} --name ${outcome.name}`;\n\t\t\t}\n\t\t} else {\n\t\t\tawait $`gh label create ${outcome.name} --color ${outcome.color} --description ${outcome.description}`;\n\t\t}\n\t}\n}\n"],"mappings":"AAAA,SAAS,SAAS;AAElB;AAAA,EAEC;AAAA,OACM;AACP,SAAS,qBAAqB;AAE9B,eAAsB,6BAA6B;AAClD,QAAM,iBAAiB,KAAK;AAAA,KAC1B,MAAM,gDAAgD,UAAU;AAAA,EAClE;AAEA,aAAW,WAAW,eAAe;AACpC,UAAM,qBAAqB;AAAA,MAC1B;AAAA,MACA,QAAQ;AAAA,IACT;AAEA,QAAI,oBAAoB;AACvB,UACC,QAAQ,UAAU,mBAAmB,SACrC,QAAQ,gBAAgB,mBAAmB,aAC1C;AACD,cAAM,kBAAkB,mBAAmB,IAAI,YAAY,QAAQ,KAAK,kBAAkB,QAAQ,WAAW,WAAW,QAAQ,IAAI;AAAA,MACrI;AAAA,IACD,OAAO;AACN,YAAM,oBAAoB,QAAQ,IAAI,YAAY,QAAQ,KAAK,kBAAkB,QAAQ,WAAW;AAAA,IACrG;AAAA,EACD;AACD;","names":[]}
1
+ {"version":3,"sources":["../../../../src/steps/initializeGitHubRepository/labels/initializeRepositoryLabels.ts"],"sourcesContent":["import { $ } from \"execa\";\n\nimport {\n\tGhLabelData,\n\tgetExistingEquivalentLabels,\n} from \"./getExistingEquivalentLabels.js\";\nimport { outcomeLabels } from \"./outcomeLabels.js\";\n\nexport async function initializeRepositoryLabels() {\n\tconst existingLabels = JSON.parse(\n\t\t(await $`gh label list --json color,description,name`).stdout || \"[]\",\n\t) as GhLabelData[];\n\n\tfor (const outcome of outcomeLabels) {\n\t\tconst existingEquivalents = getExistingEquivalentLabels(\n\t\t\texistingLabels,\n\t\t\toutcome.name,\n\t\t);\n\n\t\t// Case: the repo has neither of the two label types\n\t\tif (!existingEquivalents.length) {\n\t\t\tawait $`gh label create ${outcome.name} --color ${outcome.color} --description ${outcome.description}`;\n\t\t\tcontinue;\n\t\t}\n\n\t\tfor (const existingEquivalent of existingEquivalents) {\n\t\t\t// Case: the repo already has both prefixed and non-prefixed label name types\n\t\t\t// E.g. both \"area: documentation\" and \"documentation\"\n\t\t\tif (\n\t\t\t\texistingEquivalent.name !== outcome.name &&\n\t\t\t\texistingLabels.some((existing) => existing.name === outcome.name)\n\t\t\t) {\n\t\t\t\tawait $`gh label delete ${existingEquivalent.name} --yes`;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Case: the repo has one of the two label types, with >=1 different property\n\t\t\t// E.g. \"documentation\" and the same color and description\n\t\t\t// E.g. \"area: documentation\" but with a different color\n\t\t\tif (\n\t\t\t\toutcome.color !== existingEquivalent.color ||\n\t\t\t\toutcome.description !== existingEquivalent.description ||\n\t\t\t\toutcome.name !== existingEquivalent.name\n\t\t\t) {\n\t\t\t\tawait $`gh label edit ${existingEquivalent.name} --color ${outcome.color} --description ${outcome.description} --name ${outcome.name} --yes`;\n\t\t\t}\n\t\t}\n\t}\n}\n"],"mappings":"AAAA,SAAS,SAAS;AAElB;AAAA,EAEC;AAAA,OACM;AACP,SAAS,qBAAqB;AAE9B,eAAsB,6BAA6B;AAClD,QAAM,iBAAiB,KAAK;AAAA,KAC1B,MAAM,gDAAgD,UAAU;AAAA,EAClE;AAEA,aAAW,WAAW,eAAe;AACpC,UAAM,sBAAsB;AAAA,MAC3B;AAAA,MACA,QAAQ;AAAA,IACT;AAGA,QAAI,CAAC,oBAAoB,QAAQ;AAChC,YAAM,oBAAoB,QAAQ,IAAI,YAAY,QAAQ,KAAK,kBAAkB,QAAQ,WAAW;AACpG;AAAA,IACD;AAEA,eAAW,sBAAsB,qBAAqB;AAGrD,UACC,mBAAmB,SAAS,QAAQ,QACpC,eAAe,KAAK,CAAC,aAAa,SAAS,SAAS,QAAQ,IAAI,GAC/D;AACD,cAAM,oBAAoB,mBAAmB,IAAI;AACjD;AAAA,MACD;AAKA,UACC,QAAQ,UAAU,mBAAmB,SACrC,QAAQ,gBAAgB,mBAAmB,eAC3C,QAAQ,SAAS,mBAAmB,MACnC;AACD,cAAM,kBAAkB,mBAAmB,IAAI,YAAY,QAAQ,KAAK,kBAAkB,QAAQ,WAAW,WAAW,QAAQ,IAAI;AAAA,MACrI;AAAA,IACD;AAAA,EACD;AACD;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-typescript-app",
3
- "version": "1.29.26",
3
+ "version": "1.29.28",
4
4
  "description": "Quickstart-friendly TypeScript template with comprehensive formatting, linting, releases, testing, and other great tooling built-in. ✨",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,8 +0,0 @@
1
- interface GhLabelData {
2
- color: string;
3
- description: string;
4
- name: string;
5
- }
6
- declare function getExistingEquivalentLabel(existingLabels: GhLabelData[], outcomeLabel: string): GhLabelData | undefined;
7
-
8
- export { GhLabelData, getExistingEquivalentLabel };
@@ -1,14 +0,0 @@
1
- const aliases = /* @__PURE__ */ new Map([
2
- ["enhancement", "type: feature"],
3
- ["help wanted", "status: accepting prs"]
4
- ]);
5
- function getExistingEquivalentLabel(existingLabels, outcomeLabel) {
6
- const outcomeTrimmed = outcomeLabel.replace(/\w+: (\w+)/, "$1");
7
- return existingLabels.find(({ name: existingName }) => {
8
- return existingName === outcomeLabel || existingName === outcomeTrimmed || aliases.get(existingName) === outcomeLabel || existingName.replace(/\w+: (\w+)/, "$1") === outcomeLabel;
9
- });
10
- }
11
- export {
12
- getExistingEquivalentLabel
13
- };
14
- //# sourceMappingURL=getExistingEquivalentLabel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/steps/initializeGitHubRepository/labels/getExistingEquivalentLabel.ts"],"sourcesContent":["const aliases = new Map([\n\t[\"enhancement\", \"type: feature\"],\n\t[\"help wanted\", \"status: accepting prs\"],\n]);\n\nexport interface GhLabelData {\n\tcolor: string;\n\tdescription: string;\n\tname: string;\n}\n\nexport function getExistingEquivalentLabel(\n\texistingLabels: GhLabelData[],\n\toutcomeLabel: string,\n) {\n\tconst outcomeTrimmed = outcomeLabel.replace(/\\w+: (\\w+)/, \"$1\");\n\n\treturn existingLabels.find(({ name: existingName }) => {\n\t\treturn (\n\t\t\texistingName === outcomeLabel ||\n\t\t\texistingName === outcomeTrimmed ||\n\t\t\taliases.get(existingName) === outcomeLabel ||\n\t\t\texistingName.replace(/\\w+: (\\w+)/, \"$1\") === outcomeLabel\n\t\t);\n\t});\n}\n"],"mappings":"AAAA,MAAM,UAAU,oBAAI,IAAI;AAAA,EACvB,CAAC,eAAe,eAAe;AAAA,EAC/B,CAAC,eAAe,uBAAuB;AACxC,CAAC;AAQM,SAAS,2BACf,gBACA,cACC;AACD,QAAM,iBAAiB,aAAa,QAAQ,cAAc,IAAI;AAE9D,SAAO,eAAe,KAAK,CAAC,EAAE,MAAM,aAAa,MAAM;AACtD,WACC,iBAAiB,gBACjB,iBAAiB,kBACjB,QAAQ,IAAI,YAAY,MAAM,gBAC9B,aAAa,QAAQ,cAAc,IAAI,MAAM;AAAA,EAE/C,CAAC;AACF;","names":[]}