create-typescript-app 2.25.0 → 2.26.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/lib/base.js CHANGED
@@ -116,7 +116,7 @@ const base = createBase({
116
116
  const getBin = lazyValue(async () => await readBin(getPackageData));
117
117
  const getEmoji = lazyValue(async () => await readEmoji(getDescription));
118
118
  const getDescription = lazyValue(
119
- async () => await readDescription(getPackageData, getReadme)
119
+ async () => await readDescription(getPackageData, getReadme, getRepository)
120
120
  );
121
121
  const getDevelopmentDocumentation = lazyValue(
122
122
  async () => await readDevelopmentDocumentation(take)
@@ -9,6 +9,7 @@ declare const blockESLint: bingo_stratum.BlockWithAddons<{
9
9
  specifier: string;
10
10
  types?: boolean | undefined;
11
11
  }[];
12
+ ignores: string[];
12
13
  extensions: (string | {
13
14
  files?: string[] | undefined;
14
15
  rules?: Record<string, "off" | "error" | "warn" | ["error" | "warn", unknown] | ["error" | "warn", unknown, unknown]> | {
@@ -21,7 +22,6 @@ declare const blockESLint: bingo_stratum.BlockWithAddons<{
21
22
  linterOptions?: unknown;
22
23
  plugins?: Record<string, string> | undefined;
23
24
  })[];
24
- ignores: string[];
25
25
  explanations: string[];
26
26
  rules?: Record<string, "off" | "error" | "warn" | ["error" | "warn", unknown] | ["error" | "warn", unknown, unknown]> | {
27
27
  entries: Record<string, "off" | "error" | "warn" | ["error" | "warn", unknown] | ["error" | "warn", unknown, unknown]>;
@@ -38,8 +38,8 @@ declare const blockGitHubActionsCI: bingo_stratum.BlockWithAddons<{
38
38
  } | {
39
39
  uses: string;
40
40
  }))[];
41
- if?: string | undefined;
42
41
  checkoutWith?: Record<string, string> | undefined;
42
+ if?: string | undefined;
43
43
  }[] | undefined;
44
44
  }, {
45
45
  access: "public" | "restricted";
@@ -50,7 +50,6 @@ declare const blockPackageJson: bingo_stratum.BlockWithAddons<{
50
50
  url?: string | undefined;
51
51
  email?: string | undefined;
52
52
  })[] | undefined;
53
- publishConfig?: Record<string, unknown> | undefined;
54
53
  main?: string | undefined;
55
54
  types?: string | undefined;
56
55
  bugs?: string | {
@@ -66,6 +65,7 @@ declare const blockPackageJson: bingo_stratum.BlockWithAddons<{
66
65
  overrides?: Record<string, unknown> | undefined;
67
66
  os?: string[] | undefined;
68
67
  cpu?: string[] | undefined;
68
+ publishConfig?: Record<string, unknown> | undefined;
69
69
  workspaces?: string[] | undefined;
70
70
  deprecated?: string | undefined;
71
71
  typings?: string | undefined;
@@ -4,8 +4,8 @@ import sortPackageJson from "sort-package-json";
4
4
  import { z } from "zod";
5
5
  import { PackageJson } from "zod-package-json";
6
6
  import { base } from "../base.js";
7
+ import { htmlToTextSafe } from "../utils/htmlToTextSafe.js";
7
8
  import { blockRemoveFiles } from "./blockRemoveFiles.js";
8
- import { htmlToTextSafe } from "./html/htmlToTextSafe.js";
9
9
  import { CommandPhase } from "./phases.js";
10
10
  const PackageJsonWithNullableScripts = PackageJson.partial().extend({
11
11
  scripts: z.record(z.string(), z.union([z.string(), z.undefined()])).optional()
@@ -2,8 +2,8 @@ import * as bingo_stratum from 'bingo-stratum';
2
2
 
3
3
  declare const blockReleaseIt: bingo_stratum.BlockWithAddons<{
4
4
  builders: {
5
- order: number;
6
5
  run: string;
6
+ order: number;
7
7
  }[];
8
8
  }, {
9
9
  access: "public" | "restricted";
@@ -1,5 +1,5 @@
1
1
  import { base } from "../base.js";
2
- import { htmlToTextSafe } from "./html/htmlToTextSafe.js";
2
+ import { htmlToTextSafe } from "../utils/htmlToTextSafe.js";
3
3
  const blockRepositorySettings = base.createBlock({
4
4
  about: {
5
5
  name: "Repository Settings"
@@ -2,10 +2,6 @@ import * as bingo_stratum from 'bingo-stratum';
2
2
 
3
3
  declare const blockVitest: bingo_stratum.BlockWithAddons<{
4
4
  exclude: string[];
5
- coverage: {
6
- exclude?: string[] | undefined;
7
- include?: string[] | undefined;
8
- };
9
5
  actionSteps: ({
10
6
  with?: Record<string, string> | undefined;
11
7
  env?: Record<string, string> | undefined;
@@ -15,6 +11,10 @@ declare const blockVitest: bingo_stratum.BlockWithAddons<{
15
11
  } | {
16
12
  uses: string;
17
13
  }))[];
14
+ coverage: {
15
+ exclude?: string[] | undefined;
16
+ include?: string[] | undefined;
17
+ };
18
18
  flags: string[];
19
19
  }, {
20
20
  access: "public" | "restricted";
@@ -553,6 +553,7 @@ declare const blocks: {
553
553
  specifier: string;
554
554
  types?: boolean | undefined;
555
555
  }[];
556
+ ignores: string[];
556
557
  extensions: (string | {
557
558
  files?: string[] | undefined;
558
559
  rules?: Record<string, "off" | "error" | "warn" | ["error" | "warn", unknown] | ["error" | "warn", unknown, unknown]> | {
@@ -565,7 +566,6 @@ declare const blocks: {
565
566
  linterOptions?: unknown;
566
567
  plugins?: Record<string, string> | undefined;
567
568
  })[];
568
- ignores: string[];
569
569
  explanations: string[];
570
570
  rules?: Record<string, "off" | "error" | "warn" | ["error" | "warn", unknown] | ["error" | "warn", unknown, unknown]> | {
571
571
  entries: Record<string, "off" | "error" | "warn" | ["error" | "warn", unknown] | ["error" | "warn", unknown, unknown]>;
@@ -1469,8 +1469,8 @@ declare const blocks: {
1469
1469
  } | {
1470
1470
  uses: string;
1471
1471
  }))[];
1472
- if?: string | undefined;
1473
1472
  checkoutWith?: Record<string, string> | undefined;
1473
+ if?: string | undefined;
1474
1474
  }[] | undefined;
1475
1475
  }, {
1476
1476
  access: "public" | "restricted";
@@ -2211,7 +2211,6 @@ declare const blocks: {
2211
2211
  url?: string | undefined;
2212
2212
  email?: string | undefined;
2213
2213
  })[] | undefined;
2214
- publishConfig?: Record<string, unknown> | undefined;
2215
2214
  main?: string | undefined;
2216
2215
  types?: string | undefined;
2217
2216
  bugs?: string | {
@@ -2227,6 +2226,7 @@ declare const blocks: {
2227
2226
  overrides?: Record<string, unknown> | undefined;
2228
2227
  os?: string[] | undefined;
2229
2228
  cpu?: string[] | undefined;
2229
+ publishConfig?: Record<string, unknown> | undefined;
2230
2230
  workspaces?: string[] | undefined;
2231
2231
  deprecated?: string | undefined;
2232
2232
  typings?: string | undefined;
@@ -2806,8 +2806,8 @@ declare const blocks: {
2806
2806
  }>;
2807
2807
  blockReleaseIt: bingo_stratum.BlockWithAddons<{
2808
2808
  builders: {
2809
- order: number;
2810
2809
  run: string;
2810
+ order: number;
2811
2811
  }[];
2812
2812
  }, {
2813
2813
  access: "public" | "restricted";
@@ -3335,10 +3335,6 @@ declare const blocks: {
3335
3335
  }>;
3336
3336
  blockVitest: bingo_stratum.BlockWithAddons<{
3337
3337
  exclude: string[];
3338
- coverage: {
3339
- exclude?: string[] | undefined;
3340
- include?: string[] | undefined;
3341
- };
3342
3338
  actionSteps: ({
3343
3339
  with?: Record<string, string> | undefined;
3344
3340
  env?: Record<string, string> | undefined;
@@ -3348,6 +3344,10 @@ declare const blocks: {
3348
3344
  } | {
3349
3345
  uses: string;
3350
3346
  }))[];
3347
+ coverage: {
3348
+ exclude?: string[] | undefined;
3349
+ include?: string[] | undefined;
3350
+ };
3351
3351
  flags: string[];
3352
3352
  }, {
3353
3353
  access: "public" | "restricted";
@@ -1,5 +1,5 @@
1
1
  var name = "create-typescript-app";
2
- var version = "2.24.5";
2
+ var version = "2.26.0";
3
3
  var description = "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁";
4
4
  var repository = {
5
5
  type: "git",
@@ -50,11 +50,12 @@ var dependencies = {
50
50
  json5: "^2.2.3",
51
51
  "lazy-value": "^3.0.0",
52
52
  lodash: "^4.17.21",
53
+ marked: "^15.0.7",
53
54
  "npm-user": "^6.1.1",
54
55
  "object-strings-deep": "^0.1.1",
55
56
  "parse-author": "^2.0.0",
56
57
  "parse-package-name": "^1.0.0",
57
- "remove-dependencies": "^0.1.0",
58
+ "remove-dependencies": "^0.1.1",
58
59
  "remove-undefined-objects": "^6.0.0",
59
60
  semver: "^7.7.1",
60
61
  "set-github-repository-labels": "^0.2.0",
@@ -1,5 +1,5 @@
1
1
  import { PartialPackageData } from '../types.js';
2
2
 
3
- declare function readDescription(getPackageData: () => Promise<PartialPackageData>, getReadme: () => Promise<string>): Promise<string | undefined>;
3
+ declare function readDescription(getPackageData: () => Promise<PartialPackageData>, getReadme: () => Promise<string>, getRepository: () => Promise<string | undefined>): Promise<string | undefined>;
4
4
 
5
5
  export { readDescription };
@@ -1,16 +1,27 @@
1
+ import { marked } from "marked";
1
2
  import { packageData } from "../data/packageData.js";
3
+ import { htmlToTextSafe } from "../utils/htmlToTextSafe.js";
2
4
  import { readDescriptionFromReadme } from "./readDescriptionFromReadme.js";
3
- async function readDescription(getPackageData, getReadme) {
4
- const { description: inferred } = await getPackageData();
5
- if (!inferred) {
5
+ async function readDescription(getPackageData, getReadme, getRepository) {
6
+ const { description: fromPackageJson } = await getPackageData();
7
+ if (!fromPackageJson) {
6
8
  return void 0;
7
9
  }
8
- const { description: existing } = packageData;
9
10
  const fromReadme = await readDescriptionFromReadme(getReadme);
10
- if (fromReadme?.replaceAll(/<\s*(?:\/\s*)?\w+\s*>/gu, "") === inferred) {
11
- return fromReadme;
11
+ if (!fromReadme) {
12
+ return marked.parseInline(fromPackageJson);
12
13
  }
13
- return existing === inferred ? void 0 : inferred;
14
+ if (await getRepository() !== "create-typescript-app" && fromPackageJson === packageData.description) {
15
+ return void 0;
16
+ }
17
+ const fromPackageJsonNormalized = htmlToTextSafe(
18
+ await marked.parseInline(fromPackageJson)
19
+ );
20
+ const fromReadmeNormalized = htmlToTextSafe(fromReadme);
21
+ if (fromReadmeNormalized !== fromPackageJsonNormalized) {
22
+ return await marked.parseInline(fromPackageJson);
23
+ }
24
+ return fromReadme;
14
25
  }
15
26
  export {
16
27
  readDescription
@@ -0,0 +1,15 @@
1
+ import { convert } from "html-to-text";
2
+ function htmlToTextSafe(raw) {
3
+ return convert(raw, {
4
+ selectors: [
5
+ {
6
+ options: { ignoreHref: true },
7
+ selector: "a"
8
+ }
9
+ ],
10
+ wordwrap: false
11
+ });
12
+ }
13
+ export {
14
+ htmlToTextSafe
15
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-typescript-app",
3
- "version": "2.25.0",
3
+ "version": "2.26.1",
4
4
  "description": "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁",
5
5
  "repository": {
6
6
  "type": "git",
@@ -54,11 +54,12 @@
54
54
  "json5": "^2.2.3",
55
55
  "lazy-value": "^3.0.0",
56
56
  "lodash": "^4.17.21",
57
+ "marked": "^15.0.7",
57
58
  "npm-user": "^6.1.1",
58
59
  "object-strings-deep": "^0.1.1",
59
60
  "parse-author": "^2.0.0",
60
61
  "parse-package-name": "^1.0.0",
61
- "remove-dependencies": "^0.1.0",
62
+ "remove-dependencies": "^0.1.1",
62
63
  "remove-undefined-objects": "^6.0.0",
63
64
  "semver": "^7.7.1",
64
65
  "set-github-repository-labels": "^0.2.0",
@@ -1,7 +0,0 @@
1
- import { convert } from "html-to-text";
2
- function htmlToTextSafe(raw) {
3
- return convert(raw, { wordwrap: false });
4
- }
5
- export {
6
- htmlToTextSafe
7
- };
File without changes