create-typescript-app 1.29.45 → 1.29.46

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.
@@ -1,14 +1,19 @@
1
1
  import fs from "node:fs/promises";
2
2
  import { EOL } from "node:os";
3
+ import { readFileSafe } from "../shared/readFileSafe.js";
4
+ const detectionLine = `<!-- You can remove this notice if you don't want it \u{1F642} no worries! -->`;
3
5
  const endOfReadmeNotice = [
4
6
  ``,
5
- `<!-- You can remove this notice if you don't want it \u{1F642} no worries! -->`,
7
+ detectionLine,
6
8
  ``,
7
9
  `> \u{1F499} This package is based on [@JoshuaKGoldberg](https://github.com/JoshuaKGoldberg)'s [create-typescript-app](https://github.com/JoshuaKGoldberg/create-typescript-app).`,
8
10
  ``
9
11
  ].join(EOL);
10
12
  async function updateReadme() {
11
- await fs.appendFile("./README.md", endOfReadmeNotice);
13
+ const contents = await readFileSafe("./README.md", "");
14
+ if (!contents.includes(detectionLine)) {
15
+ await fs.appendFile("./README.md", endOfReadmeNotice);
16
+ }
12
17
  }
13
18
  export {
14
19
  endOfReadmeNotice,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/steps/updateReadme.ts"],"sourcesContent":["import fs from \"node:fs/promises\";\nimport { EOL } from \"node:os\";\n\nexport const endOfReadmeNotice = [\n\t``,\n\t`<!-- You can remove this notice if you don't want it 🙂 no worries! -->`,\n\t``,\n\t`> 💙 This package is based on [@JoshuaKGoldberg](https://github.com/JoshuaKGoldberg)'s [create-typescript-app](https://github.com/JoshuaKGoldberg/create-typescript-app).`,\n\t``,\n].join(EOL);\n\nexport async function updateReadme() {\n\tawait fs.appendFile(\"./README.md\", endOfReadmeNotice);\n}\n"],"mappings":"AAAA,OAAO,QAAQ;AACf,SAAS,WAAW;AAEb,MAAM,oBAAoB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,EAAE,KAAK,GAAG;AAEV,eAAsB,eAAe;AACpC,QAAM,GAAG,WAAW,eAAe,iBAAiB;AACrD;","names":[]}
1
+ {"version":3,"sources":["../../src/steps/updateReadme.ts"],"sourcesContent":["import fs from \"node:fs/promises\";\nimport { EOL } from \"node:os\";\n\nimport { readFileSafe } from \"../shared/readFileSafe.js\";\n\nconst detectionLine = `<!-- You can remove this notice if you don't want it 🙂 no worries! -->`;\n\nexport const endOfReadmeNotice = [\n\t``,\n\tdetectionLine,\n\t``,\n\t`> 💙 This package is based on [@JoshuaKGoldberg](https://github.com/JoshuaKGoldberg)'s [create-typescript-app](https://github.com/JoshuaKGoldberg/create-typescript-app).`,\n\t``,\n].join(EOL);\n\nexport async function updateReadme() {\n\tconst contents = await readFileSafe(\"./README.md\", \"\");\n\n\tif (!contents.includes(detectionLine)) {\n\t\tawait fs.appendFile(\"./README.md\", endOfReadmeNotice);\n\t}\n}\n"],"mappings":"AAAA,OAAO,QAAQ;AACf,SAAS,WAAW;AAEpB,SAAS,oBAAoB;AAE7B,MAAM,gBAAgB;AAEf,MAAM,oBAAoB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,EAAE,KAAK,GAAG;AAEV,eAAsB,eAAe;AACpC,QAAM,WAAW,MAAM,aAAa,eAAe,EAAE;AAErD,MAAI,CAAC,SAAS,SAAS,aAAa,GAAG;AACtC,UAAM,GAAG,WAAW,eAAe,iBAAiB;AAAA,EACrD;AACD;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-typescript-app",
3
- "version": "1.29.45",
3
+ "version": "1.29.46",
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",