create-typescript-app 2.68.2 → 2.69.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.
@@ -1,6 +1,5 @@
1
1
  import { base } from "../base.mjs";
2
2
  import { intakeFileAsJson } from "./intake/intakeFileAsJson.mjs";
3
- import { blockPackageJson } from "./blockPackageJson.mjs";
4
3
  import { blockTSDown } from "./blockTSDown.mjs";
5
4
  import { z } from "zod";
6
5
  //#region src/blocks/blockExports.ts
@@ -21,10 +20,11 @@ const blockExports = base.createBlock({
21
20
  produce({ addons, options }) {
22
21
  const { filePath = "./dist/index.mjs", runArgs } = addons;
23
22
  const main = zFilePath.safeParse(options.packageData?.main).data;
24
- return { addons: [blockPackageJson({ properties: {
25
- exports: { ".": filePath.startsWith(".") ? filePath : `./${filePath}` },
26
- ...main && { main: libToDist(main) }
27
- } }), blockTSDown({ runInCI: [`node ${filePath}${runArgs.map((arg) => ` ${arg}`).join("")}`] })] };
23
+ return { addons: [blockTSDown({
24
+ exports: filePath.startsWith(".") ? filePath : `./${filePath}`,
25
+ ...main && { main: libToDist(main) },
26
+ runInCI: [`node ${filePath}${runArgs.map((arg) => ` ${arg}`).join("")}`]
27
+ })] };
28
28
  }
29
29
  });
30
30
  function libToDist(filePath) {
@@ -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
  },
@@ -1,5 +1,6 @@
1
1
  //#region src/blocks/blockNcc.d.ts
2
2
  export declare const blockNcc: import("bingo-stratum").BlockWithAddons<{
3
+ build?: string | undefined;
3
4
  entry?: string | undefined;
4
5
  }, {
5
6
  access: "public" | "restricted";
@@ -1,25 +1,38 @@
1
1
  import { base } from "../base.mjs";
2
2
  import { blockGitHubActionsCI } from "./blockGitHubActionsCI.mjs";
3
+ import { formatFile } from "../utils/formatFile.mjs";
3
4
  import { blockDevelopmentDocs } from "./blockDevelopmentDocs.mjs";
4
5
  import { blockPackageJson } from "./blockPackageJson.mjs";
6
+ import { blockGitHubIssueTemplates } from "./blockGitHubIssueTemplates.mjs";
5
7
  import { blockCSpell } from "./blockCSpell.mjs";
6
8
  import { blockESLint } from "./blockESLint.mjs";
7
9
  import { blockGitignore } from "./blockGitignore.mjs";
8
10
  import { blockPrettier } from "./blockPrettier.mjs";
11
+ import { blockReleaseIt } from "./blockReleaseIt.mjs";
12
+ import { blockVitest } from "./blockVitest.mjs";
13
+ import { blockTypeScript } from "./blockTypeScript.mjs";
9
14
  import { z } from "zod";
10
15
  //#region src/blocks/blockNcc.ts
11
16
  const blockNcc = base.createBlock({
12
17
  about: { name: "ncc" },
13
- addons: { entry: z.string().optional() },
18
+ addons: {
19
+ build: z.string().optional(),
20
+ entry: z.string().optional()
21
+ },
14
22
  intake({ options }) {
15
- return { entry: options.packageData?.scripts?.["build:release"]?.match(/ncc build (.+) -o dist/)?.[1] };
23
+ const scripts = options.packageData?.scripts;
24
+ return {
25
+ build: scripts?.build?.match(/^tsc\b/) ? scripts.build : void 0,
26
+ entry: scripts?.["build:release"]?.match(/ncc build (.+) -o dist/)?.[1]
27
+ };
16
28
  },
17
- produce({ addons }) {
18
- const { entry = "src/index.ts" } = addons;
19
- return { addons: [
20
- blockCSpell({ ignorePaths: ["dist"] }),
21
- blockDevelopmentDocs({ sections: { Building: {
22
- contents: `
29
+ produce({ addons, options }) {
30
+ const { build, entry = "src/index.ts" } = addons;
31
+ return {
32
+ addons: [
33
+ blockCSpell({ ignorePaths: ["dist", "lib"] }),
34
+ blockDevelopmentDocs({ sections: { Building: {
35
+ contents: `
23
36
  Run [TypeScript](https://typescriptlang.org) locally to type check and build source files from \`src/\` into output files in \`lib/\`:
24
37
 
25
38
  \`\`\`shell
@@ -32,8 +45,8 @@ Add \`--watch\` to run the builder in a watch mode that rebuilds changed files i
32
45
  pnpm build --watch
33
46
  \`\`\`
34
47
  `,
35
- innerSections: [{
36
- contents: `
48
+ innerSections: [{
49
+ contents: `
37
50
  Run [\`@vercel/ncc\`](https://github.com/vercel/ncc) to clear and recreate an output \`dist/\` to be used in production.
38
51
 
39
52
  \`\`\`shell
@@ -44,16 +57,16 @@ CI fails if the committed \`dist/\` doesn't match what \`pnpm build:release\` pr
44
57
  If that happens, run \`pnpm build:release\` and commit the changed files under \`dist/\`.
45
58
  Renovate PRs that update bundled dependencies need the same: rebuild and commit \`dist/\` on their branch before they can merge.
46
59
  `,
47
- heading: "Building for Release"
48
- }]
49
- } } }),
50
- blockESLint({ ignores: ["dist"] }),
51
- blockGitHubActionsCI({ jobs: [{
52
- name: "Build",
53
- steps: [{ run: "pnpm build" }]
54
- }, {
55
- name: "Build (Release)",
56
- steps: [{ run: "pnpm build:release" }, { run: `# Verify dist/ is up to date
60
+ heading: "Building for Release"
61
+ }]
62
+ } } }),
63
+ blockESLint({ ignores: ["dist", "lib"] }),
64
+ blockGitHubActionsCI({ jobs: [{
65
+ name: "Build",
66
+ steps: [{ run: "pnpm build" }]
67
+ }, {
68
+ name: "Build (Release)",
69
+ steps: [{ run: "pnpm build:release" }, { run: `# Verify dist/ is up to date
57
70
  changes=$(git status --porcelain --untracked-files=all --ignored -- dist ':!*.d.ts' ':!*.d.ts.map')
58
71
  if [ -n "$changes" ]; then
59
72
  echo "$changes"
@@ -61,17 +74,47 @@ if [ -n "$changes" ]; then
61
74
  exit 1
62
75
  fi
63
76
  ` }]
64
- }] }),
65
- blockGitignore({ ignores: ["/dist/**/*.d.ts", "/dist/**/*.d.ts.map"] }),
66
- blockPackageJson({ properties: {
67
- devDependencies: { "@vercel/ncc": "^0.38.3" },
68
- scripts: {
69
- build: "tsc",
70
- "build:release": `rm -rf dist && ncc build ${entry} -o dist`
71
- }
72
- } }),
73
- blockPrettier({ ignores: ["/dist"] })
74
- ] };
77
+ }] }),
78
+ blockGitHubIssueTemplates({ checklists: {
79
+ 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.`],
80
+ feature: [`I have looked at the [latest release](https://github.com/${options.owner}/${options.repository}/releases/latest) of this action.`]
81
+ } }),
82
+ blockGitignore({ ignores: [
83
+ "/dist/**/*.d.ts",
84
+ "/dist/**/*.d.ts.map",
85
+ "/lib"
86
+ ] }),
87
+ blockPackageJson({ properties: {
88
+ devDependencies: { "@vercel/ncc": "^0.38.3" },
89
+ files: ["lib/"],
90
+ scripts: {
91
+ build: build ?? "tsc --project tsconfig.build.json",
92
+ "build:release": `rm -rf dist && ncc build ${entry} -o dist`
93
+ }
94
+ } }),
95
+ blockPrettier({ ignores: ["/dist", "/lib"] }),
96
+ blockReleaseIt({ builders: [{
97
+ order: 0,
98
+ run: "pnpm build"
99
+ }] }),
100
+ blockTypeScript({ outDir: "lib" }),
101
+ blockVitest({ exclude: ["lib"] })
102
+ ],
103
+ ...!build && { files: { "tsconfig.build.json": formatFile("tsconfig.build.json", JSON.stringify({
104
+ exclude: ["src/**/*.test.ts"],
105
+ extends: "./tsconfig.json"
106
+ })) } }
107
+ };
108
+ },
109
+ setup() {
110
+ return { addons: [blockPackageJson({ properties: { exports: { ".": "./lib/index.js" } } })] };
111
+ },
112
+ transition() {
113
+ return { addons: [blockGitignore({ removals: [
114
+ "/dist",
115
+ "dist",
116
+ "dist/"
117
+ ] })] };
75
118
  }
76
119
  });
77
120
  //#endregion
@@ -3,6 +3,8 @@ export declare const blockTSDown: import("bingo-stratum").BlockWithAddons<{
3
3
  entry: string[];
4
4
  properties: Record<string, unknown>;
5
5
  runInCI: string[];
6
+ exports?: string | undefined;
7
+ main?: string | undefined;
6
8
  }, {
7
9
  access: "public" | "restricted";
8
10
  description: string;
@@ -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";
@@ -36,6 +37,8 @@ const blockTSDown = base.createBlock({
36
37
  about: { name: "TSDown" },
37
38
  addons: {
38
39
  entry: zEntry.default([]),
40
+ exports: z.string().optional(),
41
+ main: z.string().optional(),
39
42
  properties: zProperties.default({}),
40
43
  runInCI: z.array(z.string()).default([])
41
44
  },
@@ -57,7 +60,7 @@ const blockTSDown = base.createBlock({
57
60
  };
58
61
  },
59
62
  produce({ addons, options }) {
60
- const { entry, properties, runInCI } = addons;
63
+ const { entry, exports, main, properties, runInCI } = addons;
61
64
  return {
62
65
  addons: [
63
66
  blockDevelopmentDocs({ sections: { Building: { contents: `
@@ -78,8 +81,16 @@ pnpm build --watch
78
81
  name: "Build",
79
82
  steps: [{ run: "pnpm build" }, ...runInCI.map((run) => ({ run }))]
80
83
  }] }),
84
+ blockGitHubIssueTemplates({ checklists: {
85
+ bug: ["I have pulled in the newest version of the project.", "I have tried restarting my IDE and the issue persists."],
86
+ feature: ["I have looked at the latest version of the project."]
87
+ } }),
88
+ blockGitignore({ ignores: ["/dist"] }),
81
89
  blockPackageJson({ properties: {
82
90
  devDependencies: getPackageDependencies("tsdown"),
91
+ ...exports && { exports: { ".": exports } },
92
+ files: ["dist/"],
93
+ ...main && { main },
83
94
  scripts: { build: "tsdown" }
84
95
  } }),
85
96
  blockReleaseIt({ builders: [{
@@ -103,7 +114,11 @@ export default defineConfig(${JSON.stringify({
103
114
  },
104
115
  transition() {
105
116
  return { addons: [
106
- blockGitignore({ removals: ["/lib", "lib/"] }),
117
+ blockGitignore({ removals: [
118
+ "/lib",
119
+ "dist/",
120
+ "lib/"
121
+ ] }),
107
122
  blockPackageJson({ outdatedFiles: ["lib/"] }),
108
123
  blockRemoveDependencies({ dependencies: [
109
124
  "@babel/cli",
@@ -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;
@@ -111,6 +111,7 @@ export declare const blockTypeScript: import("bingo-stratum").BlockWithAddons<{
111
111
  useUnknownInCatchVariables?: boolean | undefined;
112
112
  verbatimModuleSyntax?: boolean | undefined;
113
113
  } | undefined;
114
+ outDir?: string | undefined;
114
115
  }, {
115
116
  access: "public" | "restricted";
116
117
  description: string;
@@ -9,15 +9,18 @@ import { blockRemoveWorkflows } from "./blockRemoveWorkflows.mjs";
9
9
  import { getPrimaryBin } from "./bin/getPrimaryBin.mjs";
10
10
  import { blockVSCode } from "./blockVSCode.mjs";
11
11
  import { blockExampleFiles } from "./blockExampleFiles.mjs";
12
- import { blockGitignore } from "./blockGitignore.mjs";
13
12
  import { blockKnip } from "./blockKnip.mjs";
14
13
  import { blockVitest } from "./blockVitest.mjs";
14
+ import { z } from "zod";
15
15
  import sortKeys from "sort-keys";
16
16
  import { CompilerOptionsSchema } from "zod-tsconfig";
17
17
  //#region src/blocks/blockTypeScript.ts
18
18
  const blockTypeScript = base.createBlock({
19
19
  about: { name: "TypeScript" },
20
- addons: { compilerOptions: CompilerOptionsSchema.optional() },
20
+ addons: {
21
+ compilerOptions: CompilerOptionsSchema.optional(),
22
+ outDir: z.string().optional()
23
+ },
21
24
  intake({ files }) {
22
25
  const raw = intakeFileAsJson(files, ["tsconfig.json"]);
23
26
  const { data } = CompilerOptionsSchema.safeParse(raw?.compilerOptions);
@@ -25,7 +28,7 @@ const blockTypeScript = base.createBlock({
25
28
  return { compilerOptions: data };
26
29
  },
27
30
  produce({ addons, options }) {
28
- const { compilerOptions } = addons;
31
+ const { compilerOptions, outDir } = addons;
29
32
  const primaryBin = getPrimaryBin(options.bin, options.repository);
30
33
  return {
31
34
  addons: [
@@ -79,16 +82,12 @@ import { greet } from "${options.repository}";
79
82
  greet("Hello, world! ${options.emoji}");
80
83
  \`\`\``]
81
84
  }),
82
- blockGitignore({ ignores: ["/dist"] }),
83
85
  blockGitHubActionsCI({ jobs: [{
84
86
  name: "Type Check",
85
87
  steps: [{ run: "pnpm tsc" }]
86
88
  }] }),
87
89
  blockKnip({ project: ["src/**/*.ts"] }),
88
- blockPackageJson({ properties: {
89
- devDependencies: getPackageDependencies("typescript"),
90
- files: ["dist/"]
91
- } }),
90
+ blockPackageJson({ properties: { devDependencies: getPackageDependencies("typescript") } }),
92
91
  blockVitest({
93
92
  coverage: { include: ["src"] },
94
93
  exclude: ["dist"]
@@ -123,14 +122,19 @@ greet("Hello, world! ${options.emoji}");
123
122
  skipLibCheck: true,
124
123
  strict: true,
125
124
  target: "ES2023",
126
- ...compilerOptions
125
+ ...outDir && {
126
+ outDir,
127
+ rootDir: "src"
128
+ },
129
+ ...compilerOptions,
130
+ ...outDir && { noEmit: void 0 }
127
131
  }),
128
132
  include: ["src"]
129
133
  })) }
130
134
  };
131
135
  },
132
136
  transition() {
133
- return { addons: [blockGitignore({ removals: ["dist/"] }), blockRemoveWorkflows({ workflows: ["tsc"] })] };
137
+ return { addons: [blockRemoveWorkflows({ workflows: ["tsc"] })] };
134
138
  }
135
139
  });
136
140
  //#endregion
@@ -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;
@@ -2186,6 +2193,7 @@ export declare const blocks: {
2186
2193
  }>> | undefined;
2187
2194
  }>;
2188
2195
  blockNcc: import("bingo-stratum").BlockWithAddons<{
2196
+ build?: string | undefined;
2189
2197
  entry?: string | undefined;
2190
2198
  }, {
2191
2199
  access: "public" | "restricted";
@@ -3558,6 +3566,8 @@ export declare const blocks: {
3558
3566
  entry: string[];
3559
3567
  properties: Record<string, unknown>;
3560
3568
  runInCI: string[];
3569
+ exports?: string | undefined;
3570
+ main?: string | undefined;
3561
3571
  }, {
3562
3572
  access: "public" | "restricted";
3563
3573
  description: string;
@@ -3666,15 +3676,15 @@ export declare const blocks: {
3666
3676
  inlineSources?: boolean | undefined;
3667
3677
  isolatedDeclarations?: boolean | undefined;
3668
3678
  isolatedModules?: boolean | undefined;
3669
- jsx?: "preserve" | "none" | "react" | "react-jsx" | "react-jsxdev" | "react-native" | undefined;
3679
+ jsx?: "none" | "preserve" | "react" | "react-jsx" | "react-jsxdev" | "react-native" | undefined;
3670
3680
  keyofStringsOnly?: boolean | undefined;
3671
3681
  lib?: string[] | undefined;
3672
3682
  libReplacement?: boolean | undefined;
3673
3683
  locale?: string | undefined;
3674
3684
  mapRoot?: string | undefined;
3675
3685
  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;
3686
+ 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;
3687
+ moduleDetection?: "force" | "legacy" | "auto" | undefined;
3678
3688
  moduleResolution?: "node" | "node16" | "Node16" | "nodenext" | "NodeNext" | "bundler" | "Bundler" | "classic" | "Classic" | "Node" | "node10" | "Node10" | "NodeJs" | undefined;
3679
3689
  moduleSuffixes?: string[] | undefined;
3680
3690
  newLine?: "crlf" | "lf" | undefined;
@@ -3733,7 +3743,7 @@ export declare const blocks: {
3733
3743
  noUncheckedSideEffectImports?: boolean | undefined;
3734
3744
  resolveJsonModule?: boolean | undefined;
3735
3745
  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;
3746
+ 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
3747
  traceResolution?: boolean | undefined;
3738
3748
  typeRoots?: string[] | undefined;
3739
3749
  types?: string[] | undefined;
@@ -3741,6 +3751,7 @@ export declare const blocks: {
3741
3751
  useUnknownInCatchVariables?: boolean | undefined;
3742
3752
  verbatimModuleSyntax?: boolean | undefined;
3743
3753
  } | undefined;
3754
+ outDir?: string | undefined;
3744
3755
  }, {
3745
3756
  access: "public" | "restricted";
3746
3757
  description: string;
@@ -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";
@@ -15,6 +16,7 @@ import { blockReleaseIt } from "./blockReleaseIt.mjs";
15
16
  import { blockTSDown } from "./blockTSDown.mjs";
16
17
  import { blockVitest } from "./blockVitest.mjs";
17
18
  import { blockESLintPlugin } from "./blockESLintPlugin.mjs";
19
+ import { blockTypeScript } from "./blockTypeScript.mjs";
18
20
  import { blockNcc } from "./blockNcc.mjs";
19
21
  import { blockWebExt } from "./blockWebExt.mjs";
20
22
  import { blockAllContributors } from "./blockAllContributors.mjs";
@@ -25,13 +27,11 @@ import { blockBin } from "./blockBin.mjs";
25
27
  import { blockContributingDocs } from "./blockContributingDocs.mjs";
26
28
  import { blockContributorCovenant } from "./blockContributorCovenant.mjs";
27
29
  import { blockExports } from "./blockExports.mjs";
28
- import { blockGitHubIssueTemplates } from "./blockGitHubIssueTemplates.mjs";
29
30
  import { blockGitHubPRTemplate } from "./blockGitHubPRTemplate.mjs";
30
31
  import { blockMITLicense } from "./blockMITLicense.mjs";
31
32
  import { blockSecurityDocs } from "./blockSecurityDocs.mjs";
32
33
  import { blockSideEffects } from "./blockSideEffects.mjs";
33
34
  import { blockTemplatedWith } from "./blockTemplatedWith.mjs";
34
- import { blockTypeScript } from "./blockTypeScript.mjs";
35
35
  import { blockESLintComments } from "./blockESLintComments.mjs";
36
36
  import { blockESLintJSDoc } from "./blockESLintJSDoc.mjs";
37
37
  import { blockESLintJSONC } from "./blockESLintJSONC.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";
@@ -16,6 +17,7 @@ import { blockReleaseIt } from "./blocks/blockReleaseIt.mjs";
16
17
  import { blockTSDown } from "./blocks/blockTSDown.mjs";
17
18
  import { blockVitest } from "./blocks/blockVitest.mjs";
18
19
  import { blockESLintPlugin } from "./blocks/blockESLintPlugin.mjs";
20
+ import { blockTypeScript } from "./blocks/blockTypeScript.mjs";
19
21
  import { blockNcc } from "./blocks/blockNcc.mjs";
20
22
  import { blockWebExt } from "./blocks/blockWebExt.mjs";
21
23
  import { blockAllContributors } from "./blocks/blockAllContributors.mjs";
@@ -26,13 +28,11 @@ import { blockBin } from "./blocks/blockBin.mjs";
26
28
  import { blockContributingDocs } from "./blocks/blockContributingDocs.mjs";
27
29
  import { blockContributorCovenant } from "./blocks/blockContributorCovenant.mjs";
28
30
  import { blockExports } from "./blocks/blockExports.mjs";
29
- import { blockGitHubIssueTemplates } from "./blocks/blockGitHubIssueTemplates.mjs";
30
31
  import { blockGitHubPRTemplate } from "./blocks/blockGitHubPRTemplate.mjs";
31
32
  import { blockMITLicense } from "./blocks/blockMITLicense.mjs";
32
33
  import { blockSecurityDocs } from "./blocks/blockSecurityDocs.mjs";
33
34
  import { blockSideEffects } from "./blocks/blockSideEffects.mjs";
34
35
  import { blockTemplatedWith } from "./blocks/blockTemplatedWith.mjs";
35
- import { blockTypeScript } from "./blocks/blockTypeScript.mjs";
36
36
  import { presetMinimal } from "./presets/minimal.mjs";
37
37
  import { presetCommon } from "./presets/common.mjs";
38
38
  import { blockESLintComments } from "./blocks/blockESLintComments.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";
@@ -13,12 +14,12 @@ import { blockGitignore } from "../blocks/blockGitignore.mjs";
13
14
  import { blockPrettier } from "../blocks/blockPrettier.mjs";
14
15
  import { blockRepositorySecrets } from "../blocks/blockRepositorySecrets.mjs";
15
16
  import { blockTSDown } from "../blocks/blockTSDown.mjs";
17
+ import { blockTypeScript } from "../blocks/blockTypeScript.mjs";
16
18
  import { blockGitHubApps } from "../blocks/blockGitHubApps.mjs";
17
19
  import { blockBin } from "../blocks/blockBin.mjs";
18
20
  import { blockContributingDocs } from "../blocks/blockContributingDocs.mjs";
19
21
  import { blockContributorCovenant } from "../blocks/blockContributorCovenant.mjs";
20
22
  import { blockExports } from "../blocks/blockExports.mjs";
21
- import { blockGitHubIssueTemplates } from "../blocks/blockGitHubIssueTemplates.mjs";
22
23
  import { blockGitHubPRTemplate } from "../blocks/blockGitHubPRTemplate.mjs";
23
24
  import { blockMITLicense } from "../blocks/blockMITLicense.mjs";
24
25
  import { blockRepositoryLabels } from "../blocks/blockRepositoryLabels.mjs";
@@ -26,7 +27,6 @@ import { blockRepositorySettings } from "../blocks/blockRepositorySettings.mjs";
26
27
  import { blockSecurityDocs } from "../blocks/blockSecurityDocs.mjs";
27
28
  import { blockSideEffects } from "../blocks/blockSideEffects.mjs";
28
29
  import { blockTemplatedWith } from "../blocks/blockTemplatedWith.mjs";
29
- import { blockTypeScript } from "../blocks/blockTypeScript.mjs";
30
30
  //#region src/presets/minimal.ts
31
31
  const presetMinimal = base.createPreset({
32
32
  about: {
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.1",
4
4
  "description": "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁",
5
5
  "repository": {
6
6
  "type": "git",