create-typescript-app 1.36.0 → 1.37.1

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.
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  <a href="#contributors" target="_blank">
7
7
  <!-- prettier-ignore-start -->
8
8
  <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
9
- <img alt="All Contributors: 30 👪" src="https://img.shields.io/badge/all_contributors-30_👪-21bb42.svg" />
9
+ <img alt="All Contributors: 31 🤝" src="https://img.shields.io/badge/all_contributors-31_🤝-21bb42.svg" />
10
10
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
11
11
  <!-- prettier-ignore-end -->
12
12
  </a>
@@ -113,9 +113,10 @@ Thanks! 💖
113
113
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/RuthwikReddy09"><img src="https://avatars.githubusercontent.com/u/126862059?v=4?s=100" width="100px;" alt="Ruthwik"/><br /><sub><b>Ruthwik</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=ruthwikreddy09" title="Code">💻</a></td>
114
114
  <td align="center" valign="top" width="14.28%"><a href="https://ryota-murakami.github.io/"><img src="https://avatars.githubusercontent.com/u/5501268?v=4?s=100" width="100px;" alt="Ryota Murakami"/><br /><sub><b>Ryota Murakami</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=ryota-murakami" title="Code">💻</a> <a href="https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=author%3Aryota-murakami" title="Bug reports">🐛</a></td>
115
115
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/the-lazy-learner"><img src="https://avatars.githubusercontent.com/u/13695177?v=4?s=100" width="100px;" alt="Sudhansu"/><br /><sub><b>Sudhansu</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=the-lazy-learner" title="Code">💻</a></td>
116
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/tungbq"><img src="https://avatars.githubusercontent.com/u/85242618?v=4?s=100" width="100px;" alt="Tung Bui (Leo)"/><br /><sub><b>Tung Bui (Leo)</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=tungbq" title="Code">💻</a></td>
116
+ <td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/timonjurschitsch/"><img src="https://avatars.githubusercontent.com/u/103483059?v=4?s=100" width="100px;" alt="Timon Jurschitsch"/><br /><sub><b>Timon Jurschitsch</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=dertimonius" title="Code">💻</a></td>
117
117
  </tr>
118
118
  <tr>
119
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/tungbq"><img src="https://avatars.githubusercontent.com/u/85242618?v=4?s=100" width="100px;" alt="Tung Bui (Leo)"/><br /><sub><b>Tung Bui (Leo)</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=tungbq" title="Code">💻</a></td>
119
120
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/vasanth9"><img src="https://avatars.githubusercontent.com/u/42891954?v=4?s=100" width="100px;" alt="Vasanth Kumar Cheepurupalli"/><br /><sub><b>Vasanth Kumar Cheepurupalli</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=vasanth9" title="Code">💻</a></td>
120
121
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/TAKANOME-DEV"><img src="https://avatars.githubusercontent.com/u/79809121?v=4?s=100" width="100px;" alt="takanomedev"/><br /><sub><b>takanomedev</b></sub></a><br /><a href="https://github.com/JoshuaKGoldberg/create-typescript-app/commits?author=TAKANOME-DEV" title="Code">💻</a></td>
121
122
  </tr>
@@ -1,8 +1,15 @@
1
+ import parse from "parse-author";
1
2
  function parsePackageAuthor(packageData) {
2
- const [packageAuthor, packageEmail] = typeof packageData.author === "string" ? [
3
- packageData.author.split("<")[0].trim(),
4
- packageData.author.split(/<|>/)[1]?.trim()
5
- ] : [packageData.author?.name, packageData.author?.email];
3
+ let packageAuthor;
4
+ let packageEmail;
5
+ if (typeof packageData.author === "string") {
6
+ const parsedAuthor = parse(packageData.author);
7
+ packageAuthor = parsedAuthor.name;
8
+ packageEmail = parsedAuthor.email;
9
+ } else if (packageData.author) {
10
+ packageAuthor = packageData.author.name;
11
+ packageEmail = packageData.author.email;
12
+ }
6
13
  return {
7
14
  author: packageAuthor,
8
15
  email: packageEmail
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/shared/options/createOptionDefaults/parsePackageAuthor.ts"],"sourcesContent":["import { PartialPackageData } from \"../../types.js\";\n\nexport function parsePackageAuthor(packageData: PartialPackageData) {\n\tconst [packageAuthor, packageEmail] =\n\t\ttypeof packageData.author === \"string\"\n\t\t\t? [\n\t\t\t\t\tpackageData.author.split(\"<\")[0].trim(),\n\t\t\t\t\tpackageData.author.split(/<|>/)[1]?.trim(),\n\t\t\t ]\n\t\t\t: [packageData.author?.name, packageData.author?.email];\n\n\treturn {\n\t\tauthor: packageAuthor,\n\t\temail: packageEmail,\n\t};\n}\n"],"mappings":"AAEO,SAAS,mBAAmB,aAAiC;AACnE,QAAM,CAAC,eAAe,YAAY,IACjC,OAAO,YAAY,WAAW,WAC3B;AAAA,IACA,YAAY,OAAO,MAAM,GAAG,EAAE,CAAC,EAAE,KAAK;AAAA,IACtC,YAAY,OAAO,MAAM,KAAK,EAAE,CAAC,GAAG,KAAK;AAAA,EACzC,IACA,CAAC,YAAY,QAAQ,MAAM,YAAY,QAAQ,KAAK;AAExD,SAAO;AAAA,IACN,QAAQ;AAAA,IACR,OAAO;AAAA,EACR;AACD;","names":[]}
1
+ {"version":3,"sources":["../../../../src/shared/options/createOptionDefaults/parsePackageAuthor.ts"],"sourcesContent":["import parse from \"parse-author\";\n\nimport { PartialPackageData } from \"../../types.js\";\n\nexport function parsePackageAuthor(packageData: PartialPackageData) {\n\tlet packageAuthor: string | undefined;\n\tlet packageEmail: string | undefined;\n\n\tif (typeof packageData.author === \"string\") {\n\t\tconst parsedAuthor = parse(packageData.author);\n\t\tpackageAuthor = parsedAuthor.name;\n\t\tpackageEmail = parsedAuthor.email;\n\t} else if (packageData.author) {\n\t\tpackageAuthor = packageData.author.name;\n\t\tpackageEmail = packageData.author.email;\n\t}\n\n\treturn {\n\t\tauthor: packageAuthor,\n\t\temail: packageEmail,\n\t};\n}\n"],"mappings":"AAAA,OAAO,WAAW;AAIX,SAAS,mBAAmB,aAAiC;AACnE,MAAI;AACJ,MAAI;AAEJ,MAAI,OAAO,YAAY,WAAW,UAAU;AAC3C,UAAM,eAAe,MAAM,YAAY,MAAM;AAC7C,oBAAgB,aAAa;AAC7B,mBAAe,aAAa;AAAA,EAC7B,WAAW,YAAY,QAAQ;AAC9B,oBAAgB,YAAY,OAAO;AACnC,mBAAe,YAAY,OAAO;AAAA,EACnC;AAEA,SAAO;AAAA,IACN,QAAQ;AAAA,IACR,OAAO;AAAA,EACR;AACD;","names":[]}
@@ -13,6 +13,7 @@ async function uninstallPackages(offline) {
13
13
  "lazy-value",
14
14
  "js-yaml",
15
15
  "npm-user",
16
+ "parse-author",
16
17
  "octokit",
17
18
  "prettier",
18
19
  "replace-in-file",
@@ -27,6 +28,7 @@ async function uninstallPackages(offline) {
27
28
  "@octokit/request-error",
28
29
  "@types/git-url-parse",
29
30
  "@types/js-yaml",
31
+ "@types/parse-author",
30
32
  "@types/prettier",
31
33
  "all-contributors-cli",
32
34
  "c8",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/steps/uninstallPackages.ts"],"sourcesContent":["import { $ } from \"execa\";\n\nimport { readPackageData, removeDependencies } from \"../shared/packages.js\";\n\nexport async function uninstallPackages(offline: boolean | undefined) {\n\tconst packageData = await readPackageData();\n\n\tawait removeDependencies(\n\t\t[\n\t\t\t\"@clack/prompts\",\n\t\t\t\"all-contributors-for-repository\",\n\t\t\t\"chalk\",\n\t\t\t\"execa\",\n\t\t\t\"git-remote-origin-url\",\n\t\t\t\"git-url-parse\",\n\t\t\t\"lazy-value\",\n\t\t\t\"js-yaml\",\n\t\t\t\"npm-user\",\n\t\t\t\"octokit\",\n\t\t\t\"prettier\",\n\t\t\t\"replace-in-file\",\n\t\t\t\"title-case\",\n\t\t\t\"zod\",\n\t\t\t\"zod-validation-error\",\n\t\t],\n\t\tpackageData.dependencies,\n\t);\n\n\tawait removeDependencies(\n\t\t[\n\t\t\t\"@octokit/request-error\",\n\t\t\t\"@types/git-url-parse\",\n\t\t\t\"@types/js-yaml\",\n\t\t\t\"@types/prettier\",\n\t\t\t\"all-contributors-cli\",\n\t\t\t\"c8\",\n\t\t\t\"eslint-config-prettier\",\n\t\t\t\"globby\",\n\t\t\t\"tsx\",\n\t\t],\n\t\tpackageData.devDependencies,\n\t\t\"-D\",\n\t);\n\n\tawait $`pnpm add prettier -D${offline ? \" --offline\" : \"\"}`;\n}\n"],"mappings":"AAAA,SAAS,SAAS;AAElB,SAAS,iBAAiB,0BAA0B;AAEpD,eAAsB,kBAAkB,SAA8B;AACrE,QAAM,cAAc,MAAM,gBAAgB;AAE1C,QAAM;AAAA,IACL;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,IACA,YAAY;AAAA,EACb;AAEA,QAAM;AAAA,IACL;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,EACD;AAEA,QAAM,wBAAwB,UAAU,eAAe,EAAE;AAC1D;","names":[]}
1
+ {"version":3,"sources":["../../src/steps/uninstallPackages.ts"],"sourcesContent":["import { $ } from \"execa\";\n\nimport { readPackageData, removeDependencies } from \"../shared/packages.js\";\n\nexport async function uninstallPackages(offline: boolean | undefined) {\n\tconst packageData = await readPackageData();\n\n\tawait removeDependencies(\n\t\t[\n\t\t\t\"@clack/prompts\",\n\t\t\t\"all-contributors-for-repository\",\n\t\t\t\"chalk\",\n\t\t\t\"execa\",\n\t\t\t\"git-remote-origin-url\",\n\t\t\t\"git-url-parse\",\n\t\t\t\"lazy-value\",\n\t\t\t\"js-yaml\",\n\t\t\t\"npm-user\",\n\t\t\t\"parse-author\",\n\t\t\t\"octokit\",\n\t\t\t\"prettier\",\n\t\t\t\"replace-in-file\",\n\t\t\t\"title-case\",\n\t\t\t\"zod\",\n\t\t\t\"zod-validation-error\",\n\t\t],\n\t\tpackageData.dependencies,\n\t);\n\n\tawait removeDependencies(\n\t\t[\n\t\t\t\"@octokit/request-error\",\n\t\t\t\"@types/git-url-parse\",\n\t\t\t\"@types/js-yaml\",\n\t\t\t\"@types/parse-author\",\n\t\t\t\"@types/prettier\",\n\t\t\t\"all-contributors-cli\",\n\t\t\t\"c8\",\n\t\t\t\"eslint-config-prettier\",\n\t\t\t\"globby\",\n\t\t\t\"tsx\",\n\t\t],\n\t\tpackageData.devDependencies,\n\t\t\"-D\",\n\t);\n\n\tawait $`pnpm add prettier -D${offline ? \" --offline\" : \"\"}`;\n}\n"],"mappings":"AAAA,SAAS,SAAS;AAElB,SAAS,iBAAiB,0BAA0B;AAEpD,eAAsB,kBAAkB,SAA8B;AACrE,QAAM,cAAc,MAAM,gBAAgB;AAE1C,QAAM;AAAA,IACL;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,IACA,YAAY;AAAA,EACb;AAEA,QAAM;AAAA,IACL;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,EACD;AAEA,QAAM,wBAAwB,UAAU,eAAe,EAAE;AAC1D;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-typescript-app",
3
- "version": "1.36.0",
3
+ "version": "1.37.1",
4
4
  "description": "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 💝",
5
5
  "repository": {
6
6
  "type": "git",
@@ -53,6 +53,7 @@
53
53
  "lazy-value": "^3.0.0",
54
54
  "npm-user": "^5.0.1",
55
55
  "octokit": "^3.1.0",
56
+ "parse-author": "^2.0.0",
56
57
  "prettier": "^3.0.2",
57
58
  "replace-in-file": "^7.0.1",
58
59
  "title-case": "^4.0.0",
@@ -66,6 +67,7 @@
66
67
  "@types/git-url-parse": "^9.0.1",
67
68
  "@types/js-yaml": "^4.0.5",
68
69
  "@types/node": "^20.5.6",
70
+ "@types/parse-author": "^2.0.1",
69
71
  "@types/prettier": "^2.7.3",
70
72
  "@typescript-eslint/eslint-plugin": "^6.5.0",
71
73
  "@typescript-eslint/parser": "^6.5.0",
@@ -88,7 +90,7 @@
88
90
  "globby": "^13.2.2",
89
91
  "husky": "^8.0.3",
90
92
  "jsonc-eslint-parser": "^2.3.0",
91
- "knip": "2.30.1",
93
+ "knip": "2.32.2",
92
94
  "lint-staged": "^14.0.1",
93
95
  "markdownlint": "^0.31.0",
94
96
  "markdownlint-cli": "^0.37.0",