create-typescript-app 2.29.3 → 2.31.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.
- package/lib/base.d.ts +7 -7
- package/lib/base.js +1 -1
- package/lib/blocks/blockAllContributors.d.ts +1 -1
- package/lib/blocks/blockAreTheTypesWrong.d.ts +1 -1
- package/lib/blocks/blockCSpell.d.ts +1 -1
- package/lib/blocks/blockCTATransitions.d.ts +1 -1
- package/lib/blocks/blockCodecov.d.ts +1 -1
- package/lib/blocks/blockContributingDocs.d.ts +1 -1
- package/lib/blocks/blockContributorCovenant.d.ts +1 -1
- package/lib/blocks/blockDevelopmentDocs.d.ts +1 -1
- package/lib/blocks/blockESLint.d.ts +2 -2
- package/lib/blocks/blockESLintComments.d.ts +1 -1
- package/lib/blocks/blockESLintJSDoc.d.ts +1 -1
- package/lib/blocks/blockESLintJSONC.d.ts +1 -1
- package/lib/blocks/blockESLintMarkdown.d.ts +1 -1
- package/lib/blocks/blockESLintMoreStyling.d.ts +1 -1
- package/lib/blocks/blockESLintNode.d.ts +1 -1
- package/lib/blocks/blockESLintPackageJson.d.ts +1 -1
- package/lib/blocks/blockESLintPerfectionist.d.ts +1 -1
- package/lib/blocks/blockESLintPlugin.d.ts +1 -1
- package/lib/blocks/blockESLintRegexp.d.ts +1 -1
- package/lib/blocks/blockESLintYML.d.ts +1 -1
- package/lib/blocks/blockExampleFiles.d.ts +1 -1
- package/lib/blocks/blockFunding.d.ts +1 -1
- package/lib/blocks/blockGitHubActionsCI.d.ts +2 -2
- package/lib/blocks/blockGitHubApps.d.ts +1 -1
- package/lib/blocks/blockGitHubIssueTemplates.d.ts +1 -1
- package/lib/blocks/blockGitHubPRTemplate.d.ts +1 -1
- package/lib/blocks/blockGitignore.d.ts +1 -1
- package/lib/blocks/blockKnip.d.ts +1 -1
- package/lib/blocks/blockMITLicense.d.ts +1 -1
- package/lib/blocks/blockMain.d.ts +1 -1
- package/lib/blocks/blockMarkdownlint.d.ts +1 -1
- package/lib/blocks/blockNcc.d.ts +4 -2
- package/lib/blocks/blockNcc.js +15 -3
- package/lib/blocks/blockNvmrc.d.ts +1 -1
- package/lib/blocks/blockPRCompliance.d.ts +1 -1
- package/lib/blocks/blockPackageJson.d.ts +2 -2
- package/lib/blocks/blockPnpmDedupe.d.ts +1 -1
- package/lib/blocks/blockPrettier.d.ts +1 -1
- package/lib/blocks/blockPrettierPluginCurly.d.ts +1 -1
- package/lib/blocks/blockPrettierPluginPackageJson.d.ts +1 -1
- package/lib/blocks/blockPrettierPluginSh.d.ts +1 -1
- package/lib/blocks/blockREADME.d.ts +1 -1
- package/lib/blocks/blockReleaseIt.d.ts +2 -2
- package/lib/blocks/blockRemoveDependencies.d.ts +1 -1
- package/lib/blocks/blockRemoveFiles.d.ts +1 -1
- package/lib/blocks/blockRemoveWorkflows.d.ts +1 -1
- package/lib/blocks/blockRenovate.d.ts +1 -1
- package/lib/blocks/blockRepositoryBranchRuleset.d.ts +1 -1
- package/lib/blocks/blockRepositoryLabels.d.ts +1 -1
- package/lib/blocks/blockRepositorySecrets.d.ts +1 -1
- package/lib/blocks/blockRepositorySettings.d.ts +1 -1
- package/lib/blocks/blockSecurityDocs.d.ts +1 -1
- package/lib/blocks/blockTSup.d.ts +1 -1
- package/lib/blocks/blockTemplatedWith.d.ts +1 -1
- package/lib/blocks/blockTypeScript.d.ts +1 -1
- package/lib/blocks/blockVSCode.d.ts +1 -1
- package/lib/blocks/blockVitest.d.ts +5 -5
- package/lib/blocks/blockVitest.js +31 -22
- package/lib/blocks/blockWebExt.d.ts +1 -1
- package/lib/blocks/index.d.ts +58 -56
- package/lib/data/packageData.d.ts +3 -3
- package/lib/index.d.ts +4 -4
- package/lib/presets/common.d.ts +3 -3
- package/lib/presets/everything.d.ts +3 -3
- package/lib/presets/index.d.ts +9 -9
- package/lib/presets/minimal.d.ts +3 -3
- package/lib/schemas.d.ts +2 -2
- package/lib/template.d.ts +3 -3
- package/package.json +3 -3
|
@@ -57,7 +57,7 @@ declare const blockRenovate: bingo_stratum.BlockWithoutAddons<{
|
|
|
57
57
|
devDependencies?: Record<string, string> | undefined;
|
|
58
58
|
peerDependencies?: Record<string, string> | undefined;
|
|
59
59
|
peerDependenciesMeta?: Record<string, unknown> | undefined;
|
|
60
|
-
scripts?: Record<string, string> | undefined;
|
|
60
|
+
scripts?: Record<string, string | undefined> | undefined;
|
|
61
61
|
} | undefined;
|
|
62
62
|
pnpm?: string | undefined;
|
|
63
63
|
rulesetId?: string | undefined;
|
|
@@ -59,7 +59,7 @@ declare const blockRepositoryBranchRuleset: bingo_stratum.BlockWithAddons<{
|
|
|
59
59
|
devDependencies?: Record<string, string> | undefined;
|
|
60
60
|
peerDependencies?: Record<string, string> | undefined;
|
|
61
61
|
peerDependenciesMeta?: Record<string, unknown> | undefined;
|
|
62
|
-
scripts?: Record<string, string> | undefined;
|
|
62
|
+
scripts?: Record<string, string | undefined> | undefined;
|
|
63
63
|
} | undefined;
|
|
64
64
|
pnpm?: string | undefined;
|
|
65
65
|
rulesetId?: string | undefined;
|
|
@@ -57,7 +57,7 @@ declare const blockRepositoryLabels: bingo_stratum.BlockWithoutAddons<{
|
|
|
57
57
|
devDependencies?: Record<string, string> | undefined;
|
|
58
58
|
peerDependencies?: Record<string, string> | undefined;
|
|
59
59
|
peerDependenciesMeta?: Record<string, unknown> | undefined;
|
|
60
|
-
scripts?: Record<string, string> | undefined;
|
|
60
|
+
scripts?: Record<string, string | undefined> | undefined;
|
|
61
61
|
} | undefined;
|
|
62
62
|
pnpm?: string | undefined;
|
|
63
63
|
rulesetId?: string | undefined;
|
|
@@ -62,7 +62,7 @@ declare const blockRepositorySecrets: bingo_stratum.BlockWithAddons<{
|
|
|
62
62
|
devDependencies?: Record<string, string> | undefined;
|
|
63
63
|
peerDependencies?: Record<string, string> | undefined;
|
|
64
64
|
peerDependenciesMeta?: Record<string, unknown> | undefined;
|
|
65
|
-
scripts?: Record<string, string> | undefined;
|
|
65
|
+
scripts?: Record<string, string | undefined> | undefined;
|
|
66
66
|
} | undefined;
|
|
67
67
|
pnpm?: string | undefined;
|
|
68
68
|
rulesetId?: string | undefined;
|
|
@@ -57,7 +57,7 @@ declare const blockRepositorySettings: bingo_stratum.BlockWithoutAddons<{
|
|
|
57
57
|
devDependencies?: Record<string, string> | undefined;
|
|
58
58
|
peerDependencies?: Record<string, string> | undefined;
|
|
59
59
|
peerDependenciesMeta?: Record<string, unknown> | undefined;
|
|
60
|
-
scripts?: Record<string, string> | undefined;
|
|
60
|
+
scripts?: Record<string, string | undefined> | undefined;
|
|
61
61
|
} | undefined;
|
|
62
62
|
pnpm?: string | undefined;
|
|
63
63
|
rulesetId?: string | undefined;
|
|
@@ -57,7 +57,7 @@ declare const blockSecurityDocs: bingo_stratum.BlockWithoutAddons<{
|
|
|
57
57
|
devDependencies?: Record<string, string> | undefined;
|
|
58
58
|
peerDependencies?: Record<string, string> | undefined;
|
|
59
59
|
peerDependenciesMeta?: Record<string, unknown> | undefined;
|
|
60
|
-
scripts?: Record<string, string> | undefined;
|
|
60
|
+
scripts?: Record<string, string | undefined> | undefined;
|
|
61
61
|
} | undefined;
|
|
62
62
|
pnpm?: string | undefined;
|
|
63
63
|
rulesetId?: string | undefined;
|
|
@@ -61,7 +61,7 @@ declare const blockTSup: bingo_stratum.BlockWithAddons<{
|
|
|
61
61
|
devDependencies?: Record<string, string> | undefined;
|
|
62
62
|
peerDependencies?: Record<string, string> | undefined;
|
|
63
63
|
peerDependenciesMeta?: Record<string, unknown> | undefined;
|
|
64
|
-
scripts?: Record<string, string> | undefined;
|
|
64
|
+
scripts?: Record<string, string | undefined> | undefined;
|
|
65
65
|
} | undefined;
|
|
66
66
|
pnpm?: string | undefined;
|
|
67
67
|
rulesetId?: string | undefined;
|
|
@@ -57,7 +57,7 @@ declare const blockTemplatedWith: bingo_stratum.BlockWithoutAddons<{
|
|
|
57
57
|
devDependencies?: Record<string, string> | undefined;
|
|
58
58
|
peerDependencies?: Record<string, string> | undefined;
|
|
59
59
|
peerDependenciesMeta?: Record<string, unknown> | undefined;
|
|
60
|
-
scripts?: Record<string, string> | undefined;
|
|
60
|
+
scripts?: Record<string, string | undefined> | undefined;
|
|
61
61
|
} | undefined;
|
|
62
62
|
pnpm?: string | undefined;
|
|
63
63
|
rulesetId?: string | undefined;
|
|
@@ -169,7 +169,7 @@ declare const blockTypeScript: bingo_stratum.BlockWithAddons<{
|
|
|
169
169
|
devDependencies?: Record<string, string> | undefined;
|
|
170
170
|
peerDependencies?: Record<string, string> | undefined;
|
|
171
171
|
peerDependenciesMeta?: Record<string, unknown> | undefined;
|
|
172
|
-
scripts?: Record<string, string> | undefined;
|
|
172
|
+
scripts?: Record<string, string | undefined> | undefined;
|
|
173
173
|
} | undefined;
|
|
174
174
|
pnpm?: string | undefined;
|
|
175
175
|
rulesetId?: string | undefined;
|
|
@@ -66,7 +66,7 @@ declare const blockVSCode: bingo_stratum.BlockWithAddons<{
|
|
|
66
66
|
devDependencies?: Record<string, string> | undefined;
|
|
67
67
|
peerDependencies?: Record<string, string> | undefined;
|
|
68
68
|
peerDependenciesMeta?: Record<string, unknown> | undefined;
|
|
69
|
-
scripts?: Record<string, string> | undefined;
|
|
69
|
+
scripts?: Record<string, string | undefined> | undefined;
|
|
70
70
|
} | undefined;
|
|
71
71
|
pnpm?: string | undefined;
|
|
72
72
|
rulesetId?: string | undefined;
|
|
@@ -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
|
environment?: string | undefined;
|
|
20
20
|
}, {
|
|
@@ -74,7 +74,7 @@ declare const blockVitest: bingo_stratum.BlockWithAddons<{
|
|
|
74
74
|
devDependencies?: Record<string, string> | undefined;
|
|
75
75
|
peerDependencies?: Record<string, string> | undefined;
|
|
76
76
|
peerDependenciesMeta?: Record<string, unknown> | undefined;
|
|
77
|
-
scripts?: Record<string, string> | undefined;
|
|
77
|
+
scripts?: Record<string, string | undefined> | undefined;
|
|
78
78
|
} | undefined;
|
|
79
79
|
pnpm?: string | undefined;
|
|
80
80
|
rulesetId?: string | undefined;
|
|
@@ -28,11 +28,37 @@ const zCoverage = z.object({
|
|
|
28
28
|
exclude: z.array(z.string()).optional(),
|
|
29
29
|
include: z.array(z.string()).optional()
|
|
30
30
|
});
|
|
31
|
+
const zEnvironment = z.string();
|
|
31
32
|
const zExclude = z.array(z.string());
|
|
32
33
|
const zTest = z.object({
|
|
33
34
|
coverage: zCoverage,
|
|
35
|
+
environment: zEnvironment,
|
|
34
36
|
exclude: zExclude
|
|
35
|
-
});
|
|
37
|
+
}).partial();
|
|
38
|
+
function intakeFromConfig(files) {
|
|
39
|
+
const file = intakeFile(files, ["vitest.config.ts"]);
|
|
40
|
+
if (!file) {
|
|
41
|
+
return void 0;
|
|
42
|
+
}
|
|
43
|
+
const normalized = file[0].replaceAll(/[\n\r]/g, "");
|
|
44
|
+
const matched = /defineConfig\(\{(.+)\}\)\s*(?:;\s*)?$/u.exec(normalized);
|
|
45
|
+
if (!matched) {
|
|
46
|
+
return void 0;
|
|
47
|
+
}
|
|
48
|
+
const rawData = tryParseJSON5(`{${matched[1]}}`);
|
|
49
|
+
if (typeof rawData !== "object" || typeof rawData.test !== "object") {
|
|
50
|
+
return void 0;
|
|
51
|
+
}
|
|
52
|
+
const parsedData = zTest.safeParse(rawData.test).data;
|
|
53
|
+
if (!parsedData) {
|
|
54
|
+
return void 0;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
coverage: parsedData.coverage,
|
|
58
|
+
environment: parsedData.environment,
|
|
59
|
+
exclude: parsedData.exclude
|
|
60
|
+
};
|
|
61
|
+
}
|
|
36
62
|
const blockVitest = base.createBlock({
|
|
37
63
|
about: {
|
|
38
64
|
name: "Vitest"
|
|
@@ -40,31 +66,14 @@ const blockVitest = base.createBlock({
|
|
|
40
66
|
addons: {
|
|
41
67
|
actionSteps: z.array(zActionStep).default([]),
|
|
42
68
|
coverage: zCoverage.default({}),
|
|
43
|
-
environment:
|
|
69
|
+
environment: zEnvironment.optional(),
|
|
44
70
|
exclude: zExclude.default([]),
|
|
45
71
|
flags: z.array(z.string()).default([])
|
|
46
72
|
},
|
|
47
|
-
intake({ files }) {
|
|
48
|
-
const file = intakeFile(files, ["vitest.config.ts"]);
|
|
49
|
-
if (!file) {
|
|
50
|
-
return void 0;
|
|
51
|
-
}
|
|
52
|
-
const normalized = file[0].replaceAll(/[\n\r]/g, "");
|
|
53
|
-
const matched = /defineConfig\(\{(.+)\}\)\s*(?:;\s*)?$/u.exec(normalized);
|
|
54
|
-
if (!matched) {
|
|
55
|
-
return void 0;
|
|
56
|
-
}
|
|
57
|
-
const rawData = tryParseJSON5(`{${matched[1]}}`);
|
|
58
|
-
if (typeof rawData !== "object" || typeof rawData.test !== "object") {
|
|
59
|
-
return void 0;
|
|
60
|
-
}
|
|
61
|
-
const parsedData = zTest.safeParse(rawData.test).data;
|
|
62
|
-
if (!parsedData) {
|
|
63
|
-
return void 0;
|
|
64
|
-
}
|
|
73
|
+
intake({ files, options }) {
|
|
65
74
|
return {
|
|
66
|
-
|
|
67
|
-
|
|
75
|
+
...intakeFromConfig(files),
|
|
76
|
+
flags: options.packageData?.scripts?.test?.match(/^vitest (.+)/)?.[1].split(" ")
|
|
68
77
|
};
|
|
69
78
|
},
|
|
70
79
|
produce({ addons }) {
|
|
@@ -57,7 +57,7 @@ declare const blockWebExt: bingo_stratum.BlockWithoutAddons<{
|
|
|
57
57
|
devDependencies?: Record<string, string> | undefined;
|
|
58
58
|
peerDependencies?: Record<string, string> | undefined;
|
|
59
59
|
peerDependenciesMeta?: Record<string, unknown> | undefined;
|
|
60
|
-
scripts?: Record<string, string> | undefined;
|
|
60
|
+
scripts?: Record<string, string | undefined> | undefined;
|
|
61
61
|
} | undefined;
|
|
62
62
|
pnpm?: string | undefined;
|
|
63
63
|
rulesetId?: string | undefined;
|