create-typescript-app 2.0.0 → 2.2.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.
Files changed (73) hide show
  1. package/lib/base.d.ts +1 -0
  2. package/lib/base.js +4 -0
  3. package/lib/base.js.map +1 -1
  4. package/lib/blocks/blockAllContributors.d.ts +1 -0
  5. package/lib/blocks/blockAreTheTypesWrong.d.ts +1 -0
  6. package/lib/blocks/blockCSpell.d.ts +1 -0
  7. package/lib/blocks/blockCodecov.d.ts +1 -0
  8. package/lib/blocks/blockContributingDocs.d.ts +1 -0
  9. package/lib/blocks/blockContributorCovenant.d.ts +1 -0
  10. package/lib/blocks/blockDevelopmentDocs.d.ts +1 -0
  11. package/lib/blocks/blockESLint.d.ts +1 -0
  12. package/lib/blocks/blockESLint.js +2 -1
  13. package/lib/blocks/blockESLint.js.map +1 -1
  14. package/lib/blocks/blockESLintComments.d.ts +1 -0
  15. package/lib/blocks/blockESLintJSDoc.d.ts +1 -0
  16. package/lib/blocks/blockESLintJSONC.d.ts +1 -0
  17. package/lib/blocks/blockESLintMarkdown.d.ts +1 -0
  18. package/lib/blocks/blockESLintMoreStyling.d.ts +1 -0
  19. package/lib/blocks/blockESLintNode.d.ts +1 -0
  20. package/lib/blocks/blockESLintPackageJson.d.ts +1 -0
  21. package/lib/blocks/blockESLintPerfectionist.d.ts +1 -0
  22. package/lib/blocks/blockESLintRegexp.d.ts +1 -0
  23. package/lib/blocks/blockESLintYML.d.ts +1 -0
  24. package/lib/blocks/blockExampleFiles.d.ts +1 -0
  25. package/lib/blocks/blockFunding.d.ts +1 -0
  26. package/lib/blocks/blockGitHubActionsCI.d.ts +1 -0
  27. package/lib/blocks/blockGitHubActionsCI.js +1 -2
  28. package/lib/blocks/blockGitHubActionsCI.js.map +1 -1
  29. package/lib/blocks/blockGitHubApps.d.ts +1 -0
  30. package/lib/blocks/blockGitHubIssueTemplates.d.ts +1 -0
  31. package/lib/blocks/blockGitHubPRTemplate.d.ts +1 -0
  32. package/lib/blocks/blockGitignore.d.ts +1 -0
  33. package/lib/blocks/blockKnip.d.ts +1 -0
  34. package/lib/blocks/blockMITLicense.d.ts +1 -0
  35. package/lib/blocks/blockMarkdownlint.d.ts +1 -0
  36. package/lib/blocks/blockNvmrc.d.ts +1 -0
  37. package/lib/blocks/blockPRCompliance.d.ts +1 -0
  38. package/lib/blocks/blockPackageJson.d.ts +1 -0
  39. package/lib/blocks/blockPackageJson.js +3 -0
  40. package/lib/blocks/blockPackageJson.js.map +1 -1
  41. package/lib/blocks/blockPnpmDedupe.d.ts +1 -0
  42. package/lib/blocks/blockPrettier.d.ts +1 -0
  43. package/lib/blocks/blockPrettierPluginCurly.d.ts +1 -0
  44. package/lib/blocks/blockPrettierPluginPackageJson.d.ts +1 -0
  45. package/lib/blocks/blockPrettierPluginSh.d.ts +1 -0
  46. package/lib/blocks/blockREADME.d.ts +1 -0
  47. package/lib/blocks/blockReleaseIt.d.ts +1 -0
  48. package/lib/blocks/blockRenovate.d.ts +1 -0
  49. package/lib/blocks/blockRepositoryBranchRuleset.d.ts +1 -0
  50. package/lib/blocks/blockRepositoryLabels.d.ts +1 -0
  51. package/lib/blocks/blockRepositorySecrets.d.ts +1 -0
  52. package/lib/blocks/blockRepositorySettings.d.ts +1 -0
  53. package/lib/blocks/blockSecurityDocs.d.ts +1 -0
  54. package/lib/blocks/blockTSup.d.ts +1 -0
  55. package/lib/blocks/blockTemplatedWith.d.ts +1 -0
  56. package/lib/blocks/blockTypeScript.d.ts +1 -0
  57. package/lib/blocks/blockVSCode.d.ts +1 -0
  58. package/lib/blocks/blockVitest.d.ts +1 -0
  59. package/lib/blocks/blockVitest.js +5 -2
  60. package/lib/blocks/blockVitest.js.map +1 -1
  61. package/lib/blocks/index.d.ts +43 -0
  62. package/lib/data/packageData.d.ts +11 -3
  63. package/lib/index.d.ts +2 -0
  64. package/lib/options/readPnpm.d.ts +5 -0
  65. package/lib/options/readPnpm.js +8 -0
  66. package/lib/options/readPnpm.js.map +1 -0
  67. package/lib/presets/common.d.ts +1 -0
  68. package/lib/presets/everything.d.ts +1 -0
  69. package/lib/presets/index.d.ts +3 -0
  70. package/lib/presets/minimal.d.ts +1 -0
  71. package/lib/template.d.ts +1 -0
  72. package/lib/types.d.ts +1 -0
  73. package/package.json +5 -1
@@ -43,6 +43,7 @@ declare const blockPrettierPluginPackageJson: bingo_stratum.BlockWithoutAddons<{
43
43
  devDependencies?: Record<string, string> | undefined;
44
44
  scripts?: Record<string, string> | undefined;
45
45
  } | undefined;
46
+ pnpm?: string | undefined;
46
47
  rulesetId?: string | undefined;
47
48
  usage?: string | undefined;
48
49
  version?: string | undefined;
@@ -43,6 +43,7 @@ declare const blockPrettierPluginSh: bingo_stratum.BlockWithoutAddons<{
43
43
  devDependencies?: Record<string, string> | undefined;
44
44
  scripts?: Record<string, string> | undefined;
45
45
  } | undefined;
46
+ pnpm?: string | undefined;
46
47
  rulesetId?: string | undefined;
47
48
  usage?: string | undefined;
48
49
  version?: string | undefined;
@@ -47,6 +47,7 @@ declare const blockREADME: bingo_stratum.BlockWithAddons<{
47
47
  devDependencies?: Record<string, string> | undefined;
48
48
  scripts?: Record<string, string> | undefined;
49
49
  } | undefined;
50
+ pnpm?: string | undefined;
50
51
  rulesetId?: string | undefined;
51
52
  usage?: string | undefined;
52
53
  version?: string | undefined;
@@ -43,6 +43,7 @@ declare const blockReleaseIt: bingo_stratum.BlockWithoutAddons<{
43
43
  devDependencies?: Record<string, string> | undefined;
44
44
  scripts?: Record<string, string> | undefined;
45
45
  } | undefined;
46
+ pnpm?: string | undefined;
46
47
  rulesetId?: string | undefined;
47
48
  usage?: string | undefined;
48
49
  version?: string | undefined;
@@ -43,6 +43,7 @@ declare const blockRenovate: bingo_stratum.BlockWithoutAddons<{
43
43
  devDependencies?: Record<string, string> | undefined;
44
44
  scripts?: Record<string, string> | undefined;
45
45
  } | undefined;
46
+ pnpm?: string | undefined;
46
47
  rulesetId?: string | undefined;
47
48
  usage?: string | undefined;
48
49
  version?: string | undefined;
@@ -45,6 +45,7 @@ declare const blockRepositoryBranchRuleset: bingo_stratum.BlockWithAddons<{
45
45
  devDependencies?: Record<string, string> | undefined;
46
46
  scripts?: Record<string, string> | undefined;
47
47
  } | undefined;
48
+ pnpm?: string | undefined;
48
49
  rulesetId?: string | undefined;
49
50
  usage?: string | undefined;
50
51
  version?: string | undefined;
@@ -43,6 +43,7 @@ declare const blockRepositoryLabels: bingo_stratum.BlockWithoutAddons<{
43
43
  devDependencies?: Record<string, string> | undefined;
44
44
  scripts?: Record<string, string> | undefined;
45
45
  } | undefined;
46
+ pnpm?: string | undefined;
46
47
  rulesetId?: string | undefined;
47
48
  usage?: string | undefined;
48
49
  version?: string | undefined;
@@ -48,6 +48,7 @@ declare const blockRepositorySecrets: bingo_stratum.BlockWithAddons<{
48
48
  devDependencies?: Record<string, string> | undefined;
49
49
  scripts?: Record<string, string> | undefined;
50
50
  } | undefined;
51
+ pnpm?: string | undefined;
51
52
  rulesetId?: string | undefined;
52
53
  usage?: string | undefined;
53
54
  version?: string | undefined;
@@ -43,6 +43,7 @@ declare const blockRepositorySettings: bingo_stratum.BlockWithoutAddons<{
43
43
  devDependencies?: Record<string, string> | undefined;
44
44
  scripts?: Record<string, string> | undefined;
45
45
  } | undefined;
46
+ pnpm?: string | undefined;
46
47
  rulesetId?: string | undefined;
47
48
  usage?: string | undefined;
48
49
  version?: string | undefined;
@@ -43,6 +43,7 @@ declare const blockSecurityDocs: bingo_stratum.BlockWithoutAddons<{
43
43
  devDependencies?: Record<string, string> | undefined;
44
44
  scripts?: Record<string, string> | undefined;
45
45
  } | undefined;
46
+ pnpm?: string | undefined;
46
47
  rulesetId?: string | undefined;
47
48
  usage?: string | undefined;
48
49
  version?: string | undefined;
@@ -46,6 +46,7 @@ declare const blockTSup: bingo_stratum.BlockWithAddons<{
46
46
  devDependencies?: Record<string, string> | undefined;
47
47
  scripts?: Record<string, string> | undefined;
48
48
  } | undefined;
49
+ pnpm?: string | undefined;
49
50
  rulesetId?: string | undefined;
50
51
  usage?: string | undefined;
51
52
  version?: string | undefined;
@@ -43,6 +43,7 @@ declare const blockTemplatedWith: bingo_stratum.BlockWithoutAddons<{
43
43
  devDependencies?: Record<string, string> | undefined;
44
44
  scripts?: Record<string, string> | undefined;
45
45
  } | undefined;
46
+ pnpm?: string | undefined;
46
47
  rulesetId?: string | undefined;
47
48
  usage?: string | undefined;
48
49
  version?: string | undefined;
@@ -43,6 +43,7 @@ declare const blockTypeScript: bingo_stratum.BlockWithoutAddons<{
43
43
  devDependencies?: Record<string, string> | undefined;
44
44
  scripts?: Record<string, string> | undefined;
45
45
  } | undefined;
46
+ pnpm?: string | undefined;
46
47
  rulesetId?: string | undefined;
47
48
  usage?: string | undefined;
48
49
  version?: string | undefined;
@@ -52,6 +52,7 @@ declare const blockVSCode: bingo_stratum.BlockWithAddons<{
52
52
  devDependencies?: Record<string, string> | undefined;
53
53
  scripts?: Record<string, string> | undefined;
54
54
  } | undefined;
55
+ pnpm?: string | undefined;
55
56
  rulesetId?: string | undefined;
56
57
  usage?: string | undefined;
57
58
  version?: string | undefined;
@@ -58,6 +58,7 @@ declare const blockVitest: bingo_stratum.BlockWithAddons<{
58
58
  devDependencies?: Record<string, string> | undefined;
59
59
  scripts?: Record<string, string> | undefined;
60
60
  } | undefined;
61
+ pnpm?: string | undefined;
61
62
  rulesetId?: string | undefined;
62
63
  usage?: string | undefined;
63
64
  version?: string | undefined;
@@ -73,7 +73,10 @@ Calls to \`console.log\`, \`console.warn\`, and other console methods will cause
73
73
  }
74
74
  ],
75
75
  ignores: ["coverage", "**/*.snap"],
76
- imports: [{ source: "@vitest/eslint-plugin", specifier: "vitest" }]
76
+ imports: [{ source: "@vitest/eslint-plugin", specifier: "vitest" }],
77
+ settings: {
78
+ vitest: { typecheck: true }
79
+ }
77
80
  }),
78
81
  blockExampleFiles({
79
82
  files: {
@@ -83,7 +86,7 @@ import { greet } from "./greet.js";
83
86
 
84
87
  const message = "Yay, testing!";
85
88
 
86
- describe("greet", () => {
89
+ describe(greet, () => {
87
90
  it("logs to the console once when message is provided as a string", () => {
88
91
  const logger = vi.spyOn(console, "log").mockImplementation(() => undefined);
89
92
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/blocks/blockVitest.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { base } from \"../base.js\";\nimport { getPackageDependencies } from \"../data/packageData.js\";\nimport { resolveBin } from \"../utils/resolveBin.js\";\nimport { blockCSpell } from \"./blockCSpell.js\";\nimport { blockDevelopmentDocs } from \"./blockDevelopmentDocs.js\";\nimport { blockESLint } from \"./blockESLint.js\";\nimport { blockExampleFiles } from \"./blockExampleFiles.js\";\nimport { blockGitHubActionsCI, zActionStep } from \"./blockGitHubActionsCI.js\";\nimport { blockGitignore } from \"./blockGitignore.js\";\nimport { blockPackageJson } from \"./blockPackageJson.js\";\nimport { blockPrettier } from \"./blockPrettier.js\";\nimport { blockTSup } from \"./blockTSup.js\";\nimport { blockVSCode } from \"./blockVSCode.js\";\nimport { CommandPhase } from \"./phases.js\";\n\nexport const blockVitest = base.createBlock({\n\tabout: {\n\t\tname: \"Vitest\",\n\t},\n\taddons: {\n\t\tactionSteps: z.array(zActionStep).default([]),\n\t\tcoverage: z\n\t\t\t.object({\n\t\t\t\texclude: z.array(z.string()).optional(),\n\t\t\t\tinclude: z.array(z.string()).optional(),\n\t\t\t})\n\t\t\t.default({}),\n\t\texclude: z.array(z.string()).default([]),\n\t},\n\tproduce({ addons }) {\n\t\tconst { actionSteps, coverage, exclude = [] } = addons;\n\t\tconst excludeText = JSON.stringify(exclude);\n\n\t\treturn {\n\t\t\taddons: [\n\t\t\t\tblockCSpell({\n\t\t\t\t\tignores: [\"coverage\"],\n\t\t\t\t}),\n\t\t\t\tblockDevelopmentDocs({\n\t\t\t\t\tsections: {\n\t\t\t\t\t\tTesting: {\n\t\t\t\t\t\t\tcontents: `\n[Vitest](https://vitest.dev) is used for tests.\nYou can run it locally on the command-line:\n\n\\`\\`\\`shell\npnpm run test\n\\`\\`\\`\n\nAdd the \\`--coverage\\` flag to compute test coverage and place reports in the \\`coverage/\\` directory:\n\n\\`\\`\\`shell\npnpm run test --coverage\n\\`\\`\\`\n\nNote that [console-fail-test](https://github.com/JoshuaKGoldberg/console-fail-test) is enabled for all test runs.\nCalls to \\`console.log\\`, \\`console.warn\\`, and other console methods will cause a test to fail.\n\n\n\t\t`,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockESLint({\n\t\t\t\t\textensions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\textends: [\"vitest.configs.recommended\"],\n\t\t\t\t\t\t\tfiles: [\"**/*.test.*\"],\n\t\t\t\t\t\t\trules: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tentries: {\n\t\t\t\t\t\t\t\t\t\t\"@typescript-eslint/no-unsafe-assignment\": \"off\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tignores: [\"coverage\", \"**/*.snap\"],\n\t\t\t\t\timports: [{ source: \"@vitest/eslint-plugin\", specifier: \"vitest\" }],\n\t\t\t\t}),\n\t\t\t\tblockExampleFiles({\n\t\t\t\t\tfiles: {\n\t\t\t\t\t\t\"greet.test.ts\": `import { describe, expect, it, vi } from \"vitest\";\n\nimport { greet } from \"./greet.js\";\n\nconst message = \"Yay, testing!\";\n\ndescribe(\"greet\", () => {\n\tit(\"logs to the console once when message is provided as a string\", () => {\n\t\tconst logger = vi.spyOn(console, \"log\").mockImplementation(() => undefined);\n\n\t\tgreet(message);\n\n\t\texpect(logger).toHaveBeenCalledWith(message);\n\t\texpect(logger).toHaveBeenCalledTimes(1);\n\t});\n\n\tit(\"logs to the console once when message is provided as an object\", () => {\n\t\tconst logger = vi.spyOn(console, \"log\").mockImplementation(() => undefined);\n\n\t\tgreet({ message });\n\n\t\texpect(logger).toHaveBeenCalledWith(message);\n\t\texpect(logger).toHaveBeenCalledTimes(1);\n\t});\n\n\tit(\"logs once when times is not provided in an object\", () => {\n\t\tconst logger = vi.fn();\n\n\t\tgreet({ logger, message });\n\n\t\texpect(logger).toHaveBeenCalledWith(message);\n\t\texpect(logger).toHaveBeenCalledTimes(1);\n\t});\n\n\tit(\"logs a specified number of times when times is provided\", () => {\n\t\tconst logger = vi.fn();\n\t\tconst times = 7;\n\n\t\tgreet({ logger, message, times });\n\n\t\texpect(logger).toHaveBeenCalledWith(message);\n\t\texpect(logger).toHaveBeenCalledTimes(7);\n\t});\n});\n`,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockGitignore({\n\t\t\t\t\tignores: [\"/coverage\"],\n\t\t\t\t}),\n\t\t\t\tblockGitHubActionsCI({\n\t\t\t\t\tjobs: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: \"Test\",\n\t\t\t\t\t\t\tsteps: [{ run: \"pnpm run test --coverage\" }, ...actionSteps],\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}),\n\t\t\t\tblockPackageJson({\n\t\t\t\t\tproperties: {\n\t\t\t\t\t\tdevDependencies: getPackageDependencies(\n\t\t\t\t\t\t\t\"@vitest/coverage-v8\",\n\t\t\t\t\t\t\t\"@vitest/eslint-plugin\",\n\t\t\t\t\t\t\t\"console-fail-test\",\n\t\t\t\t\t\t\t\"vitest\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tscripts: {\n\t\t\t\t\t\t\ttest: \"vitest\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockPrettier({\n\t\t\t\t\tignores: [\"/coverage\"],\n\t\t\t\t}),\n\t\t\t\tblockTSup({\n\t\t\t\t\tentry: [\"!src/**/*.test.*\"],\n\t\t\t\t}),\n\t\t\t\tblockVSCode({\n\t\t\t\t\tdebuggers: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\targs: [\"run\", \"${relativeFile}\"],\n\t\t\t\t\t\t\tautoAttachChildProcesses: true,\n\t\t\t\t\t\t\tconsole: \"integratedTerminal\",\n\t\t\t\t\t\t\tname: \"Debug Current Test File\",\n\t\t\t\t\t\t\tprogram: \"${workspaceRoot}/node_modules/vitest/vitest.mjs\",\n\t\t\t\t\t\t\trequest: \"launch\",\n\t\t\t\t\t\t\tskipFiles: [\"<node_internals>/**\", \"**/node_modules/**\"],\n\t\t\t\t\t\t\tsmartStep: true,\n\t\t\t\t\t\t\ttype: \"node\",\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\textensions: [\"vitest.explorer\"],\n\t\t\t\t}),\n\t\t\t],\n\t\t\tfiles: {\n\t\t\t\t\"vitest.config.ts\": `import { defineConfig } from \"vitest/config\";\n\nexport default defineConfig({\n\ttest: {\n\t\tclearMocks: true,\n\t\tcoverage: {\n\t\t\tall: true,\n\t\t\t${\n\t\t\t\tcoverage.exclude?.length\n\t\t\t\t\t? `exclude: ${JSON.stringify(coverage.exclude)},\n\t\t\t`\n\t\t\t\t\t: \"\"\n\t\t\t}include: ${JSON.stringify(coverage.include)},\n\t\t\treporter: [\"html\", \"lcov\"],\n\t\t},\n\t\texclude: [${excludeText.slice(1, excludeText.length - 1)}, \"node_modules\"],\n\t\tsetupFiles: [\"console-fail-test/setup\"],\n\t},\n});\n\t`,\n\t\t\t},\n\t\t};\n\t},\n\ttransition() {\n\t\treturn {\n\t\t\tscripts: [\n\t\t\t\t{\n\t\t\t\t\tcommands: [\n\t\t\t\t\t\t`node ${resolveBin(\"remove-dependencies/bin/index.js\")} eslint-plugin-jest eslint-plugin-mocha eslint-plugin-vitest jest mocha`,\n\t\t\t\t\t],\n\t\t\t\t\tphase: CommandPhase.Process,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcommands: [\"rm .mocha* jest.config.* vitest.config.*\"],\n\t\t\t\t\tphase: CommandPhase.Migrations,\n\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AAAA,UACT,OAAO,CAAC,kBAAkB;AAAA,QAC3B,CAAC;AAAA,QACD,YAAY;AAAA,UACX,WAAW;AAAA,YACV;AAAA,cACC,MAAM,CAAC,OAAO,iBAAiB;AAAA,cAC/B,0BAA0B;AAAA,cAC1B,SAAS;AAAA,cACT,MAAM;AAAA,cACN,SAAS;AAAA,cACT,SAAS;AAAA,cACT,WAAW,CAAC,uBAAuB,oBAAoB;AAAA,cACvD,WAAW;AAAA,cACX,MAAM;AAAA,YACP;AAAA,UACD;AAAA,UACA,YAAY,CAAC,iBAAiB;AAAA,QAC/B,CAAC;AAAA,MACF;AAAA,MACA,OAAO;AAAA,QACN,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAQpB,SAAS,SAAS,SACf,YAAY,KAAK,UAAU,SAAS,OAAO,CAAC;AAAA,OAE5C,EACJ,YAAY,KAAK,UAAU,SAAS,OAAO,CAAC;AAAA;AAAA;AAAA,cAGjC,YAAY,MAAM,GAAG,YAAY,SAAS,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,MAKvD;AAAA,IACD;AAAA,EACD;AAAA,EACA,aAAa;AACZ,WAAO;AAAA,MACN,SAAS;AAAA,QACR;AAAA,UACC,UAAU;AAAA,YACT,QAAQ,WAAW,kCAAkC,CAAC;AAAA,UACvD;AAAA,UACA,OAAO,aAAa;AAAA,QACrB;AAAA,QACA;AAAA,UACC,UAAU,CAAC,0CAA0C;AAAA,UACrD,OAAO,aAAa;AAAA,UACpB,QAAQ;AAAA,QACT;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACD,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../src/blocks/blockVitest.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { base } from \"../base.js\";\nimport { getPackageDependencies } from \"../data/packageData.js\";\nimport { resolveBin } from \"../utils/resolveBin.js\";\nimport { blockCSpell } from \"./blockCSpell.js\";\nimport { blockDevelopmentDocs } from \"./blockDevelopmentDocs.js\";\nimport { blockESLint } from \"./blockESLint.js\";\nimport { blockExampleFiles } from \"./blockExampleFiles.js\";\nimport { blockGitHubActionsCI, zActionStep } from \"./blockGitHubActionsCI.js\";\nimport { blockGitignore } from \"./blockGitignore.js\";\nimport { blockPackageJson } from \"./blockPackageJson.js\";\nimport { blockPrettier } from \"./blockPrettier.js\";\nimport { blockTSup } from \"./blockTSup.js\";\nimport { blockVSCode } from \"./blockVSCode.js\";\nimport { CommandPhase } from \"./phases.js\";\n\nexport const blockVitest = base.createBlock({\n\tabout: {\n\t\tname: \"Vitest\",\n\t},\n\taddons: {\n\t\tactionSteps: z.array(zActionStep).default([]),\n\t\tcoverage: z\n\t\t\t.object({\n\t\t\t\texclude: z.array(z.string()).optional(),\n\t\t\t\tinclude: z.array(z.string()).optional(),\n\t\t\t})\n\t\t\t.default({}),\n\t\texclude: z.array(z.string()).default([]),\n\t},\n\tproduce({ addons }) {\n\t\tconst { actionSteps, coverage, exclude = [] } = addons;\n\t\tconst excludeText = JSON.stringify(exclude);\n\n\t\treturn {\n\t\t\taddons: [\n\t\t\t\tblockCSpell({\n\t\t\t\t\tignores: [\"coverage\"],\n\t\t\t\t}),\n\t\t\t\tblockDevelopmentDocs({\n\t\t\t\t\tsections: {\n\t\t\t\t\t\tTesting: {\n\t\t\t\t\t\t\tcontents: `\n[Vitest](https://vitest.dev) is used for tests.\nYou can run it locally on the command-line:\n\n\\`\\`\\`shell\npnpm run test\n\\`\\`\\`\n\nAdd the \\`--coverage\\` flag to compute test coverage and place reports in the \\`coverage/\\` directory:\n\n\\`\\`\\`shell\npnpm run test --coverage\n\\`\\`\\`\n\nNote that [console-fail-test](https://github.com/JoshuaKGoldberg/console-fail-test) is enabled for all test runs.\nCalls to \\`console.log\\`, \\`console.warn\\`, and other console methods will cause a test to fail.\n\n\n\t\t`,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockESLint({\n\t\t\t\t\textensions: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\textends: [\"vitest.configs.recommended\"],\n\t\t\t\t\t\t\tfiles: [\"**/*.test.*\"],\n\t\t\t\t\t\t\trules: [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tentries: {\n\t\t\t\t\t\t\t\t\t\t\"@typescript-eslint/no-unsafe-assignment\": \"off\",\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\tignores: [\"coverage\", \"**/*.snap\"],\n\t\t\t\t\timports: [{ source: \"@vitest/eslint-plugin\", specifier: \"vitest\" }],\n\t\t\t\t\tsettings: {\n\t\t\t\t\t\tvitest: { typecheck: true },\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockExampleFiles({\n\t\t\t\t\tfiles: {\n\t\t\t\t\t\t\"greet.test.ts\": `import { describe, expect, it, vi } from \"vitest\";\n\nimport { greet } from \"./greet.js\";\n\nconst message = \"Yay, testing!\";\n\ndescribe(greet, () => {\n\tit(\"logs to the console once when message is provided as a string\", () => {\n\t\tconst logger = vi.spyOn(console, \"log\").mockImplementation(() => undefined);\n\n\t\tgreet(message);\n\n\t\texpect(logger).toHaveBeenCalledWith(message);\n\t\texpect(logger).toHaveBeenCalledTimes(1);\n\t});\n\n\tit(\"logs to the console once when message is provided as an object\", () => {\n\t\tconst logger = vi.spyOn(console, \"log\").mockImplementation(() => undefined);\n\n\t\tgreet({ message });\n\n\t\texpect(logger).toHaveBeenCalledWith(message);\n\t\texpect(logger).toHaveBeenCalledTimes(1);\n\t});\n\n\tit(\"logs once when times is not provided in an object\", () => {\n\t\tconst logger = vi.fn();\n\n\t\tgreet({ logger, message });\n\n\t\texpect(logger).toHaveBeenCalledWith(message);\n\t\texpect(logger).toHaveBeenCalledTimes(1);\n\t});\n\n\tit(\"logs a specified number of times when times is provided\", () => {\n\t\tconst logger = vi.fn();\n\t\tconst times = 7;\n\n\t\tgreet({ logger, message, times });\n\n\t\texpect(logger).toHaveBeenCalledWith(message);\n\t\texpect(logger).toHaveBeenCalledTimes(7);\n\t});\n});\n`,\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockGitignore({\n\t\t\t\t\tignores: [\"/coverage\"],\n\t\t\t\t}),\n\t\t\t\tblockGitHubActionsCI({\n\t\t\t\t\tjobs: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tname: \"Test\",\n\t\t\t\t\t\t\tsteps: [{ run: \"pnpm run test --coverage\" }, ...actionSteps],\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t}),\n\t\t\t\tblockPackageJson({\n\t\t\t\t\tproperties: {\n\t\t\t\t\t\tdevDependencies: getPackageDependencies(\n\t\t\t\t\t\t\t\"@vitest/coverage-v8\",\n\t\t\t\t\t\t\t\"@vitest/eslint-plugin\",\n\t\t\t\t\t\t\t\"console-fail-test\",\n\t\t\t\t\t\t\t\"vitest\",\n\t\t\t\t\t\t),\n\t\t\t\t\t\tscripts: {\n\t\t\t\t\t\t\ttest: \"vitest\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t}),\n\t\t\t\tblockPrettier({\n\t\t\t\t\tignores: [\"/coverage\"],\n\t\t\t\t}),\n\t\t\t\tblockTSup({\n\t\t\t\t\tentry: [\"!src/**/*.test.*\"],\n\t\t\t\t}),\n\t\t\t\tblockVSCode({\n\t\t\t\t\tdebuggers: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\targs: [\"run\", \"${relativeFile}\"],\n\t\t\t\t\t\t\tautoAttachChildProcesses: true,\n\t\t\t\t\t\t\tconsole: \"integratedTerminal\",\n\t\t\t\t\t\t\tname: \"Debug Current Test File\",\n\t\t\t\t\t\t\tprogram: \"${workspaceRoot}/node_modules/vitest/vitest.mjs\",\n\t\t\t\t\t\t\trequest: \"launch\",\n\t\t\t\t\t\t\tskipFiles: [\"<node_internals>/**\", \"**/node_modules/**\"],\n\t\t\t\t\t\t\tsmartStep: true,\n\t\t\t\t\t\t\ttype: \"node\",\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\textensions: [\"vitest.explorer\"],\n\t\t\t\t}),\n\t\t\t],\n\t\t\tfiles: {\n\t\t\t\t\"vitest.config.ts\": `import { defineConfig } from \"vitest/config\";\n\nexport default defineConfig({\n\ttest: {\n\t\tclearMocks: true,\n\t\tcoverage: {\n\t\t\tall: true,\n\t\t\t${\n\t\t\t\tcoverage.exclude?.length\n\t\t\t\t\t? `exclude: ${JSON.stringify(coverage.exclude)},\n\t\t\t`\n\t\t\t\t\t: \"\"\n\t\t\t}include: ${JSON.stringify(coverage.include)},\n\t\t\treporter: [\"html\", \"lcov\"],\n\t\t},\n\t\texclude: [${excludeText.slice(1, excludeText.length - 1)}, \"node_modules\"],\n\t\tsetupFiles: [\"console-fail-test/setup\"],\n\t},\n});\n\t`,\n\t\t\t},\n\t\t};\n\t},\n\ttransition() {\n\t\treturn {\n\t\t\tscripts: [\n\t\t\t\t{\n\t\t\t\t\tcommands: [\n\t\t\t\t\t\t`node ${resolveBin(\"remove-dependencies/bin/index.js\")} eslint-plugin-jest eslint-plugin-mocha eslint-plugin-vitest jest mocha`,\n\t\t\t\t\t],\n\t\t\t\t\tphase: CommandPhase.Process,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tcommands: [\"rm .mocha* jest.config.* vitest.config.*\"],\n\t\t\t\t\tphase: CommandPhase.Migrations,\n\t\t\t\t\tsilent: true,\n\t\t\t\t},\n\t\t\t],\n\t\t};\n\t},\n});\n"],"mappings":"AAAA,SAAS,SAAS;AAElB,SAAS,YAAY;AACrB,SAAS,8BAA8B;AACvC,SAAS,kBAAkB;AAC3B,SAAS,mBAAmB;AAC5B,SAAS,4BAA4B;AACrC,SAAS,mBAAmB;AAC5B,SAAS,yBAAyB;AAClC,SAAS,sBAAsB,mBAAmB;AAClD,SAAS,sBAAsB;AAC/B,SAAS,wBAAwB;AACj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AC,uBAAuB,oBAAoB;AAAA,cACvD,WAAW;AAAA,cACX,MAAM;AAAA,YACP;AAAA,UACD;AAAA,UACA,YAAY,CAAC,iBAAiB;AAAA,QAC/B,CAAC;AAAA,MACF;AAAA,MACA,OAAO;AAAA,QACN,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAQpB,SAAS,SAAS,SACf,YAAY,KAAK,UAAU,SAAS,OAAO,CAAC;AAAA,OAE5C,EACJ,YAAY,KAAK,UAAU,SAAS,OAAO,CAAC;AAAA;AAAA;AAAA,cAGjC,YAAY,MAAM,GAAG,YAAY,SAAS,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,MAKvD;AAAA,IACD;AAAA,EACD;AAAA,EACA,aAAa;AACZ,WAAO;AAAA,MACN,SAAS;AAAA,QACR;AAAA,UACC,UAAU;AAAA,YACT,QAAQ,WAAW,kCAAkC,CAAC;AAAA,UACvD;AAAA,UACA,OAAO,aAAa;AAAA,QACrB;AAAA,QACA;AAAA,UACC,UAAU,CAAC,0CAA0C;AAAA,UACrD,OAAO,aAAa;AAAA,UACpB,QAAQ;AAAA,QACT;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACD,CAAC;","names":[]}
@@ -88,6 +88,7 @@ declare const blocks: {
88
88
  devDependencies?: Record<string, string> | undefined;
89
89
  scripts?: Record<string, string> | undefined;
90
90
  } | undefined;
91
+ pnpm?: string | undefined;
91
92
  rulesetId?: string | undefined;
92
93
  usage?: string | undefined;
93
94
  version?: string | undefined;
@@ -135,6 +136,7 @@ declare const blocks: {
135
136
  devDependencies?: Record<string, string> | undefined;
136
137
  scripts?: Record<string, string> | undefined;
137
138
  } | undefined;
139
+ pnpm?: string | undefined;
138
140
  rulesetId?: string | undefined;
139
141
  usage?: string | undefined;
140
142
  version?: string | undefined;
@@ -184,6 +186,7 @@ declare const blocks: {
184
186
  devDependencies?: Record<string, string> | undefined;
185
187
  scripts?: Record<string, string> | undefined;
186
188
  } | undefined;
189
+ pnpm?: string | undefined;
187
190
  rulesetId?: string | undefined;
188
191
  usage?: string | undefined;
189
192
  version?: string | undefined;
@@ -231,6 +234,7 @@ declare const blocks: {
231
234
  devDependencies?: Record<string, string> | undefined;
232
235
  scripts?: Record<string, string> | undefined;
233
236
  } | undefined;
237
+ pnpm?: string | undefined;
234
238
  rulesetId?: string | undefined;
235
239
  usage?: string | undefined;
236
240
  version?: string | undefined;
@@ -278,6 +282,7 @@ declare const blocks: {
278
282
  devDependencies?: Record<string, string> | undefined;
279
283
  scripts?: Record<string, string> | undefined;
280
284
  } | undefined;
285
+ pnpm?: string | undefined;
281
286
  rulesetId?: string | undefined;
282
287
  usage?: string | undefined;
283
288
  version?: string | undefined;
@@ -328,6 +333,7 @@ declare const blocks: {
328
333
  devDependencies?: Record<string, string> | undefined;
329
334
  scripts?: Record<string, string> | undefined;
330
335
  } | undefined;
336
+ pnpm?: string | undefined;
331
337
  rulesetId?: string | undefined;
332
338
  usage?: string | undefined;
333
339
  version?: string | undefined;
@@ -389,6 +395,7 @@ declare const blocks: {
389
395
  devDependencies?: Record<string, string> | undefined;
390
396
  scripts?: Record<string, string> | undefined;
391
397
  } | undefined;
398
+ pnpm?: string | undefined;
392
399
  rulesetId?: string | undefined;
393
400
  usage?: string | undefined;
394
401
  version?: string | undefined;
@@ -462,6 +469,7 @@ declare const blocks: {
462
469
  devDependencies?: Record<string, string> | undefined;
463
470
  scripts?: Record<string, string> | undefined;
464
471
  } | undefined;
472
+ pnpm?: string | undefined;
465
473
  rulesetId?: string | undefined;
466
474
  usage?: string | undefined;
467
475
  version?: string | undefined;
@@ -509,6 +517,7 @@ declare const blocks: {
509
517
  devDependencies?: Record<string, string> | undefined;
510
518
  scripts?: Record<string, string> | undefined;
511
519
  } | undefined;
520
+ pnpm?: string | undefined;
512
521
  rulesetId?: string | undefined;
513
522
  usage?: string | undefined;
514
523
  version?: string | undefined;
@@ -556,6 +565,7 @@ declare const blocks: {
556
565
  devDependencies?: Record<string, string> | undefined;
557
566
  scripts?: Record<string, string> | undefined;
558
567
  } | undefined;
568
+ pnpm?: string | undefined;
559
569
  rulesetId?: string | undefined;
560
570
  usage?: string | undefined;
561
571
  version?: string | undefined;
@@ -603,6 +613,7 @@ declare const blocks: {
603
613
  devDependencies?: Record<string, string> | undefined;
604
614
  scripts?: Record<string, string> | undefined;
605
615
  } | undefined;
616
+ pnpm?: string | undefined;
606
617
  rulesetId?: string | undefined;
607
618
  usage?: string | undefined;
608
619
  version?: string | undefined;
@@ -650,6 +661,7 @@ declare const blocks: {
650
661
  devDependencies?: Record<string, string> | undefined;
651
662
  scripts?: Record<string, string> | undefined;
652
663
  } | undefined;
664
+ pnpm?: string | undefined;
653
665
  rulesetId?: string | undefined;
654
666
  usage?: string | undefined;
655
667
  version?: string | undefined;
@@ -697,6 +709,7 @@ declare const blocks: {
697
709
  devDependencies?: Record<string, string> | undefined;
698
710
  scripts?: Record<string, string> | undefined;
699
711
  } | undefined;
712
+ pnpm?: string | undefined;
700
713
  rulesetId?: string | undefined;
701
714
  usage?: string | undefined;
702
715
  version?: string | undefined;
@@ -744,6 +757,7 @@ declare const blocks: {
744
757
  devDependencies?: Record<string, string> | undefined;
745
758
  scripts?: Record<string, string> | undefined;
746
759
  } | undefined;
760
+ pnpm?: string | undefined;
747
761
  rulesetId?: string | undefined;
748
762
  usage?: string | undefined;
749
763
  version?: string | undefined;
@@ -791,6 +805,7 @@ declare const blocks: {
791
805
  devDependencies?: Record<string, string> | undefined;
792
806
  scripts?: Record<string, string> | undefined;
793
807
  } | undefined;
808
+ pnpm?: string | undefined;
794
809
  rulesetId?: string | undefined;
795
810
  usage?: string | undefined;
796
811
  version?: string | undefined;
@@ -838,6 +853,7 @@ declare const blocks: {
838
853
  devDependencies?: Record<string, string> | undefined;
839
854
  scripts?: Record<string, string> | undefined;
840
855
  } | undefined;
856
+ pnpm?: string | undefined;
841
857
  rulesetId?: string | undefined;
842
858
  usage?: string | undefined;
843
859
  version?: string | undefined;
@@ -885,6 +901,7 @@ declare const blocks: {
885
901
  devDependencies?: Record<string, string> | undefined;
886
902
  scripts?: Record<string, string> | undefined;
887
903
  } | undefined;
904
+ pnpm?: string | undefined;
888
905
  rulesetId?: string | undefined;
889
906
  usage?: string | undefined;
890
907
  version?: string | undefined;
@@ -932,6 +949,7 @@ declare const blocks: {
932
949
  devDependencies?: Record<string, string> | undefined;
933
950
  scripts?: Record<string, string> | undefined;
934
951
  } | undefined;
952
+ pnpm?: string | undefined;
935
953
  rulesetId?: string | undefined;
936
954
  usage?: string | undefined;
937
955
  version?: string | undefined;
@@ -979,6 +997,7 @@ declare const blocks: {
979
997
  devDependencies?: Record<string, string> | undefined;
980
998
  scripts?: Record<string, string> | undefined;
981
999
  } | undefined;
1000
+ pnpm?: string | undefined;
982
1001
  rulesetId?: string | undefined;
983
1002
  usage?: string | undefined;
984
1003
  version?: string | undefined;
@@ -1039,6 +1058,7 @@ declare const blocks: {
1039
1058
  devDependencies?: Record<string, string> | undefined;
1040
1059
  scripts?: Record<string, string> | undefined;
1041
1060
  } | undefined;
1061
+ pnpm?: string | undefined;
1042
1062
  rulesetId?: string | undefined;
1043
1063
  usage?: string | undefined;
1044
1064
  version?: string | undefined;
@@ -1086,6 +1106,7 @@ declare const blocks: {
1086
1106
  devDependencies?: Record<string, string> | undefined;
1087
1107
  scripts?: Record<string, string> | undefined;
1088
1108
  } | undefined;
1109
+ pnpm?: string | undefined;
1089
1110
  rulesetId?: string | undefined;
1090
1111
  usage?: string | undefined;
1091
1112
  version?: string | undefined;
@@ -1133,6 +1154,7 @@ declare const blocks: {
1133
1154
  devDependencies?: Record<string, string> | undefined;
1134
1155
  scripts?: Record<string, string> | undefined;
1135
1156
  } | undefined;
1157
+ pnpm?: string | undefined;
1136
1158
  rulesetId?: string | undefined;
1137
1159
  usage?: string | undefined;
1138
1160
  version?: string | undefined;
@@ -1182,6 +1204,7 @@ declare const blocks: {
1182
1204
  devDependencies?: Record<string, string> | undefined;
1183
1205
  scripts?: Record<string, string> | undefined;
1184
1206
  } | undefined;
1207
+ pnpm?: string | undefined;
1185
1208
  rulesetId?: string | undefined;
1186
1209
  usage?: string | undefined;
1187
1210
  version?: string | undefined;
@@ -1231,6 +1254,7 @@ declare const blocks: {
1231
1254
  devDependencies?: Record<string, string> | undefined;
1232
1255
  scripts?: Record<string, string> | undefined;
1233
1256
  } | undefined;
1257
+ pnpm?: string | undefined;
1234
1258
  rulesetId?: string | undefined;
1235
1259
  usage?: string | undefined;
1236
1260
  version?: string | undefined;
@@ -1280,6 +1304,7 @@ declare const blocks: {
1280
1304
  devDependencies?: Record<string, string> | undefined;
1281
1305
  scripts?: Record<string, string> | undefined;
1282
1306
  } | undefined;
1307
+ pnpm?: string | undefined;
1283
1308
  rulesetId?: string | undefined;
1284
1309
  usage?: string | undefined;
1285
1310
  version?: string | undefined;
@@ -1327,6 +1352,7 @@ declare const blocks: {
1327
1352
  devDependencies?: Record<string, string> | undefined;
1328
1353
  scripts?: Record<string, string> | undefined;
1329
1354
  } | undefined;
1355
+ pnpm?: string | undefined;
1330
1356
  rulesetId?: string | undefined;
1331
1357
  usage?: string | undefined;
1332
1358
  version?: string | undefined;
@@ -1374,6 +1400,7 @@ declare const blocks: {
1374
1400
  devDependencies?: Record<string, string> | undefined;
1375
1401
  scripts?: Record<string, string> | undefined;
1376
1402
  } | undefined;
1403
+ pnpm?: string | undefined;
1377
1404
  rulesetId?: string | undefined;
1378
1405
  usage?: string | undefined;
1379
1406
  version?: string | undefined;
@@ -1430,6 +1457,7 @@ declare const blocks: {
1430
1457
  devDependencies?: Record<string, string> | undefined;
1431
1458
  scripts?: Record<string, string> | undefined;
1432
1459
  } | undefined;
1460
+ pnpm?: string | undefined;
1433
1461
  rulesetId?: string | undefined;
1434
1462
  usage?: string | undefined;
1435
1463
  version?: string | undefined;
@@ -1477,6 +1505,7 @@ declare const blocks: {
1477
1505
  devDependencies?: Record<string, string> | undefined;
1478
1506
  scripts?: Record<string, string> | undefined;
1479
1507
  } | undefined;
1508
+ pnpm?: string | undefined;
1480
1509
  rulesetId?: string | undefined;
1481
1510
  usage?: string | undefined;
1482
1511
  version?: string | undefined;
@@ -1524,6 +1553,7 @@ declare const blocks: {
1524
1553
  devDependencies?: Record<string, string> | undefined;
1525
1554
  scripts?: Record<string, string> | undefined;
1526
1555
  } | undefined;
1556
+ pnpm?: string | undefined;
1527
1557
  rulesetId?: string | undefined;
1528
1558
  usage?: string | undefined;
1529
1559
  version?: string | undefined;
@@ -1580,6 +1610,7 @@ declare const blocks: {
1580
1610
  devDependencies?: Record<string, string> | undefined;
1581
1611
  scripts?: Record<string, string> | undefined;
1582
1612
  } | undefined;
1613
+ pnpm?: string | undefined;
1583
1614
  rulesetId?: string | undefined;
1584
1615
  usage?: string | undefined;
1585
1616
  version?: string | undefined;
@@ -1627,6 +1658,7 @@ declare const blocks: {
1627
1658
  devDependencies?: Record<string, string> | undefined;
1628
1659
  scripts?: Record<string, string> | undefined;
1629
1660
  } | undefined;
1661
+ pnpm?: string | undefined;
1630
1662
  rulesetId?: string | undefined;
1631
1663
  usage?: string | undefined;
1632
1664
  version?: string | undefined;
@@ -1674,6 +1706,7 @@ declare const blocks: {
1674
1706
  devDependencies?: Record<string, string> | undefined;
1675
1707
  scripts?: Record<string, string> | undefined;
1676
1708
  } | undefined;
1709
+ pnpm?: string | undefined;
1677
1710
  rulesetId?: string | undefined;
1678
1711
  usage?: string | undefined;
1679
1712
  version?: string | undefined;
@@ -1721,6 +1754,7 @@ declare const blocks: {
1721
1754
  devDependencies?: Record<string, string> | undefined;
1722
1755
  scripts?: Record<string, string> | undefined;
1723
1756
  } | undefined;
1757
+ pnpm?: string | undefined;
1724
1758
  rulesetId?: string | undefined;
1725
1759
  usage?: string | undefined;
1726
1760
  version?: string | undefined;
@@ -1772,6 +1806,7 @@ declare const blocks: {
1772
1806
  devDependencies?: Record<string, string> | undefined;
1773
1807
  scripts?: Record<string, string> | undefined;
1774
1808
  } | undefined;
1809
+ pnpm?: string | undefined;
1775
1810
  rulesetId?: string | undefined;
1776
1811
  usage?: string | undefined;
1777
1812
  version?: string | undefined;
@@ -1819,6 +1854,7 @@ declare const blocks: {
1819
1854
  devDependencies?: Record<string, string> | undefined;
1820
1855
  scripts?: Record<string, string> | undefined;
1821
1856
  } | undefined;
1857
+ pnpm?: string | undefined;
1822
1858
  rulesetId?: string | undefined;
1823
1859
  usage?: string | undefined;
1824
1860
  version?: string | undefined;
@@ -1866,6 +1902,7 @@ declare const blocks: {
1866
1902
  devDependencies?: Record<string, string> | undefined;
1867
1903
  scripts?: Record<string, string> | undefined;
1868
1904
  } | undefined;
1905
+ pnpm?: string | undefined;
1869
1906
  rulesetId?: string | undefined;
1870
1907
  usage?: string | undefined;
1871
1908
  version?: string | undefined;
@@ -1913,6 +1950,7 @@ declare const blocks: {
1913
1950
  devDependencies?: Record<string, string> | undefined;
1914
1951
  scripts?: Record<string, string> | undefined;
1915
1952
  } | undefined;
1953
+ pnpm?: string | undefined;
1916
1954
  rulesetId?: string | undefined;
1917
1955
  usage?: string | undefined;
1918
1956
  version?: string | undefined;
@@ -1960,6 +1998,7 @@ declare const blocks: {
1960
1998
  devDependencies?: Record<string, string> | undefined;
1961
1999
  scripts?: Record<string, string> | undefined;
1962
2000
  } | undefined;
2001
+ pnpm?: string | undefined;
1963
2002
  rulesetId?: string | undefined;
1964
2003
  usage?: string | undefined;
1965
2004
  version?: string | undefined;
@@ -2010,6 +2049,7 @@ declare const blocks: {
2010
2049
  devDependencies?: Record<string, string> | undefined;
2011
2050
  scripts?: Record<string, string> | undefined;
2012
2051
  } | undefined;
2052
+ pnpm?: string | undefined;
2013
2053
  rulesetId?: string | undefined;
2014
2054
  usage?: string | undefined;
2015
2055
  version?: string | undefined;
@@ -2057,6 +2097,7 @@ declare const blocks: {
2057
2097
  devDependencies?: Record<string, string> | undefined;
2058
2098
  scripts?: Record<string, string> | undefined;
2059
2099
  } | undefined;
2100
+ pnpm?: string | undefined;
2060
2101
  rulesetId?: string | undefined;
2061
2102
  usage?: string | undefined;
2062
2103
  version?: string | undefined;
@@ -2119,6 +2160,7 @@ declare const blocks: {
2119
2160
  devDependencies?: Record<string, string> | undefined;
2120
2161
  scripts?: Record<string, string> | undefined;
2121
2162
  } | undefined;
2163
+ pnpm?: string | undefined;
2122
2164
  rulesetId?: string | undefined;
2123
2165
  usage?: string | undefined;
2124
2166
  version?: string | undefined;
@@ -2175,6 +2217,7 @@ declare const blocks: {
2175
2217
  devDependencies?: Record<string, string> | undefined;
2176
2218
  scripts?: Record<string, string> | undefined;
2177
2219
  } | undefined;
2220
+ pnpm?: string | undefined;
2178
2221
  rulesetId?: string | undefined;
2179
2222
  usage?: string | undefined;
2180
2223
  version?: string | undefined;
@@ -1,5 +1,5 @@
1
1
  var name = "create-typescript-app";
2
- var version = "2.0.0";
2
+ var version = "2.1.0";
3
3
  var description = "Quickstart-friendly TypeScript template with comprehensive, configurable, opinionated tooling. 🎁";
4
4
  var repository = {
5
5
  type: "git",
@@ -104,9 +104,13 @@ var devDependencies = {
104
104
  "typescript-eslint": "8.26.0",
105
105
  vitest: "3.0.7"
106
106
  };
107
+ var packageManager = "pnpm@10.4.0";
107
108
  var engines = {
108
109
  node: ">=18.3.0"
109
110
  };
111
+ var publishConfig = {
112
+ provenance: true
113
+ };
110
114
  var _package = {
111
115
  name: name,
112
116
  version: version,
@@ -124,7 +128,9 @@ var _package = {
124
128
  },
125
129
  dependencies: dependencies,
126
130
  devDependencies: devDependencies,
127
- engines: engines
131
+ packageManager: packageManager,
132
+ engines: engines,
133
+ publishConfig: publishConfig
128
134
  };
129
135
 
130
136
  declare const ______package_json_author: typeof author;
@@ -137,12 +143,14 @@ declare const ______package_json_files: typeof files;
137
143
  declare const ______package_json_license: typeof license;
138
144
  declare const ______package_json_main: typeof main;
139
145
  declare const ______package_json_name: typeof name;
146
+ declare const ______package_json_packageManager: typeof packageManager;
147
+ declare const ______package_json_publishConfig: typeof publishConfig;
140
148
  declare const ______package_json_repository: typeof repository;
141
149
  declare const ______package_json_scripts: typeof scripts;
142
150
  declare const ______package_json_type: typeof type;
143
151
  declare const ______package_json_version: typeof version;
144
152
  declare namespace ______package_json {
145
- export { ______package_json_author as author, ______package_json_bin as bin, _package as default, ______package_json_dependencies as dependencies, ______package_json_description as description, ______package_json_devDependencies as devDependencies, ______package_json_engines as engines, ______package_json_files as files, ______package_json_license as license, ______package_json_main as main, ______package_json_name as name, ______package_json_repository as repository, ______package_json_scripts as scripts, ______package_json_type as type, ______package_json_version as version };
153
+ export { ______package_json_author as author, ______package_json_bin as bin, _package as default, ______package_json_dependencies as dependencies, ______package_json_description as description, ______package_json_devDependencies as devDependencies, ______package_json_engines as engines, ______package_json_files as files, ______package_json_license as license, ______package_json_main as main, ______package_json_name as name, ______package_json_packageManager as packageManager, ______package_json_publishConfig as publishConfig, ______package_json_repository as repository, ______package_json_scripts as scripts, ______package_json_type as type, ______package_json_version as version };
146
154
  }
147
155
 
148
156
  declare const packageData: typeof ______package_json;
package/lib/index.d.ts CHANGED
@@ -148,6 +148,7 @@ declare const createConfig: bingo.CreateTemplateConfig<{
148
148
  devDependencies?: Record<string, string> | undefined;
149
149
  scripts?: Record<string, string> | undefined;
150
150
  }>>;
151
+ pnpm: zod.ZodOptional<zod.ZodString>;
151
152
  repository: zod.ZodString;
152
153
  rulesetId: zod.ZodOptional<zod.ZodString>;
153
154
  title: zod.ZodString;
@@ -196,6 +197,7 @@ declare const createConfig: bingo.CreateTemplateConfig<{
196
197
  devDependencies?: Record<string, string> | undefined;
197
198
  scripts?: Record<string, string> | undefined;
198
199
  } | undefined;
200
+ pnpm?: string | undefined;
199
201
  rulesetId?: string | undefined;
200
202
  usage?: string | undefined;
201
203
  version?: string | undefined;
@@ -0,0 +1,5 @@
1
+ import { PartialPackageData } from '../types.js';
2
+
3
+ declare function readPnpm(packageData: () => Promise<PartialPackageData>): Promise<string>;
4
+
5
+ export { readPnpm };
@@ -0,0 +1,8 @@
1
+ async function readPnpm(packageData) {
2
+ const { packageManager } = await packageData();
3
+ return packageManager?.startsWith("pnpm@") ? packageManager.slice("pnpm@".length) : "10.4.0";
4
+ }
5
+ export {
6
+ readPnpm
7
+ };
8
+ //# sourceMappingURL=readPnpm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/options/readPnpm.ts"],"sourcesContent":["import { PartialPackageData } from \"../types.js\";\n\nexport async function readPnpm(packageData: () => Promise<PartialPackageData>) {\n\tconst { packageManager } = await packageData();\n\n\treturn packageManager?.startsWith(\"pnpm@\")\n\t\t? packageManager.slice(\"pnpm@\".length)\n\t\t: \"10.4.0\";\n}\n"],"mappings":"AAEA,eAAsB,SAAS,aAAgD;AAC9E,QAAM,EAAE,eAAe,IAAI,MAAM,YAAY;AAE7C,SAAO,gBAAgB,WAAW,OAAO,IACtC,eAAe,MAAM,QAAQ,MAAM,IACnC;AACJ;","names":[]}
@@ -96,6 +96,7 @@ declare const presetCommon: bingo_stratum.Preset<{
96
96
  devDependencies?: Record<string, string> | undefined;
97
97
  scripts?: Record<string, string> | undefined;
98
98
  }>>;
99
+ pnpm: zod.ZodOptional<zod.ZodString>;
99
100
  repository: zod.ZodString;
100
101
  rulesetId: zod.ZodOptional<zod.ZodString>;
101
102
  title: zod.ZodString;
@@ -96,6 +96,7 @@ declare const presetEverything: bingo_stratum.Preset<{
96
96
  devDependencies?: Record<string, string> | undefined;
97
97
  scripts?: Record<string, string> | undefined;
98
98
  }>>;
99
+ pnpm: zod.ZodOptional<zod.ZodString>;
99
100
  repository: zod.ZodString;
100
101
  rulesetId: zod.ZodOptional<zod.ZodString>;
101
102
  title: zod.ZodString;