create-typescript-app 2.8.1 → 2.9.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.
@@ -41,7 +41,8 @@ const blockCSpell = base.createBlock({
41
41
  name: "Lint Spelling",
42
42
  steps: [{ run: "pnpm lint:spelling" }]
43
43
  }
44
- ]
44
+ ],
45
+ removedWorkflows: ["lint-spelling", "spelling"]
45
46
  }),
46
47
  blockPackageJson({
47
48
  properties: {
@@ -1,8 +1,8 @@
1
1
  import { z } from "zod";
2
2
  import { base } from "../base.js";
3
3
  import { blockGitHubApps } from "./blockGitHubApps.js";
4
+ import { blockRemoveFiles } from "./blockRemoveFiles.js";
4
5
  import { blockVitest } from "./blockVitest.js";
5
- import { CommandPhase } from "./phases.js";
6
6
  const blockCodecov = base.createBlock({
7
7
  about: {
8
8
  name: "Codecov"
@@ -34,12 +34,8 @@ const blockCodecov = base.createBlock({
34
34
  },
35
35
  transition() {
36
36
  return {
37
- scripts: [
38
- {
39
- commands: ["rm .github/codecov.yml codecov.yml"],
40
- phase: CommandPhase.Migrations,
41
- silent: true
42
- }
37
+ addons: [
38
+ blockRemoveFiles({ files: [".github/codecov.yml", "codecov.yml"] })
43
39
  ]
44
40
  };
45
41
  }
@@ -1,5 +1,5 @@
1
1
  import { base } from "../base.js";
2
- import { CommandPhase } from "./phases.js";
2
+ import { blockRemoveFiles } from "./blockRemoveFiles.js";
3
3
  const blockContributingDocs = base.createBlock({
4
4
  about: {
5
5
  name: "Contributing Docs"
@@ -112,13 +112,7 @@ ${options.emoji} is a good starter if you're not sure which to use.
112
112
  },
113
113
  transition() {
114
114
  return {
115
- scripts: [
116
- {
117
- commands: ["rm CONTRIBUTING.md"],
118
- phase: CommandPhase.Migrations,
119
- silent: true
120
- }
121
- ]
115
+ addons: [blockRemoveFiles({ files: ["CONTRIBUTING.md"] })]
122
116
  };
123
117
  }
124
118
  });
@@ -1,5 +1,5 @@
1
1
  import { base } from "../base.js";
2
- import { CommandPhase } from "./phases.js";
2
+ import { blockRemoveFiles } from "./blockRemoveFiles.js";
3
3
  const blockContributorCovenant = base.createBlock({
4
4
  about: {
5
5
  name: "Contributor Covenant"
@@ -147,13 +147,7 @@ For answers to common questions about this code of conduct, see the FAQ at
147
147
  },
148
148
  transition() {
149
149
  return {
150
- scripts: [
151
- {
152
- commands: ["rm CODE_OF_CONDUCT.md"],
153
- phase: CommandPhase.Migrations,
154
- silent: true
155
- }
156
- ]
150
+ addons: [blockRemoveFiles({ files: ["CODE_OF_CONDUCT.md"] })]
157
151
  };
158
152
  }
159
153
  });
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { base } from "../base.js";
3
- import { CommandPhase } from "./phases.js";
3
+ import { blockRemoveFiles } from "./blockRemoveFiles.js";
4
4
  const zInnerSection = z.object({
5
5
  contents: z.string(),
6
6
  heading: z.string()
@@ -77,13 +77,7 @@ const blockDevelopmentDocs = base.createBlock({
77
77
  },
78
78
  transition() {
79
79
  return {
80
- scripts: [
81
- {
82
- commands: ["rm DEVELOPMENT.md"],
83
- phase: CommandPhase.Migrations,
84
- silent: true
85
- }
86
- ]
80
+ addons: [blockRemoveFiles({ files: ["DEVELOPMENT.md"] })]
87
81
  };
88
82
  }
89
83
  });
@@ -7,6 +7,8 @@ import { blockCSpell } from "./blockCSpell.js";
7
7
  import { blockDevelopmentDocs } from "./blockDevelopmentDocs.js";
8
8
  import { blockGitHubActionsCI } from "./blockGitHubActionsCI.js";
9
9
  import { blockPackageJson } from "./blockPackageJson.js";
10
+ import { blockRemoveDependencies } from "./blockRemoveDependencies.js";
11
+ import { blockRemoveFiles } from "./blockRemoveFiles.js";
10
12
  import { blockVSCode } from "./blockVSCode.js";
11
13
  import { CommandPhase } from "./phases.js";
12
14
  const zRuleOptions = z.union([
@@ -139,7 +141,8 @@ Each should be shown in VS Code, and can be run manually on the command-line:
139
141
  { run: "pnpm lint" }
140
142
  ]
141
143
  }
142
- ]
144
+ ],
145
+ removedWorkflows: ["eslint", "lint"]
143
146
  }),
144
147
  blockPackageJson({
145
148
  properties: {
@@ -200,12 +203,22 @@ export default tseslint.config(
200
203
  },
201
204
  transition() {
202
205
  return {
203
- scripts: [
204
- {
205
- commands: ["rm .eslintrc* .eslintignore eslint.config.*"],
206
- phase: CommandPhase.Migrations,
207
- silent: true
208
- }
206
+ addons: [
207
+ blockRemoveDependencies({
208
+ dependencies: [
209
+ "@types/eslint",
210
+ "@typescript-eslint/eslint-plugin",
211
+ "@typescript-eslint/parser",
212
+ "eslint-plugin-deprecation",
213
+ "eslint-plugin-eslint-comments",
214
+ "eslint-plugin-no-only-tests",
215
+ "jsonc-eslint-parser",
216
+ "yaml-eslint-parser"
217
+ ]
218
+ }),
219
+ blockRemoveFiles({
220
+ files: [".eslintrc*", ".eslintignore", "eslint.config.{cjs,mjs}"]
221
+ })
209
222
  ]
210
223
  };
211
224
  }
@@ -1,5 +1,8 @@
1
1
  import { base } from "../base.js";
2
2
  import { blockESLint } from "./blockESLint.js";
3
+ import { blockGitHubActionsCI } from "./blockGitHubActionsCI.js";
4
+ import { blockPackageJson } from "./blockPackageJson.js";
5
+ import { blockRemoveDependencies } from "./blockRemoveDependencies.js";
3
6
  const blockESLintPackageJson = base.createBlock({
4
7
  about: {
5
8
  name: "ESLint package.json Plugin"
@@ -15,6 +18,22 @@ const blockESLintPackageJson = base.createBlock({
15
18
  specifier: "packageJson"
16
19
  }
17
20
  ]
21
+ }),
22
+ blockGitHubActionsCI({
23
+ removedWorkflows: ["lint-package-json"]
24
+ }),
25
+ blockPackageJson({
26
+ properties: {
27
+ scripts: {
28
+ "lint:package-json": void 0
29
+ }
30
+ }
31
+ }),
32
+ blockRemoveDependencies({
33
+ dependencies: [
34
+ "npm-package-json-lint",
35
+ "npm-package-json-lint-config-default"
36
+ ]
18
37
  })
19
38
  ]
20
39
  };
@@ -41,6 +41,7 @@ declare const blockGitHubActionsCI: bingo_stratum.BlockWithAddons<{
41
41
  if?: string | undefined;
42
42
  checkoutWith?: Record<string, string> | undefined;
43
43
  }[] | undefined;
44
+ removedWorkflows?: string[] | undefined;
44
45
  }, {
45
46
  access: "public" | "restricted";
46
47
  description: string;
@@ -1,10 +1,10 @@
1
1
  import jsYaml from "js-yaml";
2
2
  import { z } from "zod";
3
3
  import { base } from "../base.js";
4
+ import { blockRemoveFiles } from "./blockRemoveFiles.js";
4
5
  import { blockRepositoryBranchRuleset } from "./blockRepositoryBranchRuleset.js";
5
6
  import { createMultiWorkflowFile } from "./files/createMultiWorkflowFile.js";
6
7
  import { createSoloWorkflowFile } from "./files/createSoloWorkflowFile.js";
7
- import { CommandPhase } from "./phases.js";
8
8
  const zActionStep = z.intersection(
9
9
  z.object({
10
10
  env: z.record(z.string(), z.string()).optional(),
@@ -25,7 +25,8 @@ const blockGitHubActionsCI = base.createBlock({
25
25
  name: z.string(),
26
26
  steps: z.array(zActionStep)
27
27
  })
28
- ).optional()
28
+ ).optional(),
29
+ removedWorkflows: z.array(z.string()).optional()
29
30
  },
30
31
  produce({ addons }) {
31
32
  const { jobs } = addons;
@@ -120,14 +121,19 @@ echo "See https://github.com/actions-ecosystem/action-remove-labels/issues/221."
120
121
  }
121
122
  };
122
123
  },
123
- transition() {
124
+ transition({ addons }) {
125
+ const { removedWorkflows = [] } = addons;
124
126
  return {
125
- scripts: [
126
- {
127
- commands: ["rm -rf .circleci travis.yml"],
128
- phase: CommandPhase.Migrations,
129
- silent: true
130
- }
127
+ addons: [
128
+ blockRemoveFiles({
129
+ files: [
130
+ ".circleci",
131
+ "travis.yml",
132
+ ...removedWorkflows.map(
133
+ (removedWorkflow) => `.github/workflows/${removedWorkflow}.yml`
134
+ )
135
+ ]
136
+ })
131
137
  ]
132
138
  };
133
139
  }
@@ -7,7 +7,7 @@ import {
7
7
  import { blockDevelopmentDocs } from "./blockDevelopmentDocs.js";
8
8
  import { blockGitHubActionsCI } from "./blockGitHubActionsCI.js";
9
9
  import { blockPackageJson } from "./blockPackageJson.js";
10
- import { CommandPhase } from "./phases.js";
10
+ import { blockRemoveFiles } from "./blockRemoveFiles.js";
11
11
  const blockKnip = base.createBlock({
12
12
  about: {
13
13
  name: "Knip"
@@ -36,7 +36,8 @@ const blockKnip = base.createBlock({
36
36
  name: "Lint Knip",
37
37
  steps: [{ run: "pnpm lint:knip" }]
38
38
  }
39
- ]
39
+ ],
40
+ removedWorkflows: ["knip", "lint-knip"]
40
41
  }),
41
42
  blockPackageJson({
42
43
  properties: {
@@ -63,12 +64,10 @@ const blockKnip = base.createBlock({
63
64
  },
64
65
  transition() {
65
66
  return {
66
- scripts: [
67
- {
68
- commands: ["rm .knip* knip.*"],
69
- phase: CommandPhase.Migrations,
70
- silent: true
71
- }
67
+ addons: [
68
+ blockRemoveFiles({
69
+ files: [".knip*", "knip.{c,m,t}*", "knip.js", "knip.jsonc"]
70
+ })
72
71
  ]
73
72
  };
74
73
  }
@@ -39,6 +39,12 @@ const blockMarkdownlint = base.createBlock({
39
39
  name: "Lint Markdown",
40
40
  steps: [{ run: "pnpm lint:md" }]
41
41
  }
42
+ ],
43
+ removedWorkflows: [
44
+ "lint-md",
45
+ "lint-markdown",
46
+ "lint-markdownlint",
47
+ "markdownlint"
42
48
  ]
43
49
  }),
44
50
  blockPackageJson({
@@ -26,7 +26,7 @@ declare const blockPackageJson: bingo_stratum.BlockWithAddons<{
26
26
  keywords?: string[] | undefined;
27
27
  dependencies?: Record<string, string> | undefined;
28
28
  devDependencies?: Record<string, string> | undefined;
29
- scripts?: Record<string, string> | undefined;
29
+ scripts?: Record<string, string | undefined> | undefined;
30
30
  repository?: string | {
31
31
  type: string;
32
32
  url: string;
@@ -5,14 +5,18 @@ import sortPackageJson from "sort-package-json";
5
5
  import { z } from "zod";
6
6
  import { PackageJson } from "zod-package-json";
7
7
  import { base } from "../base.js";
8
+ import { blockRemoveFiles } from "./blockRemoveFiles.js";
8
9
  import { CommandPhase } from "./phases.js";
10
+ const PackageJsonWithNullableScripts = PackageJson.partial().extend({
11
+ scripts: z.record(z.string(), z.union([z.string(), z.undefined()])).optional()
12
+ });
9
13
  const blockPackageJson = base.createBlock({
10
14
  about: {
11
15
  name: "Package JSON"
12
16
  },
13
17
  addons: {
14
18
  cleanupCommands: z.array(z.string()).default([]),
15
- properties: PackageJson.partial().default({})
19
+ properties: PackageJsonWithNullableScripts.default({})
16
20
  },
17
21
  produce({ addons, offline, options }) {
18
22
  const dependencies = useLargerVersions(options.packageData?.dependencies, {
@@ -87,13 +91,7 @@ const blockPackageJson = base.createBlock({
87
91
  },
88
92
  transition() {
89
93
  return {
90
- scripts: [
91
- {
92
- commands: ["rm package-lock.json yarn.lock"],
93
- phase: CommandPhase.Migrations,
94
- silent: true
95
- }
96
- ]
94
+ addons: [blockRemoveFiles({ files: ["package-lock.json yarn.lock"] })]
97
95
  };
98
96
  }
99
97
  });
@@ -26,10 +26,11 @@ const blockPnpmDedupe = base.createBlock({
26
26
  name: "Lint Packages",
27
27
  steps: [{ run: "pnpm lint:packages" }]
28
28
  }
29
- ]
29
+ ],
30
+ removedWorkflows: ["lint-packages"]
30
31
  }),
31
32
  blockPackageJson({
32
- cleanupCommands: ["pnpm dedupe --offline"],
33
+ cleanupCommands: ["pnpm dedupe"],
33
34
  properties: {
34
35
  scripts: {
35
36
  "lint:packages": "pnpm dedupe --check"
@@ -5,6 +5,7 @@ import { blockCSpell } from "./blockCSpell.js";
5
5
  import { blockDevelopmentDocs } from "./blockDevelopmentDocs.js";
6
6
  import { blockGitHubActionsCI } from "./blockGitHubActionsCI.js";
7
7
  import { blockPackageJson } from "./blockPackageJson.js";
8
+ import { blockRemoveFiles } from "./blockRemoveFiles.js";
8
9
  import { blockVSCode } from "./blockVSCode.js";
9
10
  import { formatIgnoreFile } from "./files/formatIgnoreFile.js";
10
11
  import { CommandPhase } from "./phases.js";
@@ -53,7 +54,8 @@ pnpm format --write
53
54
  name: "Prettier",
54
55
  steps: [{ run: "pnpm format --list-different" }]
55
56
  }
56
- ]
57
+ ],
58
+ removedWorkflows: ["format", "prettier"]
57
59
  }),
58
60
  blockPackageJson({
59
61
  properties: {
@@ -102,12 +104,10 @@ pnpm format --write
102
104
  },
103
105
  transition() {
104
106
  return {
105
- scripts: [
106
- {
107
- commands: ["rm .prettierrc* prettier.config*"],
108
- phase: CommandPhase.Migrations,
109
- silent: true
110
- }
107
+ addons: [
108
+ blockRemoveFiles({
109
+ files: [".prettierrc.{c*,js,m*,t*}", "prettier.config*"]
110
+ })
111
111
  ]
112
112
  };
113
113
  }
@@ -2,6 +2,7 @@ import { base } from "../base.js";
2
2
  import { getPackageDependencies } from "../data/packageData.js";
3
3
  import { blockCSpell } from "./blockCSpell.js";
4
4
  import { blockPackageJson } from "./blockPackageJson.js";
5
+ import { blockRemoveDependencies } from "./blockRemoveDependencies.js";
5
6
  import { blockRepositorySecrets } from "./blockRepositorySecrets.js";
6
7
  import { createSoloWorkflowFile } from "./files/createSoloWorkflowFile.js";
7
8
  const blockReleaseIt = base.createBlock({
@@ -22,9 +23,15 @@ const blockReleaseIt = base.createBlock({
22
23
  ),
23
24
  publishConfig: {
24
25
  provenance: true
26
+ },
27
+ scripts: {
28
+ "should-semantic-release": void 0
25
29
  }
26
30
  }
27
31
  }),
32
+ blockRemoveDependencies({
33
+ dependencies: ["should-semantic-release"]
34
+ }),
28
35
  blockRepositorySecrets({
29
36
  secrets: [
30
37
  {
@@ -0,0 +1,60 @@
1
+ import * as bingo_stratum from 'bingo-stratum';
2
+
3
+ declare const blockRemoveDependencies: bingo_stratum.BlockWithAddons<{
4
+ dependencies?: string[] | undefined;
5
+ }, {
6
+ access: "public" | "restricted";
7
+ description: string;
8
+ directory: string;
9
+ email: {
10
+ github: string;
11
+ npm: string;
12
+ };
13
+ title: string;
14
+ owner: string;
15
+ repository: string;
16
+ author?: string | undefined;
17
+ bin?: string | undefined;
18
+ contributors?: {
19
+ avatar_url: string;
20
+ contributions: string[];
21
+ login: string;
22
+ name: string;
23
+ profile: string;
24
+ }[] | undefined;
25
+ documentation?: string | undefined;
26
+ emoji?: string | undefined;
27
+ existingLabels?: {
28
+ name: string;
29
+ description: string;
30
+ color: string;
31
+ }[] | undefined;
32
+ explainer?: string[] | undefined;
33
+ funding?: string | undefined;
34
+ guide?: {
35
+ href: string;
36
+ title: string;
37
+ } | undefined;
38
+ keywords?: string[] | undefined;
39
+ logo?: {
40
+ alt: string;
41
+ src: string;
42
+ height?: number | undefined;
43
+ width?: number | undefined;
44
+ } | undefined;
45
+ node?: {
46
+ minimum: string;
47
+ pinned?: string | undefined;
48
+ } | undefined;
49
+ packageData?: {
50
+ dependencies?: Record<string, string> | undefined;
51
+ devDependencies?: Record<string, string> | undefined;
52
+ scripts?: Record<string, string> | undefined;
53
+ } | undefined;
54
+ pnpm?: string | undefined;
55
+ rulesetId?: string | undefined;
56
+ usage?: string | undefined;
57
+ version?: string | undefined;
58
+ }>;
59
+
60
+ export { blockRemoveDependencies };
@@ -0,0 +1,32 @@
1
+ import { z } from "zod";
2
+ import { base } from "../base.js";
3
+ import { resolveBin } from "../utils/resolveBin.js";
4
+ import { CommandPhase } from "./phases.js";
5
+ const blockRemoveDependencies = base.createBlock({
6
+ about: {
7
+ name: "Remove Dependencies"
8
+ },
9
+ addons: {
10
+ dependencies: z.array(z.string()).optional()
11
+ },
12
+ // TODO: Make produce() optional, so this empty-ish produce() can be removed
13
+ // https://github.com/JoshuaKGoldberg/bingo/issues/295
14
+ produce() {
15
+ return {};
16
+ },
17
+ transition({ addons }) {
18
+ return {
19
+ scripts: addons.dependencies ? [
20
+ {
21
+ commands: [
22
+ `node ${resolveBin("remove-dependencies/bin/index.js")} ${addons.dependencies.join(" ")}`
23
+ ],
24
+ phase: CommandPhase.Process
25
+ }
26
+ ] : void 0
27
+ };
28
+ }
29
+ });
30
+ export {
31
+ blockRemoveDependencies
32
+ };
@@ -0,0 +1,60 @@
1
+ import * as bingo_stratum from 'bingo-stratum';
2
+
3
+ declare const blockRemoveFiles: bingo_stratum.BlockWithAddons<{
4
+ files?: string[] | undefined;
5
+ }, {
6
+ access: "public" | "restricted";
7
+ description: string;
8
+ directory: string;
9
+ email: {
10
+ github: string;
11
+ npm: string;
12
+ };
13
+ title: string;
14
+ owner: string;
15
+ repository: string;
16
+ author?: string | undefined;
17
+ bin?: string | undefined;
18
+ contributors?: {
19
+ avatar_url: string;
20
+ contributions: string[];
21
+ login: string;
22
+ name: string;
23
+ profile: string;
24
+ }[] | undefined;
25
+ documentation?: string | undefined;
26
+ emoji?: string | undefined;
27
+ existingLabels?: {
28
+ name: string;
29
+ description: string;
30
+ color: string;
31
+ }[] | undefined;
32
+ explainer?: string[] | undefined;
33
+ funding?: string | undefined;
34
+ guide?: {
35
+ href: string;
36
+ title: string;
37
+ } | undefined;
38
+ keywords?: string[] | undefined;
39
+ logo?: {
40
+ alt: string;
41
+ src: string;
42
+ height?: number | undefined;
43
+ width?: number | undefined;
44
+ } | undefined;
45
+ node?: {
46
+ minimum: string;
47
+ pinned?: string | undefined;
48
+ } | undefined;
49
+ packageData?: {
50
+ dependencies?: Record<string, string> | undefined;
51
+ devDependencies?: Record<string, string> | undefined;
52
+ scripts?: Record<string, string> | undefined;
53
+ } | undefined;
54
+ pnpm?: string | undefined;
55
+ rulesetId?: string | undefined;
56
+ usage?: string | undefined;
57
+ version?: string | undefined;
58
+ }>;
59
+
60
+ export { blockRemoveFiles };
@@ -0,0 +1,33 @@
1
+ import { z } from "zod";
2
+ import { base } from "../base.js";
3
+ import { resolveBin } from "../utils/resolveBin.js";
4
+ import { CommandPhase } from "./phases.js";
5
+ const blockRemoveFiles = base.createBlock({
6
+ about: {
7
+ name: "Remove Files"
8
+ },
9
+ addons: {
10
+ files: z.array(z.string()).optional()
11
+ },
12
+ // TODO: Make produce() optional, so this empty-ish produce() can be removed
13
+ // https://github.com/JoshuaKGoldberg/bingo/issues/295
14
+ produce() {
15
+ return {};
16
+ },
17
+ transition({ addons }) {
18
+ return {
19
+ scripts: addons.files ? [
20
+ {
21
+ commands: [
22
+ `node ${resolveBin("trash-cli/cli.js")} ${addons.files.join(" ")}`
23
+ ],
24
+ phase: CommandPhase.Migrations,
25
+ silent: true
26
+ }
27
+ ] : void 0
28
+ };
29
+ }
30
+ });
31
+ export {
32
+ blockRemoveFiles
33
+ };
@@ -1,11 +1,12 @@
1
1
  import { z } from "zod";
2
2
  import { base } from "../base.js";
3
3
  import { getPackageDependencies } from "../data/packageData.js";
4
- import { resolveBin } from "../utils/resolveBin.js";
5
4
  import { blockDevelopmentDocs } from "./blockDevelopmentDocs.js";
6
5
  import { blockESLint } from "./blockESLint.js";
7
6
  import { blockGitHubActionsCI } from "./blockGitHubActionsCI.js";
8
7
  import { blockPackageJson } from "./blockPackageJson.js";
8
+ import { blockRemoveDependencies } from "./blockRemoveDependencies.js";
9
+ import { blockRemoveFiles } from "./blockRemoveFiles.js";
9
10
  import { CommandPhase } from "./phases.js";
10
11
  const blockTSup = base.createBlock({
11
12
  about: {
@@ -52,7 +53,8 @@ pnpm build --watch
52
53
  }
53
54
  ]
54
55
  }
55
- ]
56
+ ],
57
+ removedWorkflows: ["build", "tsup"]
56
58
  }),
57
59
  blockPackageJson({
58
60
  properties: {
@@ -86,18 +88,13 @@ export default defineConfig({
86
88
  },
87
89
  transition() {
88
90
  return {
89
- scripts: [
90
- {
91
- commands: [
92
- `node ${resolveBin("remove-dependencies/bin/index.js")} @babel/core babel`
93
- ],
94
- phase: CommandPhase.Process
95
- },
96
- {
97
- commands: ["rm -rf .babelrc* babel.config.* dist lib"],
98
- phase: CommandPhase.Migrations,
99
- silent: true
100
- }
91
+ addons: [
92
+ blockRemoveDependencies({
93
+ dependencies: ["@babel/core", "babel"]
94
+ }),
95
+ blockRemoveFiles({
96
+ files: [".babelrc*", "babel.config.*", "dist", "lib"]
97
+ })
101
98
  ]
102
99
  };
103
100
  }
@@ -67,7 +67,8 @@ export * from "./types.js";
67
67
  ignores: ["/lib"]
68
68
  }),
69
69
  blockGitHubActionsCI({
70
- jobs: [{ name: "Type Check", steps: [{ run: "pnpm tsc" }] }]
70
+ jobs: [{ name: "Type Check", steps: [{ run: "pnpm tsc" }] }],
71
+ removedWorkflows: ["tsc"]
71
72
  }),
72
73
  blockMarkdownlint({
73
74
  ignores: ["lib/"]
@@ -1,7 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { base } from "../base.js";
3
3
  import { getPackageDependencies } from "../data/packageData.js";
4
- import { resolveBin } from "../utils/resolveBin.js";
5
4
  import { blockCSpell } from "./blockCSpell.js";
6
5
  import { blockDevelopmentDocs } from "./blockDevelopmentDocs.js";
7
6
  import { blockESLint } from "./blockESLint.js";
@@ -10,9 +9,10 @@ import { blockGitHubActionsCI, zActionStep } from "./blockGitHubActionsCI.js";
10
9
  import { blockGitignore } from "./blockGitignore.js";
11
10
  import { blockPackageJson } from "./blockPackageJson.js";
12
11
  import { blockPrettier } from "./blockPrettier.js";
12
+ import { blockRemoveDependencies } from "./blockRemoveDependencies.js";
13
+ import { blockRemoveFiles } from "./blockRemoveFiles.js";
13
14
  import { blockTSup } from "./blockTSup.js";
14
15
  import { blockVSCode } from "./blockVSCode.js";
15
- import { CommandPhase } from "./phases.js";
16
16
  const blockVitest = base.createBlock({
17
17
  about: {
18
18
  name: "Vitest"
@@ -136,7 +136,8 @@ describe(greet, () => {
136
136
  name: "Test",
137
137
  steps: [{ run: "pnpm run test --coverage" }, ...actionSteps]
138
138
  }
139
- ]
139
+ ],
140
+ removedWorkflows: ["test"]
140
141
  }),
141
142
  blockPackageJson({
142
143
  properties: {
@@ -196,18 +197,18 @@ export default defineConfig({
196
197
  },
197
198
  transition() {
198
199
  return {
199
- scripts: [
200
- {
201
- commands: [
202
- `node ${resolveBin("remove-dependencies/bin/index.js")} eslint-plugin-jest eslint-plugin-mocha eslint-plugin-vitest jest mocha`
203
- ],
204
- phase: CommandPhase.Process
205
- },
206
- {
207
- commands: ["rm .mocha* jest.config.* vitest.config.*"],
208
- phase: CommandPhase.Migrations,
209
- silent: true
210
- }
200
+ addons: [
201
+ blockRemoveDependencies({
202
+ dependencies: [
203
+ "eslint-plugin-jest",
204
+ "eslint-plugin-mocha",
205
+ "eslint-plugin-vitest",
206
+ "jest mocha"
207
+ ]
208
+ }),
209
+ blockRemoveFiles({
210
+ files: [".mocha*", "jest.config.*", "vitest.config.{c,j,m}*"]
211
+ })
211
212
  ]
212
213
  };
213
214
  }
@@ -1132,6 +1132,7 @@ declare const blocks: {
1132
1132
  if?: string | undefined;
1133
1133
  checkoutWith?: Record<string, string> | undefined;
1134
1134
  }[] | undefined;
1135
+ removedWorkflows?: string[] | undefined;
1135
1136
  }, {
1136
1137
  access: "public" | "restricted";
1137
1138
  description: string;
@@ -1596,7 +1597,7 @@ declare const blocks: {
1596
1597
  keywords?: string[] | undefined;
1597
1598
  dependencies?: Record<string, string> | undefined;
1598
1599
  devDependencies?: Record<string, string> | undefined;
1599
- scripts?: Record<string, string> | undefined;
1600
+ scripts?: Record<string, string | undefined> | undefined;
1600
1601
  repository?: string | {
1601
1602
  type: string;
1602
1603
  url: string;
@@ -1,5 +1,5 @@
1
1
  var name = "create-typescript-app";
2
- var version = "2.8.0";
2
+ var version = "2.9.0";
3
3
  var description = "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁";
4
4
  var repository = {
5
5
  type: "git",
@@ -13,6 +13,8 @@ import { blockMITLicense } from "../blocks/blockMITLicense.js";
13
13
  import { blockPackageJson } from "../blocks/blockPackageJson.js";
14
14
  import { blockPrettier } from "../blocks/blockPrettier.js";
15
15
  import { blockREADME } from "../blocks/blockREADME.js";
16
+ import { blockRemoveDependencies } from "../blocks/blockRemoveDependencies.js";
17
+ import { blockRemoveFiles } from "../blocks/blockRemoveFiles.js";
16
18
  import { blockRepositoryBranchRuleset } from "../blocks/blockRepositoryBranchRuleset.js";
17
19
  import { blockRepositoryLabels } from "../blocks/blockRepositoryLabels.js";
18
20
  import { blockRepositorySecrets } from "../blocks/blockRepositorySecrets.js";
@@ -41,6 +43,8 @@ const presetMinimal = base.createPreset({
41
43
  blockPackageJson,
42
44
  blockPrettier,
43
45
  blockREADME,
46
+ blockRemoveDependencies,
47
+ blockRemoveFiles,
44
48
  blockRepositoryBranchRuleset,
45
49
  blockRepositoryLabels,
46
50
  blockRepositorySecrets,
package/lib/template.js CHANGED
@@ -1,4 +1,8 @@
1
1
  import { base } from "./base.js";
2
+ import { blockAreTheTypesWrong } from "./blocks/blockAreTheTypesWrong.js";
3
+ import { blockCTATransitions } from "./blocks/blockCTATransitions.js";
4
+ import { blockRemoveDependencies } from "./blocks/blockRemoveDependencies.js";
5
+ import { blockRemoveFiles } from "./blocks/blockRemoveFiles.js";
2
6
  import { presetCommon } from "./presets/common.js";
3
7
  import { presetEverything } from "./presets/everything.js";
4
8
  import { presetMinimal } from "./presets/minimal.js";
@@ -10,6 +14,12 @@ const template = base.createStratumTemplate({
10
14
  repository: "create-typescript-app"
11
15
  }
12
16
  },
17
+ blocks: [
18
+ blockAreTheTypesWrong,
19
+ blockCTATransitions,
20
+ blockRemoveDependencies,
21
+ blockRemoveFiles
22
+ ],
13
23
  presets: [presetMinimal, presetCommon, presetEverything],
14
24
  suggested: presetCommon
15
25
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-typescript-app",
3
- "version": "2.8.1",
3
+ "version": "2.9.1",
4
4
  "description": "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁",
5
5
  "repository": {
6
6
  "type": "git",