create-typescript-app 2.23.1 → 2.24.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.d.ts
CHANGED
|
@@ -13,16 +13,16 @@ declare const base: bingo_stratum.Base<{
|
|
|
13
13
|
name: z.ZodString;
|
|
14
14
|
profile: z.ZodString;
|
|
15
15
|
}, "strip", z.ZodTypeAny, {
|
|
16
|
-
name: string;
|
|
17
16
|
avatar_url: string;
|
|
18
17
|
contributions: string[];
|
|
19
18
|
login: string;
|
|
19
|
+
name: string;
|
|
20
20
|
profile: string;
|
|
21
21
|
}, {
|
|
22
|
-
name: string;
|
|
23
22
|
avatar_url: string;
|
|
24
23
|
contributions: string[];
|
|
25
24
|
login: string;
|
|
25
|
+
name: string;
|
|
26
26
|
profile: string;
|
|
27
27
|
}>, "many">>;
|
|
28
28
|
description: z.ZodDefault<z.ZodString>;
|
|
@@ -88,11 +88,11 @@ declare const base: bingo_stratum.Base<{
|
|
|
88
88
|
href: z.ZodString;
|
|
89
89
|
title: z.ZodString;
|
|
90
90
|
}, "strip", z.ZodTypeAny, {
|
|
91
|
-
title: string;
|
|
92
91
|
href: string;
|
|
93
|
-
}, {
|
|
94
92
|
title: string;
|
|
93
|
+
}, {
|
|
95
94
|
href: string;
|
|
95
|
+
title: string;
|
|
96
96
|
}>>;
|
|
97
97
|
keywords: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
98
98
|
logo: z.ZodOptional<z.ZodObject<{
|
|
@@ -131,15 +131,15 @@ declare const base: bingo_stratum.Base<{
|
|
|
131
131
|
}, "strip", z.ZodTypeAny, {
|
|
132
132
|
dependencies?: Record<string, string> | undefined;
|
|
133
133
|
devDependencies?: Record<string, string> | undefined;
|
|
134
|
-
scripts?: Record<string, string> | undefined;
|
|
135
134
|
peerDependencies?: Record<string, string> | undefined;
|
|
136
135
|
peerDependenciesMeta?: Record<string, unknown> | undefined;
|
|
136
|
+
scripts?: Record<string, string> | undefined;
|
|
137
137
|
}, {
|
|
138
138
|
dependencies?: Record<string, string> | undefined;
|
|
139
139
|
devDependencies?: Record<string, string> | undefined;
|
|
140
|
-
scripts?: Record<string, string> | undefined;
|
|
141
140
|
peerDependencies?: Record<string, string> | undefined;
|
|
142
141
|
peerDependenciesMeta?: Record<string, unknown> | undefined;
|
|
142
|
+
scripts?: Record<string, string> | undefined;
|
|
143
143
|
}>>;
|
|
144
144
|
pnpm: z.ZodOptional<z.ZodString>;
|
|
145
145
|
repository: z.ZodString;
|
|
@@ -25,10 +25,11 @@ const blockPrettier = base.createBlock({
|
|
|
25
25
|
})
|
|
26
26
|
})
|
|
27
27
|
).default([]),
|
|
28
|
-
plugins: z.array(z.string()).default([])
|
|
28
|
+
plugins: z.array(z.string()).default([]),
|
|
29
|
+
runBefore: z.array(z.string()).default([])
|
|
29
30
|
},
|
|
30
31
|
produce({ addons }) {
|
|
31
|
-
const { ignores, overrides, plugins } = addons;
|
|
32
|
+
const { ignores, overrides, plugins, runBefore } = addons;
|
|
32
33
|
return {
|
|
33
34
|
addons: [
|
|
34
35
|
blockCSpell({
|
|
@@ -54,14 +55,17 @@ pnpm format --write
|
|
|
54
55
|
jobs: [
|
|
55
56
|
{
|
|
56
57
|
name: "Prettier",
|
|
57
|
-
steps: [
|
|
58
|
+
steps: [
|
|
59
|
+
...runBefore.map((run) => ({ run })),
|
|
60
|
+
{ run: "pnpm format --list-different" }
|
|
61
|
+
]
|
|
58
62
|
}
|
|
59
63
|
]
|
|
60
64
|
}),
|
|
61
65
|
blockPackageJson({
|
|
62
66
|
properties: {
|
|
63
67
|
devDependencies: getPackageDependencies(
|
|
64
|
-
...plugins,
|
|
68
|
+
...plugins.filter((plugin) => !plugin.startsWith(".")),
|
|
65
69
|
"husky",
|
|
66
70
|
"lint-staged",
|
|
67
71
|
"prettier"
|
|
@@ -97,7 +101,7 @@ pnpm format --write
|
|
|
97
101
|
},
|
|
98
102
|
scripts: [
|
|
99
103
|
{
|
|
100
|
-
commands: ["pnpm format --write"],
|
|
104
|
+
commands: [...runBefore, "pnpm format --write"],
|
|
101
105
|
phase: CommandPhase.Format
|
|
102
106
|
}
|
|
103
107
|
]
|
|
@@ -110,7 +114,11 @@ pnpm format --write
|
|
|
110
114
|
dependencies: ["eslint-config-prettier", "eslint-plugin-prettier"]
|
|
111
115
|
}),
|
|
112
116
|
blockRemoveFiles({
|
|
113
|
-
files: [
|
|
117
|
+
files: [
|
|
118
|
+
".prettierrc",
|
|
119
|
+
".prettierrc.{c*,js,m*,t*}",
|
|
120
|
+
"prettier.config*"
|
|
121
|
+
]
|
|
114
122
|
}),
|
|
115
123
|
blockRemoveWorkflows({
|
|
116
124
|
workflows: ["format", "prettier"]
|
package/lib/blocks/index.d.ts
CHANGED
package/lib/data/packageData.js
CHANGED
|
@@ -15,7 +15,7 @@ function getPackageDependency(name) {
|
|
|
15
15
|
const version = getPackageInner("devDependencies", name) ?? getPackageInner("dependencies", name);
|
|
16
16
|
if (!version) {
|
|
17
17
|
throw new Error(
|
|
18
|
-
`'${name} is neither in package.json's dependencies nor its devDependencies.`
|
|
18
|
+
`'${name}' is neither in package.json's dependencies nor its devDependencies.`
|
|
19
19
|
);
|
|
20
20
|
}
|
|
21
21
|
return version;
|
package/lib/schemas.d.ts
CHANGED
|
@@ -7,16 +7,16 @@ declare const zContributor: z.ZodObject<{
|
|
|
7
7
|
name: z.ZodString;
|
|
8
8
|
profile: z.ZodString;
|
|
9
9
|
}, "strip", z.ZodTypeAny, {
|
|
10
|
-
name: string;
|
|
11
10
|
avatar_url: string;
|
|
12
11
|
contributions: string[];
|
|
13
12
|
login: string;
|
|
13
|
+
name: string;
|
|
14
14
|
profile: string;
|
|
15
15
|
}, {
|
|
16
|
-
name: string;
|
|
17
16
|
avatar_url: string;
|
|
18
17
|
contributions: string[];
|
|
19
18
|
login: string;
|
|
19
|
+
name: string;
|
|
20
20
|
profile: string;
|
|
21
21
|
}>;
|
|
22
22
|
type Contributor = z.infer<typeof zContributor>;
|