create-typescript-app 2.65.1 → 2.65.3

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.
Files changed (166) hide show
  1. package/dist/base.d.mts +4 -4
  2. package/dist/base.mjs +1 -0
  3. package/dist/blocks/actions/resolveUses.d.mts +2 -3
  4. package/dist/blocks/actions/steps.d.mts +5 -6
  5. package/dist/blocks/bin/getPrimaryBin.d.mts +2 -3
  6. package/dist/blocks/blockAllContributors.d.mts +3 -3
  7. package/dist/blocks/blockAllContributors.mjs +3 -6
  8. package/dist/blocks/blockAreTheTypesWrong.d.mts +3 -3
  9. package/dist/blocks/blockBin.d.mts +3 -3
  10. package/dist/blocks/blockCSpell.d.mts +3 -3
  11. package/dist/blocks/blockCTATransitions.d.mts +3 -3
  12. package/dist/blocks/blockCTATransitions.mjs +5 -8
  13. package/dist/blocks/blockCodecov.d.mts +3 -3
  14. package/dist/blocks/blockContributingDocs.d.mts +3 -3
  15. package/dist/blocks/blockContributorCovenant.d.mts +3 -3
  16. package/dist/blocks/blockDevelopmentDocs.d.mts +3 -3
  17. package/dist/blocks/blockESLint.d.mts +3 -3
  18. package/dist/blocks/blockESLint.mjs +5 -4
  19. package/dist/blocks/blockESLintComments.d.mts +3 -3
  20. package/dist/blocks/blockESLintJSDoc.d.mts +3 -3
  21. package/dist/blocks/blockESLintJSONC.d.mts +3 -3
  22. package/dist/blocks/blockESLintMarkdown.d.mts +3 -3
  23. package/dist/blocks/blockESLintMarkdownLinks.d.mts +3 -3
  24. package/dist/blocks/blockESLintMoreStyling.d.mts +4 -4
  25. package/dist/blocks/blockESLintNode.d.mts +3 -3
  26. package/dist/blocks/blockESLintPackageJson.d.mts +3 -3
  27. package/dist/blocks/blockESLintPerfectionist.d.mts +3 -3
  28. package/dist/blocks/blockESLintPlugin.d.mts +3 -3
  29. package/dist/blocks/blockESLintRegexp.d.mts +3 -3
  30. package/dist/blocks/blockESLintYML.d.mts +3 -3
  31. package/dist/blocks/blockExampleFiles.d.mts +3 -3
  32. package/dist/blocks/blockExports.d.mts +3 -3
  33. package/dist/blocks/blockExports.mjs +10 -3
  34. package/dist/blocks/blockFunding.d.mts +3 -3
  35. package/dist/blocks/blockFunding.mjs +2 -1
  36. package/dist/blocks/blockGitHubActionsCI.d.mts +3 -3
  37. package/dist/blocks/blockGitHubActionsCI.mjs +7 -8
  38. package/dist/blocks/blockGitHubApps.d.mts +3 -3
  39. package/dist/blocks/blockGitHubIssueTemplates.d.mts +3 -3
  40. package/dist/blocks/blockGitHubIssueTemplates.mjs +9 -17
  41. package/dist/blocks/blockGitHubPRTemplate.d.mts +3 -3
  42. package/dist/blocks/blockGitignore.d.mts +3 -3
  43. package/dist/blocks/blockKnip.d.mts +3 -3
  44. package/dist/blocks/blockKnip.mjs +5 -3
  45. package/dist/blocks/blockMITLicense.d.mts +3 -3
  46. package/dist/blocks/blockNcc.d.mts +3 -3
  47. package/dist/blocks/blockNvmrc.d.mts +3 -3
  48. package/dist/blocks/blockOctoGuide.d.mts +3 -3
  49. package/dist/blocks/blockOctoGuide.mjs +4 -7
  50. package/dist/blocks/blockOctoGuideStrict.d.mts +3 -3
  51. package/dist/blocks/blockPackageJson.d.mts +3 -3
  52. package/dist/blocks/blockPnpmDedupe.d.mts +3 -3
  53. package/dist/blocks/blockPrettier.d.mts +3 -3
  54. package/dist/blocks/blockPrettier.mjs +4 -7
  55. package/dist/blocks/blockPrettierPluginCurly.d.mts +3 -3
  56. package/dist/blocks/blockPrettierPluginPackageJson.d.mts +3 -3
  57. package/dist/blocks/blockPrettierPluginPaddingLines.d.mts +3 -3
  58. package/dist/blocks/blockPrettierPluginSentencesPerLine.d.mts +3 -3
  59. package/dist/blocks/blockPrettierPluginSh.d.mts +3 -3
  60. package/dist/blocks/blockREADME.d.mts +3 -3
  61. package/dist/blocks/blockReleaseIt.d.mts +3 -3
  62. package/dist/blocks/blockReleaseIt.mjs +5 -8
  63. package/dist/blocks/blockRemoveDependencies.d.mts +3 -3
  64. package/dist/blocks/blockRemoveFiles.d.mts +3 -3
  65. package/dist/blocks/blockRemoveWorkflows.d.mts +3 -3
  66. package/dist/blocks/blockRenovate.d.mts +3 -3
  67. package/dist/blocks/blockRepositoryBranchRuleset.d.mts +3 -3
  68. package/dist/blocks/blockRepositoryLabels.d.mts +3 -3
  69. package/dist/blocks/blockRepositorySecrets.d.mts +3 -3
  70. package/dist/blocks/blockRepositorySettings.d.mts +3 -3
  71. package/dist/blocks/blockSecurityDocs.d.mts +3 -3
  72. package/dist/blocks/blockSideEffects.d.mts +3 -3
  73. package/dist/blocks/blockTSDown.d.mts +3 -3
  74. package/dist/blocks/blockTSDown.mjs +3 -2
  75. package/dist/blocks/blockTemplatedWith.d.mts +3 -3
  76. package/dist/blocks/blockTypeScript.d.mts +3 -3
  77. package/dist/blocks/blockVSCode.d.mts +3 -3
  78. package/dist/blocks/blockVitest.d.mts +3 -3
  79. package/dist/blocks/blockWebExt.d.mts +3 -3
  80. package/dist/blocks/codecov/findCodecovStep.d.mts +3 -4
  81. package/dist/blocks/eslint/blockESLintIntake.d.mts +2 -3
  82. package/dist/blocks/eslint/blockESLintPluginIntake.d.mts +2 -3
  83. package/dist/blocks/eslint/getScriptFileExtension.d.mts +3 -4
  84. package/dist/blocks/eslint/mergeAllExtensions.d.mts +2 -3
  85. package/dist/blocks/eslint/schemas.d.mts +15 -16
  86. package/dist/blocks/files/createJobName.d.mts +2 -3
  87. package/dist/blocks/files/createMultiWorkflowFile.d.mts +5 -6
  88. package/dist/blocks/files/createSoloWorkflowFile.d.mts +2 -3
  89. package/dist/blocks/files/formatIgnoreFile.d.mts +2 -3
  90. package/dist/blocks/files/formatWorkflowYaml.d.mts +2 -3
  91. package/dist/blocks/files/formatYaml.d.mts +2 -3
  92. package/dist/blocks/files/removeUsesQuotes.d.mts +2 -3
  93. package/dist/blocks/files/withPreviously.d.mts +4 -0
  94. package/dist/blocks/files/withPreviously.mjs +6 -0
  95. package/dist/blocks/getInstallationSuggestions.d.mts +2 -3
  96. package/dist/blocks/index.d.mts +53 -2
  97. package/dist/blocks/intake/intakeFile.d.mts +2 -3
  98. package/dist/blocks/intake/intakeFileAsJson.d.mts +2 -3
  99. package/dist/blocks/intake/intakeFileAsYaml.d.mts +3 -4
  100. package/dist/blocks/intake/intakeFileDefineConfig.d.mts +2 -3
  101. package/dist/blocks/intake/intakeFileExportObject.d.mts +2 -3
  102. package/dist/blocks/options.fakes.d.mts +2 -3
  103. package/dist/blocks/outcomeLabels.d.mts +2 -3
  104. package/dist/blocks/phases.d.mts +2 -3
  105. package/dist/constants.d.mts +2 -3
  106. package/dist/data/contributions.d.mts +2 -3
  107. package/dist/data/packageData.d.mts +4 -5
  108. package/dist/index.d.mts +4 -2
  109. package/dist/inputs/inputFromDirectory.d.mts +2 -3
  110. package/dist/inputs/inputFromOctokit.d.mts +2 -3
  111. package/dist/options/readAccess.d.mts +2 -3
  112. package/dist/options/readAllContributors.d.mts +2 -3
  113. package/dist/options/readAuthor.d.mts +2 -3
  114. package/dist/options/readBin.d.mts +2 -3
  115. package/dist/options/readBundle.d.mts +2 -3
  116. package/dist/options/readCodecovToken.d.mts +2 -3
  117. package/dist/options/readDescription.d.mts +2 -3
  118. package/dist/options/readDescriptionFromReadme.d.mts +2 -3
  119. package/dist/options/readDevelopmentDocumentation.d.mts +2 -3
  120. package/dist/options/readDocumentation.d.mts +2 -3
  121. package/dist/options/readEmailFromCodeOfConduct.d.mts +2 -3
  122. package/dist/options/readEmailFromGit.d.mts +2 -3
  123. package/dist/options/readEmailFromNpm.d.mts +2 -3
  124. package/dist/options/readEmails.d.mts +2 -3
  125. package/dist/options/readEmoji.d.mts +2 -3
  126. package/dist/options/readExistingLabels.d.mts +2 -3
  127. package/dist/options/readFileAsJson.d.mts +2 -3
  128. package/dist/options/readFileSafe.d.mts +2 -3
  129. package/dist/options/readFunding.d.mts +2 -3
  130. package/dist/options/readFunding.mjs +4 -1
  131. package/dist/options/readGitDefaults.d.mts +2 -3
  132. package/dist/options/readGuide.d.mts +2 -3
  133. package/dist/options/readKeywords.d.mts +2 -3
  134. package/dist/options/readLogo.d.mts +2 -3
  135. package/dist/options/readLogoSizing.d.mts +3 -4
  136. package/dist/options/readNode.d.mts +2 -3
  137. package/dist/options/readNpmDefaults.d.mts +2 -3
  138. package/dist/options/readOwner.d.mts +2 -3
  139. package/dist/options/readPackageAuthor.d.mts +3 -4
  140. package/dist/options/readPackageData.d.mts +2 -3
  141. package/dist/options/readPnpm.d.mts +2 -3
  142. package/dist/options/readReadmeAdditional.d.mts +2 -3
  143. package/dist/options/readReadmeExplainer.d.mts +2 -3
  144. package/dist/options/readReadmeFootnotes.d.mts +3 -4
  145. package/dist/options/readReadmeUsage.d.mts +2 -3
  146. package/dist/options/readRepository.d.mts +2 -3
  147. package/dist/options/readRulesetId.d.mts +2 -3
  148. package/dist/options/readTitle.d.mts +2 -3
  149. package/dist/options/readWords.d.mts +2 -3
  150. package/dist/options/readWorkflowsVersions.d.mts +2 -3
  151. package/dist/presets/common.d.mts +3 -3
  152. package/dist/presets/everything.d.mts +3 -3
  153. package/dist/presets/index.d.mts +5 -2
  154. package/dist/presets/minimal.d.mts +3 -3
  155. package/dist/schemas.d.mts +15 -16
  156. package/dist/template.d.mts +3 -3
  157. package/dist/types.d.mts +4 -5
  158. package/dist/utils/htmlToTextSafe.d.mts +2 -3
  159. package/dist/utils/parseDefineConfig.d.mts +2 -3
  160. package/dist/utils/resolveBin.d.mts +2 -3
  161. package/dist/utils/resolveEmails.d.mts +2 -3
  162. package/dist/utils/swallowError.d.mts +2 -3
  163. package/dist/utils/swallowErrorAsync.d.mts +2 -3
  164. package/dist/utils/trimPrecedingSlash.d.mts +2 -3
  165. package/dist/utils/tryCatch.d.mts +2 -3
  166. package/package.json +27 -27
@@ -1,5 +1,5 @@
1
1
  //#region src/blocks/blockESLintPlugin.d.ts
2
- declare const blockESLintPlugin: import("bingo-stratum").BlockWithAddons<{
2
+ export declare const blockESLintPlugin: import("bingo-stratum").BlockWithAddons<{
3
3
  configEmoji?: [string, string][] | undefined;
4
4
  }, {
5
5
  access: "public" | "restricted";
@@ -57,6 +57,7 @@ declare const blockESLintPlugin: import("bingo-stratum").BlockWithAddons<{
57
57
  packageData?: {
58
58
  dependencies?: Record<string, string> | undefined;
59
59
  devDependencies?: Record<string, string> | undefined;
60
+ main?: string | undefined;
60
61
  peerDependencies?: Record<string, string> | undefined;
61
62
  peerDependenciesMeta?: Record<string, unknown> | undefined;
62
63
  scripts?: Record<string, string | undefined> | undefined;
@@ -71,5 +72,4 @@ declare const blockESLintPlugin: import("bingo-stratum").BlockWithAddons<{
71
72
  pinned?: boolean | undefined;
72
73
  }>> | undefined;
73
74
  }>;
74
- //#endregion
75
- export { blockESLintPlugin };
75
+ //#endregion
@@ -1,5 +1,5 @@
1
1
  //#region src/blocks/blockESLintRegexp.d.ts
2
- declare const blockESLintRegexp: import("bingo-stratum").BlockWithoutAddons<{
2
+ export declare const blockESLintRegexp: import("bingo-stratum").BlockWithoutAddons<{
3
3
  access: "public" | "restricted";
4
4
  description: string;
5
5
  directory: string;
@@ -55,6 +55,7 @@ declare const blockESLintRegexp: import("bingo-stratum").BlockWithoutAddons<{
55
55
  packageData?: {
56
56
  dependencies?: Record<string, string> | undefined;
57
57
  devDependencies?: Record<string, string> | undefined;
58
+ main?: string | undefined;
58
59
  peerDependencies?: Record<string, string> | undefined;
59
60
  peerDependenciesMeta?: Record<string, unknown> | undefined;
60
61
  scripts?: Record<string, string | undefined> | undefined;
@@ -69,5 +70,4 @@ declare const blockESLintRegexp: import("bingo-stratum").BlockWithoutAddons<{
69
70
  pinned?: boolean | undefined;
70
71
  }>> | undefined;
71
72
  }>;
72
- //#endregion
73
- export { blockESLintRegexp };
73
+ //#endregion
@@ -1,5 +1,5 @@
1
1
  //#region src/blocks/blockESLintYML.d.ts
2
- declare const blockESLintYML: import("bingo-stratum").BlockWithoutAddons<{
2
+ export declare const blockESLintYML: import("bingo-stratum").BlockWithoutAddons<{
3
3
  access: "public" | "restricted";
4
4
  description: string;
5
5
  directory: string;
@@ -55,6 +55,7 @@ declare const blockESLintYML: import("bingo-stratum").BlockWithoutAddons<{
55
55
  packageData?: {
56
56
  dependencies?: Record<string, string> | undefined;
57
57
  devDependencies?: Record<string, string> | undefined;
58
+ main?: string | undefined;
58
59
  peerDependencies?: Record<string, string> | undefined;
59
60
  peerDependenciesMeta?: Record<string, unknown> | undefined;
60
61
  scripts?: Record<string, string | undefined> | undefined;
@@ -69,5 +70,4 @@ declare const blockESLintYML: import("bingo-stratum").BlockWithoutAddons<{
69
70
  pinned?: boolean | undefined;
70
71
  }>> | undefined;
71
72
  }>;
72
- //#endregion
73
- export { blockESLintYML };
73
+ //#endregion
@@ -1,5 +1,5 @@
1
1
  //#region src/blocks/blockExampleFiles.d.ts
2
- declare const blockExampleFiles: import("bingo-stratum").BlockWithAddons<{
2
+ export declare const blockExampleFiles: import("bingo-stratum").BlockWithAddons<{
3
3
  files: Record<string, string>;
4
4
  usage: string[];
5
5
  }, {
@@ -58,6 +58,7 @@ declare const blockExampleFiles: import("bingo-stratum").BlockWithAddons<{
58
58
  packageData?: {
59
59
  dependencies?: Record<string, string> | undefined;
60
60
  devDependencies?: Record<string, string> | undefined;
61
+ main?: string | undefined;
61
62
  peerDependencies?: Record<string, string> | undefined;
62
63
  peerDependenciesMeta?: Record<string, unknown> | undefined;
63
64
  scripts?: Record<string, string | undefined> | undefined;
@@ -72,5 +73,4 @@ declare const blockExampleFiles: import("bingo-stratum").BlockWithAddons<{
72
73
  pinned?: boolean | undefined;
73
74
  }>> | undefined;
74
75
  }>;
75
- //#endregion
76
- export { blockExampleFiles };
76
+ //#endregion
@@ -1,5 +1,5 @@
1
1
  //#region src/blocks/blockExports.d.ts
2
- declare const blockExports: import("bingo-stratum").BlockWithAddons<{
2
+ export declare const blockExports: import("bingo-stratum").BlockWithAddons<{
3
3
  runArgs: string[];
4
4
  filePath?: string | undefined;
5
5
  }, {
@@ -58,6 +58,7 @@ declare const blockExports: import("bingo-stratum").BlockWithAddons<{
58
58
  packageData?: {
59
59
  dependencies?: Record<string, string> | undefined;
60
60
  devDependencies?: Record<string, string> | undefined;
61
+ main?: string | undefined;
61
62
  peerDependencies?: Record<string, string> | undefined;
62
63
  peerDependenciesMeta?: Record<string, unknown> | undefined;
63
64
  scripts?: Record<string, string | undefined> | undefined;
@@ -72,5 +73,4 @@ declare const blockExports: import("bingo-stratum").BlockWithAddons<{
72
73
  pinned?: boolean | undefined;
73
74
  }>> | undefined;
74
75
  }>;
75
- //#endregion
76
- export { blockExports };
76
+ //#endregion
@@ -16,12 +16,19 @@ const blockExports = base.createBlock({
16
16
  const packageData = intakeFileAsJson(files, ["package.json"]);
17
17
  const exports = zExports.safeParse(packageData?.exports).data;
18
18
  const filePath = packageData?.exports === void 0 ? zFilePath.safeParse(packageData?.main).data : typeof exports === "string" ? exports : exports?.["."];
19
- return filePath ? { filePath: filePath.replace(/^(?:\.\/)?lib\//u, "./dist/") } : void 0;
19
+ return filePath ? { filePath: libToDist(filePath) } : void 0;
20
20
  },
21
- produce({ addons }) {
21
+ produce({ addons, options }) {
22
22
  const { filePath = "./dist/index.mjs", runArgs } = addons;
23
- return { addons: [blockPackageJson({ properties: { exports: { ".": filePath.startsWith(".") ? filePath : `./${filePath}` } } }), blockTSDown({ runInCI: [`node ${filePath}${runArgs.map((arg) => ` ${arg}`).join("")}`] })] };
23
+ const main = zFilePath.safeParse(options.packageData?.main).data;
24
+ return { addons: [blockPackageJson({ properties: {
25
+ exports: { ".": filePath.startsWith(".") ? filePath : `./${filePath}` },
26
+ ...main && { main: libToDist(main) }
27
+ } }), blockTSDown({ runInCI: [`node ${filePath}${runArgs.map((arg) => ` ${arg}`).join("")}`] })] };
24
28
  }
25
29
  });
30
+ function libToDist(filePath) {
31
+ return filePath.replace(/^(?:\.\/)?lib\//u, "./dist/");
32
+ }
26
33
  //#endregion
27
34
  export { blockExports };
@@ -1,5 +1,5 @@
1
1
  //#region src/blocks/blockFunding.d.ts
2
- declare const blockFunding: import("bingo-stratum").BlockWithoutAddons<{
2
+ export declare const blockFunding: import("bingo-stratum").BlockWithoutAddons<{
3
3
  access: "public" | "restricted";
4
4
  description: string;
5
5
  directory: string;
@@ -55,6 +55,7 @@ declare const blockFunding: import("bingo-stratum").BlockWithoutAddons<{
55
55
  packageData?: {
56
56
  dependencies?: Record<string, string> | undefined;
57
57
  devDependencies?: Record<string, string> | undefined;
58
+ main?: string | undefined;
58
59
  peerDependencies?: Record<string, string> | undefined;
59
60
  peerDependenciesMeta?: Record<string, unknown> | undefined;
60
61
  scripts?: Record<string, string | undefined> | undefined;
@@ -69,5 +70,4 @@ declare const blockFunding: import("bingo-stratum").BlockWithoutAddons<{
69
70
  pinned?: boolean | undefined;
70
71
  }>> | undefined;
71
72
  }>;
72
- //#endregion
73
- export { blockFunding };
73
+ //#endregion
@@ -1,11 +1,12 @@
1
1
  import { base } from "../base.mjs";
2
2
  import { blockRemoveFiles } from "./blockRemoveFiles.mjs";
3
3
  import { formatYaml } from "./files/formatYaml.mjs";
4
+ import { withPreviously } from "./files/withPreviously.mjs";
4
5
  //#region src/blocks/blockFunding.ts
5
6
  const blockFunding = base.createBlock({
6
7
  about: { name: "Funding" },
7
8
  produce({ options }) {
8
- return { files: { ".github": { "FUNDING.yaml": options.funding && formatYaml({ github: options.funding }) } } };
9
+ return { files: { ".github": { "FUNDING.yaml": withPreviously(options.funding && formatYaml({ github: options.funding }), ["FUNDING.yml"]) } } };
9
10
  },
10
11
  transition() {
11
12
  return { addons: [blockRemoveFiles({ files: [".github/FUNDING.yml"] })] };
@@ -1,5 +1,5 @@
1
1
  //#region src/blocks/blockGitHubActionsCI.d.ts
2
- declare const blockGitHubActionsCI: import("bingo-stratum").BlockWithAddons<{
2
+ export declare const blockGitHubActionsCI: import("bingo-stratum").BlockWithAddons<{
3
3
  jobs?: {
4
4
  name: string;
5
5
  steps: ({
@@ -70,6 +70,7 @@ declare const blockGitHubActionsCI: import("bingo-stratum").BlockWithAddons<{
70
70
  packageData?: {
71
71
  dependencies?: Record<string, string> | undefined;
72
72
  devDependencies?: Record<string, string> | undefined;
73
+ main?: string | undefined;
73
74
  peerDependencies?: Record<string, string> | undefined;
74
75
  peerDependenciesMeta?: Record<string, unknown> | undefined;
75
76
  scripts?: Record<string, string | undefined> | undefined;
@@ -84,5 +85,4 @@ declare const blockGitHubActionsCI: import("bingo-stratum").BlockWithAddons<{
84
85
  pinned?: boolean | undefined;
85
86
  }>> | undefined;
86
87
  }>;
87
- //#endregion
88
- export { blockGitHubActionsCI };
88
+ //#endregion
@@ -6,6 +6,7 @@ import { blockRepositoryBranchRuleset } from "./blockRepositoryBranchRuleset.mjs
6
6
  import { formatYaml } from "./files/formatYaml.mjs";
7
7
  import { createMultiWorkflowFile } from "./files/createMultiWorkflowFile.mjs";
8
8
  import { createSoloWorkflowFile } from "./files/createSoloWorkflowFile.mjs";
9
+ import { withPreviously } from "./files/withPreviously.mjs";
9
10
  import { z } from "zod";
10
11
  //#region src/blocks/blockGitHubActionsCI.ts
11
12
  const blockGitHubActionsCI = base.createBlock({
@@ -32,7 +33,7 @@ const blockGitHubActionsCI = base.createBlock({
32
33
  return {
33
34
  addons: [blockRepositoryBranchRuleset({ requiredStatusChecks: jobsWithEnginesCheck?.map((job) => job.name) })],
34
35
  files: { ".github": {
35
- actions: { prepare: { "action.yaml": formatYaml({
36
+ actions: { prepare: { "action.yaml": withPreviously(formatYaml({
36
37
  description: "Prepares the repo for a typical CI job",
37
38
  name: "Setup",
38
39
  runs: {
@@ -52,14 +53,14 @@ const blockGitHubActionsCI = base.createBlock({
52
53
  ],
53
54
  using: "composite"
54
55
  }
55
- }) } },
56
+ }), ["action.yml"]) } },
56
57
  workflows: {
57
- "ci.yaml": jobsWithEnginesCheck && createMultiWorkflowFile({
58
+ "ci.yaml": withPreviously(jobsWithEnginesCheck && createMultiWorkflowFile({
58
59
  jobs: jobsWithEnginesCheck,
59
60
  name: "CI",
60
61
  workflowsVersions: options.workflowsVersions
61
- }),
62
- "pr-review-requested.yaml": createSoloWorkflowFile({
62
+ }), ["ci.yml"]),
63
+ "pr-review-requested.yaml": withPreviously(createSoloWorkflowFile({
63
64
  name: "PR Review Requested",
64
65
  on: { pull_request_target: { types: ["review_requested"] } },
65
66
  permissions: { "pull-requests": "write" },
@@ -70,7 +71,7 @@ const blockGitHubActionsCI = base.createBlock({
70
71
  if: "failure()",
71
72
  run: "echo \"Don't worry if the previous step failed.\"\necho \"See https://github.com/actions-ecosystem/action-remove-labels/issues/221.\"\n"
72
73
  }]
73
- })
74
+ }), ["pr-review-requested.yml"])
74
75
  }
75
76
  } }
76
77
  };
@@ -78,9 +79,7 @@ const blockGitHubActionsCI = base.createBlock({
78
79
  transition() {
79
80
  return { addons: [blockRemoveFiles({ files: [
80
81
  ".circleci",
81
- ".github/actions/prepare/action.yml",
82
82
  ".github/workflows/ci.yml",
83
- ".github/workflows/pr-review-requested.yml",
84
83
  "travis.{yaml,yml}"
85
84
  ] })] };
86
85
  }
@@ -1,5 +1,5 @@
1
1
  //#region src/blocks/blockGitHubApps.d.ts
2
- declare const blockGitHubApps: import("bingo-stratum").BlockWithAddons<{
2
+ export declare const blockGitHubApps: import("bingo-stratum").BlockWithAddons<{
3
3
  apps: {
4
4
  name: string;
5
5
  url: string;
@@ -60,6 +60,7 @@ declare const blockGitHubApps: import("bingo-stratum").BlockWithAddons<{
60
60
  packageData?: {
61
61
  dependencies?: Record<string, string> | undefined;
62
62
  devDependencies?: Record<string, string> | undefined;
63
+ main?: string | undefined;
63
64
  peerDependencies?: Record<string, string> | undefined;
64
65
  peerDependenciesMeta?: Record<string, unknown> | undefined;
65
66
  scripts?: Record<string, string | undefined> | undefined;
@@ -74,5 +75,4 @@ declare const blockGitHubApps: import("bingo-stratum").BlockWithAddons<{
74
75
  pinned?: boolean | undefined;
75
76
  }>> | undefined;
76
77
  }>;
77
- //#endregion
78
- export { blockGitHubApps };
78
+ //#endregion
@@ -1,5 +1,5 @@
1
1
  //#region src/blocks/blockGitHubIssueTemplates.d.ts
2
- declare const blockGitHubIssueTemplates: import("bingo-stratum").BlockWithoutAddons<{
2
+ export declare const blockGitHubIssueTemplates: import("bingo-stratum").BlockWithoutAddons<{
3
3
  access: "public" | "restricted";
4
4
  description: string;
5
5
  directory: string;
@@ -55,6 +55,7 @@ declare const blockGitHubIssueTemplates: import("bingo-stratum").BlockWithoutAdd
55
55
  packageData?: {
56
56
  dependencies?: Record<string, string> | undefined;
57
57
  devDependencies?: Record<string, string> | undefined;
58
+ main?: string | undefined;
58
59
  peerDependencies?: Record<string, string> | undefined;
59
60
  peerDependenciesMeta?: Record<string, unknown> | undefined;
60
61
  scripts?: Record<string, string | undefined> | undefined;
@@ -69,5 +70,4 @@ declare const blockGitHubIssueTemplates: import("bingo-stratum").BlockWithoutAdd
69
70
  pinned?: boolean | undefined;
70
71
  }>> | undefined;
71
72
  }>;
72
- //#endregion
73
- export { blockGitHubIssueTemplates };
73
+ //#endregion
@@ -1,13 +1,13 @@
1
1
  import { base } from "../base.mjs";
2
- import { blockRemoveFiles } from "./blockRemoveFiles.mjs";
3
2
  import { formatYaml } from "./files/formatYaml.mjs";
3
+ import { withPreviously } from "./files/withPreviously.mjs";
4
4
  //#region src/blocks/blockGitHubIssueTemplates.ts
5
5
  const blockGitHubIssueTemplates = base.createBlock({
6
6
  about: { name: "GitHub Issue Templates" },
7
7
  produce({ options }) {
8
8
  return { files: { ".github": {
9
9
  ISSUE_TEMPLATE: {
10
- "01-bug.yaml": formatYaml({
10
+ "01-bug.yaml": withPreviously(formatYaml({
11
11
  body: [
12
12
  {
13
13
  attributes: {
@@ -58,8 +58,8 @@ const blockGitHubIssueTemplates = base.createBlock({
58
58
  labels: ["type: bug"],
59
59
  name: "🐛 Bug",
60
60
  title: "🐛 Bug: <short description of the bug>"
61
- }),
62
- "02-documentation.yaml": formatYaml({
61
+ }), ["01-bug.yml"]),
62
+ "02-documentation.yaml": withPreviously(formatYaml({
63
63
  body: [
64
64
  {
65
65
  attributes: {
@@ -95,8 +95,8 @@ const blockGitHubIssueTemplates = base.createBlock({
95
95
  labels: ["area: documentation"],
96
96
  name: "📝 Documentation",
97
97
  title: "📝 Documentation: <short description of the request>"
98
- }),
99
- "03-feature.yaml": formatYaml({
98
+ }), ["02-documentation.yml"]),
99
+ "03-feature.yaml": withPreviously(formatYaml({
100
100
  body: [
101
101
  {
102
102
  attributes: {
@@ -132,8 +132,8 @@ const blockGitHubIssueTemplates = base.createBlock({
132
132
  labels: ["type: feature"],
133
133
  name: "🚀 Feature",
134
134
  title: "🚀 Feature: <short description of the feature>"
135
- }),
136
- "04-tooling.yaml": formatYaml({
135
+ }), ["03-feature.yml"]),
136
+ "04-tooling.yaml": withPreviously(formatYaml({
137
137
  body: [
138
138
  {
139
139
  attributes: {
@@ -176,7 +176,7 @@ const blockGitHubIssueTemplates = base.createBlock({
176
176
  labels: ["area: tooling"],
177
177
  name: "🛠 Tooling",
178
178
  title: "🛠 Tooling: <short description of the change>"
179
- })
179
+ }), ["04-tooling.yml"])
180
180
  },
181
181
  "ISSUE_TEMPLATE.md": `<!-- Note: Please must use one of our issue templates to file an issue! 🛑 -->
182
182
  <!-- 👉 https://github.com/${options.owner}/${options.repository}/issues/new/choose 👈 -->
@@ -189,14 +189,6 @@ const blockGitHubIssueTemplates = base.createBlock({
189
189
  ...
190
190
  `
191
191
  } } };
192
- },
193
- transition() {
194
- return { addons: [blockRemoveFiles({ files: [
195
- ".github/ISSUE_TEMPLATE/01-bug.yml",
196
- ".github/ISSUE_TEMPLATE/02-documentation.yml",
197
- ".github/ISSUE_TEMPLATE/03-feature.yml",
198
- ".github/ISSUE_TEMPLATE/04-tooling.yml"
199
- ] })] };
200
192
  }
201
193
  });
202
194
  //#endregion
@@ -1,5 +1,5 @@
1
1
  //#region src/blocks/blockGitHubPRTemplate.d.ts
2
- declare const blockGitHubPRTemplate: import("bingo-stratum").BlockWithoutAddons<{
2
+ export declare const blockGitHubPRTemplate: import("bingo-stratum").BlockWithoutAddons<{
3
3
  access: "public" | "restricted";
4
4
  description: string;
5
5
  directory: string;
@@ -55,6 +55,7 @@ declare const blockGitHubPRTemplate: import("bingo-stratum").BlockWithoutAddons<
55
55
  packageData?: {
56
56
  dependencies?: Record<string, string> | undefined;
57
57
  devDependencies?: Record<string, string> | undefined;
58
+ main?: string | undefined;
58
59
  peerDependencies?: Record<string, string> | undefined;
59
60
  peerDependenciesMeta?: Record<string, unknown> | undefined;
60
61
  scripts?: Record<string, string | undefined> | undefined;
@@ -69,5 +70,4 @@ declare const blockGitHubPRTemplate: import("bingo-stratum").BlockWithoutAddons<
69
70
  pinned?: boolean | undefined;
70
71
  }>> | undefined;
71
72
  }>;
72
- //#endregion
73
- export { blockGitHubPRTemplate };
73
+ //#endregion
@@ -1,5 +1,5 @@
1
1
  //#region src/blocks/blockGitignore.d.ts
2
- declare const blockGitignore: import("bingo-stratum").BlockWithAddons<{
2
+ export declare const blockGitignore: import("bingo-stratum").BlockWithAddons<{
3
3
  ignores: string[];
4
4
  }, {
5
5
  access: "public" | "restricted";
@@ -57,6 +57,7 @@ declare const blockGitignore: import("bingo-stratum").BlockWithAddons<{
57
57
  packageData?: {
58
58
  dependencies?: Record<string, string> | undefined;
59
59
  devDependencies?: Record<string, string> | undefined;
60
+ main?: string | undefined;
60
61
  peerDependencies?: Record<string, string> | undefined;
61
62
  peerDependenciesMeta?: Record<string, unknown> | undefined;
62
63
  scripts?: Record<string, string | undefined> | undefined;
@@ -71,5 +72,4 @@ declare const blockGitignore: import("bingo-stratum").BlockWithAddons<{
71
72
  pinned?: boolean | undefined;
72
73
  }>> | undefined;
73
74
  }>;
74
- //#endregion
75
- export { blockGitignore };
75
+ //#endregion
@@ -1,5 +1,5 @@
1
1
  //#region src/blocks/blockKnip.d.ts
2
- declare const blockKnip: import("bingo-stratum").BlockWithAddons<{
2
+ export declare const blockKnip: import("bingo-stratum").BlockWithAddons<{
3
3
  entry?: string[] | undefined;
4
4
  ignoreDependencies?: string[] | undefined;
5
5
  project?: string[] | undefined;
@@ -59,6 +59,7 @@ declare const blockKnip: import("bingo-stratum").BlockWithAddons<{
59
59
  packageData?: {
60
60
  dependencies?: Record<string, string> | undefined;
61
61
  devDependencies?: Record<string, string> | undefined;
62
+ main?: string | undefined;
62
63
  peerDependencies?: Record<string, string> | undefined;
63
64
  peerDependenciesMeta?: Record<string, unknown> | undefined;
64
65
  scripts?: Record<string, string | undefined> | undefined;
@@ -73,5 +74,4 @@ declare const blockKnip: import("bingo-stratum").BlockWithAddons<{
73
74
  pinned?: boolean | undefined;
74
75
  }>> | undefined;
75
76
  }>;
76
- //#endregion
77
- export { blockKnip };
77
+ //#endregion
@@ -1,6 +1,7 @@
1
1
  import { getPackageDependencies } from "../data/packageData.mjs";
2
2
  import { base } from "../base.mjs";
3
3
  import { blockRemoveFiles } from "./blockRemoveFiles.mjs";
4
+ import { withPreviously } from "./files/withPreviously.mjs";
4
5
  import { blockGitHubActionsCI } from "./blockGitHubActionsCI.mjs";
5
6
  import { blockPackageJson } from "./blockPackageJson.mjs";
6
7
  import { blockDevelopmentDocs } from "./blockDevelopmentDocs.mjs";
@@ -44,7 +45,7 @@ const blockKnip = base.createBlock({
44
45
  blockRemoveFiles({ files: [".ts-prunerc*"] }),
45
46
  blockVSCode({ extensions: ["webpro.vscode-knip"] })
46
47
  ],
47
- files: { "knip.config.ts": `import type { KnipConfig } from "knip";
48
+ files: { "knip.config.ts": withPreviously(`import type { KnipConfig } from "knip";
48
49
 
49
50
  export default ${JSON.stringify({
50
51
  entry: entry?.sort(),
@@ -55,13 +56,14 @@ export default ${JSON.stringify({
55
56
  },
56
57
  project: project?.sort(),
57
58
  treatConfigHintsAsErrors: true
58
- })} satisfies KnipConfig;` }
59
+ })} satisfies KnipConfig;`, ["knip.json"]) }
59
60
  };
60
61
  },
61
62
  transition() {
62
63
  return { addons: [blockRemoveFiles({ files: [
63
64
  ".knip*",
64
- "knip.{c,j,m}*",
65
+ "knip.{cjs,js,mjs}",
66
+ "knip.config.{c,j,m}*",
65
67
  "knip.json*"
66
68
  ] }), blockRemoveWorkflows({ workflows: ["knip", "lint-knip"] })] };
67
69
  }
@@ -1,5 +1,5 @@
1
1
  //#region src/blocks/blockMITLicense.d.ts
2
- declare const blockMITLicense: import("bingo-stratum").BlockWithoutAddons<{
2
+ export declare const blockMITLicense: import("bingo-stratum").BlockWithoutAddons<{
3
3
  access: "public" | "restricted";
4
4
  description: string;
5
5
  directory: string;
@@ -55,6 +55,7 @@ declare const blockMITLicense: import("bingo-stratum").BlockWithoutAddons<{
55
55
  packageData?: {
56
56
  dependencies?: Record<string, string> | undefined;
57
57
  devDependencies?: Record<string, string> | undefined;
58
+ main?: string | undefined;
58
59
  peerDependencies?: Record<string, string> | undefined;
59
60
  peerDependenciesMeta?: Record<string, unknown> | undefined;
60
61
  scripts?: Record<string, string | undefined> | undefined;
@@ -69,5 +70,4 @@ declare const blockMITLicense: import("bingo-stratum").BlockWithoutAddons<{
69
70
  pinned?: boolean | undefined;
70
71
  }>> | undefined;
71
72
  }>;
72
- //#endregion
73
- export { blockMITLicense };
73
+ //#endregion
@@ -1,5 +1,5 @@
1
1
  //#region src/blocks/blockNcc.d.ts
2
- declare const blockNcc: import("bingo-stratum").BlockWithAddons<{
2
+ export declare const blockNcc: import("bingo-stratum").BlockWithAddons<{
3
3
  entry?: string | undefined;
4
4
  }, {
5
5
  access: "public" | "restricted";
@@ -57,6 +57,7 @@ declare const blockNcc: import("bingo-stratum").BlockWithAddons<{
57
57
  packageData?: {
58
58
  dependencies?: Record<string, string> | undefined;
59
59
  devDependencies?: Record<string, string> | undefined;
60
+ main?: string | undefined;
60
61
  peerDependencies?: Record<string, string> | undefined;
61
62
  peerDependenciesMeta?: Record<string, unknown> | undefined;
62
63
  scripts?: Record<string, string | undefined> | undefined;
@@ -71,5 +72,4 @@ declare const blockNcc: import("bingo-stratum").BlockWithAddons<{
71
72
  pinned?: boolean | undefined;
72
73
  }>> | undefined;
73
74
  }>;
74
- //#endregion
75
- export { blockNcc };
75
+ //#endregion
@@ -1,5 +1,5 @@
1
1
  //#region src/blocks/blockNvmrc.d.ts
2
- declare const blockNvmrc: import("bingo-stratum").BlockWithoutAddons<{
2
+ export declare const blockNvmrc: import("bingo-stratum").BlockWithoutAddons<{
3
3
  access: "public" | "restricted";
4
4
  description: string;
5
5
  directory: string;
@@ -55,6 +55,7 @@ declare const blockNvmrc: import("bingo-stratum").BlockWithoutAddons<{
55
55
  packageData?: {
56
56
  dependencies?: Record<string, string> | undefined;
57
57
  devDependencies?: Record<string, string> | undefined;
58
+ main?: string | undefined;
58
59
  peerDependencies?: Record<string, string> | undefined;
59
60
  peerDependenciesMeta?: Record<string, unknown> | undefined;
60
61
  scripts?: Record<string, string | undefined> | undefined;
@@ -69,5 +70,4 @@ declare const blockNvmrc: import("bingo-stratum").BlockWithoutAddons<{
69
70
  pinned?: boolean | undefined;
70
71
  }>> | undefined;
71
72
  }>;
72
- //#endregion
73
- export { blockNvmrc };
73
+ //#endregion
@@ -1,5 +1,5 @@
1
1
  //#region src/blocks/blockOctoGuide.d.ts
2
- declare const blockOctoGuide: import("bingo-stratum").BlockWithAddons<{
2
+ export declare const blockOctoGuide: import("bingo-stratum").BlockWithAddons<{
3
3
  config?: "strict" | "recommended" | undefined;
4
4
  }, {
5
5
  access: "public" | "restricted";
@@ -57,6 +57,7 @@ declare const blockOctoGuide: import("bingo-stratum").BlockWithAddons<{
57
57
  packageData?: {
58
58
  dependencies?: Record<string, string> | undefined;
59
59
  devDependencies?: Record<string, string> | undefined;
60
+ main?: string | undefined;
60
61
  peerDependencies?: Record<string, string> | undefined;
61
62
  peerDependenciesMeta?: Record<string, unknown> | undefined;
62
63
  scripts?: Record<string, string | undefined> | undefined;
@@ -71,5 +72,4 @@ declare const blockOctoGuide: import("bingo-stratum").BlockWithAddons<{
71
72
  pinned?: boolean | undefined;
72
73
  }>> | undefined;
73
74
  }>;
74
- //#endregion
75
- export { blockOctoGuide };
75
+ //#endregion
@@ -3,6 +3,7 @@ import { base } from "../base.mjs";
3
3
  import { resolveUses } from "./actions/resolveUses.mjs";
4
4
  import { blockRemoveFiles } from "./blockRemoveFiles.mjs";
5
5
  import { createSoloWorkflowFile } from "./files/createSoloWorkflowFile.mjs";
6
+ import { withPreviously } from "./files/withPreviously.mjs";
6
7
  import { z } from "zod";
7
8
  //#region src/blocks/blockOctoGuide.ts
8
9
  const blockOctoGuide = base.createBlock({
@@ -24,7 +25,7 @@ const blockOctoGuide = base.createBlock({
24
25
  return { config: runOctoGuideStep.with?.config };
25
26
  },
26
27
  produce({ addons, options }) {
27
- return { files: { ".github": { workflows: { "octoguide.yaml": createSoloWorkflowFile({
28
+ return { files: { ".github": { workflows: { "octoguide.yaml": withPreviously(createSoloWorkflowFile({
28
29
  if: "${{ !endsWith(github.actor, '[bot]') }}",
29
30
  name: "OctoGuide",
30
31
  on: {
@@ -59,14 +60,10 @@ const blockOctoGuide = base.createBlock({
59
60
  "github-token": "${{ secrets.GITHUB_TOKEN }}"
60
61
  }
61
62
  }]
62
- }) } } } };
63
+ }), ["octoguide.yml"]) } } } };
63
64
  },
64
65
  transition() {
65
- return { addons: [blockRemoveFiles({ files: [
66
- ".github/workflows/accessibility-alt-text-bot.{yaml,yml}",
67
- ".github/workflows/compliance.{yaml,yml}",
68
- ".github/workflows/octoguide.yml"
69
- ] })] };
66
+ return { addons: [blockRemoveFiles({ files: [".github/workflows/accessibility-alt-text-bot.{yaml,yml}", ".github/workflows/compliance.{yaml,yml}"] })] };
70
67
  }
71
68
  });
72
69
  //#endregion
@@ -1,5 +1,5 @@
1
1
  //#region src/blocks/blockOctoGuideStrict.d.ts
2
- declare const blockOctoGuideStrict: import("bingo-stratum").BlockWithoutAddons<{
2
+ export declare const blockOctoGuideStrict: import("bingo-stratum").BlockWithoutAddons<{
3
3
  access: "public" | "restricted";
4
4
  description: string;
5
5
  directory: string;
@@ -55,6 +55,7 @@ declare const blockOctoGuideStrict: import("bingo-stratum").BlockWithoutAddons<{
55
55
  packageData?: {
56
56
  dependencies?: Record<string, string> | undefined;
57
57
  devDependencies?: Record<string, string> | undefined;
58
+ main?: string | undefined;
58
59
  peerDependencies?: Record<string, string> | undefined;
59
60
  peerDependenciesMeta?: Record<string, unknown> | undefined;
60
61
  scripts?: Record<string, string | undefined> | undefined;
@@ -69,5 +70,4 @@ declare const blockOctoGuideStrict: import("bingo-stratum").BlockWithoutAddons<{
69
70
  pinned?: boolean | undefined;
70
71
  }>> | undefined;
71
72
  }>;
72
- //#endregion
73
- export { blockOctoGuideStrict };
73
+ //#endregion
@@ -1,5 +1,5 @@
1
1
  //#region src/blocks/blockPackageJson.d.ts
2
- declare const blockPackageJson: import("bingo-stratum").BlockWithAddons<{
2
+ export declare const blockPackageJson: import("bingo-stratum").BlockWithAddons<{
3
3
  cleanupCommands: string[];
4
4
  properties: {
5
5
  [x: string]: unknown;
@@ -179,6 +179,7 @@ declare const blockPackageJson: import("bingo-stratum").BlockWithAddons<{
179
179
  packageData?: {
180
180
  dependencies?: Record<string, string> | undefined;
181
181
  devDependencies?: Record<string, string> | undefined;
182
+ main?: string | undefined;
182
183
  peerDependencies?: Record<string, string> | undefined;
183
184
  peerDependenciesMeta?: Record<string, unknown> | undefined;
184
185
  scripts?: Record<string, string | undefined> | undefined;
@@ -193,5 +194,4 @@ declare const blockPackageJson: import("bingo-stratum").BlockWithAddons<{
193
194
  pinned?: boolean | undefined;
194
195
  }>> | undefined;
195
196
  }>;
196
- //#endregion
197
- export { blockPackageJson };
197
+ //#endregion
@@ -1,5 +1,5 @@
1
1
  //#region src/blocks/blockPnpmDedupe.d.ts
2
- declare const blockPnpmDedupe: import("bingo-stratum").BlockWithoutAddons<{
2
+ export declare const blockPnpmDedupe: import("bingo-stratum").BlockWithoutAddons<{
3
3
  access: "public" | "restricted";
4
4
  description: string;
5
5
  directory: string;
@@ -55,6 +55,7 @@ declare const blockPnpmDedupe: import("bingo-stratum").BlockWithoutAddons<{
55
55
  packageData?: {
56
56
  dependencies?: Record<string, string> | undefined;
57
57
  devDependencies?: Record<string, string> | undefined;
58
+ main?: string | undefined;
58
59
  peerDependencies?: Record<string, string> | undefined;
59
60
  peerDependenciesMeta?: Record<string, unknown> | undefined;
60
61
  scripts?: Record<string, string | undefined> | undefined;
@@ -69,5 +70,4 @@ declare const blockPnpmDedupe: import("bingo-stratum").BlockWithoutAddons<{
69
70
  pinned?: boolean | undefined;
70
71
  }>> | undefined;
71
72
  }>;
72
- //#endregion
73
- export { blockPnpmDedupe };
73
+ //#endregion