create-typescript-app 2.68.2 → 2.69.0

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,5 +1,12 @@
1
1
  //#region src/blocks/blockGitHubIssueTemplates.d.ts
2
- export declare const blockGitHubIssueTemplates: import("bingo-stratum").BlockWithoutAddons<{
2
+ export declare const blockGitHubIssueTemplates: import("bingo-stratum").BlockWithAddons<{
3
+ checklists: {
4
+ bug?: string[] | undefined;
5
+ documentation?: string[] | undefined;
6
+ feature?: string[] | undefined;
7
+ tooling?: string[] | undefined;
8
+ };
9
+ }, {
3
10
  access: "public" | "restricted";
4
11
  description: string;
5
12
  directory: string;
@@ -1,10 +1,23 @@
1
1
  import { base } from "../base.mjs";
2
2
  import { formatYaml } from "./files/formatYaml.mjs";
3
3
  import { withPreviously } from "./files/withPreviously.mjs";
4
+ import { z } from "zod";
4
5
  //#region src/blocks/blockGitHubIssueTemplates.ts
6
+ const zChecklist = z.array(z.string()).optional();
5
7
  const blockGitHubIssueTemplates = base.createBlock({
6
8
  about: { name: "GitHub Issue Templates" },
7
- produce({ options }) {
9
+ addons: { checklists: z.object({
10
+ bug: zChecklist,
11
+ documentation: zChecklist,
12
+ feature: zChecklist,
13
+ tooling: zChecklist
14
+ }).default({}) },
15
+ produce({ addons, options }) {
16
+ const { checklists } = addons;
17
+ const createChecklistOptions = (labels = []) => [...labels.toSorted(), `I have [searched for related issues](https://github.com/${options.owner}/${options.repository}/issues?q=is%3Aissue) and found none that matched my issue.`].map((label) => ({
18
+ label,
19
+ required: true
20
+ }));
8
21
  return { files: { ".github": {
9
22
  ISSUE_TEMPLATE: {
10
23
  "01-bug.yaml": withPreviously(formatYaml({
@@ -13,20 +26,7 @@ const blockGitHubIssueTemplates = base.createBlock({
13
26
  attributes: {
14
27
  description: "If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!",
15
28
  label: "Bug Report Checklist",
16
- options: [
17
- {
18
- label: "I have tried restarting my IDE and the issue persists.",
19
- required: true
20
- },
21
- {
22
- label: "I have pulled in the newest version of the project.",
23
- required: true
24
- },
25
- {
26
- label: `I have [searched for related issues](https://github.com/${options.owner}/${options.repository}/issues?q=is%3Aissue) and found none that matched my issue.`,
27
- required: true
28
- }
29
- ]
29
+ options: createChecklistOptions(checklists.bug)
30
30
  },
31
31
  type: "checkboxes"
32
32
  },
@@ -65,13 +65,7 @@ const blockGitHubIssueTemplates = base.createBlock({
65
65
  attributes: {
66
66
  description: "If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!",
67
67
  label: "Documentation Report Checklist",
68
- options: [{
69
- label: "I have looked at the latest `main` branch of the repository.",
70
- required: true
71
- }, {
72
- label: `I have [searched for related issues](https://github.com/${options.owner}/${options.repository}/issues?q=is%3Aissue) and found none that matched my issue.`,
73
- required: true
74
- }]
68
+ options: createChecklistOptions([...checklists.documentation ?? [], "I have looked at the latest `main` branch of the repository."])
75
69
  },
76
70
  type: "checkboxes"
77
71
  },
@@ -102,13 +96,7 @@ const blockGitHubIssueTemplates = base.createBlock({
102
96
  attributes: {
103
97
  description: "If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!",
104
98
  label: "Feature Request Checklist",
105
- options: [{
106
- label: "I have looked at the latest version of the project.",
107
- required: true
108
- }, {
109
- label: `I have [searched for related issues](https://github.com/${options.owner}/${options.repository}/issues?q=is%3Aissue) and found none that matched my issue.`,
110
- required: true
111
- }]
99
+ options: createChecklistOptions(checklists.feature)
112
100
  },
113
101
  type: "checkboxes"
114
102
  },
@@ -139,20 +127,7 @@ const blockGitHubIssueTemplates = base.createBlock({
139
127
  attributes: {
140
128
  description: "If any of these required steps are not taken, we may not be able to review your issue. Help us to help you!",
141
129
  label: "Tooling Report Checklist",
142
- options: [
143
- {
144
- label: "I have tried restarting my IDE and the issue persists.",
145
- required: true
146
- },
147
- {
148
- label: "I have pulled in the newest version of the project.",
149
- required: true
150
- },
151
- {
152
- label: `I have [searched for related issues](https://github.com/${options.owner}/${options.repository}/issues?q=is%3Aissue) and found none that matched my issue.`,
153
- required: true
154
- }
155
- ]
130
+ options: createChecklistOptions([...checklists.tooling ?? [], "I have pulled in the newest version of the project."])
156
131
  },
157
132
  type: "checkboxes"
158
133
  },
@@ -2,6 +2,7 @@ import { base } from "../base.mjs";
2
2
  import { blockGitHubActionsCI } from "./blockGitHubActionsCI.mjs";
3
3
  import { blockDevelopmentDocs } from "./blockDevelopmentDocs.mjs";
4
4
  import { blockPackageJson } from "./blockPackageJson.mjs";
5
+ import { blockGitHubIssueTemplates } from "./blockGitHubIssueTemplates.mjs";
5
6
  import { blockCSpell } from "./blockCSpell.mjs";
6
7
  import { blockESLint } from "./blockESLint.mjs";
7
8
  import { blockGitignore } from "./blockGitignore.mjs";
@@ -14,7 +15,7 @@ const blockNcc = base.createBlock({
14
15
  intake({ options }) {
15
16
  return { entry: options.packageData?.scripts?.["build:release"]?.match(/ncc build (.+) -o dist/)?.[1] };
16
17
  },
17
- produce({ addons }) {
18
+ produce({ addons, options }) {
18
19
  const { entry = "src/index.ts" } = addons;
19
20
  return { addons: [
20
21
  blockCSpell({ ignorePaths: ["dist"] }),
@@ -62,6 +63,10 @@ if [ -n "$changes" ]; then
62
63
  fi
63
64
  ` }]
64
65
  }] }),
66
+ blockGitHubIssueTemplates({ checklists: {
67
+ bug: ["I have checked the workflow run logs for errors.", `I have tried the [latest release](https://github.com/${options.owner}/${options.repository}/releases/latest) of this action and the issue persists.`],
68
+ feature: [`I have looked at the [latest release](https://github.com/${options.owner}/${options.repository}/releases/latest) of this action.`]
69
+ } }),
65
70
  blockGitignore({ ignores: ["/dist/**/*.d.ts", "/dist/**/*.d.ts.map"] }),
66
71
  blockPackageJson({ properties: {
67
72
  devDependencies: { "@vercel/ncc": "^0.38.3" },
@@ -9,6 +9,7 @@ import { blockDevelopmentDocs } from "./blockDevelopmentDocs.mjs";
9
9
  import { intakeFileAsJson } from "./intake/intakeFileAsJson.mjs";
10
10
  import { blockPackageJson } from "./blockPackageJson.mjs";
11
11
  import { blockRemoveWorkflows } from "./blockRemoveWorkflows.mjs";
12
+ import { blockGitHubIssueTemplates } from "./blockGitHubIssueTemplates.mjs";
12
13
  import { blockRemoveDependencies } from "./blockRemoveDependencies.mjs";
13
14
  import { blockESLint } from "./blockESLint.mjs";
14
15
  import { blockGitignore } from "./blockGitignore.mjs";
@@ -78,6 +79,10 @@ pnpm build --watch
78
79
  name: "Build",
79
80
  steps: [{ run: "pnpm build" }, ...runInCI.map((run) => ({ run }))]
80
81
  }] }),
82
+ blockGitHubIssueTemplates({ checklists: {
83
+ bug: ["I have pulled in the newest version of the project.", "I have tried restarting my IDE and the issue persists."],
84
+ feature: ["I have looked at the latest version of the project."]
85
+ } }),
81
86
  blockPackageJson({ properties: {
82
87
  devDependencies: getPackageDependencies("tsdown"),
83
88
  scripts: { build: "tsdown" }
@@ -36,15 +36,15 @@ export declare const blockTypeScript: import("bingo-stratum").BlockWithAddons<{
36
36
  inlineSources?: boolean | undefined;
37
37
  isolatedDeclarations?: boolean | undefined;
38
38
  isolatedModules?: boolean | undefined;
39
- jsx?: "preserve" | "none" | "react" | "react-jsx" | "react-jsxdev" | "react-native" | undefined;
39
+ jsx?: "none" | "preserve" | "react" | "react-jsx" | "react-jsxdev" | "react-native" | undefined;
40
40
  keyofStringsOnly?: boolean | undefined;
41
41
  lib?: string[] | undefined;
42
42
  libReplacement?: boolean | undefined;
43
43
  locale?: string | undefined;
44
44
  mapRoot?: string | undefined;
45
45
  maxNodeModuleJsDepth?: number | undefined;
46
- module?: "commonjs" | "preserve" | "none" | "amd" | "AMD" | "CommonJS" | "es2015" | "ES2015" | "es2020" | "ES2020" | "es2022" | "ES2022" | "es6" | "ES6" | "esnext" | "ESNext" | "node16" | "Node16" | "node18" | "Node18" | "nodenext" | "NodeNext" | "None" | "Preserve" | "system" | "System" | "umd" | "UMD" | undefined;
47
- moduleDetection?: "auto" | "force" | "legacy" | undefined;
46
+ module?: "commonjs" | "none" | "preserve" | "amd" | "AMD" | "CommonJS" | "es2015" | "ES2015" | "es2020" | "ES2020" | "es2022" | "ES2022" | "es6" | "ES6" | "esnext" | "ESNext" | "node16" | "Node16" | "node18" | "Node18" | "nodenext" | "NodeNext" | "None" | "Preserve" | "system" | "System" | "umd" | "UMD" | undefined;
47
+ moduleDetection?: "force" | "legacy" | "auto" | undefined;
48
48
  moduleResolution?: "node" | "node16" | "Node16" | "nodenext" | "NodeNext" | "bundler" | "Bundler" | "classic" | "Classic" | "Node" | "node10" | "Node10" | "NodeJs" | undefined;
49
49
  moduleSuffixes?: string[] | undefined;
50
50
  newLine?: "crlf" | "lf" | undefined;
@@ -103,7 +103,7 @@ export declare const blockTypeScript: import("bingo-stratum").BlockWithAddons<{
103
103
  noUncheckedSideEffectImports?: boolean | undefined;
104
104
  resolveJsonModule?: boolean | undefined;
105
105
  suppressImplicitAnyIndexErrors?: boolean | undefined;
106
- target?: "json" | "es2015" | "ES2015" | "es2020" | "ES2020" | "es2022" | "ES2022" | "esnext" | "ESNext" | "es2016" | "ES2016" | "es2017" | "ES2017" | "es2018" | "ES2018" | "es2019" | "ES2019" | "es2021" | "ES2021" | "es2023" | "ES2023" | "es2024" | "ES2024" | "es3" | "ES3" | "es5" | "ES5" | "JSON" | "latest" | "Latest" | undefined;
106
+ target?: "json" | "latest" | "es2015" | "ES2015" | "es2020" | "ES2020" | "es2022" | "ES2022" | "esnext" | "ESNext" | "es2016" | "ES2016" | "es2017" | "ES2017" | "es2018" | "ES2018" | "es2019" | "ES2019" | "es2021" | "ES2021" | "es2023" | "ES2023" | "es2024" | "ES2024" | "es3" | "ES3" | "es5" | "ES5" | "JSON" | "Latest" | undefined;
107
107
  traceResolution?: boolean | undefined;
108
108
  typeRoots?: string[] | undefined;
109
109
  types?: string[] | undefined;
@@ -2,6 +2,7 @@ import { base } from "../base.mjs";
2
2
  import { formatFile } from "../utils/formatFile.mjs";
3
3
  import { blockDevelopmentDocs } from "./blockDevelopmentDocs.mjs";
4
4
  import { getPrimaryBin } from "./bin/getPrimaryBin.mjs";
5
+ import { blockGitHubIssueTemplates } from "./blockGitHubIssueTemplates.mjs";
5
6
  import { z } from "zod";
6
7
  import sortKeys from "sort-keys";
7
8
  //#region src/blocks/blockVSCode.ts
@@ -36,7 +37,7 @@ To launch it, open a test file, then run _Debug Current Test File_ from the VS C
36
37
  heading: "Debugging Tests"
37
38
  }] }
38
39
  }
39
- })],
40
+ }), blockGitHubIssueTemplates({ checklists: { tooling: ["I have tried restarting my IDE and the issue persists."] } })],
40
41
  files: { ".vscode": {
41
42
  "extensions.json": extensions?.length ? formatFile(".vscode/extensions.json", JSON.stringify({ recommendations: [...extensions].sort() })) : void 0,
42
43
  "launch.json": debuggers?.length ? formatFile(".vscode/launch.json", JSON.stringify({
@@ -2,6 +2,7 @@ import { base } from "../base.mjs";
2
2
  import { blockGitHubActionsCI } from "./blockGitHubActionsCI.mjs";
3
3
  import { blockDevelopmentDocs } from "./blockDevelopmentDocs.mjs";
4
4
  import { blockPackageJson } from "./blockPackageJson.mjs";
5
+ import { blockGitHubIssueTemplates } from "./blockGitHubIssueTemplates.mjs";
5
6
  import { blockCSpell } from "./blockCSpell.mjs";
6
7
  import { blockESLint } from "./blockESLint.mjs";
7
8
  import { blockGitignore } from "./blockGitignore.mjs";
@@ -78,6 +79,10 @@ Then upload that \`./web-ext-artifacts/refined_saved_replies-*.zip\` file to:
78
79
  name: "Lint Web-ext",
79
80
  steps: [{ run: "pnpm dev" }, { run: "pnpm lint:web-ext" }]
80
81
  }] }),
82
+ blockGitHubIssueTemplates({ checklists: {
83
+ bug: ["I have tried the latest version of the extension and the issue persists."],
84
+ feature: ["I have looked at the latest version of the extension."]
85
+ } }),
81
86
  blockGitignore({ ignores: [
82
87
  "*.zip",
83
88
  "/lib",
@@ -1822,7 +1822,14 @@ export declare const blocks: {
1822
1822
  pinned?: boolean | undefined;
1823
1823
  }>> | undefined;
1824
1824
  }>;
1825
- blockGitHubIssueTemplates: import("bingo-stratum").BlockWithoutAddons<{
1825
+ blockGitHubIssueTemplates: import("bingo-stratum").BlockWithAddons<{
1826
+ checklists: {
1827
+ bug?: string[] | undefined;
1828
+ documentation?: string[] | undefined;
1829
+ feature?: string[] | undefined;
1830
+ tooling?: string[] | undefined;
1831
+ };
1832
+ }, {
1826
1833
  access: "public" | "restricted";
1827
1834
  description: string;
1828
1835
  directory: string;
@@ -3666,15 +3673,15 @@ export declare const blocks: {
3666
3673
  inlineSources?: boolean | undefined;
3667
3674
  isolatedDeclarations?: boolean | undefined;
3668
3675
  isolatedModules?: boolean | undefined;
3669
- jsx?: "preserve" | "none" | "react" | "react-jsx" | "react-jsxdev" | "react-native" | undefined;
3676
+ jsx?: "none" | "preserve" | "react" | "react-jsx" | "react-jsxdev" | "react-native" | undefined;
3670
3677
  keyofStringsOnly?: boolean | undefined;
3671
3678
  lib?: string[] | undefined;
3672
3679
  libReplacement?: boolean | undefined;
3673
3680
  locale?: string | undefined;
3674
3681
  mapRoot?: string | undefined;
3675
3682
  maxNodeModuleJsDepth?: number | undefined;
3676
- module?: "commonjs" | "preserve" | "none" | "amd" | "AMD" | "CommonJS" | "es2015" | "ES2015" | "es2020" | "ES2020" | "es2022" | "ES2022" | "es6" | "ES6" | "esnext" | "ESNext" | "node16" | "Node16" | "node18" | "Node18" | "nodenext" | "NodeNext" | "None" | "Preserve" | "system" | "System" | "umd" | "UMD" | undefined;
3677
- moduleDetection?: "auto" | "force" | "legacy" | undefined;
3683
+ module?: "commonjs" | "none" | "preserve" | "amd" | "AMD" | "CommonJS" | "es2015" | "ES2015" | "es2020" | "ES2020" | "es2022" | "ES2022" | "es6" | "ES6" | "esnext" | "ESNext" | "node16" | "Node16" | "node18" | "Node18" | "nodenext" | "NodeNext" | "None" | "Preserve" | "system" | "System" | "umd" | "UMD" | undefined;
3684
+ moduleDetection?: "force" | "legacy" | "auto" | undefined;
3678
3685
  moduleResolution?: "node" | "node16" | "Node16" | "nodenext" | "NodeNext" | "bundler" | "Bundler" | "classic" | "Classic" | "Node" | "node10" | "Node10" | "NodeJs" | undefined;
3679
3686
  moduleSuffixes?: string[] | undefined;
3680
3687
  newLine?: "crlf" | "lf" | undefined;
@@ -3733,7 +3740,7 @@ export declare const blocks: {
3733
3740
  noUncheckedSideEffectImports?: boolean | undefined;
3734
3741
  resolveJsonModule?: boolean | undefined;
3735
3742
  suppressImplicitAnyIndexErrors?: boolean | undefined;
3736
- target?: "json" | "es2015" | "ES2015" | "es2020" | "ES2020" | "es2022" | "ES2022" | "esnext" | "ESNext" | "es2016" | "ES2016" | "es2017" | "ES2017" | "es2018" | "ES2018" | "es2019" | "ES2019" | "es2021" | "ES2021" | "es2023" | "ES2023" | "es2024" | "ES2024" | "es3" | "ES3" | "es5" | "ES5" | "JSON" | "latest" | "Latest" | undefined;
3743
+ target?: "json" | "latest" | "es2015" | "ES2015" | "es2020" | "ES2020" | "es2022" | "ES2022" | "esnext" | "ESNext" | "es2016" | "ES2016" | "es2017" | "ES2017" | "es2018" | "ES2018" | "es2019" | "ES2019" | "es2021" | "ES2021" | "es2023" | "ES2023" | "es2024" | "ES2024" | "es3" | "ES3" | "es5" | "ES5" | "JSON" | "Latest" | undefined;
3737
3744
  traceResolution?: boolean | undefined;
3738
3745
  typeRoots?: string[] | undefined;
3739
3746
  types?: string[] | undefined;
@@ -2,6 +2,7 @@ import { blockGitHubActionsCI } from "./blockGitHubActionsCI.mjs";
2
2
  import { blockAreTheTypesWrong } from "./blockAreTheTypesWrong.mjs";
3
3
  import { blockDevelopmentDocs } from "./blockDevelopmentDocs.mjs";
4
4
  import { blockPackageJson } from "./blockPackageJson.mjs";
5
+ import { blockGitHubIssueTemplates } from "./blockGitHubIssueTemplates.mjs";
5
6
  import { blockVSCode } from "./blockVSCode.mjs";
6
7
  import { blockCSpell } from "./blockCSpell.mjs";
7
8
  import { blockCTATransitions } from "./blockCTATransitions.mjs";
@@ -25,7 +26,6 @@ import { blockBin } from "./blockBin.mjs";
25
26
  import { blockContributingDocs } from "./blockContributingDocs.mjs";
26
27
  import { blockContributorCovenant } from "./blockContributorCovenant.mjs";
27
28
  import { blockExports } from "./blockExports.mjs";
28
- import { blockGitHubIssueTemplates } from "./blockGitHubIssueTemplates.mjs";
29
29
  import { blockGitHubPRTemplate } from "./blockGitHubPRTemplate.mjs";
30
30
  import { blockMITLicense } from "./blockMITLicense.mjs";
31
31
  import { blockSecurityDocs } from "./blockSecurityDocs.mjs";
package/dist/index.mjs CHANGED
@@ -3,6 +3,7 @@ import { blockGitHubActionsCI } from "./blocks/blockGitHubActionsCI.mjs";
3
3
  import { blockAreTheTypesWrong } from "./blocks/blockAreTheTypesWrong.mjs";
4
4
  import { blockDevelopmentDocs } from "./blocks/blockDevelopmentDocs.mjs";
5
5
  import { blockPackageJson } from "./blocks/blockPackageJson.mjs";
6
+ import { blockGitHubIssueTemplates } from "./blocks/blockGitHubIssueTemplates.mjs";
6
7
  import { blockVSCode } from "./blocks/blockVSCode.mjs";
7
8
  import { blockCSpell } from "./blocks/blockCSpell.mjs";
8
9
  import { blockCTATransitions } from "./blocks/blockCTATransitions.mjs";
@@ -26,7 +27,6 @@ import { blockBin } from "./blocks/blockBin.mjs";
26
27
  import { blockContributingDocs } from "./blocks/blockContributingDocs.mjs";
27
28
  import { blockContributorCovenant } from "./blocks/blockContributorCovenant.mjs";
28
29
  import { blockExports } from "./blocks/blockExports.mjs";
29
- import { blockGitHubIssueTemplates } from "./blocks/blockGitHubIssueTemplates.mjs";
30
30
  import { blockGitHubPRTemplate } from "./blocks/blockGitHubPRTemplate.mjs";
31
31
  import { blockMITLicense } from "./blocks/blockMITLicense.mjs";
32
32
  import { blockSecurityDocs } from "./blocks/blockSecurityDocs.mjs";
@@ -5,6 +5,7 @@ import { blockGitHubActionsCI } from "../blocks/blockGitHubActionsCI.mjs";
5
5
  import { blockDevelopmentDocs } from "../blocks/blockDevelopmentDocs.mjs";
6
6
  import { blockPackageJson } from "../blocks/blockPackageJson.mjs";
7
7
  import { blockRemoveWorkflows } from "../blocks/blockRemoveWorkflows.mjs";
8
+ import { blockGitHubIssueTemplates } from "../blocks/blockGitHubIssueTemplates.mjs";
8
9
  import { blockRemoveDependencies } from "../blocks/blockRemoveDependencies.mjs";
9
10
  import { blockESLint } from "../blocks/blockESLint.mjs";
10
11
  import { blockREADME } from "../blocks/blockREADME.mjs";
@@ -18,7 +19,6 @@ import { blockBin } from "../blocks/blockBin.mjs";
18
19
  import { blockContributingDocs } from "../blocks/blockContributingDocs.mjs";
19
20
  import { blockContributorCovenant } from "../blocks/blockContributorCovenant.mjs";
20
21
  import { blockExports } from "../blocks/blockExports.mjs";
21
- import { blockGitHubIssueTemplates } from "../blocks/blockGitHubIssueTemplates.mjs";
22
22
  import { blockGitHubPRTemplate } from "../blocks/blockGitHubPRTemplate.mjs";
23
23
  import { blockMITLicense } from "../blocks/blockMITLicense.mjs";
24
24
  import { blockRepositoryLabels } from "../blocks/blockRepositoryLabels.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-typescript-app",
3
- "version": "2.68.2",
3
+ "version": "2.69.0",
4
4
  "description": "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁",
5
5
  "repository": {
6
6
  "type": "git",