create-typescript-app 2.69.1 → 2.71.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.
@@ -6,7 +6,6 @@ import { createSoloWorkflowFile } from "./files/createSoloWorkflowFile.mjs";
6
6
  import { withPreviously } from "./files/withPreviously.mjs";
7
7
  import { blockREADME } from "./blockREADME.mjs";
8
8
  import { blockPrettier } from "./blockPrettier.mjs";
9
- import { blockRepositorySecrets } from "./blockRepositorySecrets.mjs";
10
9
  import _ from "lodash";
11
10
  import { contributionTypes, createContributionLink, isContributionTypeName } from "all-contributors-types";
12
11
  //#region src/blocks/blockAllContributors.ts
@@ -16,32 +15,25 @@ const blockAllContributors = base.createBlock({
16
15
  const contributions = options.contributors?.length;
17
16
  const ownerContributions = Array.from(new Set([options.contributors?.find((contributor) => contributor.login.toLowerCase() === options.owner.toLowerCase())?.contributions, startingOwnerContributions].filter(Boolean).flat()));
18
17
  return {
19
- addons: [
20
- blockPrettier({ ignores: ["/.all-contributorsrc"] }),
21
- blockREADME({
22
- badges: [{
23
- alt: `👪 All Contributors: ${contributions}`,
24
- comments: {
25
- after: `
18
+ addons: [blockPrettier({ ignores: ["/.all-contributorsrc"] }), blockREADME({
19
+ badges: [{
20
+ alt: `👪 All Contributors: ${contributions}`,
21
+ comments: {
22
+ after: `
26
23
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
27
24
  \t<!-- prettier-ignore-end -->`,
28
- before: `<!-- prettier-ignore-start -->
25
+ before: `<!-- prettier-ignore-start -->
29
26
  \t<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
30
27
  \t`
31
- },
32
- href: "#contributors",
33
- src: `https://img.shields.io/badge/%F0%9F%91%AA_all_contributors-${contributions}-21bb42.svg`
34
- }],
35
- sections: options.contributors ? [printAllContributorsTable(options.contributors, {
36
- projectName: options.repository,
37
- projectOwner: options.owner
38
- })] : void 0
39
- }),
40
- blockRepositorySecrets({ secrets: [{
41
- description: "a GitHub PAT with repo and workflow permissions",
42
- name: "ACCESS_TOKEN"
43
- }] })
44
- ],
28
+ },
29
+ href: "#contributors",
30
+ src: `https://img.shields.io/badge/%F0%9F%91%AA_all_contributors-${contributions}-21bb42.svg`
31
+ }],
32
+ sections: options.contributors ? [printAllContributorsTable(options.contributors, {
33
+ projectName: options.repository,
34
+ projectOwner: options.owner
35
+ })] : void 0
36
+ })],
45
37
  files: {
46
38
  ".all-contributorsrc": JSON.stringify({
47
39
  badgeTemplate: " <a href=\"#contributors\" target=\"_blank\"><img alt=\"👪 All Contributors: <%= contributors.length %>\" src=\"https://img.shields.io/badge/%F0%9F%91%AA_all_contributors-<%= contributors.length %>-21bb42.svg\" /></a>",
@@ -57,17 +49,16 @@ const blockAllContributors = base.createBlock({
57
49
  ".github": { workflows: { "contributors.yaml": withPreviously(createSoloWorkflowFile({
58
50
  name: "Contributors",
59
51
  on: { push: { branches: ["main"] } },
60
- steps: [
61
- {
62
- uses: resolveUses("actions/checkout", "v4", options.workflowsVersions),
63
- with: { "fetch-depth": 0 }
64
- },
65
- { uses: "./.github/actions/prepare" },
66
- {
67
- env: { GITHUB_TOKEN: "${{ secrets.ACCESS_TOKEN }}" },
68
- uses: resolveUses("JoshuaKGoldberg/all-contributors-auto-action", "v0.5.0", options.workflowsVersions)
69
- }
70
- ]
52
+ permissions: {
53
+ actions: "read",
54
+ contents: "read",
55
+ issues: "write",
56
+ "pull-requests": "write"
57
+ },
58
+ steps: [{
59
+ env: { GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" },
60
+ uses: resolveUses("JoshuaKGoldberg/all-contributors-auto-action", "v0.7.0", options.workflowsVersions)
61
+ }]
71
62
  }), ["contributors.yml"]) } }
72
63
  },
73
64
  scripts: [{
@@ -7,6 +7,7 @@ import { createSoloWorkflowFile } from "./files/createSoloWorkflowFile.mjs";
7
7
  import { withPreviously } from "./files/withPreviously.mjs";
8
8
  import { blockPackageJson } from "./blockPackageJson.mjs";
9
9
  import { blockCSpell } from "./blockCSpell.mjs";
10
+ import { blockRepositorySecrets } from "./blockRepositorySecrets.mjs";
10
11
  //#region src/blocks/blockCTATransitions.ts
11
12
  const blockCTATransitions = base.createBlock({
12
13
  about: { name: "CTA Transitions" },
@@ -19,7 +20,11 @@ const blockCTATransitions = base.createBlock({
19
20
  "stefanzweifel"
20
21
  ] }),
21
22
  blockPackageJson({ properties: { devDependencies: { "create-typescript-app": packageData.version } } }),
22
- blockRepositoryBranchRuleset({ requiredStatusChecks: ["Transition"] })
23
+ blockRepositoryBranchRuleset({ requiredStatusChecks: ["Transition"] }),
24
+ blockRepositorySecrets({ secrets: [{
25
+ description: "a GitHub PAT with repo and workflow permissions",
26
+ name: "ACCESS_TOKEN"
27
+ }] })
23
28
  ],
24
29
  files: { ".github": {
25
30
  actions: { transition: { "action.yaml": withPreviously(formatYaml({
@@ -31,6 +31,7 @@ const blockGitHubActionsCI = base.createBlock({
31
31
  }
32
32
  }, { run: "pnpm install --prod --engine-strict --ignore-scripts" }]
33
33
  }].toSorted((a, b) => a.name.localeCompare(b.name));
34
+ const prReviewLabelsUses = resolveUses("JoshuaKGoldberg/pr-review-labels-action", "v0.1.0", options.workflowsVersions);
34
35
  return {
35
36
  addons: [blockRepositoryBranchRuleset({ requiredStatusChecks: jobsWithEnginesCheck?.map((job) => job.name) })],
36
37
  files: { ".github": {
@@ -61,18 +62,27 @@ const blockGitHubActionsCI = base.createBlock({
61
62
  name: "CI",
62
63
  workflowsVersions: options.workflowsVersions
63
64
  }), ["ci.yml"]),
64
- "pr-review-requested.yaml": withPreviously(createSoloWorkflowFile({
65
- name: "PR Review Requested",
66
- on: { pull_request_target: { types: ["review_requested"] } },
67
- permissions: { "pull-requests": "write" },
68
- steps: [{
69
- uses: resolveUses("actions-ecosystem/action-remove-labels", "v1", options.workflowsVersions),
70
- with: { labels: "status: waiting for author" }
71
- }, {
72
- if: "failure()",
73
- run: "echo \"Don't worry if the previous step failed.\"\necho \"See https://github.com/actions-ecosystem/action-remove-labels/issues/221.\"\n"
74
- }]
75
- }), ["pr-review-requested.yml"])
65
+ "pr-review-labels.yaml": withPreviously(createSoloWorkflowFile({
66
+ name: "PR Review Labels",
67
+ on: {
68
+ pull_request_target: { types: ["review_requested"] },
69
+ workflow_run: {
70
+ types: ["completed"],
71
+ workflows: ["PR Review Submitted"]
72
+ }
73
+ },
74
+ permissions: {
75
+ actions: "read",
76
+ "pull-requests": "write"
77
+ },
78
+ steps: [{ uses: prReviewLabelsUses }]
79
+ }), ["pr-review-requested.yaml", "pr-review-requested.yml"]),
80
+ "pr-review-submitted.yaml": createSoloWorkflowFile({
81
+ name: "PR Review Submitted",
82
+ on: { pull_request_review: { types: ["submitted"] } },
83
+ permissions: {},
84
+ steps: [{ uses: prReviewLabelsUses }]
85
+ })
76
86
  }
77
87
  } }
78
88
  };
@@ -6,8 +6,8 @@ import { withPreviously } from "./files/withPreviously.mjs";
6
6
  import { formatFile } from "../utils/formatFile.mjs";
7
7
  import { blockPackageJson } from "./blockPackageJson.mjs";
8
8
  import { blockCSpell } from "./blockCSpell.mjs";
9
- import { blockREADME } from "./blockREADME.mjs";
10
9
  import { blockRepositorySecrets } from "./blockRepositorySecrets.mjs";
10
+ import { blockREADME } from "./blockREADME.mjs";
11
11
  import { z } from "zod";
12
12
  //#region src/blocks/blockReleaseIt.ts
13
13
  const blockReleaseIt = base.createBlock({
@@ -20,6 +20,9 @@ interface WorkflowFileOn {
20
20
  branches?: string | string[];
21
21
  types?: string[];
22
22
  };
23
+ pull_request_review?: {
24
+ types: string[];
25
+ };
23
26
  pull_request_review_comment?: {
24
27
  types: string[];
25
28
  };
@@ -33,6 +36,10 @@ interface WorkflowFileOn {
33
36
  types: string[];
34
37
  };
35
38
  workflow_dispatch?: null | string;
39
+ workflow_run?: {
40
+ types: string[];
41
+ workflows: string[];
42
+ };
36
43
  }
37
44
  interface WorkflowFileOptions {
38
45
  concurrency?: WorkflowFileConcurrency;
@@ -44,6 +51,7 @@ interface WorkflowFileOptions {
44
51
  steps: WorkflowFileStep[];
45
52
  }
46
53
  interface WorkflowFilePermissions {
54
+ actions?: string;
47
55
  contents?: string;
48
56
  discussions?: string;
49
57
  "id-token"?: string;
@@ -6,13 +6,13 @@ import { blockDevelopmentDocs } from "../blocks/blockDevelopmentDocs.mjs";
6
6
  import { blockPackageJson } from "../blocks/blockPackageJson.mjs";
7
7
  import { blockRemoveWorkflows } from "../blocks/blockRemoveWorkflows.mjs";
8
8
  import { blockGitHubIssueTemplates } from "../blocks/blockGitHubIssueTemplates.mjs";
9
+ import { blockRepositorySecrets } from "../blocks/blockRepositorySecrets.mjs";
9
10
  import { blockRemoveDependencies } from "../blocks/blockRemoveDependencies.mjs";
10
11
  import { blockESLint } from "../blocks/blockESLint.mjs";
11
12
  import { blockREADME } from "../blocks/blockREADME.mjs";
12
13
  import { blockExampleFiles } from "../blocks/blockExampleFiles.mjs";
13
14
  import { blockGitignore } from "../blocks/blockGitignore.mjs";
14
15
  import { blockPrettier } from "../blocks/blockPrettier.mjs";
15
- import { blockRepositorySecrets } from "../blocks/blockRepositorySecrets.mjs";
16
16
  import { blockTSDown } from "../blocks/blockTSDown.mjs";
17
17
  import { blockTypeScript } from "../blocks/blockTypeScript.mjs";
18
18
  import { blockGitHubApps } from "../blocks/blockGitHubApps.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-typescript-app",
3
- "version": "2.69.1",
3
+ "version": "2.71.0",
4
4
  "description": "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁",
5
5
  "repository": {
6
6
  "type": "git",
@@ -89,7 +89,7 @@
89
89
  "bingo-testers": "0.8.0",
90
90
  "console-fail-test": "0.9.0",
91
91
  "cspell": "10.3.3",
92
- "eslint": "10.11.0",
92
+ "eslint": "10.12.0",
93
93
  "eslint-plugin-jsdoc": "65.0.1",
94
94
  "eslint-plugin-jsonc": "3.4.1",
95
95
  "eslint-plugin-markdown-links": "0.9.1",
@@ -112,7 +112,7 @@
112
112
  "typescript-eslint": "8.71.0",
113
113
  "vitest": "5.0.1"
114
114
  },
115
- "packageManager": "pnpm@12.8.1",
115
+ "packageManager": "pnpm@12.9.0",
116
116
  "engines": {
117
117
  "node": "^22.13.0 || ^24.11.0 || >=26.0.0"
118
118
  }