create-typescript-app 1.43.2 โ 1.43.4
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
|
@@ -3,25 +3,15 @@
|
|
|
3
3
|
<p align="center">Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. ๐</p>
|
|
4
4
|
|
|
5
5
|
<p align="center">
|
|
6
|
-
|
|
7
|
-
<!--
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<!--
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<a href="https://
|
|
14
|
-
|
|
15
|
-
</a>
|
|
16
|
-
<a href="https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CODE_OF_CONDUCT.md" target="_blank">
|
|
17
|
-
<img alt="Code of Conduct: Enforced ๐ค" src="https://img.shields.io/badge/code_of_conduct-enforced_๐ค-21bb42" />
|
|
18
|
-
</a>
|
|
19
|
-
<a href="https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/LICENSE.md" target="_blank">
|
|
20
|
-
<img alt="License: MIT ๐" src="https://img.shields.io/badge/license-MIT_๐-21bb42.svg">
|
|
21
|
-
</a>
|
|
22
|
-
<a href="https://github.com/sponsors/JoshuaKGoldberg" target="_blank">
|
|
23
|
-
<img alt="Sponsor: On GitHub ๐ธ" src="https://img.shields.io/badge/sponsor-on_github_๐ธ-21bb42.svg" />
|
|
24
|
-
</a>
|
|
6
|
+
<!-- prettier-ignore-start -->
|
|
7
|
+
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
8
|
+
<a href="#contributors" target="_blank"><img alt="All Contributors: 35 ๐ค" src="https://img.shields.io/badge/all_contributors-35_๐ค-21bb42.svg" /></a>
|
|
9
|
+
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
10
|
+
<!-- prettier-ignore-end -->
|
|
11
|
+
<a href="https://codecov.io/gh/JoshuaKGoldberg/create-typescript-app" target="_blank"><img alt="Codecov Test Coverage" src="https://codecov.io/gh/JoshuaKGoldberg/create-typescript-app/branch/main/graph/badge.svg"/></a>
|
|
12
|
+
<a href="https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CODE_OF_CONDUCT.md" target="_blank"><img alt="Code of Conduct: Enforced ๐ค" src="https://img.shields.io/badge/code_of_conduct-enforced_๐ค-21bb42" /></a>
|
|
13
|
+
<a href="https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/LICENSE.md" target="_blank"><img alt="License: MIT ๐" src="https://img.shields.io/badge/license-MIT_๐-21bb42.svg"></a>
|
|
14
|
+
<a href="https://github.com/sponsors/JoshuaKGoldberg" target="_blank"><img alt="Sponsor: On GitHub ๐ธ" src="https://img.shields.io/badge/sponsor-on_github_๐ธ-21bb42.svg" /></a>
|
|
25
15
|
<img alt="Style: Prettier ๐งน" src="https://img.shields.io/badge/style-prettier_๐งน-21bb42.svg" />
|
|
26
16
|
<img alt="TypeScript: Strict ๐ช" src="https://img.shields.io/badge/typescript-strict_๐ช-21bb42.svg" />
|
|
27
17
|
<img alt="npm package version" src="https://img.shields.io/npm/v/create-typescript-app?color=21bb42" />
|
|
@@ -44,7 +44,12 @@ async function updateLocalFiles(options) {
|
|
|
44
44
|
}
|
|
45
45
|
for (const [from, to, files = ["./.github/**/*", "./*.*"]] of replacements) {
|
|
46
46
|
try {
|
|
47
|
-
await replaceInFile({
|
|
47
|
+
await replaceInFile({
|
|
48
|
+
allowEmptyPaths: true,
|
|
49
|
+
files,
|
|
50
|
+
from,
|
|
51
|
+
to
|
|
52
|
+
});
|
|
48
53
|
} catch (error) {
|
|
49
54
|
throw new Error(
|
|
50
55
|
`Failed to replace ${from.toString()} with ${to} in ${files.toString()}`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/steps/updateLocalFiles.ts"],"sourcesContent":["import replaceInFile from \"replace-in-file\";\n\nimport { readFileSafeAsJson } from \"../shared/readFileSafeAsJson.js\";\nimport { Options } from \"../shared/types.js\";\n\ninterface ExistingPackageData {\n\tdescription?: string;\n\tversion?: string;\n}\n\nexport async function updateLocalFiles(options: Options) {\n\tconst existingPackage = ((await readFileSafeAsJson(\"./package.json\")) ??\n\t\t{}) as ExistingPackageData;\n\n\tconst replacements = [\n\t\t[/Create TypeScript App/g, options.title],\n\t\t[/JoshuaKGoldberg(?!\\/console-fail-test)/g, options.owner],\n\t\t[/create-typescript-app/g, options.repository],\n\t\t[/\\/\\*\\n.+\\*\\/\\n\\n/gs, ``, \".eslintrc.cjs\"],\n\t\t[/\"author\": \".+\"/g, `\"author\": \"${options.author}\"`, \"./package.json\"],\n\t\t...(options.mode === \"migrate\"\n\t\t\t? []\n\t\t\t: [[/\"bin\": \".+\\n/g, ``, \"./package.json\"]]),\n\t\t[/\"test:create\": \".+\\n/g, ``, \"./package.json\"],\n\t\t[/\"test:initialize\": \".*/g, ``, \"./package.json\"],\n\t\t[/\"initialize\": \".*/g, ``, \"./package.json\"],\n\t\t[/\"test:migrate\": \".+\\n/g, ``, \"./package.json\"],\n\t\t[/## Getting Started.*## Development/gs, `## Development`, \"./README.md\"],\n\t\t[/\\n## Setup Scripts.*$/gs, \"\", \"./.github/DEVELOPMENT.md\"],\n\t\t[`\\t\\t\"src/initialize/index.ts\",\\n`, ``, \"./knip.jsonc\"],\n\t\t[`\\t\\t\"src/migrate/index.ts\",\\n`, ``, \"./knip.jsonc\"],\n\t\t[\n\t\t\t`[\"src/index.ts!\", \"script/initialize*.js\"]`,\n\t\t\t`\"src/index.ts!\"`,\n\t\t\t\"./knip.jsonc\",\n\t\t],\n\t\t[`[\"src/**/*.ts!\", \"script/**/*.js\"]`, `\"src/**/*.ts!\"`, \"./knip.jsonc\"],\n\t\t// Edge case: migration scripts will rewrite README.md attribution\n\t\t[\n\t\t\t`> ๐ This package is based on [@${options.owner}](https://github.com/${options.owner})'s [${options.repository}](https://github.com/JoshuaKGoldberg/${options.repository}).`,\n\t\t\t`> ๐ This package is based on [@JoshuaKGoldberg](https://github.com/JoshuaKGoldberg)'s [create-typescript-app](https://github.com/JoshuaKGoldberg/create-typescript-app).`,\n\t\t\t\"./README.md\",\n\t\t],\n\t];\n\n\tif (existingPackage.description) {\n\t\treplacements.push([existingPackage.description, options.description]);\n\t}\n\n\tif (options.mode === \"initialize\" && existingPackage.version) {\n\t\treplacements.push([\n\t\t\tnew RegExp(`\"version\": \"${existingPackage.version}\"`, \"g\"),\n\t\t\t`\"version\": \"0.0.0\"`,\n\t\t\t\"./package.json\",\n\t\t]);\n\t}\n\n\tfor (const [from, to, files = [\"./.github/**/*\", \"./*.*\"]] of replacements) {\n\t\ttry {\n\t\t\t// @ts-expect-error -- https://github.com/microsoft/TypeScript/issues/54342\n\t\t\tawait replaceInFile({
|
|
1
|
+
{"version":3,"sources":["../../src/steps/updateLocalFiles.ts"],"sourcesContent":["import replaceInFile from \"replace-in-file\";\n\nimport { readFileSafeAsJson } from \"../shared/readFileSafeAsJson.js\";\nimport { Options } from \"../shared/types.js\";\n\ninterface ExistingPackageData {\n\tdescription?: string;\n\tversion?: string;\n}\n\nexport async function updateLocalFiles(options: Options) {\n\tconst existingPackage = ((await readFileSafeAsJson(\"./package.json\")) ??\n\t\t{}) as ExistingPackageData;\n\n\tconst replacements = [\n\t\t[/Create TypeScript App/g, options.title],\n\t\t[/JoshuaKGoldberg(?!\\/console-fail-test)/g, options.owner],\n\t\t[/create-typescript-app/g, options.repository],\n\t\t[/\\/\\*\\n.+\\*\\/\\n\\n/gs, ``, \".eslintrc.cjs\"],\n\t\t[/\"author\": \".+\"/g, `\"author\": \"${options.author}\"`, \"./package.json\"],\n\t\t...(options.mode === \"migrate\"\n\t\t\t? []\n\t\t\t: [[/\"bin\": \".+\\n/g, ``, \"./package.json\"]]),\n\t\t[/\"test:create\": \".+\\n/g, ``, \"./package.json\"],\n\t\t[/\"test:initialize\": \".*/g, ``, \"./package.json\"],\n\t\t[/\"initialize\": \".*/g, ``, \"./package.json\"],\n\t\t[/\"test:migrate\": \".+\\n/g, ``, \"./package.json\"],\n\t\t[/## Getting Started.*## Development/gs, `## Development`, \"./README.md\"],\n\t\t[/\\n## Setup Scripts.*$/gs, \"\", \"./.github/DEVELOPMENT.md\"],\n\t\t[`\\t\\t\"src/initialize/index.ts\",\\n`, ``, \"./knip.jsonc\"],\n\t\t[`\\t\\t\"src/migrate/index.ts\",\\n`, ``, \"./knip.jsonc\"],\n\t\t[\n\t\t\t`[\"src/index.ts!\", \"script/initialize*.js\"]`,\n\t\t\t`\"src/index.ts!\"`,\n\t\t\t\"./knip.jsonc\",\n\t\t],\n\t\t[`[\"src/**/*.ts!\", \"script/**/*.js\"]`, `\"src/**/*.ts!\"`, \"./knip.jsonc\"],\n\t\t// Edge case: migration scripts will rewrite README.md attribution\n\t\t[\n\t\t\t`> ๐ This package is based on [@${options.owner}](https://github.com/${options.owner})'s [${options.repository}](https://github.com/JoshuaKGoldberg/${options.repository}).`,\n\t\t\t`> ๐ This package is based on [@JoshuaKGoldberg](https://github.com/JoshuaKGoldberg)'s [create-typescript-app](https://github.com/JoshuaKGoldberg/create-typescript-app).`,\n\t\t\t\"./README.md\",\n\t\t],\n\t];\n\n\tif (existingPackage.description) {\n\t\treplacements.push([existingPackage.description, options.description]);\n\t}\n\n\tif (options.mode === \"initialize\" && existingPackage.version) {\n\t\treplacements.push([\n\t\t\tnew RegExp(`\"version\": \"${existingPackage.version}\"`, \"g\"),\n\t\t\t`\"version\": \"0.0.0\"`,\n\t\t\t\"./package.json\",\n\t\t]);\n\t}\n\n\tfor (const [from, to, files = [\"./.github/**/*\", \"./*.*\"]] of replacements) {\n\t\ttry {\n\t\t\t// @ts-expect-error -- https://github.com/microsoft/TypeScript/issues/54342\n\t\t\tawait replaceInFile({\n\t\t\t\tallowEmptyPaths: true,\n\t\t\t\tfiles,\n\t\t\t\tfrom,\n\t\t\t\tto,\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tthrow new Error(\n\t\t\t\t`Failed to replace ${from.toString()} with ${to} in ${files.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A,EACrE;AAEA,MAAI,QAAQ,SAAS,gBAAgB,gBAAgB,SAAS;AAC7D,iBAAa,KAAK;AAAA,MACjB,IAAI,OAAO,eAAe,gBAAgB,OAAO,KAAK,GAAG;AAAA,MACzD;AAAA,MACA;AAAA,IACD,CAAC;AAAA,EACF;AAEA,aAAW,CAAC,MAAM,IAAI,QAAQ,CAAC,kBAAkB,OAAO,CAAC,KAAK,cAAc;AAC3E,QAAI;AAEH,YAAM,cAAc;AAAA,QACnB,iBAAiB;AAAA,QACjB;AAAA,QACA;AAAA,QACA;AAAA,MACD,CAAC;AAAA,IACF,SAAS,OAAO;AACf,YAAM,IAAI;AAAA,QACT,qBAAqB,KAAK,SAAS,CAAC,SAAS,EAAE,OAAO,MAAM,SAAS,CAAC;AAAA,QACtE;AAAA,UACC,OAAO;AAAA,QACR;AAAA,MACD;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.43.
|
|
3
|
+
"version": "1.43.4",
|
|
4
4
|
"description": "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. ๐",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -87,10 +87,10 @@
|
|
|
87
87
|
"eslint-plugin-regexp": "^2.0.0",
|
|
88
88
|
"eslint-plugin-vitest": "^0.3.0",
|
|
89
89
|
"eslint-plugin-yml": "^1.8.0",
|
|
90
|
-
"globby": "^
|
|
90
|
+
"globby": "^14.0.0",
|
|
91
91
|
"husky": "^8.0.3",
|
|
92
92
|
"jsonc-eslint-parser": "^2.3.0",
|
|
93
|
-
"knip": "2.
|
|
93
|
+
"knip": "2.41.0",
|
|
94
94
|
"lint-staged": "^15.0.0",
|
|
95
95
|
"markdownlint": "^0.31.0",
|
|
96
96
|
"markdownlint-cli": "^0.37.0",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"sentences-per-line": "^0.2.1",
|
|
103
103
|
"should-semantic-release": "^0.2.0",
|
|
104
104
|
"tsup": "^7.2.0",
|
|
105
|
-
"tsx": "^
|
|
105
|
+
"tsx": "^4.0.0",
|
|
106
106
|
"typescript": "^5.1.6",
|
|
107
107
|
"vitest": "^0.34.3",
|
|
108
108
|
"yaml-eslint-parser": "^1.2.2"
|