create-typescript-app 1.58.0 → 1.60.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/shared/createCleanupCommands.js +1 -1
- package/lib/shared/createCleanupCommands.js.map +1 -1
- package/lib/shared/options/args.d.ts +0 -5
- package/lib/shared/options/args.js +0 -6
- package/lib/shared/options/args.js.map +1 -1
- package/lib/shared/options/augmentOptionsWithExcludes.js +2 -1
- package/lib/shared/options/augmentOptionsWithExcludes.js.map +1 -1
- package/lib/shared/options/ensureRepositoryExists.js +2 -1
- package/lib/shared/options/ensureRepositoryExists.js.map +1 -1
- package/lib/shared/options/exclusionKeys.d.ts +1 -1
- package/lib/shared/options/exclusionKeys.js +0 -5
- package/lib/shared/options/exclusionKeys.js.map +1 -1
- package/lib/shared/options/getGitHub.js +6 -8
- package/lib/shared/options/getGitHub.js.map +1 -1
- package/lib/shared/options/optionsSchema.d.ts +24 -28
- package/lib/shared/options/optionsSchema.js +0 -1
- package/lib/shared/options/optionsSchema.js.map +1 -1
- package/lib/shared/options/readOptions.js +0 -1
- package/lib/shared/options/readOptions.js.map +1 -1
- package/lib/shared/types.d.ts +0 -1
- package/lib/steps/finalizeDependencies.js +5 -6
- package/lib/steps/finalizeDependencies.js.map +1 -1
- package/lib/steps/uninstallPackages.js +1 -0
- package/lib/steps/uninstallPackages.js.map +1 -1
- package/lib/steps/updateLocalFiles.js +1 -1
- package/lib/steps/updateLocalFiles.js.map +1 -1
- package/lib/steps/writing/creation/{createESLintRC.d.ts → createESLintConfig.d.ts} +2 -2
- package/lib/steps/writing/creation/createESLintConfig.js +154 -0
- package/lib/steps/writing/creation/createESLintConfig.js.map +1 -0
- package/lib/steps/writing/creation/dotGitHub/actions.js +4 -1
- package/lib/steps/writing/creation/dotGitHub/actions.js.map +1 -1
- package/lib/steps/writing/creation/dotGitHub/createDotGitHubFiles.js +1 -0
- package/lib/steps/writing/creation/dotGitHub/createDotGitHubFiles.js.map +1 -1
- package/lib/steps/writing/creation/dotGitHub/createWorkflows.js +1 -1
- package/lib/steps/writing/creation/dotGitHub/createWorkflows.js.map +1 -1
- package/lib/steps/writing/creation/dotVSCode.js +1 -0
- package/lib/steps/writing/creation/dotVSCode.js.map +1 -1
- package/lib/steps/writing/creation/rootFiles.d.ts +1 -2
- package/lib/steps/writing/creation/rootFiles.js +3 -7
- package/lib/steps/writing/creation/rootFiles.js.map +1 -1
- package/lib/steps/writing/creation/writePackageJson.js +1 -2
- package/lib/steps/writing/creation/writePackageJson.js.map +1 -1
- package/package.json +36 -35
- package/lib/steps/writing/creation/createESLintRC.js +0 -167
- package/lib/steps/writing/creation/createESLintRC.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/steps/finalizeDependencies.ts"],"sourcesContent":["import { execaCommand } from \"execa\";\n\nimport { readPackageData, removeDependencies } from \"../shared/packages.js\";\nimport { Options } from \"../shared/types.js\";\n\nexport async function finalizeDependencies(options: Options) {\n\tconst devDependencies = [\n\t\t\"@
|
|
1
|
+
{"version":3,"sources":["../../src/steps/finalizeDependencies.ts"],"sourcesContent":["import { execaCommand } from \"execa\";\n\nimport { readPackageData, removeDependencies } from \"../shared/packages.js\";\nimport { Options } from \"../shared/types.js\";\n\nexport async function finalizeDependencies(options: Options) {\n\tconst devDependencies = [\n\t\t\"@eslint/js\",\n\t\t\"@eslint-community/eslint-plugin-eslint-comments\",\n\t\t\"@types/eslint-plugin-markdown\",\n\t\t\"eslint\",\n\t\t\"eslint-plugin-jsdoc\",\n\t\t\"eslint-plugin-n\",\n\t\t\"eslint-plugin-regexp\",\n\t\t\"husky\",\n\t\t\"lint-staged\",\n\t\t\"prettier\",\n\t\t\"prettier-plugin-curly\",\n\t\t\"prettier-plugin-packagejson\",\n\t\t\"tsup\",\n\t\t\"typescript\",\n\t\t\"typescript-eslint\",\n\t\t...(options.excludeAllContributors ? [] : [\"all-contributors-cli\"]),\n\t\t...(options.excludeLintJson ? [] : [\"eslint-plugin-jsonc\"]),\n\t\t...(options.excludeLintJson && options.excludeLintPackageJson\n\t\t\t? []\n\t\t\t: [\"jsonc-eslint-parser\"]),\n\t\t...(options.excludeLintKnip ? [] : [\"knip\"]),\n\t\t...(options.excludeLintMd\n\t\t\t? []\n\t\t\t: [\n\t\t\t\t\t\"eslint-plugin-markdown\",\n\t\t\t\t\t\"markdownlint\",\n\t\t\t\t\t\"markdownlint-cli\",\n\t\t\t\t\t\"sentences-per-line\",\n\t\t\t ]),\n\t\t...(options.excludeLintPackageJson ? [] : [\"eslint-plugin-package-json\"]),\n\t\t...(options.excludeLintPerfectionist\n\t\t\t? []\n\t\t\t: [\"eslint-plugin-perfectionist\"]),\n\t\t...(options.excludeLintSpelling ? [] : [\"cspell\"]),\n\t\t...(options.excludeLintYml ? [] : [\"eslint-plugin-yml\"]),\n\t\t...(options.excludeReleases\n\t\t\t? []\n\t\t\t: [\"@release-it/conventional-changelog\", \"release-it\"]),\n\t\t...(options.excludeTests\n\t\t\t? []\n\t\t\t: [\n\t\t\t\t\t\"@vitest/coverage-v8\",\n\t\t\t\t\t\"console-fail-test\",\n\t\t\t\t\t\"eslint-plugin-vitest\",\n\t\t\t\t\t\"vitest\",\n\t\t\t ]),\n\t]\n\t\t.filter(Boolean)\n\t\t.sort()\n\t\t.map((packageName) => `${packageName}@latest`)\n\t\t.join(\" \");\n\n\tawait execaCommand(\n\t\t`pnpm add ${devDependencies} -D${options.offline ? \" --offline\" : \"\"}`,\n\t);\n\n\tif (!options.excludeAllContributors) {\n\t\tawait execaCommand(`npx all-contributors-cli generate`);\n\t\tawait removeDependencies(\n\t\t\t[\"all-contributors-cli\", \"all-contributors-for-repository\"],\n\t\t\t(await readPackageData()).devDependencies,\n\t\t\t\"-D\",\n\t\t);\n\t}\n\n\tawait execaCommand(`pnpm dedupe`);\n}\n"],"mappings":"AAAA,SAAS,oBAAoB;AAE7B,SAAS,iBAAiB,0BAA0B;AAGpD,eAAsB,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,OACzD,MAAM,gBAAgB,GAAG;AAAA,MAC1B;AAAA,IACD;AAAA,EACD;AAEA,QAAM,aAAa,aAAa;AACjC;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/steps/uninstallPackages.ts"],"sourcesContent":["import { $ } from \"execa\";\n\nimport { readPackageData, removeDependencies } from \"../shared/packages.js\";\n\nexport async function uninstallPackages(offline: boolean | undefined) {\n\tconst packageData = await readPackageData();\n\n\tawait removeDependencies(\n\t\t[\n\t\t\t\"@clack/prompts\",\n\t\t\t\"all-contributors-for-repository\",\n\t\t\t\"chalk\",\n\t\t\t\"execa\",\n\t\t\t\"git-remote-origin-url\",\n\t\t\t\"git-url-parse\",\n\t\t\t\"lazy-value\",\n\t\t\t\"js-yaml\",\n\t\t\t\"npm-user\",\n\t\t\t\"parse-author\",\n\t\t\t\"rimraf\",\n\t\t\t\"octokit\",\n\t\t\t\"prettier\",\n\t\t\t\"replace-in-file\",\n\t\t\t\"title-case\",\n\t\t\t\"zod\",\n\t\t\t\"zod-validation-error\",\n\t\t],\n\t\tpackageData.dependencies,\n\t);\n\n\tawait removeDependencies(\n\t\t[\n\t\t\t\"@octokit/request-error\",\n\t\t\t\"@types/git-url-parse\",\n\t\t\t\"@types/js-yaml\",\n\t\t\t\"@types/parse-author\",\n\t\t\t\"all-contributors-cli\",\n\t\t\t\"c8\",\n\t\t\t\"eslint-config-prettier\",\n\t\t\t\"globby\",\n\t\t\t\"tsx\",\n\t\t],\n\t\tpackageData.devDependencies,\n\t\t\"-D\",\n\t);\n\n\tawait $`pnpm add prettier -D${offline ? \" --offline\" : \"\"}`;\n}\n"],"mappings":"AAAA,SAAS,SAAS;AAElB,SAAS,iBAAiB,0BAA0B;AAEpD,eAAsB,kBAAkB,SAA8B;AACrE,QAAM,cAAc,MAAM,gBAAgB;AAE1C,QAAM;AAAA,IACL;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,IACA,YAAY;AAAA,EACb;AAEA,QAAM;AAAA,IACL;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,EACD;AAEA,QAAM,wBAAwB,UAAU,eAAe,EAAE;AAC1D;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/steps/uninstallPackages.ts"],"sourcesContent":["import { $ } from \"execa\";\n\nimport { readPackageData, removeDependencies } from \"../shared/packages.js\";\n\nexport async function uninstallPackages(offline: boolean | undefined) {\n\tconst packageData = await readPackageData();\n\n\tawait removeDependencies(\n\t\t[\n\t\t\t\"@clack/prompts\",\n\t\t\t\"all-contributors-for-repository\",\n\t\t\t\"chalk\",\n\t\t\t\"execa\",\n\t\t\t\"get-github-auth-token\",\n\t\t\t\"git-remote-origin-url\",\n\t\t\t\"git-url-parse\",\n\t\t\t\"lazy-value\",\n\t\t\t\"js-yaml\",\n\t\t\t\"npm-user\",\n\t\t\t\"parse-author\",\n\t\t\t\"rimraf\",\n\t\t\t\"octokit\",\n\t\t\t\"prettier\",\n\t\t\t\"replace-in-file\",\n\t\t\t\"title-case\",\n\t\t\t\"zod\",\n\t\t\t\"zod-validation-error\",\n\t\t],\n\t\tpackageData.dependencies,\n\t);\n\n\tawait removeDependencies(\n\t\t[\n\t\t\t\"@octokit/request-error\",\n\t\t\t\"@types/git-url-parse\",\n\t\t\t\"@types/js-yaml\",\n\t\t\t\"@types/parse-author\",\n\t\t\t\"all-contributors-cli\",\n\t\t\t\"c8\",\n\t\t\t\"eslint-config-prettier\",\n\t\t\t\"globby\",\n\t\t\t\"tsx\",\n\t\t],\n\t\tpackageData.devDependencies,\n\t\t\"-D\",\n\t);\n\n\tawait $`pnpm add prettier -D${offline ? \" --offline\" : \"\"}`;\n}\n"],"mappings":"AAAA,SAAS,SAAS;AAElB,SAAS,iBAAiB,0BAA0B;AAEpD,eAAsB,kBAAkB,SAA8B;AACrE,QAAM,cAAc,MAAM,gBAAgB;AAE1C,QAAM;AAAA,IACL;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,IACA,YAAY;AAAA,EACb;AAEA,QAAM;AAAA,IACL;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACD;AAAA,IACA,YAAY;AAAA,IACZ;AAAA,EACD;AAEA,QAAM,wBAAwB,UAAU,eAAe,EAAE;AAC1D;","names":[]}
|
|
@@ -9,7 +9,7 @@ async function updateLocalFiles(options) {
|
|
|
9
9
|
createJoshuaKGoldbergReplacement(options),
|
|
10
10
|
[/JoshuaKGoldberg/g, options.owner, "package.json"],
|
|
11
11
|
[/create-typescript-app/g, options.repository],
|
|
12
|
-
[/\/\*\n.+\*\/\n\n/gs, ``, ".
|
|
12
|
+
[/\/\*\n.+\*\/\n\n/gs, ``, "eslint.config.js"],
|
|
13
13
|
[/"author": ".+"/g, `"author": "${options.author}"`, "./package.json"],
|
|
14
14
|
...options.mode === "migrate" ? [] : [
|
|
15
15
|
// Only creating a new repository should remove these parts.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/steps/updateLocalFiles.ts"],"sourcesContent":["import replaceInFile, { From, To } from \"replace-in-file\";\n\nimport { readFileSafeAsJson } from \"../shared/readFileSafeAsJson.js\";\nimport { Options } from \"../shared/types.js\";\nimport { createJoshuaKGoldbergReplacement } from \"./createJoshuaKGoldbergReplacement.js\";\nimport { endOfReadmeTemplateLine } from \"./updateReadme.js\";\n\ninterface ExistingPackageData {\n\tdescription?: string;\n\tversion?: string;\n}\n\nexport async function updateLocalFiles(options: Options) {\n\tconst existingPackage = ((await readFileSafeAsJson(\"./package.json\")) ??\n\t\t{}) as ExistingPackageData;\n\n\tconst replacements: [From, To, (string | string[])?][] = [\n\t\t[/Create TypeScript App/g, options.title],\n\t\tcreateJoshuaKGoldbergReplacement(options),\n\t\t[/JoshuaKGoldberg/g, options.owner, \"package.json\"],\n\t\t[/create-typescript-app/g, options.repository],\n\t\t[/\\/\\*\\n.+\\*\\/\\n\\n/gs, ``, \".
|
|
1
|
+
{"version":3,"sources":["../../src/steps/updateLocalFiles.ts"],"sourcesContent":["import replaceInFile, { From, To } from \"replace-in-file\";\n\nimport { readFileSafeAsJson } from \"../shared/readFileSafeAsJson.js\";\nimport { Options } from \"../shared/types.js\";\nimport { createJoshuaKGoldbergReplacement } from \"./createJoshuaKGoldbergReplacement.js\";\nimport { endOfReadmeTemplateLine } from \"./updateReadme.js\";\n\ninterface ExistingPackageData {\n\tdescription?: string;\n\tversion?: string;\n}\n\nexport async function updateLocalFiles(options: Options) {\n\tconst existingPackage = ((await readFileSafeAsJson(\"./package.json\")) ??\n\t\t{}) as ExistingPackageData;\n\n\tconst replacements: [From, To, (string | string[])?][] = [\n\t\t[/Create TypeScript App/g, options.title],\n\t\tcreateJoshuaKGoldbergReplacement(options),\n\t\t[/JoshuaKGoldberg/g, options.owner, \"package.json\"],\n\t\t[/create-typescript-app/g, options.repository],\n\t\t[/\\/\\*\\n.+\\*\\/\\n\\n/gs, ``, \"eslint.config.js\"],\n\t\t[/\"author\": \".+\"/g, `\"author\": \"${options.author}\"`, \"./package.json\"],\n\t\t...(options.mode === \"migrate\"\n\t\t\t? []\n\t\t\t: ([\n\t\t\t\t\t// Only creating a new repository should remove these parts.\n\t\t\t\t\t// Existing ones might coincidentally have them too.\n\t\t\t\t\t[/\"test:create\": \".+\\n/g, ``, \"./package.json\"],\n\t\t\t\t\t[/\"test:initialize\": \".*/g, ``, \"./package.json\"],\n\t\t\t\t\t[/\"initialize\": \".*/g, ``, \"./package.json\"],\n\t\t\t\t\t[/\"test:migrate\": \".+\\n/g, ``, \"./package.json\"],\n\t\t\t\t\t[\n\t\t\t\t\t\t/## Getting Started.*## Development/gs,\n\t\t\t\t\t\t`## Development`,\n\t\t\t\t\t\t\"./README.md\",\n\t\t\t\t\t],\n\t\t\t\t\t[/\\n## Setup Scripts.*$/gs, \"\", \"./.github/DEVELOPMENT.md\"],\n\t\t\t\t\t[`\\t\\t\"src/initialize/index.ts\",\\n`, ``, \"./knip.json\"],\n\t\t\t\t\t[`\\t\\t\"src/migrate/index.ts\",\\n`, ``, \"./knip.json\"],\n\t\t\t\t\t[\n\t\t\t\t\t\t`[\"src/index.ts!\", \"script/initialize*.js\"]`,\n\t\t\t\t\t\t`\"src/index.ts!\"`,\n\t\t\t\t\t\t\"./knip.json\",\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t`[\"src/**/*.ts!\", \"script/**/*.js\"]`,\n\t\t\t\t\t\t`\"src/**/*.ts!\"`,\n\t\t\t\t\t\t\"./knip.json\",\n\t\t\t\t\t],\n\t\t\t\t\t// Edge case: migration scripts will rewrite README.md attribution\n\t\t\t\t\t[\n\t\t\t\t\t\t/> 💙 This package was templated with .+\\./g,\n\t\t\t\t\t\tendOfReadmeTemplateLine,\n\t\t\t\t\t\t\"./README.md\",\n\t\t\t\t\t],\n\t\t\t ] as typeof replacements)),\n\t];\n\n\tif (existingPackage.description) {\n\t\treplacements.push([existingPackage.description, options.description]);\n\t}\n\n\tif (options.mode !== \"migrate\") {\n\t\treplacements.push([/\"bin\": \".+\\n/g, ``, \"./package.json\"]);\n\n\t\tif (options.mode === \"initialize\" && existingPackage.version) {\n\t\t\treplacements.push([\n\t\t\t\tnew RegExp(`\"version\": \"${existingPackage.version}\"`, \"g\"),\n\t\t\t\t`\"version\": \"0.0.0\"`,\n\t\t\t\t\"./package.json\",\n\t\t\t]);\n\t\t}\n\t}\n\n\tfor (const [from, to, files = [\"./.github/**/*\", \"./*.*\"]] of replacements) {\n\t\ttry {\n\t\t\tawait replaceInFile({\n\t\t\t\tallowEmptyPaths: true,\n\t\t\t\tfiles,\n\t\t\t\tfrom,\n\t\t\t\tto,\n\t\t\t});\n\t\t} catch (error) {\n\t\t\tconst toString = typeof to === \"function\" ? \"(function)\" : to;\n\t\t\tthrow new Error(\n\t\t\t\t`Failed to replace ${from.toString()} with ${toString} in ${files.toString()}`,\n\t\t\t\t{\n\t\t\t\t\tcause: error,\n\t\t\t\t},\n\t\t\t);\n\t\t}\n\t}\n}\n"],"mappings":"AAAA,OAAO,mBAAiC;AAExC,SAAS,0BAA0B;AAEnC,SAAS,wCAAwC;AACjD,SAAS,+BAA+B;AAOxC,eAAsB,iBAAiB,SAAkB;AACxD,QAAM,kBAAoB,MAAM,mBAAmB,gBAAgB,KAClE,CAAC;AAEF,QAAM,eAAmD;AAAA,IACxD,CAAC,0BAA0B,QAAQ,KAAK;AAAA,IACxC,iCAAiC,OAAO;AAAA,IACxC,CAAC,oBAAoB,QAAQ,OAAO,cAAc;AAAA,IAClD,CAAC,0BAA0B,QAAQ,UAAU;AAAA,IAC7C,CAAC,sBAAsB,IAAI,kBAAkB;AAAA,IAC7C,CAAC,mBAAmB,cAAc,QAAQ,MAAM,KAAK,gBAAgB;AAAA,IACrE,GAAI,QAAQ,SAAS,YAClB,CAAC,IACA;AAAA;AAAA;AAAA,MAGD,CAAC,yBAAyB,IAAI,gBAAgB;AAAA,MAC9C,CAAC,2BAA2B,IAAI,gBAAgB;AAAA,MAChD,CAAC,sBAAsB,IAAI,gBAAgB;AAAA,MAC3C,CAAC,0BAA0B,IAAI,gBAAgB;AAAA,MAC/C;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA,MACA,CAAC,2BAA2B,IAAI,0BAA0B;AAAA,MAC1D,CAAC;AAAA,GAAoC,IAAI,aAAa;AAAA,MACtD,CAAC;AAAA,GAAiC,IAAI,aAAa;AAAA,MACnD;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA,MACA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA;AAAA,MAEA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA,IACA;AAAA,EACJ;AAEA,MAAI,gBAAgB,aAAa;AAChC,iBAAa,KAAK,CAAC,gBAAgB,aAAa,QAAQ,WAAW,CAAC;AAAA,EACrE;AAEA,MAAI,QAAQ,SAAS,WAAW;AAC/B,iBAAa,KAAK,CAAC,iBAAiB,IAAI,gBAAgB,CAAC;AAEzD,QAAI,QAAQ,SAAS,gBAAgB,gBAAgB,SAAS;AAC7D,mBAAa,KAAK;AAAA,QACjB,IAAI,OAAO,eAAe,gBAAgB,OAAO,KAAK,GAAG;AAAA,QACzD;AAAA,QACA;AAAA,MACD,CAAC;AAAA,IACF;AAAA,EACD;AAEA,aAAW,CAAC,MAAM,IAAI,QAAQ,CAAC,kBAAkB,OAAO,CAAC,KAAK,cAAc;AAC3E,QAAI;AACH,YAAM,cAAc;AAAA,QACnB,iBAAiB;AAAA,QACjB;AAAA,QACA;AAAA,QACA;AAAA,MACD,CAAC;AAAA,IACF,SAAS,OAAO;AACf,YAAM,WAAW,OAAO,OAAO,aAAa,eAAe;AAC3D,YAAM,IAAI;AAAA,QACT,qBAAqB,KAAK,SAAS,CAAC,SAAS,QAAQ,OAAO,MAAM,SAAS,CAAC;AAAA,QAC5E;AAAA,UACC,OAAO;AAAA,QACR;AAAA,MACD;AAAA,IACD;AAAA,EACD;AACD;","names":[]}
|
|
@@ -2,6 +2,6 @@ import { Options } from '../../../shared/types.js';
|
|
|
2
2
|
import 'zod';
|
|
3
3
|
import '../../../shared/codes.js';
|
|
4
4
|
|
|
5
|
-
declare function
|
|
5
|
+
declare function createESLintConfig(options: Options): Promise<string>;
|
|
6
6
|
|
|
7
|
-
export {
|
|
7
|
+
export { createESLintConfig };
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { formatTypeScript } from "./formatters/formatTypeScript.js";
|
|
2
|
+
async function createESLintConfig(options) {
|
|
3
|
+
const tseslintBase = options.excludeLintStrict ? "recommended" : "strict";
|
|
4
|
+
const imports = [
|
|
5
|
+
`import eslint from "@eslint/js";`,
|
|
6
|
+
!options.excludeLintESLint && `import comments from "@eslint-community/eslint-plugin-eslint-comments/configs";`,
|
|
7
|
+
!options.excludeLintJSDoc && `import jsdoc from "eslint-plugin-jsdoc";`,
|
|
8
|
+
!options.excludeLintJson && `import jsonc from "eslint-plugin-jsonc";`,
|
|
9
|
+
!options.excludeLintMd && `import markdown from "eslint-plugin-markdown";`,
|
|
10
|
+
`import n from "eslint-plugin-n";`,
|
|
11
|
+
!options.excludeLintPackageJson && `import packageJson from "eslint-plugin-package-json/configs/recommended";`,
|
|
12
|
+
!options.excludeLintPerfectionist && `import perfectionistNatural from "eslint-plugin-perfectionist/configs/recommended-natural";`,
|
|
13
|
+
!options.excludeLintRegex && `import * as regexp from "eslint-plugin-regexp";`,
|
|
14
|
+
!options.excludeTests && `import vitest from "eslint-plugin-vitest";`,
|
|
15
|
+
!options.excludeLintYml && `import yml from "eslint-plugin-yml";`,
|
|
16
|
+
`import tseslint from "typescript-eslint";`
|
|
17
|
+
].filter(Boolean);
|
|
18
|
+
const elements = [
|
|
19
|
+
`eslint.configs.recommended,`,
|
|
20
|
+
!options.excludeLintJson && ` ...jsonc.configs["flat/recommended-with-json"],`,
|
|
21
|
+
!options.excludeLintMd && ` ...markdown.configs.recommended,`,
|
|
22
|
+
!options.excludeLintYml && ` ...yml.configs["flat/recommended"],`,
|
|
23
|
+
!options.excludeLintYml && ` ...yml.configs["flat/prettier"],`,
|
|
24
|
+
!options.excludeLintESLint && ` comments.recommended,`,
|
|
25
|
+
!options.excludeLintJSDoc && ` jsdoc.configs["flat/recommended-typescript-error"],`,
|
|
26
|
+
` n.configs["flat/recommended"],`,
|
|
27
|
+
!options.excludeLintPackageJson && ` packageJson,`,
|
|
28
|
+
!options.excludeLintPerfectionist && ` perfectionistNatural,`,
|
|
29
|
+
!options.excludeLintRegex && ` regexp.configs["flat/recommended"],`
|
|
30
|
+
].filter(Boolean);
|
|
31
|
+
return await formatTypeScript(`${imports.join("\n")}
|
|
32
|
+
|
|
33
|
+
export default tseslint.config(
|
|
34
|
+
{
|
|
35
|
+
ignores: [${options.excludeTests ? "" : `
|
|
36
|
+
"coverage*",`}
|
|
37
|
+
"lib",
|
|
38
|
+
"node_modules",
|
|
39
|
+
"pnpm-lock.yaml",
|
|
40
|
+
"**/*.snap",
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
linterOptions: {
|
|
45
|
+
reportUnusedDisableDirectives: "error",
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
${elements.join("\n")}
|
|
49
|
+
...tseslint.config({
|
|
50
|
+
extends: ${options.excludeLintStylistic ? `tseslint.configs.${tseslintBase}TypeChecked` : `[
|
|
51
|
+
...tseslint.configs.${tseslintBase}TypeChecked,
|
|
52
|
+
...tseslint.configs.stylisticTypeChecked,
|
|
53
|
+
]`},
|
|
54
|
+
files: ["**/*.js", "**/*.ts"],
|
|
55
|
+
languageOptions: {
|
|
56
|
+
parserOptions: {
|
|
57
|
+
EXPERIMENTAL_useProjectService: {
|
|
58
|
+
allowDefaultProjectForFiles: ["./*.*s", "eslint.config.js"],
|
|
59
|
+
defaultProject: "./tsconfig.json",
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
rules: {
|
|
64
|
+
${!options.excludeLintJSDoc || !options.excludeLintStylistic ? "// These off-by-default rules work well for this repo and we like them on." : ""}${options.excludeLintJSDoc ? "" : `
|
|
65
|
+
"jsdoc/informative-docs": "error",`}${options.excludeLintStylistic ? "" : `
|
|
66
|
+
"logical-assignment-operators": [
|
|
67
|
+
"error",
|
|
68
|
+
"always",
|
|
69
|
+
{ enforceForIfStatements: true },
|
|
70
|
+
],
|
|
71
|
+
"operator-assignment": "error",`}
|
|
72
|
+
|
|
73
|
+
// These on-by-default rules don't work well for this repo and we like them off.${options.excludeLintJSDoc ? "" : `
|
|
74
|
+
"jsdoc/require-jsdoc": "off",
|
|
75
|
+
"jsdoc/require-param": "off",
|
|
76
|
+
"jsdoc/require-property": "off",
|
|
77
|
+
"jsdoc/require-returns": "off",`}
|
|
78
|
+
"no-constant-condition": "off",
|
|
79
|
+
|
|
80
|
+
// These on-by-default rules work well for this repo if configured
|
|
81
|
+
"@typescript-eslint/no-unused-vars": ["error", { caughtErrors: "all" }],${options.excludeLintPerfectionist ? "" : `
|
|
82
|
+
"perfectionist/sort-objects": [
|
|
83
|
+
"error",
|
|
84
|
+
{
|
|
85
|
+
order: "asc",
|
|
86
|
+
"partition-by-comment": true,
|
|
87
|
+
type: "natural",
|
|
88
|
+
},
|
|
89
|
+
],`}${options.excludeLintStylistic ? "" : `
|
|
90
|
+
|
|
91
|
+
// Stylistic concerns that don't interfere with Prettier
|
|
92
|
+
"no-useless-rename": "error",
|
|
93
|
+
"object-shorthand": "error",`}
|
|
94
|
+
},
|
|
95
|
+
}),
|
|
96
|
+
{
|
|
97
|
+
files: ["*.jsonc"],
|
|
98
|
+
rules: {
|
|
99
|
+
"jsonc/comma-dangle": "off",
|
|
100
|
+
"jsonc/no-comments": "off",
|
|
101
|
+
"jsonc/sort-keys": "error",
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
extends: [tseslint.configs.disableTypeChecked],
|
|
106
|
+
files: ["**/*.md/*.ts"],
|
|
107
|
+
rules: {
|
|
108
|
+
"n/no-missing-import": [
|
|
109
|
+
"error",
|
|
110
|
+
{ allowModules: ["${options.repository}"] },
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
},${options.excludeTests ? "" : `
|
|
114
|
+
{
|
|
115
|
+
files: ["**/*.test.*"],
|
|
116
|
+
languageOptions: {
|
|
117
|
+
globals: vitest.environments.env.globals,
|
|
118
|
+
},
|
|
119
|
+
plugins: { vitest, },
|
|
120
|
+
rules: {
|
|
121
|
+
...vitest.configs.recommended.rules,
|
|
122
|
+
|
|
123
|
+
// These on-by-default rules aren't useful in test files.
|
|
124
|
+
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
125
|
+
"@typescript-eslint/no-unsafe-call": "off",
|
|
126
|
+
},
|
|
127
|
+
},`}${options.excludeLintYml ? "" : `
|
|
128
|
+
{
|
|
129
|
+
files: ["**/*.{yml,yaml}"],
|
|
130
|
+
rules: {
|
|
131
|
+
"yml/file-extension": ["error", { extension: "yml" }],
|
|
132
|
+
"yml/sort-keys": [
|
|
133
|
+
"error",
|
|
134
|
+
{
|
|
135
|
+
order: { type: "asc" },
|
|
136
|
+
pathPattern: "^.*$",
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
"yml/sort-sequence-values": [
|
|
140
|
+
"error",
|
|
141
|
+
{
|
|
142
|
+
order: { type: "asc" },
|
|
143
|
+
pathPattern: "^.*$",
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
},
|
|
147
|
+
},`}
|
|
148
|
+
);
|
|
149
|
+
`);
|
|
150
|
+
}
|
|
151
|
+
export {
|
|
152
|
+
createESLintConfig
|
|
153
|
+
};
|
|
154
|
+
//# sourceMappingURL=createESLintConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/steps/writing/creation/createESLintConfig.ts"],"sourcesContent":["import { Options } from \"../../../shared/types.js\";\nimport { formatTypeScript } from \"./formatters/formatTypeScript.js\";\n\nexport async function createESLintConfig(options: Options) {\n\tconst tseslintBase = options.excludeLintStrict ? \"recommended\" : \"strict\";\n\n\tconst imports = [\n\t\t`import eslint from \"@eslint/js\";`,\n\t\t!options.excludeLintESLint &&\n\t\t\t`import comments from \"@eslint-community/eslint-plugin-eslint-comments/configs\";`,\n\t\t!options.excludeLintJSDoc && `import jsdoc from \"eslint-plugin-jsdoc\";`,\n\t\t!options.excludeLintJson && `import jsonc from \"eslint-plugin-jsonc\";`,\n\t\t!options.excludeLintMd && `import markdown from \"eslint-plugin-markdown\";`,\n\t\t`import n from \"eslint-plugin-n\";`,\n\t\t!options.excludeLintPackageJson &&\n\t\t\t`import packageJson from \"eslint-plugin-package-json/configs/recommended\";`,\n\t\t!options.excludeLintPerfectionist &&\n\t\t\t`import perfectionistNatural from \"eslint-plugin-perfectionist/configs/recommended-natural\";`,\n\t\t!options.excludeLintRegex &&\n\t\t\t`import * as regexp from \"eslint-plugin-regexp\";`,\n\t\t!options.excludeTests && `import vitest from \"eslint-plugin-vitest\";`,\n\t\t!options.excludeLintYml && `import yml from \"eslint-plugin-yml\";`,\n\t\t`import tseslint from \"typescript-eslint\";`,\n\t].filter(Boolean);\n\n\tconst elements = [\n\t\t`eslint.configs.recommended,`,\n\t\t!options.excludeLintJson &&\n\t\t\t`\t...jsonc.configs[\"flat/recommended-with-json\"],`,\n\t\t!options.excludeLintMd && `\t...markdown.configs.recommended,`,\n\t\t!options.excludeLintYml && `\t...yml.configs[\"flat/recommended\"],`,\n\t\t!options.excludeLintYml && `\t...yml.configs[\"flat/prettier\"],`,\n\t\t!options.excludeLintESLint && `\tcomments.recommended,`,\n\t\t!options.excludeLintJSDoc &&\n\t\t\t`\tjsdoc.configs[\"flat/recommended-typescript-error\"],`,\n\t\t`\tn.configs[\"flat/recommended\"],`,\n\t\t!options.excludeLintPackageJson && `\tpackageJson,`,\n\t\t!options.excludeLintPerfectionist && `\tperfectionistNatural,`,\n\t\t!options.excludeLintRegex && `\tregexp.configs[\"flat/recommended\"],`,\n\t].filter(Boolean);\n\n\treturn await formatTypeScript(`${imports.join(\"\\n\")}\n\nexport default tseslint.config(\n\t{\n\t\tignores: [${\n\t\t\toptions.excludeTests\n\t\t\t\t? \"\"\n\t\t\t\t: `\n\t\t\t\"coverage*\",`\n\t\t}\n\t\t\t\"lib\",\n\t\t\t\"node_modules\",\n\t\t\t\"pnpm-lock.yaml\",\n\t\t\t\"**/*.snap\",\n\t\t],\n\t},\n\t{\n\t\tlinterOptions: {\n\t\t\treportUnusedDisableDirectives: \"error\",\n\t\t},\n\t},\n\t${elements.join(\"\\n\")}\n\t...tseslint.config({\n\t\textends: ${\n\t\t\toptions.excludeLintStylistic\n\t\t\t\t? `tseslint.configs.${tseslintBase}TypeChecked`\n\t\t\t\t: `[\n\t\t\t...tseslint.configs.${tseslintBase}TypeChecked,\n\t\t\t...tseslint.configs.stylisticTypeChecked,\n\t\t]`\n\t\t},\n\t\tfiles: [\"**/*.js\", \"**/*.ts\"],\n\t\tlanguageOptions: {\n\t\t\tparserOptions: {\n\t\t\t\tEXPERIMENTAL_useProjectService: {\n\t\t\t\t\tallowDefaultProjectForFiles: [\"./*.*s\", \"eslint.config.js\"],\n\t\t\t\t\tdefaultProject: \"./tsconfig.json\",\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t\trules: {\n\t\t\t${\n\t\t\t\t!options.excludeLintJSDoc || !options.excludeLintStylistic\n\t\t\t\t\t? \"// These off-by-default rules work well for this repo and we like them on.\"\n\t\t\t\t\t: \"\"\n\t\t\t}${\n\t\t\t\toptions.excludeLintJSDoc\n\t\t\t\t\t? \"\"\n\t\t\t\t\t: `\n\t\t\t\"jsdoc/informative-docs\": \"error\",`\n\t\t\t}${\n\t\t\t\toptions.excludeLintStylistic\n\t\t\t\t\t? \"\"\n\t\t\t\t\t: `\n\t\t\t\"logical-assignment-operators\": [\n\t\t\t\t\"error\",\n\t\t\t\t\"always\",\n\t\t\t\t{ enforceForIfStatements: true },\n\t\t\t],\n\t\t\t\"operator-assignment\": \"error\",`\n\t\t\t}\n\n\t\t\t// These on-by-default rules don't work well for this repo and we like them off.${\n\t\t\t\toptions.excludeLintJSDoc\n\t\t\t\t\t? \"\"\n\t\t\t\t\t: `\n\t\t\t\"jsdoc/require-jsdoc\": \"off\",\n\t\t\t\"jsdoc/require-param\": \"off\",\n\t\t\t\"jsdoc/require-property\": \"off\",\n\t\t\t\"jsdoc/require-returns\": \"off\",`\n\t\t\t}\n\t\t\t\"no-constant-condition\": \"off\",\n\n\t\t\t// These on-by-default rules work well for this repo if configured\n\t\t\t\"@typescript-eslint/no-unused-vars\": [\"error\", { caughtErrors: \"all\" }],${\n\t\t\t\toptions.excludeLintPerfectionist\n\t\t\t\t\t? \"\"\n\t\t\t\t\t: `\n\t\t\t\"perfectionist/sort-objects\": [\n\t\t\t\t\"error\",\n\t\t\t\t{\n\t\t\t\t\torder: \"asc\",\n\t\t\t\t\t\"partition-by-comment\": true,\n\t\t\t\t\ttype: \"natural\",\n\t\t\t\t},\n\t\t\t],`\n\t\t\t}${\n\t\t\t\toptions.excludeLintStylistic\n\t\t\t\t\t? \"\"\n\t\t\t\t\t: `\n\n\t\t\t// Stylistic concerns that don't interfere with Prettier\n\t\t\t\"no-useless-rename\": \"error\",\n\t\t\t\"object-shorthand\": \"error\",`\n\t\t\t}\n\t\t},\n\t}),\n\t{\n\t\tfiles: [\"*.jsonc\"],\n\t\trules: {\n\t\t\t\"jsonc/comma-dangle\": \"off\",\n\t\t\t\"jsonc/no-comments\": \"off\",\n\t\t\t\"jsonc/sort-keys\": \"error\",\n\t\t},\n\t},\n\t{\n\t\textends: [tseslint.configs.disableTypeChecked],\n\t\tfiles: [\"**/*.md/*.ts\"],\n\t\trules: {\n\t\t\t\"n/no-missing-import\": [\n\t\t\t\t\"error\",\n\t\t\t\t{ allowModules: [\"${options.repository}\"] },\n\t\t\t],\n\t\t},\n\t},${\n\t\toptions.excludeTests\n\t\t\t? \"\"\n\t\t\t: `\n\t{\n\t\tfiles: [\"**/*.test.*\"],\n\t\tlanguageOptions: {\n\t\t\tglobals: vitest.environments.env.globals,\n\t\t},\n\t\tplugins: { vitest, },\n\t\trules: {\n\t\t\t...vitest.configs.recommended.rules,\n\n\t\t\t// These on-by-default rules aren't useful in test files.\n\t\t\t\"@typescript-eslint/no-unsafe-assignment\": \"off\",\n\t\t\t\"@typescript-eslint/no-unsafe-call\": \"off\",\n\t\t},\n\t},`\n\t}${\n\t\toptions.excludeLintYml\n\t\t\t? \"\"\n\t\t\t: `\n\t{\n\t\tfiles: [\"**/*.{yml,yaml}\"],\n\t\trules: {\n\t\t\t\"yml/file-extension\": [\"error\", { extension: \"yml\" }],\n\t\t\t\"yml/sort-keys\": [\n\t\t\t\t\"error\",\n\t\t\t\t{\n\t\t\t\t\torder: { type: \"asc\" },\n\t\t\t\t\tpathPattern: \"^.*$\",\n\t\t\t\t},\n\t\t\t],\n\t\t\t\"yml/sort-sequence-values\": [\n\t\t\t\t\"error\",\n\t\t\t\t{\n\t\t\t\t\torder: { type: \"asc\" },\n\t\t\t\t\tpathPattern: \"^.*$\",\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t},`\n\t}\n);\n`);\n}\n"],"mappings":"AACA,SAAS,wBAAwB;AAEjC,eAAsB,mBAAmB,SAAkB;AAC1D,QAAM,eAAe,QAAQ,oBAAoB,gBAAgB;AAEjE,QAAM,UAAU;AAAA,IACf;AAAA,IACA,CAAC,QAAQ,qBACR;AAAA,IACD,CAAC,QAAQ,oBAAoB;AAAA,IAC7B,CAAC,QAAQ,mBAAmB;AAAA,IAC5B,CAAC,QAAQ,iBAAiB;AAAA,IAC1B;AAAA,IACA,CAAC,QAAQ,0BACR;AAAA,IACD,CAAC,QAAQ,4BACR;AAAA,IACD,CAAC,QAAQ,oBACR;AAAA,IACD,CAAC,QAAQ,gBAAgB;AAAA,IACzB,CAAC,QAAQ,kBAAkB;AAAA,IAC3B;AAAA,EACD,EAAE,OAAO,OAAO;AAEhB,QAAM,WAAW;AAAA,IAChB;AAAA,IACA,CAAC,QAAQ,mBACR;AAAA,IACD,CAAC,QAAQ,iBAAiB;AAAA,IAC1B,CAAC,QAAQ,kBAAkB;AAAA,IAC3B,CAAC,QAAQ,kBAAkB;AAAA,IAC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,GACC,QAAQ,iBACL,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAqBJ;AAAA;AAAA,CAEA;AACD;","names":[]}
|
|
@@ -7,7 +7,10 @@ function createDotGitHubActions() {
|
|
|
7
7
|
name: "Prepare",
|
|
8
8
|
runs: {
|
|
9
9
|
steps: [
|
|
10
|
-
{
|
|
10
|
+
{
|
|
11
|
+
uses: "pnpm/action-setup@v2",
|
|
12
|
+
with: { version: 9 }
|
|
13
|
+
},
|
|
11
14
|
{
|
|
12
15
|
uses: "actions/setup-node@v4",
|
|
13
16
|
with: { cache: "pnpm", "node-version": "20" }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/steps/writing/creation/dotGitHub/actions.ts"],"sourcesContent":["import jsYaml from \"js-yaml\";\n\nexport function createDotGitHubActions() {\n\treturn {\n\t\tprepare: {\n\t\t\t\"action.yml\": jsYaml\n\t\t\t\t.dump({\n\t\t\t\t\tdescription: \"Prepares the repo for a typical CI job\",\n\t\t\t\t\tname: \"Prepare\",\n\t\t\t\t\truns: {\n\t\t\t\t\t\tsteps: [\n\t\t\t\t\t\t\t{
|
|
1
|
+
{"version":3,"sources":["../../../../../src/steps/writing/creation/dotGitHub/actions.ts"],"sourcesContent":["import jsYaml from \"js-yaml\";\n\nexport function createDotGitHubActions() {\n\treturn {\n\t\tprepare: {\n\t\t\t\"action.yml\": jsYaml\n\t\t\t\t.dump({\n\t\t\t\t\tdescription: \"Prepares the repo for a typical CI job\",\n\t\t\t\t\tname: \"Prepare\",\n\t\t\t\t\truns: {\n\t\t\t\t\t\tsteps: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tuses: \"pnpm/action-setup@v2\",\n\t\t\t\t\t\t\t\twith: { version: 9 },\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tuses: \"actions/setup-node@v4\",\n\t\t\t\t\t\t\t\twith: { cache: \"pnpm\", \"node-version\": \"20\" },\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\trun: \"pnpm install --frozen-lockfile\",\n\t\t\t\t\t\t\t\tshell: \"bash\",\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\tusing: \"composite\",\n\t\t\t\t\t},\n\t\t\t\t})\n\t\t\t\t.replaceAll(/\\n(\\S)/g, \"\\n\\n$1\"),\n\t\t},\n\t};\n}\n"],"mappings":"AAAA,OAAO,YAAY;AAEZ,SAAS,yBAAyB;AACxC,SAAO;AAAA,IACN,SAAS;AAAA,MACR,cAAc,OACZ,KAAK;AAAA,QACL,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,UACL,OAAO;AAAA,YACN;AAAA,cACC,MAAM;AAAA,cACN,MAAM,EAAE,SAAS,EAAE;AAAA,YACpB;AAAA,YACA;AAAA,cACC,MAAM;AAAA,cACN,MAAM,EAAE,OAAO,QAAQ,gBAAgB,KAAK;AAAA,YAC7C;AAAA,YACA;AAAA,cACC,KAAK;AAAA,cACL,OAAO;AAAA,YACR;AAAA,UACD;AAAA,UACA,OAAO;AAAA,QACR;AAAA,MACD,CAAC,EACA,WAAW,WAAW,QAAQ;AAAA,IACjC;AAAA,EACD;AACD;","names":[]}
|
|
@@ -276,6 +276,7 @@ We appreciate your efforts and responsible disclosure and will make every effort
|
|
|
276
276
|
"renovate.json": await formatJson({
|
|
277
277
|
$schema: "https://docs.renovatebot.com/renovate-schema.json",
|
|
278
278
|
automerge: true,
|
|
279
|
+
extends: ["config:best-practices", "replacements:all"],
|
|
279
280
|
ignoreDeps: ["codecov/codecov-action"],
|
|
280
281
|
internalChecksFilter: "strict",
|
|
281
282
|
labels: ["dependencies"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/steps/writing/creation/dotGitHub/createDotGitHubFiles.ts"],"sourcesContent":["/* spellchecker: disable */\nimport { Options } from \"../../../../shared/types.js\";\nimport { formatJson } from \"../formatters/formatJson.js\";\nimport { formatYaml } from \"../formatters/formatYaml.js\";\nimport { createDevelopment } from \"./createDevelopment/index.js\";\n\nexport async function createDotGitHubFiles(options: Options) {\n\treturn {\n\t\t\"CODE_OF_CONDUCT.md\": `# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participation in our\ncommunity a harassment-free experience for everyone, regardless of age, body\nsize, visible or invisible disability, ethnicity, sex characteristics, gender\nidentity and expression, level of experience, education, socio-economic status,\nnationality, personal appearance, race, caste, color, religion, or sexual\nidentity and orientation.\n\nWe pledge to act and interact in ways that contribute to an open, welcoming,\ndiverse, inclusive, and healthy community.\n\n## Our Standards\n\nExamples of behavior that contributes to a positive environment for our\ncommunity include:\n\n- Demonstrating empathy and kindness toward other people\n- Being respectful of differing opinions, viewpoints, and experiences\n- Giving and gracefully accepting constructive feedback\n- Accepting responsibility and apologizing to those affected by our mistakes,\nand learning from the experience\n- Focusing on what is best not just for us as individuals, but for the overall\ncommunity\n\nExamples of unacceptable behavior include:\n\n- The use of sexualized language or imagery, and sexual attention or advances of\nany kind\n- Trolling, insulting or derogatory comments, and personal or political attacks\n- Public or private harassment\n- Publishing others' private information, such as a physical or email address,\nwithout their explicit permission\n- Other conduct which could reasonably be considered inappropriate in a\nprofessional setting\n\n## Enforcement Responsibilities\n\nCommunity leaders are responsible for clarifying and enforcing our standards of\nacceptable behavior and will take appropriate and fair corrective action in\nresponse to any behavior that they deem inappropriate, threatening, offensive,\nor harmful.\n\nCommunity leaders have the right and responsibility to remove, edit, or reject\ncomments, commits, code, wiki edits, issues, and other contributions that are\nnot aligned to this Code of Conduct, and will communicate reasons for moderation\ndecisions when appropriate.\n\n## Scope\n\nThis Code of Conduct applies within all community spaces, and also applies when\nan individual is officially representing the community in public spaces.\nExamples of representing our community include using an official e-mail address,\nposting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported to the community leaders responsible for enforcement at\n${options.email.github}.\nAll complaints will be reviewed and investigated promptly and fairly.\n\nAll community leaders are obligated to respect the privacy and security of the\nreporter of any incident.\n\n## Enforcement Guidelines\n\nCommunity leaders will follow these Community Impact Guidelines in determining\nthe consequences for any action they deem in violation of this Code of Conduct:\n\n### 1. Correction\n\n**Community Impact**: Use of inappropriate language or other behavior deemed\nunprofessional or unwelcome in the community.\n\n**Consequence**: A private, written warning from community leaders, providing\nclarity around the nature of the violation and an explanation of why the\nbehavior was inappropriate. A public apology may be requested.\n\n### 2. Warning\n\n**Community Impact**: A violation through a single incident or series of\nactions.\n\n**Consequence**: A warning with consequences for continued behavior. No\ninteraction with the people involved, including unsolicited interaction with\nthose enforcing the Code of Conduct, for a specified period of time. This\nincludes avoiding interactions in community spaces as well as external channels\nlike social media. Violating these terms may lead to a temporary or permanent\nban.\n\n### 3. Temporary Ban\n\n**Community Impact**: A serious violation of community standards, including\nsustained inappropriate behavior.\n\n**Consequence**: A temporary ban from any sort of interaction or public\ncommunication with the community for a specified period of time. No public or\nprivate interaction with the people involved, including unsolicited interaction\nwith those enforcing the Code of Conduct, is allowed during this period.\nViolating these terms may lead to a permanent ban.\n\n### 4. Permanent Ban\n\n**Community Impact**: Demonstrating a pattern of violation of community\nstandards, including sustained inappropriate behavior, harassment of an\nindividual, or aggression toward or disparagement of classes of individuals.\n\n**Consequence**: A permanent ban from any sort of public interaction within the\ncommunity.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage],\nversion 2.1, available at\n[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].\n\nCommunity Impact Guidelines were inspired by\n[Mozilla's code of conduct enforcement ladder][mozilla coc].\n\nFor answers to common questions about this code of conduct, see the FAQ at\n[https://www.contributor-covenant.org/faq][faq]. Translations are available at\n[https://www.contributor-covenant.org/translations][translations].\n\n[homepage]: https://www.contributor-covenant.org\n[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html\n[mozilla coc]: https://github.com/mozilla/diversity\n[faq]: https://www.contributor-covenant.org/faq\n[translations]: https://www.contributor-covenant.org/translations\n`,\n\t\t\"CONTRIBUTING.md\": `# Contributing\n\nThanks for your interest in contributing to \\`${options.repository}\\`! 💖\n\n> After this page, see [DEVELOPMENT.md](./DEVELOPMENT.md) for local development instructions.\n\n## Code of Conduct\n\nThis project contains a [Contributor Covenant code of conduct](./CODE_OF_CONDUCT.md) all contributors are expected to follow.\n\n## Reporting Issues\n\nPlease do [report an issue on the issue tracker](https://github.com/${options.owner}/${options.repository}/issues/new/choose) if there's any bugfix, documentation improvement, or general enhancement you'd like to see in the repository! Please fully fill out all required fields in the most appropriate issue form.\n\n## Sending Contributions\n\nSending your own changes as contribution is always appreciated!\nThere are two steps involved:\n\n1. [Finding an Issue](#finding-an-issue)\n2. [Sending a Pull Request](#sending-a-pull-request)\n\n### Finding an Issue\n\nWith the exception of very small typos, all changes to this repository generally need to correspond to an [unassigned open issue marked as \\`status: accepting prs\\` on the issue tracker](https://github.com/${options.owner}/${options.repository}/issues?q=is%3Aissue+is%3Aopen+label%3A%22status%3A+accepting+prs%22+no%3Aassignee+).\nIf this is your first time contributing, consider searching for [unassigned issues that also have the \\`good first issue\\` label](https://github.com/${options.owner}/${options.repository}/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+label%3A%22status%3A+accepting+prs%22+no%3Aassignee+).\nIf the issue you'd like to fix isn't found on the issue, see [Reporting Issues](#reporting-issues) for filing your own (please do!).\n\n#### Issue Claiming\n\nWe don't use any kind of issue claiming system.\nWe've found in the past that they result in accidental [\"licked cookie\"](https://devblogs.microsoft.com/oldnewthing/20091201-00/?p=15843) situations where contributors claim an issue but run out of time or energy trying before sending a PR.\n\nIf an unassigned issue has been marked as \\`status: accepting prs\\` and an open PR does not exist, feel free to send a PR.\nPlease don't post comments asking for permission or stating you will work on an issue.\n\n### Sending a Pull Request\n\nOnce you've identified an open issue accepting PRs that doesn't yet have a PR sent, you're free to send a pull request.\nBe sure to fill out the pull request template's requested information -- otherwise your PR will likely be closed.\n\nPRs are also expected to have a title that adheres to [conventional commits](https://www.conventionalcommits.org/en/v1.0.0).\nOnly PR titles need to be in that format, not individual commits.\nDon't worry if you get this wrong: you can always change the PR title after sending it.\nCheck [previously merged PRs](https://github.com/${options.owner}/${options.repository}/pulls?q=is%3Apr+is%3Amerged+-label%3Adependencies+) for reference.\n\n#### Draft PRs\n\nIf you don't think your PR is ready for review, [set it as a draft](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request#converting-a-pull-request-to-a-draft).\nDraft PRs won't be reviewed.\n\n#### Granular PRs\n\nPlease keep pull requests single-purpose: in other words, don't attempt to solve multiple unrelated problems in one pull request.\nSend one PR per area of concern.\nMulti-purpose pull requests are harder and slower to review, block all changes from being merged until the whole pull request is reviewed, and are difficult to name well with semantic PR titles.\n\n#### Pull Request Reviews\n\nWhen a PR is not in draft, it's considered ready for review.\nPlease don't manually \\`@\\` tag anybody to request review.\nA maintainer will look at it when they're next able to.\n\nPRs should have passing [GitHub status checks](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks) before review is requested (unless there are explicit questions asked in the PR about any failures).\n\n#### Asking Questions\n\nIf you need help and/or have a question, posting a comment in the PR is a great way to do so.\nThere's no need to tag anybody individually.\nOne of us will drop by and help when we can.\n\nPlease post comments as [line comments](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request) when possible, so that they can be threaded.\nYou can [resolve conversations](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/commenting-on-a-pull-request#resolving-conversations) on your own when you feel they're resolved - no need to comment explicitly and/or wait for a maintainer.\n\n#### Requested Changes\n\nAfter a maintainer reviews your PR, they may request changes on it.\nOnce you've made those changes, [re-request review on GitHub](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews#re-requesting-a-review).\n\nPlease try not to force-push commits to PRs that have already been reviewed.\nDoing so makes it harder to review the changes.\nWe squash merge all commits so there's no need to try to preserve Git history within a PR branch.\n\nOnce you've addressed all our feedback by making code changes and/or started a followup discussion, [re-request review](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews#re-requesting-a-review) from each maintainer whose feedback you addressed.\n\nOnce all feedback is addressed and the PR is approved, we'll ensure the branch is up to date with \\`main\\` and merge it for you.\n\n#### Post-Merge Recognition\n\nOnce your PR is merged, if you haven't yet been added to the [_Contributors_ table in the README.md](../README.md#contributors) for its [type of contribution](https://allcontributors.org/docs/en/emoji-key \"Allcontributors emoji key\"), you should be soon.\nPlease do ping the maintainer who merged your PR if that doesn't happen within 24 hours - it was likely an oversight on our end!\n\n## Emojis & Appreciation\n\nIf you made it all the way to the end, bravo dear user, we love you.\nPlease include your favorite emoji in the bottom of your issues and PRs to signal to us that you did in fact read this file and are trying to conform to it as best as possible.\n💖 is a good starter if you're not sure which to use.\n`,\n\t\t\"DEVELOPMENT.md\": await createDevelopment(options),\n\t\t...(options.funding && {\n\t\t\t\"FUNDING.yml\": formatYaml({ github: options.funding }),\n\t\t}),\n\n\t\t\"ISSUE_TEMPLATE.md\": `<!-- Note: Please must use one of our issue templates to file an issue! 🛑 -->\n<!-- 👉 https://github.com/${options.owner}/${options.repository}/issues/new/choose 👈 -->\n<!-- **Issues that should have been filed with a template will be closed without action, and we will ask you to use a template.** -->\n\n<!-- This blank issue template is only for issues that don't fit any of the templates. -->\n\n## Overview\n\n...\n`,\n\t\t\"PULL_REQUEST_TEMPLATE.md\": `<!-- 👋 Hi, thanks for sending a PR to ${options.repository}! 💖.\nPlease fill out all fields below and make sure each item is true and [x] checked.\nOtherwise we may not be able to review your PR. -->\n\n## PR Checklist\n\n- [ ] Addresses an existing open issue: fixes #000\n- [ ] That issue was marked as [\\`status: accepting prs\\`](https://github.com/${options.owner}/${options.repository}/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)\n- [ ] Steps in [CONTRIBUTING.md](https://github.com/${options.owner}/${options.repository}/blob/main/.github/CONTRIBUTING.md) were taken\n\n## Overview\n\n<!-- Description of what is changed and how the code change does that. -->\n`,\n\t\t\"SECURITY.md\": `# Security Policy\n\nWe take all security vulnerabilities seriously.\nIf you have a vulnerability or other security issues to disclose:\n\n- Thank you very much, please do!\n- Please send them to us by emailing \\`${options.email.github}\\`\n\nWe appreciate your efforts and responsible disclosure and will make every effort to acknowledge your contributions.\n`,\n\t\t...(!options.excludeRenovate && {\n\t\t\t\"renovate.json\": await formatJson({\n\t\t\t\t$schema: \"https://docs.renovatebot.com/renovate-schema.json\",\n\t\t\t\tautomerge: true,\n\t\t\t\tignoreDeps: [\"codecov/codecov-action\"],\n\t\t\t\tinternalChecksFilter: \"strict\",\n\t\t\t\tlabels: [\"dependencies\"],\n\t\t\t\tminimumReleaseAge: \"3 days\",\n\t\t\t\tpostUpdateOptions: [\"pnpmDedupe\"],\n\t\t\t}),\n\t\t}),\n\t};\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,SAAS,yBAAyB;AAElC,eAAsB,qBAAqB,SAAkB;AAC5D,SAAO;AAAA,IACN,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAsDpF,kBAAkB,MAAM,kBAAkB,OAAO;AAAA,IACjD,GAAI,QAAQ,WAAW;AAAA,MACtB,eAAe,WAAW,EAAE,QAAQ,QAAQ,QAAQ,CAAC;AAAA,IACtD;AAAA,IAEA,qBAAqB;AAAA,oCACM,QAAQ,KAAK,IAAI,QAAQ,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAS9D,4BAA4B,iDAA0C,QAAQ,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gFAOV,QAAQ,KAAK,IAAI,QAAQ,UAAU;AAAA,sDAC7D,QAAQ,KAAK,IAAI,QAAQ,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMvF,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yCAMwB,QAAQ,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA,IAI3D,GAAI,CAAC,QAAQ,mBAAmB;AAAA,MAC/B,iBAAiB,MAAM,WAAW;AAAA,QACjC,SAAS;AAAA,QACT,WAAW;AAAA,QACX,YAAY,CAAC,wBAAwB;AAAA,QACrC,sBAAsB;AAAA,QACtB,QAAQ,CAAC,cAAc;AAAA,QACvB,mBAAmB;AAAA,QACnB,mBAAmB,CAAC,YAAY;AAAA,MACjC,CAAC;AAAA,IACF;AAAA,EACD;AACD;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../../../src/steps/writing/creation/dotGitHub/createDotGitHubFiles.ts"],"sourcesContent":["/* spellchecker: disable */\nimport { Options } from \"../../../../shared/types.js\";\nimport { formatJson } from \"../formatters/formatJson.js\";\nimport { formatYaml } from \"../formatters/formatYaml.js\";\nimport { createDevelopment } from \"./createDevelopment/index.js\";\n\nexport async function createDotGitHubFiles(options: Options) {\n\treturn {\n\t\t\"CODE_OF_CONDUCT.md\": `# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participation in our\ncommunity a harassment-free experience for everyone, regardless of age, body\nsize, visible or invisible disability, ethnicity, sex characteristics, gender\nidentity and expression, level of experience, education, socio-economic status,\nnationality, personal appearance, race, caste, color, religion, or sexual\nidentity and orientation.\n\nWe pledge to act and interact in ways that contribute to an open, welcoming,\ndiverse, inclusive, and healthy community.\n\n## Our Standards\n\nExamples of behavior that contributes to a positive environment for our\ncommunity include:\n\n- Demonstrating empathy and kindness toward other people\n- Being respectful of differing opinions, viewpoints, and experiences\n- Giving and gracefully accepting constructive feedback\n- Accepting responsibility and apologizing to those affected by our mistakes,\nand learning from the experience\n- Focusing on what is best not just for us as individuals, but for the overall\ncommunity\n\nExamples of unacceptable behavior include:\n\n- The use of sexualized language or imagery, and sexual attention or advances of\nany kind\n- Trolling, insulting or derogatory comments, and personal or political attacks\n- Public or private harassment\n- Publishing others' private information, such as a physical or email address,\nwithout their explicit permission\n- Other conduct which could reasonably be considered inappropriate in a\nprofessional setting\n\n## Enforcement Responsibilities\n\nCommunity leaders are responsible for clarifying and enforcing our standards of\nacceptable behavior and will take appropriate and fair corrective action in\nresponse to any behavior that they deem inappropriate, threatening, offensive,\nor harmful.\n\nCommunity leaders have the right and responsibility to remove, edit, or reject\ncomments, commits, code, wiki edits, issues, and other contributions that are\nnot aligned to this Code of Conduct, and will communicate reasons for moderation\ndecisions when appropriate.\n\n## Scope\n\nThis Code of Conduct applies within all community spaces, and also applies when\nan individual is officially representing the community in public spaces.\nExamples of representing our community include using an official e-mail address,\nposting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported to the community leaders responsible for enforcement at\n${options.email.github}.\nAll complaints will be reviewed and investigated promptly and fairly.\n\nAll community leaders are obligated to respect the privacy and security of the\nreporter of any incident.\n\n## Enforcement Guidelines\n\nCommunity leaders will follow these Community Impact Guidelines in determining\nthe consequences for any action they deem in violation of this Code of Conduct:\n\n### 1. Correction\n\n**Community Impact**: Use of inappropriate language or other behavior deemed\nunprofessional or unwelcome in the community.\n\n**Consequence**: A private, written warning from community leaders, providing\nclarity around the nature of the violation and an explanation of why the\nbehavior was inappropriate. A public apology may be requested.\n\n### 2. Warning\n\n**Community Impact**: A violation through a single incident or series of\nactions.\n\n**Consequence**: A warning with consequences for continued behavior. No\ninteraction with the people involved, including unsolicited interaction with\nthose enforcing the Code of Conduct, for a specified period of time. This\nincludes avoiding interactions in community spaces as well as external channels\nlike social media. Violating these terms may lead to a temporary or permanent\nban.\n\n### 3. Temporary Ban\n\n**Community Impact**: A serious violation of community standards, including\nsustained inappropriate behavior.\n\n**Consequence**: A temporary ban from any sort of interaction or public\ncommunication with the community for a specified period of time. No public or\nprivate interaction with the people involved, including unsolicited interaction\nwith those enforcing the Code of Conduct, is allowed during this period.\nViolating these terms may lead to a permanent ban.\n\n### 4. Permanent Ban\n\n**Community Impact**: Demonstrating a pattern of violation of community\nstandards, including sustained inappropriate behavior, harassment of an\nindividual, or aggression toward or disparagement of classes of individuals.\n\n**Consequence**: A permanent ban from any sort of public interaction within the\ncommunity.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage],\nversion 2.1, available at\n[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].\n\nCommunity Impact Guidelines were inspired by\n[Mozilla's code of conduct enforcement ladder][mozilla coc].\n\nFor answers to common questions about this code of conduct, see the FAQ at\n[https://www.contributor-covenant.org/faq][faq]. Translations are available at\n[https://www.contributor-covenant.org/translations][translations].\n\n[homepage]: https://www.contributor-covenant.org\n[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html\n[mozilla coc]: https://github.com/mozilla/diversity\n[faq]: https://www.contributor-covenant.org/faq\n[translations]: https://www.contributor-covenant.org/translations\n`,\n\t\t\"CONTRIBUTING.md\": `# Contributing\n\nThanks for your interest in contributing to \\`${options.repository}\\`! 💖\n\n> After this page, see [DEVELOPMENT.md](./DEVELOPMENT.md) for local development instructions.\n\n## Code of Conduct\n\nThis project contains a [Contributor Covenant code of conduct](./CODE_OF_CONDUCT.md) all contributors are expected to follow.\n\n## Reporting Issues\n\nPlease do [report an issue on the issue tracker](https://github.com/${options.owner}/${options.repository}/issues/new/choose) if there's any bugfix, documentation improvement, or general enhancement you'd like to see in the repository! Please fully fill out all required fields in the most appropriate issue form.\n\n## Sending Contributions\n\nSending your own changes as contribution is always appreciated!\nThere are two steps involved:\n\n1. [Finding an Issue](#finding-an-issue)\n2. [Sending a Pull Request](#sending-a-pull-request)\n\n### Finding an Issue\n\nWith the exception of very small typos, all changes to this repository generally need to correspond to an [unassigned open issue marked as \\`status: accepting prs\\` on the issue tracker](https://github.com/${options.owner}/${options.repository}/issues?q=is%3Aissue+is%3Aopen+label%3A%22status%3A+accepting+prs%22+no%3Aassignee+).\nIf this is your first time contributing, consider searching for [unassigned issues that also have the \\`good first issue\\` label](https://github.com/${options.owner}/${options.repository}/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+label%3A%22status%3A+accepting+prs%22+no%3Aassignee+).\nIf the issue you'd like to fix isn't found on the issue, see [Reporting Issues](#reporting-issues) for filing your own (please do!).\n\n#### Issue Claiming\n\nWe don't use any kind of issue claiming system.\nWe've found in the past that they result in accidental [\"licked cookie\"](https://devblogs.microsoft.com/oldnewthing/20091201-00/?p=15843) situations where contributors claim an issue but run out of time or energy trying before sending a PR.\n\nIf an unassigned issue has been marked as \\`status: accepting prs\\` and an open PR does not exist, feel free to send a PR.\nPlease don't post comments asking for permission or stating you will work on an issue.\n\n### Sending a Pull Request\n\nOnce you've identified an open issue accepting PRs that doesn't yet have a PR sent, you're free to send a pull request.\nBe sure to fill out the pull request template's requested information -- otherwise your PR will likely be closed.\n\nPRs are also expected to have a title that adheres to [conventional commits](https://www.conventionalcommits.org/en/v1.0.0).\nOnly PR titles need to be in that format, not individual commits.\nDon't worry if you get this wrong: you can always change the PR title after sending it.\nCheck [previously merged PRs](https://github.com/${options.owner}/${options.repository}/pulls?q=is%3Apr+is%3Amerged+-label%3Adependencies+) for reference.\n\n#### Draft PRs\n\nIf you don't think your PR is ready for review, [set it as a draft](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request#converting-a-pull-request-to-a-draft).\nDraft PRs won't be reviewed.\n\n#### Granular PRs\n\nPlease keep pull requests single-purpose: in other words, don't attempt to solve multiple unrelated problems in one pull request.\nSend one PR per area of concern.\nMulti-purpose pull requests are harder and slower to review, block all changes from being merged until the whole pull request is reviewed, and are difficult to name well with semantic PR titles.\n\n#### Pull Request Reviews\n\nWhen a PR is not in draft, it's considered ready for review.\nPlease don't manually \\`@\\` tag anybody to request review.\nA maintainer will look at it when they're next able to.\n\nPRs should have passing [GitHub status checks](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks) before review is requested (unless there are explicit questions asked in the PR about any failures).\n\n#### Asking Questions\n\nIf you need help and/or have a question, posting a comment in the PR is a great way to do so.\nThere's no need to tag anybody individually.\nOne of us will drop by and help when we can.\n\nPlease post comments as [line comments](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request) when possible, so that they can be threaded.\nYou can [resolve conversations](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/commenting-on-a-pull-request#resolving-conversations) on your own when you feel they're resolved - no need to comment explicitly and/or wait for a maintainer.\n\n#### Requested Changes\n\nAfter a maintainer reviews your PR, they may request changes on it.\nOnce you've made those changes, [re-request review on GitHub](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews#re-requesting-a-review).\n\nPlease try not to force-push commits to PRs that have already been reviewed.\nDoing so makes it harder to review the changes.\nWe squash merge all commits so there's no need to try to preserve Git history within a PR branch.\n\nOnce you've addressed all our feedback by making code changes and/or started a followup discussion, [re-request review](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/about-pull-request-reviews#re-requesting-a-review) from each maintainer whose feedback you addressed.\n\nOnce all feedback is addressed and the PR is approved, we'll ensure the branch is up to date with \\`main\\` and merge it for you.\n\n#### Post-Merge Recognition\n\nOnce your PR is merged, if you haven't yet been added to the [_Contributors_ table in the README.md](../README.md#contributors) for its [type of contribution](https://allcontributors.org/docs/en/emoji-key \"Allcontributors emoji key\"), you should be soon.\nPlease do ping the maintainer who merged your PR if that doesn't happen within 24 hours - it was likely an oversight on our end!\n\n## Emojis & Appreciation\n\nIf you made it all the way to the end, bravo dear user, we love you.\nPlease include your favorite emoji in the bottom of your issues and PRs to signal to us that you did in fact read this file and are trying to conform to it as best as possible.\n💖 is a good starter if you're not sure which to use.\n`,\n\t\t\"DEVELOPMENT.md\": await createDevelopment(options),\n\t\t...(options.funding && {\n\t\t\t\"FUNDING.yml\": formatYaml({ github: options.funding }),\n\t\t}),\n\n\t\t\"ISSUE_TEMPLATE.md\": `<!-- Note: Please must use one of our issue templates to file an issue! 🛑 -->\n<!-- 👉 https://github.com/${options.owner}/${options.repository}/issues/new/choose 👈 -->\n<!-- **Issues that should have been filed with a template will be closed without action, and we will ask you to use a template.** -->\n\n<!-- This blank issue template is only for issues that don't fit any of the templates. -->\n\n## Overview\n\n...\n`,\n\t\t\"PULL_REQUEST_TEMPLATE.md\": `<!-- 👋 Hi, thanks for sending a PR to ${options.repository}! 💖.\nPlease fill out all fields below and make sure each item is true and [x] checked.\nOtherwise we may not be able to review your PR. -->\n\n## PR Checklist\n\n- [ ] Addresses an existing open issue: fixes #000\n- [ ] That issue was marked as [\\`status: accepting prs\\`](https://github.com/${options.owner}/${options.repository}/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)\n- [ ] Steps in [CONTRIBUTING.md](https://github.com/${options.owner}/${options.repository}/blob/main/.github/CONTRIBUTING.md) were taken\n\n## Overview\n\n<!-- Description of what is changed and how the code change does that. -->\n`,\n\t\t\"SECURITY.md\": `# Security Policy\n\nWe take all security vulnerabilities seriously.\nIf you have a vulnerability or other security issues to disclose:\n\n- Thank you very much, please do!\n- Please send them to us by emailing \\`${options.email.github}\\`\n\nWe appreciate your efforts and responsible disclosure and will make every effort to acknowledge your contributions.\n`,\n\t\t...(!options.excludeRenovate && {\n\t\t\t\"renovate.json\": await formatJson({\n\t\t\t\t$schema: \"https://docs.renovatebot.com/renovate-schema.json\",\n\t\t\t\tautomerge: true,\n\t\t\t\textends: [\"config:best-practices\", \"replacements:all\"],\n\t\t\t\tignoreDeps: [\"codecov/codecov-action\"],\n\t\t\t\tinternalChecksFilter: \"strict\",\n\t\t\t\tlabels: [\"dependencies\"],\n\t\t\t\tminimumReleaseAge: \"3 days\",\n\t\t\t\tpostUpdateOptions: [\"pnpmDedupe\"],\n\t\t\t}),\n\t\t}),\n\t};\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,SAAS,yBAAyB;AAElC,eAAsB,qBAAqB,SAAkB;AAC5D,SAAO;AAAA,IACN,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EA8DtB,QAAQ,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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,QAAQ,WAAW;AAAA,MACtB,eAAe,WAAW,EAAE,QAAQ,QAAQ,QAAQ,CAAC;AAAA,IACtD;AAAA,IAEA,qBAAqB;AAAA,oCACM,QAAQ,KAAK,IAAI,QAAQ,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAS9D,4BAA4B,iDAA0C,QAAQ,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gFAOV,QAAQ,KAAK,IAAI,QAAQ,UAAU;AAAA,sDAC7D,QAAQ,KAAK,IAAI,QAAQ,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMvF,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yCAMwB,QAAQ,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA,IAI3D,GAAI,CAAC,QAAQ,mBAAmB;AAAA,MAC/B,iBAAiB,MAAM,WAAW;AAAA,QACjC,SAAS;AAAA,QACT,WAAW;AAAA,QACX,SAAS,CAAC,yBAAyB,kBAAkB;AAAA,QACrD,YAAY,CAAC,wBAAwB;AAAA,QACrC,sBAAsB;AAAA,QACtB,QAAQ,CAAC,cAAc;AAAA,QACvB,mBAAmB;AAAA,QACnB,mBAAmB,CAAC,YAAY;AAAA,MACjC,CAAC;AAAA,IACF;AAAA,EACD;AACD;","names":[]}
|
|
@@ -109,7 +109,7 @@ echo "See https://github.com/actions-ecosystem/action-remove-labels/issues/221."
|
|
|
109
109
|
}),
|
|
110
110
|
"lint.yml": createWorkflowFile({
|
|
111
111
|
name: "Lint",
|
|
112
|
-
runs: [...options.bin ? ["pnpm build
|
|
112
|
+
runs: [...options.bin ? ["pnpm build"] : [], "pnpm lint"]
|
|
113
113
|
}),
|
|
114
114
|
...!options.excludeLintKnip && {
|
|
115
115
|
"lint-knip.yml": createWorkflowFile({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/steps/writing/creation/dotGitHub/createWorkflows.ts"],"sourcesContent":["/* spellchecker: disable */\nimport { Options } from \"../../../../shared/types.js\";\nimport { createWorkflowFile } from \"./createWorkflowFile.js\";\n\nexport function createWorkflows(options: Options) {\n\treturn {\n\t\t\"build.yml\": createWorkflowFile({\n\t\t\tname: \"Build\",\n\t\t\truns: [\"pnpm build\", \"node ./lib/index.js\"],\n\t\t}),\n\t\t\"pr-review-requested.yml\": createWorkflowFile({\n\t\t\tname: \"PR Review Requested\",\n\t\t\ton: {\n\t\t\t\tpull_request_target: {\n\t\t\t\t\ttypes: [\"review_requested\"],\n\t\t\t\t},\n\t\t\t},\n\t\t\tpermissions: {\n\t\t\t\t\"pull-requests\": \"write\",\n\t\t\t},\n\t\t\tsteps: [\n\t\t\t\t{\n\t\t\t\t\tuses: \"actions-ecosystem/action-remove-labels@v1\",\n\t\t\t\t\twith: {\n\t\t\t\t\t\tlabels: \"status: waiting for author\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tif: \"failure()\",\n\t\t\t\t\trun: 'echo \"Don\\'t worry if the previous step failed.\"\\necho \"See https://github.com/actions-ecosystem/action-remove-labels/issues/221.\"\\n',\n\t\t\t\t},\n\t\t\t],\n\t\t}),\n\t\t\"prettier.yml\": createWorkflowFile({\n\t\t\tname: \"Prettier\",\n\t\t\truns: [\"pnpm format --list-different\"],\n\t\t}),\n\t\t\"tsc.yml\": createWorkflowFile({\n\t\t\tname: \"Type Check\",\n\t\t\truns: [\"pnpm tsc\"],\n\t\t}),\n\t\t...(!options.excludeCompliance && {\n\t\t\t\"compliance.yml\": createWorkflowFile({\n\t\t\t\tname: \"Compliance\",\n\t\t\t\ton: {\n\t\t\t\t\tpull_request: {\n\t\t\t\t\t\tbranches: [\"main\"],\n\t\t\t\t\t\ttypes: [\"edited\", \"opened\", \"reopened\", \"synchronize\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tpermissions: {\n\t\t\t\t\t\"pull-requests\": \"write\",\n\t\t\t\t},\n\t\t\t\tsteps: [\n\t\t\t\t\t{\n\t\t\t\t\t\tuses: \"mtfoley/pr-compliance-action@main\",\n\t\t\t\t\t\twith: {\n\t\t\t\t\t\t\t\"body-auto-close\": false,\n\t\t\t\t\t\t\t\"ignore-authors\":\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t...(options.excludeAllContributors\n\t\t\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t\t\t: [\"allcontributors\", \"allcontributors[bot]\"]),\n\t\t\t\t\t\t\t\t\t...(options.excludeRenovate\n\t\t\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t\t\t: [\"renovate\", \"renovate[bot]\"]),\n\t\t\t\t\t\t\t\t].join(\"\\n\") || undefined,\n\t\t\t\t\t\t\t\"ignore-team-members\": false,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeAllContributors && {\n\t\t\t\"contributors.yml\": createWorkflowFile({\n\t\t\t\tname: \"Contributors\",\n\t\t\t\ton: {\n\t\t\t\t\tpush: {\n\t\t\t\t\t\tbranches: [\"main\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tsteps: [\n\t\t\t\t\t{ uses: \"actions/checkout@v4\", with: { \"fetch-depth\": 0 } },\n\t\t\t\t\t{ uses: \"./.github/actions/prepare\" },\n\t\t\t\t\t{\n\t\t\t\t\t\tenv: { GITHUB_TOKEN: \"${{ secrets.ACCESS_TOKEN }}\" },\n\t\t\t\t\t\tuses: `JoshuaKGoldberg/all-contributors-auto-action@v0.4.3`,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t}),\n\t\t\"accessibility-alt-text-bot.yml\": createWorkflowFile({\n\t\t\tif: \"${{ !endsWith(github.actor, '[bot]') }}\",\n\t\t\tname: \"Accessibility Alt Text Bot\",\n\t\t\ton: {\n\t\t\t\tissue_comment: {\n\t\t\t\t\ttypes: [\"created\", \"edited\"],\n\t\t\t\t},\n\t\t\t\tissues: {\n\t\t\t\t\ttypes: [\"edited\", \"opened\"],\n\t\t\t\t},\n\t\t\t\tpull_request: {\n\t\t\t\t\ttypes: [\"edited\", \"opened\"],\n\t\t\t\t},\n\t\t\t},\n\t\t\tpermissions: {\n\t\t\t\tissues: \"write\",\n\t\t\t\t\"pull-requests\": \"write\",\n\t\t\t},\n\t\t\tsteps: [\n\t\t\t\t{\n\t\t\t\t\tuses: \"github/accessibility-alt-text-bot@v1.4.0\",\n\t\t\t\t},\n\t\t\t],\n\t\t}),\n\t\t\"lint.yml\": createWorkflowFile({\n\t\t\tname: \"Lint\",\n\t\t\truns: [...(options.bin ? [\"pnpm build --no-dts\"] : []), \"pnpm lint\"],\n\t\t}),\n\t\t...(!options.excludeLintKnip && {\n\t\t\t\"lint-knip.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint Knip\",\n\t\t\t\truns: [\"pnpm lint:knip\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeLintMd && {\n\t\t\t\"lint-markdown.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint Markdown\",\n\t\t\t\truns: [\"pnpm lint:md\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeLintPackages && {\n\t\t\t\"lint-packages.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint Packages\",\n\t\t\t\truns: [\"pnpm lint:packages\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeLintSpelling && {\n\t\t\t\"lint-spelling.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint spelling\",\n\t\t\t\truns: [\"pnpm lint:spelling\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeReleases && {\n\t\t\t\"post-release.yml\": createWorkflowFile({\n\t\t\t\tname: \"Post Release\",\n\t\t\t\ton: {\n\t\t\t\t\trelease: {\n\t\t\t\t\t\ttypes: [\"published\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tsteps: [\n\t\t\t\t\t{ uses: \"actions/checkout@v4\", with: { \"fetch-depth\": 0 } },\n\t\t\t\t\t{\n\t\t\t\t\t\trun: `echo \"npm_version=$(npm pkg get version | tr -d '\"')\" >> \"$GITHUB_ENV\"`,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tuses: \"apexskier/github-release-commenter@v1\",\n\t\t\t\t\t\twith: {\n\t\t\t\t\t\t\tGITHUB_TOKEN: \"${{ secrets.GITHUB_TOKEN }}\",\n\t\t\t\t\t\t\t\"comment-template\": `\n\t\t\t\t\t\t\t:tada: This is included in version {release_link} :tada:\n\n\t\t\t\t\t\t\tThe release is available on:\n\n\t\t\t\t\t\t\t* [GitHub releases](https://github.com/${options.owner}/${options.repository}/releases/tag/{release_tag})\n\t\t\t\t\t\t\t* [npm package (@latest dist-tag)](https://www.npmjs.com/package/${options.repository}/v/\\${{ env.npm_version }})\n\n\t\t\t\t\t\t\tCheers! 📦🚀\n\t\t\t\t\t\t`,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t\t\"release.yml\": createWorkflowFile({\n\t\t\t\tconcurrency: {\n\t\t\t\t\tgroup: \"${{ github.workflow }}\",\n\t\t\t\t},\n\t\t\t\tname: \"Release\",\n\t\t\t\ton: {\n\t\t\t\t\tpush: {\n\t\t\t\t\t\tbranches: [\"main\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tpermissions: {\n\t\t\t\t\tcontents: \"write\",\n\t\t\t\t\t\"id-token\": \"write\",\n\t\t\t\t},\n\t\t\t\tsteps: [\n\t\t\t\t\t{\n\t\t\t\t\t\tuses: \"actions/checkout@v4\",\n\t\t\t\t\t\twith: {\n\t\t\t\t\t\t\t\"fetch-depth\": 0,\n\t\t\t\t\t\t\tref: \"main\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tuses: \"./.github/actions/prepare\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\trun: \"pnpm build\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tenv: {\n\t\t\t\t\t\t\tGITHUB_TOKEN: \"${{ secrets.ACCESS_TOKEN }}\",\n\t\t\t\t\t\t\tNPM_TOKEN: \"${{ secrets.NPM_TOKEN }}\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\tuses: \"JoshuaKGoldberg/release-it-action@v0.2.2\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeTests && {\n\t\t\t\"test.yml\": createWorkflowFile({\n\t\t\t\tname: \"Test\",\n\t\t\t\tsteps: [\n\t\t\t\t\t{ uses: \"actions/checkout@v4\" },\n\t\t\t\t\t{ uses: \"./.github/actions/prepare\" },\n\t\t\t\t\t{ run: \"pnpm run test --coverage\" },\n\t\t\t\t\t{\n\t\t\t\t\t\tname: \"Codecov\",\n\t\t\t\t\t\tuses: \"codecov/codecov-action@v3\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t}),\n\t};\n}\n"],"mappings":"AAEA,SAAS,0BAA0B;AAE5B,SAAS,gBAAgB,SAAkB;AACjD,SAAO;AAAA,IACN,aAAa,mBAAmB;AAAA,MAC/B,MAAM;AAAA,MACN,MAAM,CAAC,cAAc,qBAAqB;AAAA,IAC3C,CAAC;AAAA,IACD,2BAA2B,mBAAmB;AAAA,MAC7C,MAAM;AAAA,MACN,IAAI;AAAA,QACH,qBAAqB;AAAA,UACpB,OAAO,CAAC,kBAAkB;AAAA,QAC3B;AAAA,MACD;AAAA,MACA,aAAa;AAAA,QACZ,iBAAiB;AAAA,MAClB;AAAA,MACA,OAAO;AAAA,QACN;AAAA,UACC,MAAM;AAAA,UACN,MAAM;AAAA,YACL,QAAQ;AAAA,UACT;AAAA,QACD;AAAA,QACA;AAAA,UACC,IAAI;AAAA,UACJ,KAAK;AAAA;AAAA;AAAA,QACN;AAAA,MACD;AAAA,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C;AAAA,YACC,MAAM;AAAA,YACN,MAAM;AAAA,UACP;AAAA,QACD;AAAA,MACD,CAAC;AAAA,IACF;AAAA,EACD;AACD;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../../../src/steps/writing/creation/dotGitHub/createWorkflows.ts"],"sourcesContent":["/* spellchecker: disable */\nimport { Options } from \"../../../../shared/types.js\";\nimport { createWorkflowFile } from \"./createWorkflowFile.js\";\n\nexport function createWorkflows(options: Options) {\n\treturn {\n\t\t\"build.yml\": createWorkflowFile({\n\t\t\tname: \"Build\",\n\t\t\truns: [\"pnpm build\", \"node ./lib/index.js\"],\n\t\t}),\n\t\t\"pr-review-requested.yml\": createWorkflowFile({\n\t\t\tname: \"PR Review Requested\",\n\t\t\ton: {\n\t\t\t\tpull_request_target: {\n\t\t\t\t\ttypes: [\"review_requested\"],\n\t\t\t\t},\n\t\t\t},\n\t\t\tpermissions: {\n\t\t\t\t\"pull-requests\": \"write\",\n\t\t\t},\n\t\t\tsteps: [\n\t\t\t\t{\n\t\t\t\t\tuses: \"actions-ecosystem/action-remove-labels@v1\",\n\t\t\t\t\twith: {\n\t\t\t\t\t\tlabels: \"status: waiting for author\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tif: \"failure()\",\n\t\t\t\t\trun: 'echo \"Don\\'t worry if the previous step failed.\"\\necho \"See https://github.com/actions-ecosystem/action-remove-labels/issues/221.\"\\n',\n\t\t\t\t},\n\t\t\t],\n\t\t}),\n\t\t\"prettier.yml\": createWorkflowFile({\n\t\t\tname: \"Prettier\",\n\t\t\truns: [\"pnpm format --list-different\"],\n\t\t}),\n\t\t\"tsc.yml\": createWorkflowFile({\n\t\t\tname: \"Type Check\",\n\t\t\truns: [\"pnpm tsc\"],\n\t\t}),\n\t\t...(!options.excludeCompliance && {\n\t\t\t\"compliance.yml\": createWorkflowFile({\n\t\t\t\tname: \"Compliance\",\n\t\t\t\ton: {\n\t\t\t\t\tpull_request: {\n\t\t\t\t\t\tbranches: [\"main\"],\n\t\t\t\t\t\ttypes: [\"edited\", \"opened\", \"reopened\", \"synchronize\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tpermissions: {\n\t\t\t\t\t\"pull-requests\": \"write\",\n\t\t\t\t},\n\t\t\t\tsteps: [\n\t\t\t\t\t{\n\t\t\t\t\t\tuses: \"mtfoley/pr-compliance-action@main\",\n\t\t\t\t\t\twith: {\n\t\t\t\t\t\t\t\"body-auto-close\": false,\n\t\t\t\t\t\t\t\"ignore-authors\":\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t...(options.excludeAllContributors\n\t\t\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t\t\t: [\"allcontributors\", \"allcontributors[bot]\"]),\n\t\t\t\t\t\t\t\t\t...(options.excludeRenovate\n\t\t\t\t\t\t\t\t\t\t? []\n\t\t\t\t\t\t\t\t\t\t: [\"renovate\", \"renovate[bot]\"]),\n\t\t\t\t\t\t\t\t].join(\"\\n\") || undefined,\n\t\t\t\t\t\t\t\"ignore-team-members\": false,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeAllContributors && {\n\t\t\t\"contributors.yml\": createWorkflowFile({\n\t\t\t\tname: \"Contributors\",\n\t\t\t\ton: {\n\t\t\t\t\tpush: {\n\t\t\t\t\t\tbranches: [\"main\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tsteps: [\n\t\t\t\t\t{ uses: \"actions/checkout@v4\", with: { \"fetch-depth\": 0 } },\n\t\t\t\t\t{ uses: \"./.github/actions/prepare\" },\n\t\t\t\t\t{\n\t\t\t\t\t\tenv: { GITHUB_TOKEN: \"${{ secrets.ACCESS_TOKEN }}\" },\n\t\t\t\t\t\tuses: `JoshuaKGoldberg/all-contributors-auto-action@v0.4.3`,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t}),\n\t\t\"accessibility-alt-text-bot.yml\": createWorkflowFile({\n\t\t\tif: \"${{ !endsWith(github.actor, '[bot]') }}\",\n\t\t\tname: \"Accessibility Alt Text Bot\",\n\t\t\ton: {\n\t\t\t\tissue_comment: {\n\t\t\t\t\ttypes: [\"created\", \"edited\"],\n\t\t\t\t},\n\t\t\t\tissues: {\n\t\t\t\t\ttypes: [\"edited\", \"opened\"],\n\t\t\t\t},\n\t\t\t\tpull_request: {\n\t\t\t\t\ttypes: [\"edited\", \"opened\"],\n\t\t\t\t},\n\t\t\t},\n\t\t\tpermissions: {\n\t\t\t\tissues: \"write\",\n\t\t\t\t\"pull-requests\": \"write\",\n\t\t\t},\n\t\t\tsteps: [\n\t\t\t\t{\n\t\t\t\t\tuses: \"github/accessibility-alt-text-bot@v1.4.0\",\n\t\t\t\t},\n\t\t\t],\n\t\t}),\n\t\t\"lint.yml\": createWorkflowFile({\n\t\t\tname: \"Lint\",\n\t\t\truns: [...(options.bin ? [\"pnpm build\"] : []), \"pnpm lint\"],\n\t\t}),\n\t\t...(!options.excludeLintKnip && {\n\t\t\t\"lint-knip.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint Knip\",\n\t\t\t\truns: [\"pnpm lint:knip\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeLintMd && {\n\t\t\t\"lint-markdown.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint Markdown\",\n\t\t\t\truns: [\"pnpm lint:md\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeLintPackages && {\n\t\t\t\"lint-packages.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint Packages\",\n\t\t\t\truns: [\"pnpm lint:packages\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeLintSpelling && {\n\t\t\t\"lint-spelling.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint spelling\",\n\t\t\t\truns: [\"pnpm lint:spelling\"],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeReleases && {\n\t\t\t\"post-release.yml\": createWorkflowFile({\n\t\t\t\tname: \"Post Release\",\n\t\t\t\ton: {\n\t\t\t\t\trelease: {\n\t\t\t\t\t\ttypes: [\"published\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tsteps: [\n\t\t\t\t\t{ uses: \"actions/checkout@v4\", with: { \"fetch-depth\": 0 } },\n\t\t\t\t\t{\n\t\t\t\t\t\trun: `echo \"npm_version=$(npm pkg get version | tr -d '\"')\" >> \"$GITHUB_ENV\"`,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tuses: \"apexskier/github-release-commenter@v1\",\n\t\t\t\t\t\twith: {\n\t\t\t\t\t\t\tGITHUB_TOKEN: \"${{ secrets.GITHUB_TOKEN }}\",\n\t\t\t\t\t\t\t\"comment-template\": `\n\t\t\t\t\t\t\t:tada: This is included in version {release_link} :tada:\n\n\t\t\t\t\t\t\tThe release is available on:\n\n\t\t\t\t\t\t\t* [GitHub releases](https://github.com/${options.owner}/${options.repository}/releases/tag/{release_tag})\n\t\t\t\t\t\t\t* [npm package (@latest dist-tag)](https://www.npmjs.com/package/${options.repository}/v/\\${{ env.npm_version }})\n\n\t\t\t\t\t\t\tCheers! 📦🚀\n\t\t\t\t\t\t`,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t\t\"release.yml\": createWorkflowFile({\n\t\t\t\tconcurrency: {\n\t\t\t\t\tgroup: \"${{ github.workflow }}\",\n\t\t\t\t},\n\t\t\t\tname: \"Release\",\n\t\t\t\ton: {\n\t\t\t\t\tpush: {\n\t\t\t\t\t\tbranches: [\"main\"],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tpermissions: {\n\t\t\t\t\tcontents: \"write\",\n\t\t\t\t\t\"id-token\": \"write\",\n\t\t\t\t},\n\t\t\t\tsteps: [\n\t\t\t\t\t{\n\t\t\t\t\t\tuses: \"actions/checkout@v4\",\n\t\t\t\t\t\twith: {\n\t\t\t\t\t\t\t\"fetch-depth\": 0,\n\t\t\t\t\t\t\tref: \"main\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tuses: \"./.github/actions/prepare\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\trun: \"pnpm build\",\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tenv: {\n\t\t\t\t\t\t\tGITHUB_TOKEN: \"${{ secrets.ACCESS_TOKEN }}\",\n\t\t\t\t\t\t\tNPM_TOKEN: \"${{ secrets.NPM_TOKEN }}\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\tuses: \"JoshuaKGoldberg/release-it-action@v0.2.2\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeTests && {\n\t\t\t\"test.yml\": createWorkflowFile({\n\t\t\t\tname: \"Test\",\n\t\t\t\tsteps: [\n\t\t\t\t\t{ uses: \"actions/checkout@v4\" },\n\t\t\t\t\t{ uses: \"./.github/actions/prepare\" },\n\t\t\t\t\t{ run: \"pnpm run test --coverage\" },\n\t\t\t\t\t{\n\t\t\t\t\t\tname: \"Codecov\",\n\t\t\t\t\t\tuses: \"codecov/codecov-action@v3\",\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t}),\n\t\t}),\n\t};\n}\n"],"mappings":"AAEA,SAAS,0BAA0B;AAE5B,SAAS,gBAAgB,SAAkB;AACjD,SAAO;AAAA,IACN,aAAa,mBAAmB;AAAA,MAC/B,MAAM;AAAA,MACN,MAAM,CAAC,cAAc,qBAAqB;AAAA,IAC3C,CAAC;AAAA,IACD,2BAA2B,mBAAmB;AAAA,MAC7C,MAAM;AAAA,MACN,IAAI;AAAA,QACH,qBAAqB;AAAA,UACpB,OAAO,CAAC,kBAAkB;AAAA,QAC3B;AAAA,MACD;AAAA,MACA,aAAa;AAAA,QACZ,iBAAiB;AAAA,MAClB;AAAA,MACA,OAAO;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AA,MAC5B,YAAY,mBAAmB;AAAA,QAC9B,MAAM;AAAA,QACN,OAAO;AAAA,UACN,EAAE,MAAM,sBAAsB;AAAA,UAC9B,EAAE,MAAM,4BAA4B;AAAA,UACpC,EAAE,KAAK,2BAA2B;AAAA,UAClC;AAAA,YACC,MAAM;AAAA,YACN,MAAM;AAAA,UACP;AAAA,QACD;AAAA,MACD,CAAC;AAAA,IACF;AAAA,EACD;AACD;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/steps/writing/creation/dotVSCode.ts"],"sourcesContent":["import { Options } from \"../../../shared/types.js\";\nimport { formatJson } from \"./formatters/formatJson.js\";\n\n/* spellchecker: disable */\nexport async function createDotVSCode(options: Options) {\n\treturn {\n\t\t\"extensions.json\": await formatJson({\n\t\t\trecommendations: [\n\t\t\t\t\"DavidAnson.vscode-markdownlint\",\n\t\t\t\t\"dbaeumer.vscode-eslint\",\n\t\t\t\t\"esbenp.prettier-vscode\",\n\t\t\t\t!options.excludeLintSpelling && \"streetsidesoftware.code-spell-checker\",\n\t\t\t].filter(Boolean),\n\t\t}),\n\t\t...(options.excludeTests && !options.bin\n\t\t\t? {}\n\t\t\t: {\n\t\t\t\t\t\"launch.json\": await formatJson({\n\t\t\t\t\t\tconfigurations: [\n\t\t\t\t\t\t\t...(options.excludeTests\n\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\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\targs: [\"run\", \"${relativeFile}\"],\n\t\t\t\t\t\t\t\t\t\t\tautoAttachChildProcesses: true,\n\t\t\t\t\t\t\t\t\t\t\tconsole: \"integratedTerminal\",\n\t\t\t\t\t\t\t\t\t\t\tname: \"Debug Current Test File\",\n\t\t\t\t\t\t\t\t\t\t\tprogram:\n\t\t\t\t\t\t\t\t\t\t\t\t\"${workspaceRoot}/node_modules/vitest/vitest.mjs\",\n\t\t\t\t\t\t\t\t\t\t\trequest: \"launch\",\n\t\t\t\t\t\t\t\t\t\t\tskipFiles: [\"<node_internals>/**\", \"**/node_modules/**\"],\n\t\t\t\t\t\t\t\t\t\t\tsmartStep: true,\n\t\t\t\t\t\t\t\t\t\t\ttype: \"node\",\n\t\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...(options.bin\n\t\t\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tname: \"Debug Program\",\n\t\t\t\t\t\t\t\t\t\t\tpreLaunchTask: \"build\",\n\t\t\t\t\t\t\t\t\t\t\tprogram: options.bin,\n\t\t\t\t\t\t\t\t\t\t\trequest: \"launch\",\n\t\t\t\t\t\t\t\t\t\t\tskipFiles: [\"<node_internals>/**\"],\n\t\t\t\t\t\t\t\t\t\t\ttype: \"node\",\n\t\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\t: []),\n\t\t\t\t\t\t],\n\t\t\t\t\t\tversion: \"0.2.0\",\n\t\t\t\t\t}),\n\t\t\t }),\n\t\t\"settings.json\": await formatJson({\n\t\t\t\"editor.codeActionsOnSave\": {\n\t\t\t\t\"source.fixAll.eslint\": \"explicit\",\n\t\t\t},\n\t\t\t\"editor.defaultFormatter\": \"esbenp.prettier-vscode\",\n\t\t\t\"editor.formatOnSave\": true,\n\t\t\t\"editor.rulers\": [80],\n\t\t\t\"eslint.probe\": [\n\t\t\t\t\"javascript\",\n\t\t\t\t\"javascriptreact\",\n\t\t\t\t\"json\",\n\t\t\t\t\"jsonc\",\n\t\t\t\t\"markdown\",\n\t\t\t\t\"typescript\",\n\t\t\t\t\"typescriptreact\",\n\t\t\t\t\"yaml\",\n\t\t\t],\n\t\t\t\"eslint.rules.customizations\": [{ rule: \"*\", severity: \"warn\" }],\n\t\t\t\"typescript.tsdk\": \"node_modules/typescript/lib\",\n\t\t}),\n\t\t\"tasks.json\": await formatJson({\n\t\t\ttasks: [\n\t\t\t\t{\n\t\t\t\t\tdetail: \"Build the project\",\n\t\t\t\t\tlabel: \"build\",\n\t\t\t\t\tscript: \"build\",\n\t\t\t\t\ttype: \"npm\",\n\t\t\t\t},\n\t\t\t],\n\t\t\tversion: \"2.0.0\",\n\t\t}),\n\t};\n}\n"],"mappings":"AACA,SAAS,kBAAkB;AAG3B,eAAsB,gBAAgB,SAAkB;AACvD,SAAO;AAAA,IACN,mBAAmB,MAAM,WAAW;AAAA,MACnC,iBAAiB;AAAA,QAChB;AAAA,QACA;AAAA,QACA;AAAA,QACA,CAAC,QAAQ,uBAAuB;AAAA,MACjC,EAAE,OAAO,OAAO;AAAA,IACjB,CAAC;AAAA,IACD,GAAI,QAAQ,gBAAgB,CAAC,QAAQ,MAClC,CAAC,IACD;AAAA,MACA,eAAe,MAAM,WAAW;AAAA,QAC/B,gBAAgB;AAAA,UACf,GAAI,QAAQ,eACT,CAAC,IACD;AAAA,YACA;AAAA,cACC,MAAM,CAAC,OAAO,iBAAiB;AAAA,cAC/B,0BAA0B;AAAA,cAC1B,SAAS;AAAA,cACT,MAAM;AAAA,cACN,SACC;AAAA,cACD,SAAS;AAAA,cACT,WAAW,CAAC,uBAAuB,oBAAoB;AAAA,cACvD,WAAW;AAAA,cACX,MAAM;AAAA,YACP;AAAA,UACA;AAAA,UACH,GAAI,QAAQ,MACT;AAAA,YACA;AAAA,cACC,MAAM;AAAA,cACN,eAAe;AAAA,cACf,SAAS,QAAQ;AAAA,cACjB,SAAS;AAAA,cACT,WAAW,CAAC,qBAAqB;AAAA,cACjC,MAAM;AAAA,YACP;AAAA,UACA,IACA,CAAC;AAAA,QACL;AAAA,QACA,SAAS;AAAA,MACV,CAAC;AAAA,IACD;AAAA,IACH,iBAAiB,MAAM,WAAW;AAAA,MACjC,4BAA4B;AAAA,QAC3B,wBAAwB;AAAA,MACzB;AAAA,MACA,2BAA2B;AAAA,MAC3B,uBAAuB;AAAA,MACvB,iBAAiB,CAAC,EAAE;AAAA,MACpB,gBAAgB;AAAA,QACf;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA,MACA,+BAA+B,CAAC,EAAE,MAAM,KAAK,UAAU,OAAO,CAAC;AAAA,MAC/D,mBAAmB;AAAA,IACpB,CAAC;AAAA,IACD,cAAc,MAAM,WAAW;AAAA,MAC9B,OAAO;AAAA,QACN;AAAA,UACC,QAAQ;AAAA,UACR,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,MAAM;AAAA,QACP;AAAA,MACD;AAAA,MACA,SAAS;AAAA,IACV,CAAC;AAAA,EACF;AACD;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../../src/steps/writing/creation/dotVSCode.ts"],"sourcesContent":["import { Options } from \"../../../shared/types.js\";\nimport { formatJson } from \"./formatters/formatJson.js\";\n\n/* spellchecker: disable */\nexport async function createDotVSCode(options: Options) {\n\treturn {\n\t\t\"extensions.json\": await formatJson({\n\t\t\trecommendations: [\n\t\t\t\t\"DavidAnson.vscode-markdownlint\",\n\t\t\t\t\"dbaeumer.vscode-eslint\",\n\t\t\t\t\"esbenp.prettier-vscode\",\n\t\t\t\t!options.excludeLintSpelling && \"streetsidesoftware.code-spell-checker\",\n\t\t\t].filter(Boolean),\n\t\t}),\n\t\t...(options.excludeTests && !options.bin\n\t\t\t? {}\n\t\t\t: {\n\t\t\t\t\t\"launch.json\": await formatJson({\n\t\t\t\t\t\tconfigurations: [\n\t\t\t\t\t\t\t...(options.excludeTests\n\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\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\targs: [\"run\", \"${relativeFile}\"],\n\t\t\t\t\t\t\t\t\t\t\tautoAttachChildProcesses: true,\n\t\t\t\t\t\t\t\t\t\t\tconsole: \"integratedTerminal\",\n\t\t\t\t\t\t\t\t\t\t\tname: \"Debug Current Test File\",\n\t\t\t\t\t\t\t\t\t\t\tprogram:\n\t\t\t\t\t\t\t\t\t\t\t\t\"${workspaceRoot}/node_modules/vitest/vitest.mjs\",\n\t\t\t\t\t\t\t\t\t\t\trequest: \"launch\",\n\t\t\t\t\t\t\t\t\t\t\tskipFiles: [\"<node_internals>/**\", \"**/node_modules/**\"],\n\t\t\t\t\t\t\t\t\t\t\tsmartStep: true,\n\t\t\t\t\t\t\t\t\t\t\ttype: \"node\",\n\t\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...(options.bin\n\t\t\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tname: \"Debug Program\",\n\t\t\t\t\t\t\t\t\t\t\tpreLaunchTask: \"build\",\n\t\t\t\t\t\t\t\t\t\t\tprogram: options.bin,\n\t\t\t\t\t\t\t\t\t\t\trequest: \"launch\",\n\t\t\t\t\t\t\t\t\t\t\tskipFiles: [\"<node_internals>/**\"],\n\t\t\t\t\t\t\t\t\t\t\ttype: \"node\",\n\t\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\t: []),\n\t\t\t\t\t\t],\n\t\t\t\t\t\tversion: \"0.2.0\",\n\t\t\t\t\t}),\n\t\t\t }),\n\t\t\"settings.json\": await formatJson({\n\t\t\t\"editor.codeActionsOnSave\": {\n\t\t\t\t\"source.fixAll.eslint\": \"explicit\",\n\t\t\t},\n\t\t\t\"editor.defaultFormatter\": \"esbenp.prettier-vscode\",\n\t\t\t\"editor.formatOnSave\": true,\n\t\t\t\"editor.rulers\": [80],\n\t\t\t\"eslint.probe\": [\n\t\t\t\t\"javascript\",\n\t\t\t\t\"javascriptreact\",\n\t\t\t\t\"json\",\n\t\t\t\t\"jsonc\",\n\t\t\t\t\"markdown\",\n\t\t\t\t\"typescript\",\n\t\t\t\t\"typescriptreact\",\n\t\t\t\t\"yaml\",\n\t\t\t],\n\t\t\t\"eslint.rules.customizations\": [{ rule: \"*\", severity: \"warn\" }],\n\t\t\t\"eslint.useFlatConfig\": true,\n\t\t\t\"typescript.tsdk\": \"node_modules/typescript/lib\",\n\t\t}),\n\t\t\"tasks.json\": await formatJson({\n\t\t\ttasks: [\n\t\t\t\t{\n\t\t\t\t\tdetail: \"Build the project\",\n\t\t\t\t\tlabel: \"build\",\n\t\t\t\t\tscript: \"build\",\n\t\t\t\t\ttype: \"npm\",\n\t\t\t\t},\n\t\t\t],\n\t\t\tversion: \"2.0.0\",\n\t\t}),\n\t};\n}\n"],"mappings":"AACA,SAAS,kBAAkB;AAG3B,eAAsB,gBAAgB,SAAkB;AACvD,SAAO;AAAA,IACN,mBAAmB,MAAM,WAAW;AAAA,MACnC,iBAAiB;AAAA,QAChB;AAAA,QACA;AAAA,QACA;AAAA,QACA,CAAC,QAAQ,uBAAuB;AAAA,MACjC,EAAE,OAAO,OAAO;AAAA,IACjB,CAAC;AAAA,IACD,GAAI,QAAQ,gBAAgB,CAAC,QAAQ,MAClC,CAAC,IACD;AAAA,MACA,eAAe,MAAM,WAAW;AAAA,QAC/B,gBAAgB;AAAA,UACf,GAAI,QAAQ,eACT,CAAC,IACD;AAAA,YACA;AAAA,cACC,MAAM,CAAC,OAAO,iBAAiB;AAAA,cAC/B,0BAA0B;AAAA,cAC1B,SAAS;AAAA,cACT,MAAM;AAAA,cACN,SACC;AAAA,cACD,SAAS;AAAA,cACT,WAAW,CAAC,uBAAuB,oBAAoB;AAAA,cACvD,WAAW;AAAA,cACX,MAAM;AAAA,YACP;AAAA,UACA;AAAA,UACH,GAAI,QAAQ,MACT;AAAA,YACA;AAAA,cACC,MAAM;AAAA,cACN,eAAe;AAAA,cACf,SAAS,QAAQ;AAAA,cACjB,SAAS;AAAA,cACT,WAAW,CAAC,qBAAqB;AAAA,cACjC,MAAM;AAAA,YACP;AAAA,UACA,IACA,CAAC;AAAA,QACL;AAAA,QACA,SAAS;AAAA,MACV,CAAC;AAAA,IACD;AAAA,IACH,iBAAiB,MAAM,WAAW;AAAA,MACjC,4BAA4B;AAAA,QAC3B,wBAAwB;AAAA,MACzB;AAAA,MACA,2BAA2B;AAAA,MAC3B,uBAAuB;AAAA,MACvB,iBAAiB,CAAC,EAAE;AAAA,MACpB,gBAAgB;AAAA,QACf;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA,MACA,+BAA+B,CAAC,EAAE,MAAM,KAAK,UAAU,OAAO,CAAC;AAAA,MAC/D,wBAAwB;AAAA,MACxB,mBAAmB;AAAA,IACpB,CAAC;AAAA,IACD,cAAc,MAAM,WAAW;AAAA,MAC9B,OAAO;AAAA,QACN;AAAA,UACC,QAAQ;AAAA,UACR,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,MAAM;AAAA,QACP;AAAA,MACD;AAAA,MACA,SAAS;AAAA,IACV,CAAC;AAAA,EACF;AACD;","names":[]}
|
|
@@ -5,7 +5,6 @@ import '../../../shared/codes.js';
|
|
|
5
5
|
declare function createRootFiles(options: Options): Promise<{
|
|
6
6
|
"vitest.config.ts"?: string | undefined;
|
|
7
7
|
"package.json": string;
|
|
8
|
-
"tsconfig.eslint.json": string;
|
|
9
8
|
"tsconfig.json": string;
|
|
10
9
|
"tsup.config.ts": string;
|
|
11
10
|
"knip.json"?: string | undefined;
|
|
@@ -18,8 +17,8 @@ declare function createRootFiles(options: Options): Promise<{
|
|
|
18
17
|
".markdownlint.json"?: string | undefined;
|
|
19
18
|
".markdownlintignore"?: string | undefined;
|
|
20
19
|
".all-contributorsrc": string;
|
|
21
|
-
".eslintrc.cjs": string;
|
|
22
20
|
".gitignore": string;
|
|
21
|
+
"eslint.config.js": string;
|
|
23
22
|
}>;
|
|
24
23
|
|
|
25
24
|
export { createRootFiles };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createDotGitignore } from "./createDotGitignore.js";
|
|
2
|
-
import {
|
|
2
|
+
import { createESLintConfig } from "./createESLintConfig.js";
|
|
3
3
|
import { createTsupConfig } from "./createTsupConfig.js";
|
|
4
4
|
import { formatIgnoreFile } from "./formatters/formatIgnoreFile.js";
|
|
5
5
|
import { formatJson } from "./formatters/formatJson.js";
|
|
@@ -8,8 +8,8 @@ import { writePackageJson } from "./writePackageJson.js";
|
|
|
8
8
|
async function createRootFiles(options) {
|
|
9
9
|
return {
|
|
10
10
|
".all-contributorsrc": await writeAllContributorsRC(options),
|
|
11
|
-
".eslintrc.cjs": await createESLintRC(options),
|
|
12
11
|
".gitignore": createDotGitignore(options),
|
|
12
|
+
"eslint.config.js": await createESLintConfig(options),
|
|
13
13
|
...!options.excludeLintMd && {
|
|
14
14
|
".markdownlint.json": await formatJson({
|
|
15
15
|
extends: "markdownlint/style/prettier",
|
|
@@ -23,7 +23,7 @@ async function createRootFiles(options) {
|
|
|
23
23
|
"node_modules/"
|
|
24
24
|
])
|
|
25
25
|
},
|
|
26
|
-
".nvmrc": `20.
|
|
26
|
+
".nvmrc": `20.12.2
|
|
27
27
|
`,
|
|
28
28
|
".prettierignore": formatIgnoreFile([
|
|
29
29
|
...options.excludeAllContributors ? [] : [".all-contributorsrc"],
|
|
@@ -110,10 +110,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
110
110
|
})
|
|
111
111
|
},
|
|
112
112
|
"package.json": await writePackageJson(options),
|
|
113
|
-
"tsconfig.eslint.json": await formatJson({
|
|
114
|
-
extends: "./tsconfig.json",
|
|
115
|
-
include: ["."]
|
|
116
|
-
}),
|
|
117
113
|
"tsconfig.json": await formatJson({
|
|
118
114
|
compilerOptions: {
|
|
119
115
|
declaration: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/steps/writing/creation/rootFiles.ts"],"sourcesContent":["import { Options } from \"../../../shared/types.js\";\nimport { createDotGitignore } from \"./createDotGitignore.js\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../../src/steps/writing/creation/rootFiles.ts"],"sourcesContent":["import { Options } from \"../../../shared/types.js\";\nimport { createDotGitignore } from \"./createDotGitignore.js\";\nimport { createESLintConfig } from \"./createESLintConfig.js\";\nimport { createTsupConfig } from \"./createTsupConfig.js\";\nimport { formatIgnoreFile } from \"./formatters/formatIgnoreFile.js\";\nimport { formatJson } from \"./formatters/formatJson.js\";\nimport { writeAllContributorsRC } from \"./writeAllContributorsRC.js\";\nimport { writePackageJson } from \"./writePackageJson.js\";\n\nexport async function createRootFiles(options: Options) {\n\treturn {\n\t\t\".all-contributorsrc\": await writeAllContributorsRC(options),\n\t\t\".gitignore\": createDotGitignore(options),\n\t\t\"eslint.config.js\": await createESLintConfig(options),\n\t\t...(!options.excludeLintMd && {\n\t\t\t\".markdownlint.json\": await formatJson({\n\t\t\t\textends: \"markdownlint/style/prettier\",\n\t\t\t\t\"first-line-h1\": false,\n\t\t\t\t\"no-inline-html\": false,\n\t\t\t}),\n\t\t\t\".markdownlintignore\": formatIgnoreFile([\n\t\t\t\t\".github/CODE_OF_CONDUCT.md\",\n\t\t\t\t\"CHANGELOG.md\",\n\t\t\t\t\"lib/\",\n\t\t\t\t\"node_modules/\",\n\t\t\t]),\n\t\t}),\n\t\t\".nvmrc\": `20.12.2\\n`,\n\t\t\".prettierignore\": formatIgnoreFile([\n\t\t\t...(options.excludeAllContributors ? [] : [\".all-contributorsrc\"]),\n\t\t\t...(options.excludeTests ? [] : [\"coverage/\"]),\n\t\t\t\"lib/\",\n\t\t\t\"pnpm-lock.yaml\",\n\t\t]),\n\t\t\".prettierrc.json\": await formatJson({\n\t\t\t$schema: \"http://json.schemastore.org/prettierrc\",\n\t\t\toverrides: [\n\t\t\t\t{\n\t\t\t\t\tfiles: \".nvmrc\",\n\t\t\t\t\toptions: { parser: \"yaml\" },\n\t\t\t\t},\n\t\t\t],\n\t\t\tplugins: [\"prettier-plugin-curly\", \"prettier-plugin-packagejson\"],\n\t\t\tuseTabs: true,\n\t\t}),\n\t\t...(!options.excludeReleases && {\n\t\t\t\".release-it.json\": await formatJson({\n\t\t\t\tgit: {\n\t\t\t\t\tcommitMessage: \"chore: release v${version}\",\n\t\t\t\t\trequireCommits: true,\n\t\t\t\t},\n\t\t\t\tgithub: {\n\t\t\t\t\tautoGenerate: true,\n\t\t\t\t\trelease: true,\n\t\t\t\t\treleaseName: \"v${version}\",\n\t\t\t\t},\n\t\t\t\tnpm: {\n\t\t\t\t\tpublishArgs: [`--access ${options.access}`, \"--provenance\"],\n\t\t\t\t},\n\t\t\t\tplugins: {\n\t\t\t\t\t\"@release-it/conventional-changelog\": {\n\t\t\t\t\t\tinfile: \"CHANGELOG.md\",\n\t\t\t\t\t\tpreset: \"angular\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}),\n\t\t}),\n\t\t\"LICENSE.md\": `# MIT License\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n`,\n\t\t...(!options.excludeLintSpelling && {\n\t\t\t\"cspell.json\": await formatJson({\n\t\t\t\tdictionaries: [\"typescript\"],\n\t\t\t\tignorePaths: [\n\t\t\t\t\t\".github\",\n\t\t\t\t\t\"CHANGELOG.md\",\n\t\t\t\t\t...(options.excludeTests ? [] : [\"coverage\"]),\n\t\t\t\t\t\"lib\",\n\t\t\t\t\t\"node_modules\",\n\t\t\t\t\t\"pnpm-lock.yaml\",\n\t\t\t\t],\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeLintKnip && {\n\t\t\t\"knip.json\": await formatJson({\n\t\t\t\t$schema: \"https://unpkg.com/knip@latest/schema.json\",\n\t\t\t\tentry: [\"src/index.ts!\"],\n\t\t\t\tignoreExportsUsedInFile: {\n\t\t\t\t\tinterface: true,\n\t\t\t\t\ttype: true,\n\t\t\t\t},\n\t\t\t\tproject: [\"src/**/*.ts!\"],\n\t\t\t}),\n\t\t}),\n\t\t\"package.json\": await writePackageJson(options),\n\t\t\"tsconfig.json\": await formatJson({\n\t\t\tcompilerOptions: {\n\t\t\t\tdeclaration: true,\n\t\t\t\tdeclarationMap: true,\n\t\t\t\tesModuleInterop: true,\n\t\t\t\tmodule: \"NodeNext\",\n\t\t\t\tmoduleResolution: \"NodeNext\",\n\t\t\t\tnoEmit: true,\n\t\t\t\toutDir: \"lib\",\n\t\t\t\tresolveJsonModule: true,\n\t\t\t\tskipLibCheck: true,\n\t\t\t\tsourceMap: true,\n\t\t\t\tstrict: true,\n\t\t\t\ttarget: \"ES2022\",\n\t\t\t},\n\t\t\tinclude: [\"src\"],\n\t\t}),\n\t\t\"tsup.config.ts\": await createTsupConfig(options),\n\t\t...(!options.excludeTests && {\n\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\texclude: [\"lib\"],\n\t\t\tinclude: [\"src\"],\n\t\t\treporter: [\"html\", \"lcov\"],\n\t\t},\n\t\texclude: [\"lib\", \"node_modules\"],\n\t\tsetupFiles: [\"console-fail-test/set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