create-typescript-app 2.26.4 → 2.26.6

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.
@@ -93,7 +93,7 @@ const config = {
93
93
  ...(await prettier.resolveConfig(path)),
94
94
  parser: "markdown",
95
95
  }),
96
- ruleDocTitleFormat: "prefix-name",
96
+ ruleDocTitleFormat: "name",
97
97
  };
98
98
 
99
99
  export default config;
@@ -1,5 +1,5 @@
1
1
  var name = "create-typescript-app";
2
- var version = "2.26.3";
2
+ var version = "2.26.5";
3
3
  var description = "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁";
4
4
  var repository = {
5
5
  type: "git",
@@ -1,4 +1,4 @@
1
- import { indicatorTemplatedBy } from "./readReadmeFootnotes.js";
1
+ import { indicatorsTemplatedBy } from "./readReadmeFootnotes.js";
2
2
  const indicatorAfterAllContributors = /<!--\s*ALL-CONTRIBUTORS-LIST:END\s*-->/;
3
3
  const indicatorAfterAllContributorsSpellCheck = /<!--\s*spellchecker:\s*enable\s*-->/;
4
4
  async function readReadmeAdditional(getReadme) {
@@ -10,10 +10,16 @@ async function readReadmeAdditional(getReadme) {
10
10
  if (!indexAfterContributors) {
11
11
  return void 0;
12
12
  }
13
- const templatedByMatch = indicatorTemplatedBy.exec(readme);
13
+ const indexOfFirstTemplatedBy = indicatorsTemplatedBy.reduce(
14
+ (smallest, indicator) => {
15
+ const indexOf = indicator.exec(readme)?.index;
16
+ return indexOf ? Math.min(smallest, indexOf) : smallest;
17
+ },
18
+ readme.length
19
+ );
14
20
  return readme.slice(
15
21
  indexAfterContributors.index + indexAfterContributors[0].length,
16
- templatedByMatch?.index
22
+ indexOfFirstTemplatedBy
17
23
  ).trim();
18
24
  }
19
25
  export {
@@ -1,4 +1,4 @@
1
- declare const indicatorTemplatedBy: RegExp;
1
+ declare const indicatorsTemplatedBy: RegExp[];
2
2
  declare function readReadmeFootnotes(getReadme: () => Promise<string>): Promise<string | undefined>;
3
3
 
4
- export { indicatorTemplatedBy, readReadmeFootnotes };
4
+ export { indicatorsTemplatedBy, readReadmeFootnotes };
@@ -1,17 +1,26 @@
1
- const indicatorTemplatedBy = /> .* This package (?:is|was) (?:based|build|templated) (?:on|with) |<!-- You can remove this notice/;
1
+ const indicatorsTemplatedBy = [
2
+ /> .* This package (?:is|was) (?:based|build|templated) (?:on|with)/,
3
+ /<!-- You can remove this notice/
4
+ ];
2
5
  async function readReadmeFootnotes(getReadme) {
3
6
  const readme = await getReadme();
4
7
  if (!readme) {
5
8
  return void 0;
6
9
  }
7
- const indexOfTemplatedBy = indicatorTemplatedBy.exec(readme)?.index;
8
- if (!indexOfTemplatedBy) {
10
+ const indexOfLastTemplatedBy = indicatorsTemplatedBy.reduce(
11
+ (largest, indicator) => {
12
+ const indexOf = indicator.exec(readme)?.index;
13
+ return indexOf ? Math.max(largest, indexOf) : largest;
14
+ },
15
+ 0
16
+ );
17
+ if (!indexOfLastTemplatedBy) {
9
18
  return void 0;
10
19
  }
11
- const indexOfNextLine = readme.indexOf("\n", indexOfTemplatedBy);
20
+ const indexOfNextLine = readme.indexOf("\n", indexOfLastTemplatedBy);
12
21
  return readme.slice(indexOfNextLine).trim() || void 0;
13
22
  }
14
23
  export {
15
- indicatorTemplatedBy,
24
+ indicatorsTemplatedBy,
16
25
  readReadmeFootnotes
17
26
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-typescript-app",
3
- "version": "2.26.4",
3
+ "version": "2.26.6",
4
4
  "description": "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁",
5
5
  "repository": {
6
6
  "type": "git",