create-typescript-app 2.37.0 → 2.39.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/blocks/blockContributorCovenant.js +4 -0
- package/lib/blocks/blockGitHubActionsCI.d.ts +1 -0
- package/lib/blocks/blockGitHubActionsCI.js +32 -3
- package/lib/blocks/blockMarkdownlint.js +11 -6
- package/lib/blocks/blockReleaseIt.js +4 -0
- package/lib/blocks/index.d.ts +1 -0
- package/lib/data/packageData.d.ts +2 -2
- package/package.json +2 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { base } from "../base.js";
|
|
2
|
+
import { blockMarkdownlint } from "./blockMarkdownlint.js";
|
|
2
3
|
import { blockREADME } from "./blockREADME.js";
|
|
3
4
|
import { blockRemoveFiles } from "./blockRemoveFiles.js";
|
|
4
5
|
const blockContributorCovenant = base.createBlock({
|
|
@@ -8,6 +9,9 @@ const blockContributorCovenant = base.createBlock({
|
|
|
8
9
|
produce({ options }) {
|
|
9
10
|
return {
|
|
10
11
|
addons: [
|
|
12
|
+
blockMarkdownlint({
|
|
13
|
+
ignores: [".github/CODE_OF_CONDUCT.md"]
|
|
14
|
+
}),
|
|
11
15
|
blockREADME({
|
|
12
16
|
badges: [
|
|
13
17
|
{
|
|
@@ -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
|
+
nodeVersion?: string | number | undefined;
|
|
44
45
|
}, {
|
|
45
46
|
access: "public" | "restricted";
|
|
46
47
|
description: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _ from "lodash";
|
|
1
2
|
import { z } from "zod";
|
|
2
3
|
import { base } from "../base.js";
|
|
3
4
|
import { resolveUses } from "./actions/resolveUses.js";
|
|
@@ -6,6 +7,7 @@ import { blockRepositoryBranchRuleset } from "./blockRepositoryBranchRuleset.js"
|
|
|
6
7
|
import { createMultiWorkflowFile } from "./files/createMultiWorkflowFile.js";
|
|
7
8
|
import { createSoloWorkflowFile } from "./files/createSoloWorkflowFile.js";
|
|
8
9
|
import { formatYaml } from "./files/formatYaml.js";
|
|
10
|
+
import { intakeFileAsYaml } from "./intake/intakeFileAsYaml.js";
|
|
9
11
|
const zActionStep = z.intersection(
|
|
10
12
|
z.object({
|
|
11
13
|
env: z.record(z.string(), z.string()).optional(),
|
|
@@ -26,10 +28,37 @@ const blockGitHubActionsCI = base.createBlock({
|
|
|
26
28
|
name: z.string(),
|
|
27
29
|
steps: z.array(zActionStep)
|
|
28
30
|
})
|
|
29
|
-
).optional()
|
|
31
|
+
).optional(),
|
|
32
|
+
nodeVersion: z.union([z.number(), z.string()]).optional()
|
|
33
|
+
},
|
|
34
|
+
intake({ files }) {
|
|
35
|
+
const actionYml = intakeFileAsYaml(files, [
|
|
36
|
+
".github",
|
|
37
|
+
"actions",
|
|
38
|
+
"prepare",
|
|
39
|
+
"action.yml"
|
|
40
|
+
]);
|
|
41
|
+
if (!actionYml) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const steps = _.get(actionYml, ["runs", "steps"]);
|
|
45
|
+
if (!steps || !Array.isArray(steps)) {
|
|
46
|
+
return void 0;
|
|
47
|
+
}
|
|
48
|
+
const setupNodeStep = steps.find(
|
|
49
|
+
(step) => typeof step.uses === "string" && step.uses.startsWith("actions/setup-node")
|
|
50
|
+
);
|
|
51
|
+
if (!setupNodeStep) {
|
|
52
|
+
return void 0;
|
|
53
|
+
}
|
|
54
|
+
const nodeVersion = setupNodeStep.with?.["node-version"];
|
|
55
|
+
if (!nodeVersion) {
|
|
56
|
+
return void 0;
|
|
57
|
+
}
|
|
58
|
+
return { nodeVersion };
|
|
30
59
|
},
|
|
31
60
|
produce({ addons, options }) {
|
|
32
|
-
const { jobs } = addons;
|
|
61
|
+
const { jobs, nodeVersion = options.node.pinned ?? options.node.minimum } = addons;
|
|
33
62
|
return {
|
|
34
63
|
addons: [
|
|
35
64
|
blockRepositoryBranchRuleset({
|
|
@@ -60,7 +89,7 @@ const blockGitHubActionsCI = base.createBlock({
|
|
|
60
89
|
),
|
|
61
90
|
with: {
|
|
62
91
|
cache: "pnpm",
|
|
63
|
-
"node-version":
|
|
92
|
+
"node-version": nodeVersion
|
|
64
93
|
}
|
|
65
94
|
},
|
|
66
95
|
{
|
|
@@ -7,6 +7,7 @@ import { blockPackageJson } from "./blockPackageJson.js";
|
|
|
7
7
|
import { blockRemoveWorkflows } from "./blockRemoveWorkflows.js";
|
|
8
8
|
import { blockVSCode } from "./blockVSCode.js";
|
|
9
9
|
import { formatIgnoreFile } from "./files/formatIgnoreFile.js";
|
|
10
|
+
import { intakeFile } from "./intake/intakeFile.js";
|
|
10
11
|
import { CommandPhase } from "./phases.js";
|
|
11
12
|
const blockMarkdownlint = base.createBlock({
|
|
12
13
|
about: {
|
|
@@ -15,6 +16,15 @@ const blockMarkdownlint = base.createBlock({
|
|
|
15
16
|
addons: {
|
|
16
17
|
ignores: z.array(z.string()).default([])
|
|
17
18
|
},
|
|
19
|
+
intake({ files }) {
|
|
20
|
+
const markdownlintignoreRaw = intakeFile(files, [".markdownlintignore"]);
|
|
21
|
+
if (!markdownlintignoreRaw) {
|
|
22
|
+
return void 0;
|
|
23
|
+
}
|
|
24
|
+
return {
|
|
25
|
+
ignores: markdownlintignoreRaw[0].split("\n").filter(Boolean)
|
|
26
|
+
};
|
|
27
|
+
},
|
|
18
28
|
produce({ addons }) {
|
|
19
29
|
const { ignores } = addons;
|
|
20
30
|
return {
|
|
@@ -61,12 +71,7 @@ const blockMarkdownlint = base.createBlock({
|
|
|
61
71
|
"no-inline-html": false
|
|
62
72
|
}),
|
|
63
73
|
".markdownlintignore": formatIgnoreFile(
|
|
64
|
-
[
|
|
65
|
-
".github/CODE_OF_CONDUCT.md",
|
|
66
|
-
"CHANGELOG.md",
|
|
67
|
-
"node_modules/",
|
|
68
|
-
...ignores
|
|
69
|
-
].sort()
|
|
74
|
+
Array.from(/* @__PURE__ */ new Set(["node_modules/", ...ignores])).sort()
|
|
70
75
|
)
|
|
71
76
|
},
|
|
72
77
|
scripts: [
|
|
@@ -2,6 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
import { base } from "../base.js";
|
|
3
3
|
import { getPackageDependencies } from "../data/packageData.js";
|
|
4
4
|
import { resolveUses } from "./actions/resolveUses.js";
|
|
5
|
+
import { blockMarkdownlint } from "./blockMarkdownlint.js";
|
|
5
6
|
import { blockPackageJson } from "./blockPackageJson.js";
|
|
6
7
|
import { blockREADME } from "./blockREADME.js";
|
|
7
8
|
import { blockRepositorySecrets } from "./blockRepositorySecrets.js";
|
|
@@ -22,6 +23,9 @@ const blockReleaseIt = base.createBlock({
|
|
|
22
23
|
const { builders } = addons;
|
|
23
24
|
return {
|
|
24
25
|
addons: [
|
|
26
|
+
blockMarkdownlint({
|
|
27
|
+
ignores: ["CHANGELOG.md"]
|
|
28
|
+
}),
|
|
25
29
|
blockPackageJson({
|
|
26
30
|
properties: {
|
|
27
31
|
devDependencies: getPackageDependencies(
|
package/lib/blocks/index.d.ts
CHANGED
|
@@ -1473,6 +1473,7 @@ declare const blocks: {
|
|
|
1473
1473
|
if?: string | undefined;
|
|
1474
1474
|
checkoutWith?: Record<string, string> | undefined;
|
|
1475
1475
|
}[] | undefined;
|
|
1476
|
+
nodeVersion?: string | number | undefined;
|
|
1476
1477
|
}, {
|
|
1477
1478
|
access: "public" | "restricted";
|
|
1478
1479
|
description: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var name = "create-typescript-app";
|
|
2
|
-
var version = "2.
|
|
2
|
+
var version = "2.38.0";
|
|
3
3
|
var description = "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁";
|
|
4
4
|
var repository = {
|
|
5
5
|
type: "git",
|
|
@@ -95,7 +95,7 @@ var devDependencies = {
|
|
|
95
95
|
"eslint-plugin-markdown": "5.1.0",
|
|
96
96
|
"eslint-plugin-n": "17.16.2",
|
|
97
97
|
"eslint-plugin-package-json": "0.29.0",
|
|
98
|
-
"eslint-plugin-perfectionist": "4.
|
|
98
|
+
"eslint-plugin-perfectionist": "4.11.0",
|
|
99
99
|
"eslint-plugin-regexp": "2.7.0",
|
|
100
100
|
"eslint-plugin-yml": "1.17.0",
|
|
101
101
|
husky: "9.1.7",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-typescript-app",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.39.0",
|
|
4
4
|
"description": "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"eslint-plugin-markdown": "5.1.0",
|
|
100
100
|
"eslint-plugin-n": "17.16.2",
|
|
101
101
|
"eslint-plugin-package-json": "0.29.0",
|
|
102
|
-
"eslint-plugin-perfectionist": "4.
|
|
102
|
+
"eslint-plugin-perfectionist": "4.11.0",
|
|
103
103
|
"eslint-plugin-regexp": "2.7.0",
|
|
104
104
|
"eslint-plugin-yml": "1.17.0",
|
|
105
105
|
"husky": "9.1.7",
|