create-typescript-app 1.30.0 → 1.32.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 +35 -32
- package/lib/bin/index.js +8 -7
- package/lib/bin/index.js.map +1 -1
- package/lib/bin/promptForMode.d.ts +11 -0
- package/lib/bin/promptForMode.js +102 -0
- package/lib/bin/promptForMode.js.map +1 -0
- package/lib/create/createAndEnterGitDirectory.d.ts +3 -0
- package/lib/create/createAndEnterGitDirectory.js +19 -0
- package/lib/create/createAndEnterGitDirectory.js.map +1 -0
- package/lib/create/createRerunSuggestion.d.ts +1 -2
- package/lib/create/createRerunSuggestion.js +18 -5
- package/lib/create/createRerunSuggestion.js.map +1 -1
- package/lib/create/createWithOptions.d.ts +1 -0
- package/lib/create/createWithOptions.js +6 -9
- package/lib/create/createWithOptions.js.map +1 -1
- package/lib/create/index.d.ts +2 -3
- package/lib/create/index.js +16 -19
- package/lib/create/index.js.map +1 -1
- package/lib/initialize/index.d.ts +1 -2
- package/lib/initialize/index.js +7 -7
- package/lib/initialize/index.js.map +1 -1
- package/lib/initialize/initializeWithOptions.d.ts +1 -0
- package/lib/initialize/initializeWithOptions.js +4 -4
- package/lib/initialize/initializeWithOptions.js.map +1 -1
- package/lib/migrate/index.d.ts +1 -2
- package/lib/migrate/index.js +8 -5
- package/lib/migrate/index.js.map +1 -1
- package/lib/migrate/migrateWithOptions.d.ts +1 -0
- package/lib/migrate/migrateWithOptions.js +3 -3
- package/lib/migrate/migrateWithOptions.js.map +1 -1
- package/lib/shared/cli/outro.d.ts +4 -3
- package/lib/shared/cli/outro.js +2 -2
- package/lib/shared/cli/outro.js.map +1 -1
- package/lib/shared/generateNextSteps.d.ts +8 -0
- package/lib/shared/generateNextSteps.js +60 -0
- package/lib/shared/generateNextSteps.js.map +1 -0
- package/lib/shared/getGitHubUserAsAllContributor.d.ts +5 -1
- package/lib/shared/getGitHubUserAsAllContributor.js +11 -3
- package/lib/shared/getGitHubUserAsAllContributor.js.map +1 -1
- package/lib/shared/options/args.d.ts +44 -4
- package/lib/shared/options/args.js +15 -2
- package/lib/shared/options/args.js.map +1 -1
- package/lib/shared/options/augmentOptionsWithExcludes.d.ts +2 -0
- package/lib/shared/options/augmentOptionsWithExcludes.js +33 -3
- package/lib/shared/options/augmentOptionsWithExcludes.js.map +1 -1
- package/lib/shared/options/{readOptionDefaults → createOptionDefaults}/index.d.ts +10 -3
- package/lib/shared/options/{readOptionDefaults → createOptionDefaults}/index.js +14 -9
- package/lib/shared/options/createOptionDefaults/index.js.map +1 -0
- package/lib/shared/options/{readOptionDefaults → createOptionDefaults}/parsePackageAuthor.d.ts +2 -0
- package/lib/shared/options/createOptionDefaults/parsePackageAuthor.js.map +1 -0
- package/lib/shared/options/createOptionDefaults/readDefaultsFromReadme.js.map +1 -0
- package/lib/shared/options/detectEmailRedundancy.d.ts +8 -0
- package/lib/shared/options/detectEmailRedundancy.js +16 -0
- package/lib/shared/options/detectEmailRedundancy.js.map +1 -0
- package/lib/shared/options/ensureRepositoryExists.d.ts +3 -1
- package/lib/shared/options/ensureRepositoryExists.js +2 -1
- package/lib/shared/options/ensureRepositoryExists.js.map +1 -1
- package/lib/shared/options/getPrefillOrPromptedOption.d.ts +1 -1
- package/lib/shared/options/getPrefillOrPromptedOption.js +1 -4
- package/lib/shared/options/getPrefillOrPromptedOption.js.map +1 -1
- package/lib/shared/options/optionsSchema.d.ts +194 -0
- package/lib/shared/options/optionsSchema.js +57 -0
- package/lib/shared/options/optionsSchema.js.map +1 -0
- package/lib/shared/options/readOptions.d.ts +4 -3
- package/lib/shared/options/readOptions.js +46 -58
- package/lib/shared/options/readOptions.js.map +1 -1
- package/lib/shared/packages.d.ts +2 -0
- package/lib/shared/runOrRestore.d.ts +1 -1
- package/lib/shared/types.d.ts +49 -7
- package/lib/steps/addOwnerAsAllContributor.d.ts +5 -1
- package/lib/steps/addOwnerAsAllContributor.js +8 -3
- package/lib/steps/addOwnerAsAllContributor.js.map +1 -1
- package/lib/steps/addToolAllContributors.d.ts +5 -1
- package/lib/steps/addToolAllContributors.js +2 -2
- package/lib/steps/addToolAllContributors.js.map +1 -1
- package/lib/steps/detectExistingContributors.d.ts +2 -0
- package/lib/steps/finalizeDependencies.d.ts +2 -0
- package/lib/steps/finalizeDependencies.js +8 -6
- package/lib/steps/finalizeDependencies.js.map +1 -1
- package/lib/steps/initializeGitHubRepository/index.d.ts +2 -0
- package/lib/steps/initializeGitHubRepository/initializeBranchProtectionSettings.d.ts +2 -0
- package/lib/steps/initializeGitHubRepository/labels/outcomeLabels.js +5 -0
- package/lib/steps/initializeGitHubRepository/labels/outcomeLabels.js.map +1 -1
- package/lib/steps/initializeGitRemote.d.ts +2 -0
- package/lib/steps/initializeRepositorySettings.d.ts +2 -0
- package/lib/steps/uninstallPackages.d.ts +1 -1
- package/lib/steps/uninstallPackages.js +3 -2
- package/lib/steps/uninstallPackages.js.map +1 -1
- package/lib/steps/updateAllContributorsTable.d.ts +2 -0
- package/lib/steps/updateLocalFiles.d.ts +1 -2
- package/lib/steps/updateLocalFiles.js +4 -7
- package/lib/steps/updateLocalFiles.js.map +1 -1
- package/lib/steps/writeReadme/findIntroSectionClose.js +1 -1
- package/lib/steps/writeReadme/findIntroSectionClose.js.map +1 -1
- package/lib/steps/writeReadme/generateTopContent.d.ts +2 -0
- package/lib/steps/writeReadme/generateTopContent.js +17 -2
- package/lib/steps/writeReadme/generateTopContent.js.map +1 -1
- package/lib/steps/writeReadme/index.d.ts +2 -0
- package/lib/steps/writeReadme/index.js +1 -1
- package/lib/steps/writeReadme/index.js.map +1 -1
- package/lib/steps/writing/creation/createESLintRC.d.ts +2 -0
- package/lib/steps/writing/creation/createESLintRC.js +35 -42
- package/lib/steps/writing/creation/createESLintRC.js.map +1 -1
- package/lib/steps/writing/creation/dotGitHub/createDevelopment.d.ts +2 -0
- package/lib/steps/writing/creation/dotGitHub/createDevelopment.js +1 -1
- package/lib/steps/writing/creation/dotGitHub/createDevelopment.js.map +1 -1
- package/lib/steps/writing/creation/dotGitHub/createDotGitHubFiles.d.ts +2 -0
- package/lib/steps/writing/creation/dotGitHub/createDotGitHubFiles.js +9 -9
- package/lib/steps/writing/creation/dotGitHub/createDotGitHubFiles.js.map +1 -1
- package/lib/steps/writing/creation/dotGitHub/createWorkflowFile.d.ts +1 -1
- package/lib/steps/writing/creation/dotGitHub/createWorkflowFile.js.map +1 -1
- package/lib/steps/writing/creation/dotGitHub/{workflows.d.ts → createWorkflows.d.ts} +2 -0
- package/lib/steps/writing/creation/dotGitHub/{workflows.js → createWorkflows.js} +11 -89
- package/lib/steps/writing/creation/dotGitHub/createWorkflows.js.map +1 -0
- package/lib/steps/writing/creation/dotGitHub/index.d.ts +2 -0
- package/lib/steps/writing/creation/dotGitHub/index.js +1 -1
- package/lib/steps/writing/creation/dotGitHub/index.js.map +1 -1
- package/lib/steps/writing/creation/dotGitHub/issueTemplate.d.ts +2 -0
- package/lib/steps/writing/creation/dotVSCode.d.ts +2 -0
- package/lib/steps/writing/creation/index.d.ts +1 -2
- package/lib/steps/writing/creation/index.js +2 -2
- package/lib/steps/writing/creation/index.js.map +1 -1
- package/lib/steps/writing/creation/rootFiles.d.ts +2 -0
- package/lib/steps/writing/creation/rootFiles.js +4 -3
- package/lib/steps/writing/creation/rootFiles.js.map +1 -1
- package/lib/steps/writing/creation/src.d.ts +2 -0
- package/lib/steps/writing/creation/writeAllContributorsRC.d.ts +2 -0
- package/lib/steps/writing/creation/writeAllContributorsRC.js +1 -1
- package/lib/steps/writing/creation/writeAllContributorsRC.js.map +1 -1
- package/lib/steps/writing/creation/writePackageJson.d.ts +2 -0
- package/lib/steps/writing/creation/writePackageJson.js +3 -3
- package/lib/steps/writing/creation/writePackageJson.js.map +1 -1
- package/lib/steps/writing/writeStructure.d.ts +1 -2
- package/lib/steps/writing/writeStructure.js +2 -2
- package/lib/steps/writing/writeStructure.js.map +1 -1
- package/package.json +5 -8
- package/lib/bin/mode.d.ts +0 -14
- package/lib/bin/mode.js +0 -50
- package/lib/bin/mode.js.map +0 -1
- package/lib/create/createAndEnterRepository.d.ts +0 -3
- package/lib/create/createAndEnterRepository.js +0 -15
- package/lib/create/createAndEnterRepository.js.map +0 -1
- package/lib/shared/options/readOptionDefaults/index.js.map +0 -1
- package/lib/shared/options/readOptionDefaults/parsePackageAuthor.js.map +0 -1
- package/lib/shared/options/readOptionDefaults/readDefaultsFromReadme.js.map +0 -1
- package/lib/steps/writing/creation/dotGitHub/workflows.js.map +0 -1
- /package/lib/shared/options/{readOptionDefaults → createOptionDefaults}/parsePackageAuthor.js +0 -0
- /package/lib/shared/options/{readOptionDefaults → createOptionDefaults}/readDefaultsFromReadme.d.ts +0 -0
- /package/lib/shared/options/{readOptionDefaults → createOptionDefaults}/readDefaultsFromReadme.js +0 -0
|
@@ -65,7 +65,7 @@ representative at an online or offline event.
|
|
|
65
65
|
|
|
66
66
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
67
67
|
reported to the community leaders responsible for enforcement at
|
|
68
|
-
${options.email}.
|
|
68
|
+
${options.email.github}.
|
|
69
69
|
All complaints will be reviewed and investigated promptly and fairly.
|
|
70
70
|
|
|
71
71
|
All community leaders are obligated to respect the privacy and security of the
|
|
@@ -160,8 +160,8 @@ There are two steps involved:
|
|
|
160
160
|
|
|
161
161
|
### Finding an Issue
|
|
162
162
|
|
|
163
|
-
With the exception of very small typos, all changes to this repository generally need to correspond to an [open issue marked as \`accepting prs\` on the issue tracker](https://github.com
|
|
164
|
-
If this is your first time contributing, consider searching for [unassigned issues that also have the \`good first issue\` label](https://github.com
|
|
163
|
+
With 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/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aissue+is%3Aopen+label%3A%22status%3A+accepting+prs%22+no%3Aassignee+).
|
|
164
|
+
If this is your first time contributing, consider searching for [unassigned issues that also have the \`good first issue\` label](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+label%3A%22status%3A+accepting+prs%22+no%3Aassignee+).
|
|
165
165
|
If the issue you'd like to fix isn't found on the issue, see [Reporting Issues](#reporting-issues) for filing your own (please do!).
|
|
166
166
|
|
|
167
167
|
#### Issue Claiming
|
|
@@ -169,15 +169,15 @@ If the issue you'd like to fix isn't found on the issue, see [Reporting Issues](
|
|
|
169
169
|
We don't use any kind of issue claiming system.
|
|
170
170
|
We'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.
|
|
171
171
|
|
|
172
|
-
If an issue has been marked as \`accepting prs\` and an open PR does not exist, feel free to send a PR.
|
|
173
|
-
|
|
172
|
+
If an issue has been marked as \`status: accepting prs\` and an open PR does not exist, feel free to send a PR.
|
|
173
|
+
Please don't post comments asking for permission or stating you will work on an issue.
|
|
174
174
|
|
|
175
175
|
### Sending a Pull Request
|
|
176
176
|
|
|
177
177
|
Once you've identified an open issue accepting PRs that doesn't yet have a PR sent, you're free to send a pull request.
|
|
178
178
|
Be sure to fill out the pull request template's requested information -- otherwise your PR will likely be closed.
|
|
179
179
|
|
|
180
|
-
PRs are also expected to have a title that adheres to [
|
|
180
|
+
PRs are also expected to have a title that adheres to [conventional commits](https://www.conventionalcommits.org/en/v1.0.0).
|
|
181
181
|
Only PR titles need to be in that format, not individual commits.
|
|
182
182
|
Don't worry if you get this wrong: you can always change the PR title after sending it.
|
|
183
183
|
Check [previously merged PRs](https://github.com/${options.owner}/${options.repository}/pulls?q=is%3Apr+is%3Amerged+-label%3Adependencies+) for reference.
|
|
@@ -268,7 +268,7 @@ We take all security vulnerabilities seriously.
|
|
|
268
268
|
If you have a vulnerability or other security issues to disclose:
|
|
269
269
|
|
|
270
270
|
- Thank you very much, please do!
|
|
271
|
-
- Please send them to us by emailing \`${options.email}\`
|
|
271
|
+
- Please send them to us by emailing \`${options.email.github}\`
|
|
272
272
|
|
|
273
273
|
We appreciate your efforts and responsible disclosure and will make every effort to acknowledge your contributions.
|
|
274
274
|
`,
|
|
@@ -278,8 +278,8 @@ We appreciate your efforts and responsible disclosure and will make every effort
|
|
|
278
278
|
automerge: true,
|
|
279
279
|
internalChecksFilter: "strict",
|
|
280
280
|
labels: ["dependencies"],
|
|
281
|
-
|
|
282
|
-
|
|
281
|
+
minimumReleaseAge: "3 days",
|
|
282
|
+
postUpdateOptions: ["pnpmDedupe"]
|
|
283
283
|
})
|
|
284
284
|
}
|
|
285
285
|
};
|
|
@@ -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.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}.\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 [open issue marked as \\`accepting prs\\` on the issue tracker](https://github.com/${options.owner}/${options.repository}/issues?q=is%3Aopen+is%3Aissue+label%3A%22accepting+prs%22).\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%3Aopen+is%3Aissue+label%3A%22accepting+prs%22+label%3A%22good+first+issue%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 issue has been marked as \\`accepting prs\\` and an open PR does not exist, feel free to send a PR.\nYou don't need to ask for permission.\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 [commitlint](https://github.com/conventional-changelog/commitlint).\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\": 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}\\`\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\tinternalChecksFilter: \"strict\",\n\t\t\t\tlabels: [\"dependencies\"],\n\t\t\t\tpostUpdateOptions: [\"pnpmDedupe\"],\n\t\t\t\tstabilityDays: 3,\n\t\t\t}),\n\t\t}),\n\t};\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAC3B,SAAS,yBAAyB;AAElC,eAAsB,qB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|
|
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.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/JoshuaKGoldberg/create-typescript-app/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/JoshuaKGoldberg/create-typescript-app/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 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\": 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\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;AA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A;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAsDpF,kBAAkB,kBAAkB,OAAO;AAAA,IAC3C,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,sBAAsB;AAAA,QACtB,QAAQ,CAAC,cAAc;AAAA,QACvB,mBAAmB;AAAA,QACnB,mBAAmB,CAAC,YAAY;AAAA,MACjC,CAAC;AAAA,IACF;AAAA,EACD;AACD;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/steps/writing/creation/dotGitHub/createWorkflowFile.ts"],"sourcesContent":["import { formatYaml } from \"../formatters/formatYaml.js\";\n\ninterface WorkflowFileConcurrency {\n\t\"cancel-in-progress\"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/steps/writing/creation/dotGitHub/createWorkflowFile.ts"],"sourcesContent":["import { formatYaml } from \"../formatters/formatYaml.js\";\n\ninterface WorkflowFileConcurrency {\n\t\"cancel-in-progress\"?: boolean;\n\tgroup: string;\n}\n\ninterface WorkflowFileOn {\n\tpull_request?:\n\t\t| {\n\t\t\t\tbranches?: string | string[];\n\t\t\t\ttypes?: string[];\n\t\t }\n\t\t| null\n\t\t| string;\n\tpull_request_target?: {\n\t\ttypes: string[];\n\t};\n\tpush?: {\n\t\tbranches: string[];\n\t};\n\trelease?: {\n\t\ttypes: string[];\n\t};\n\tworkflow_dispatch?: null | string;\n}\n\ninterface WorkflowFilePermissions {\n\tcontents?: string;\n\t\"id-token\"?: string;\n\t\"pull-requests\"?: string;\n}\n\ninterface WorkflowFileStep {\n\tenv?: Record<string, string>;\n\tif?: string;\n\tname?: string;\n\trun?: string;\n\tuses?: string;\n\twith?: Record<string, unknown>;\n}\n\ninterface WorkflowFileOptionsBase {\n\tconcurrency?: WorkflowFileConcurrency;\n\tname: string;\n\ton?: WorkflowFileOn;\n\tpermissions?: WorkflowFilePermissions;\n}\n\ninterface WorkflowFileOptionsRuns extends WorkflowFileOptionsBase {\n\truns: (WorkflowFileStep | string)[];\n}\n\ninterface WorkflowFileOptionsSteps extends WorkflowFileOptionsBase {\n\tsteps: WorkflowFileStep[];\n}\n\ntype WorkflowFileOptions = WorkflowFileOptionsRuns | WorkflowFileOptionsSteps;\n\nexport function createWorkflowFile({\n\tconcurrency,\n\tname,\n\ton = {\n\t\tpull_request: null,\n\t\tpush: {\n\t\t\tbranches: [\"main\"],\n\t\t},\n\t},\n\tpermissions,\n\t...options\n}: WorkflowFileOptions) {\n\treturn (\n\t\tformatYaml({\n\t\t\tconcurrency,\n\t\t\tjobs: {\n\t\t\t\t[name.replaceAll(\" \", \"_\").toLowerCase()]: {\n\t\t\t\t\t\"runs-on\": \"ubuntu-latest\",\n\t\t\t\t\tsteps:\n\t\t\t\t\t\t\"runs\" in options\n\t\t\t\t\t\t\t? [\n\t\t\t\t\t\t\t\t\t{ uses: \"actions/checkout@v4\" },\n\t\t\t\t\t\t\t\t\t{ uses: \"./.github/actions/prepare\" },\n\t\t\t\t\t\t\t\t\t...options.runs.map((run) => ({ run })),\n\t\t\t\t\t\t\t ]\n\t\t\t\t\t\t\t: options.steps,\n\t\t\t\t},\n\t\t\t},\n\t\t\tname,\n\t\t\ton,\n\t\t\tpermissions,\n\t\t})\n\t\t\t.replaceAll(/\\n(\\S)/g, \"\\n\\n$1\")\n\t\t\t// https://github.com/nodeca/js-yaml/pull/515\n\t\t\t.replaceAll(/: \"\\\\n(.+)\"/g, \": |\\n$1\")\n\t\t\t.replaceAll(\"\\\\n\", \"\\n\")\n\t\t\t.replaceAll(\"\\\\t\", \" \")\n\t);\n}\n"],"mappings":"AAAA,SAAS,kBAAkB;AA2DpB,SAAS,mBAAmB;AAAA,EAClC;AAAA,EACA;AAAA,EACA,KAAK;AAAA,IACJ,cAAc;AAAA,IACd,MAAM;AAAA,MACL,UAAU,CAAC,MAAM;AAAA,IAClB;AAAA,EACD;AAAA,EACA;AAAA,EACA,GAAG;AACJ,GAAwB;AACvB,SACC,WAAW;AAAA,IACV;AAAA,IACA,MAAM;AAAA,MACL,CAAC,KAAK,WAAW,KAAK,GAAG,EAAE,YAAY,CAAC,GAAG;AAAA,QAC1C,WAAW;AAAA,QACX,OACC,UAAU,UACP;AAAA,UACA,EAAE,MAAM,sBAAsB;AAAA,UAC9B,EAAE,MAAM,4BAA4B;AAAA,UACpC,GAAG,QAAQ,KAAK,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE;AAAA,QACtC,IACA,QAAQ;AAAA,MACb;AAAA,IACD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD,CAAC,EACC,WAAW,WAAW,QAAQ,EAE9B,WAAW,gBAAgB,SAAS,EACpC,WAAW,OAAO,IAAI,EACtB,WAAW,OAAO,IAAI;AAE1B;","names":[]}
|
|
@@ -56,18 +56,16 @@ echo "See https://github.com/actions-ecosystem/action-remove-labels/issues/221."
|
|
|
56
56
|
with: {
|
|
57
57
|
"body-auto-close": false,
|
|
58
58
|
"ignore-authors": [
|
|
59
|
-
"allcontributors",
|
|
60
|
-
"
|
|
61
|
-
|
|
62
|
-
"renovate[bot]"
|
|
63
|
-
].join("\n"),
|
|
59
|
+
...options.excludeAllContributors ? [] : ["allcontributors", "allcontributors[bot]"],
|
|
60
|
+
...options.excludeRenovate ? [] : ["renovate", "renovate[bot]"]
|
|
61
|
+
].join("\n") || void 0,
|
|
64
62
|
"ignore-team-members": false
|
|
65
63
|
}
|
|
66
64
|
}
|
|
67
65
|
]
|
|
68
66
|
})
|
|
69
67
|
},
|
|
70
|
-
...!options.
|
|
68
|
+
...!options.excludeAllContributors && {
|
|
71
69
|
"contributors.yml": createWorkflowFile({
|
|
72
70
|
name: "Contributors",
|
|
73
71
|
on: {
|
|
@@ -152,7 +150,6 @@ echo "See https://github.com/actions-ecosystem/action-remove-labels/issues/221."
|
|
|
152
150
|
}),
|
|
153
151
|
"release.yml": createWorkflowFile({
|
|
154
152
|
concurrency: {
|
|
155
|
-
"cancel-in-progress": true,
|
|
156
153
|
group: "${{ github.workflow }}"
|
|
157
154
|
},
|
|
158
155
|
name: "Release",
|
|
@@ -169,7 +166,8 @@ echo "See https://github.com/actions-ecosystem/action-remove-labels/issues/221."
|
|
|
169
166
|
{
|
|
170
167
|
uses: "actions/checkout@v4",
|
|
171
168
|
with: {
|
|
172
|
-
"fetch-depth": 0
|
|
169
|
+
"fetch-depth": 0,
|
|
170
|
+
ref: "main"
|
|
173
171
|
}
|
|
174
172
|
},
|
|
175
173
|
{
|
|
@@ -178,92 +176,17 @@ echo "See https://github.com/actions-ecosystem/action-remove-labels/issues/221."
|
|
|
178
176
|
{
|
|
179
177
|
run: "pnpm build"
|
|
180
178
|
},
|
|
181
|
-
{
|
|
182
|
-
run: 'git config user.name "${GITHUB_ACTOR}"'
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
run: 'git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"'
|
|
186
|
-
},
|
|
187
179
|
{
|
|
188
180
|
env: {
|
|
181
|
+
GITHUB_TOKEN: "${{ secrets.ACCESS_TOKEN }}",
|
|
189
182
|
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}"
|
|
190
183
|
},
|
|
191
|
-
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
name: "Delete branch protection on main",
|
|
195
|
-
uses: "actions/github-script@v6.4.1",
|
|
196
|
-
with: {
|
|
197
|
-
"github-token": "${{ secrets.ACCESS_TOKEN }}",
|
|
198
|
-
script: `
|
|
199
|
-
try {
|
|
200
|
-
await github.request(
|
|
201
|
-
\`DELETE /repos/${options.owner}/${options.repository}/branches/main/protection\`,
|
|
202
|
-
);
|
|
203
|
-
} catch (error) {
|
|
204
|
-
if (!error.message?.includes?.("Branch not protected")) {
|
|
205
|
-
throw error;
|
|
206
|
-
}
|
|
207
|
-
}`
|
|
208
|
-
}
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
env: {
|
|
212
|
-
GITHUB_TOKEN: "${{ secrets.ACCESS_TOKEN }}"
|
|
213
|
-
},
|
|
214
|
-
run: `
|
|
215
|
-
if pnpm run should-semantic-release ; then
|
|
216
|
-
pnpm release-it --verbose
|
|
217
|
-
gh workflow run post-release.yml
|
|
218
|
-
fi`
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
if: "always()",
|
|
222
|
-
name: "Recreate branch protection on main",
|
|
223
|
-
uses: "actions/github-script@v6.4.1",
|
|
224
|
-
with: {
|
|
225
|
-
"github-token": "${{ secrets.ACCESS_TOKEN }}",
|
|
226
|
-
script: `
|
|
227
|
-
github.request(
|
|
228
|
-
\`PUT /repos/${options.owner}/${options.repository}/branches/main/protection\`,
|
|
229
|
-
{
|
|
230
|
-
allow_deletions: false,
|
|
231
|
-
allow_force_pushes: true,
|
|
232
|
-
allow_fork_pushes: false,
|
|
233
|
-
allow_fork_syncing: true,
|
|
234
|
-
block_creations: false,
|
|
235
|
-
branch: "main",
|
|
236
|
-
enforce_admins: false,
|
|
237
|
-
owner: "${options.owner}",
|
|
238
|
-
repo: "${options.repository}",
|
|
239
|
-
required_conversation_resolution: true,
|
|
240
|
-
required_linear_history: false,
|
|
241
|
-
required_pull_request_reviews: null,
|
|
242
|
-
required_status_checks: {
|
|
243
|
-
checks: [
|
|
244
|
-
{ context: "build" },
|
|
245
|
-
{ context: "compliance" },
|
|
246
|
-
{ context: "lint" },
|
|
247
|
-
{ context: "lint_knip" },
|
|
248
|
-
{ context: "lint_markdown" },
|
|
249
|
-
{ context: "lint_package_json" },
|
|
250
|
-
{ context: "lint_packages" },
|
|
251
|
-
{ context: "lint_spelling" },
|
|
252
|
-
{ context: "prettier" },
|
|
253
|
-
{ context: "test" },
|
|
254
|
-
],
|
|
255
|
-
strict: false,
|
|
256
|
-
},
|
|
257
|
-
restrictions: null,
|
|
258
|
-
}
|
|
259
|
-
);
|
|
260
|
-
`
|
|
261
|
-
}
|
|
184
|
+
uses: "JoshuaKGoldberg/release-it-action@v0.2.2"
|
|
262
185
|
}
|
|
263
186
|
]
|
|
264
187
|
})
|
|
265
188
|
},
|
|
266
|
-
|
|
189
|
+
...!options.excludeTests && {
|
|
267
190
|
"test.yml": createWorkflowFile({
|
|
268
191
|
name: "Test",
|
|
269
192
|
steps: [
|
|
@@ -272,8 +195,7 @@ echo "See https://github.com/actions-ecosystem/action-remove-labels/issues/221."
|
|
|
272
195
|
{ run: "pnpm run test --coverage" },
|
|
273
196
|
{
|
|
274
197
|
name: "Codecov",
|
|
275
|
-
uses: "codecov/codecov-action@v3"
|
|
276
|
-
with: { "github-token": "${{ secrets.GITHUB_TOKEN }}" }
|
|
198
|
+
uses: "codecov/codecov-action@v3"
|
|
277
199
|
}
|
|
278
200
|
]
|
|
279
201
|
})
|
|
@@ -283,4 +205,4 @@ echo "See https://github.com/actions-ecosystem/action-remove-labels/issues/221."
|
|
|
283
205
|
export {
|
|
284
206
|
createWorkflows
|
|
285
207
|
};
|
|
286
|
-
//# sourceMappingURL=
|
|
208
|
+
//# sourceMappingURL=createWorkflows.js.map
|
|
@@ -0,0 +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.3.2`,\n\t\t\t\t\t},\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: [\"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.excludeLintPackageJson && {\n\t\t\t\"lint-package-json.yml\": createWorkflowFile({\n\t\t\t\tname: \"Lint Package JSON\",\n\t\t\t\truns: [\"pnpm lint:package-json\"],\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\t\t\t\t\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\t\t\t\t\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,IACD,CAAC;AAAA,IACD,gBAAgB,mBAAmB;AAAA,MAClC,MAAM;AAAA,MACN,MAAM,CAAC,8BAA8B;AAAA,IACtC,CAAC;AAAA,IACD,WAAW,mBAAmB;AAAA,MAC7B,MAAM;AAAA,MACN,MAAM,CAAC,UAAU;AAAA,IAClB,CAAC;AAAA,IACD,GAAI,CAAC,QAAQ,qBAAqB;AAAA,MACjC,kBAAkB,mBAAmB;AAAA,QACpC,MAAM;AAAA,QACN,IAAI;AAAA,UACH,cAAc;AAAA,YACb,UAAU,CAAC,MAAM;AAAA,YACj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AO;AAAA,UACN;AAAA,YACC,MAAM;AAAA,YACN,MAAM;AAAA,cACL,eAAe;AAAA,cACf,KAAK;AAAA,YACN;AAAA,UACD;AAAA,UACA;AAAA,YACC,MAAM;AAAA,UACP;AAAA,UACA;AAAA,YACC,KAAK;AAAA,UACN;AAAA,UACA;AAAA,YACC,KAAK;AAAA,cACJ,cAAc;AAAA,cACd,WAAW;AAAA,YACZ;AAAA,YACA,MAAM;AAAA,UACP;AAAA,QACD;AAAA,MACD,CAAC;AAAA,IACF;AAAA,IACA,GAAI,CAAC,QAAQ,gBAAgB;AAAA,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,7 +1,7 @@
|
|
|
1
1
|
import { createDotGitHubActions } from "./actions.js";
|
|
2
2
|
import { createDotGitHubFiles } from "./createDotGitHubFiles.js";
|
|
3
|
+
import { createWorkflows } from "./createWorkflows.js";
|
|
3
4
|
import { createDotGitHubIssueTemplate } from "./issueTemplate.js";
|
|
4
|
-
import { createWorkflows } from "./workflows.js";
|
|
5
5
|
async function createDotGitHub(options) {
|
|
6
6
|
return {
|
|
7
7
|
ISSUE_TEMPLATE: createDotGitHubIssueTemplate(options),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/steps/writing/creation/dotGitHub/index.ts"],"sourcesContent":["import { Options } from \"../../../../shared/types.js\";\nimport { createDotGitHubActions } from \"./actions.js\";\nimport { createDotGitHubFiles } from \"./createDotGitHubFiles.js\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../../../src/steps/writing/creation/dotGitHub/index.ts"],"sourcesContent":["import { Options } from \"../../../../shared/types.js\";\nimport { createDotGitHubActions } from \"./actions.js\";\nimport { createDotGitHubFiles } from \"./createDotGitHubFiles.js\";\nimport { createWorkflows } from \"./createWorkflows.js\";\nimport { createDotGitHubIssueTemplate } from \"./issueTemplate.js\";\n\nexport async function createDotGitHub(options: Options) {\n\treturn {\n\t\tISSUE_TEMPLATE: createDotGitHubIssueTemplate(options),\n\t\tactions: createDotGitHubActions(),\n\t\tworkflows: createWorkflows(options),\n\t\t...(await createDotGitHubFiles(options)),\n\t};\n}\n"],"mappings":"AACA,SAAS,8BAA8B;AACvC,SAAS,4BAA4B;AACrC,SAAS,uBAAuB;AAChC,SAAS,oCAAoC;AAE7C,eAAsB,gBAAgB,SAAkB;AACvD,SAAO;AAAA,IACN,gBAAgB,6BAA6B,OAAO;AAAA,IACpD,SAAS,uBAAuB;AAAA,IAChC,WAAW,gBAAgB,OAAO;AAAA,IAClC,GAAI,MAAM,qBAAqB,OAAO;AAAA,EACvC;AACD;","names":[]}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { Mode } from '../../../bin/mode.js';
|
|
2
1
|
import { Options } from '../../../shared/types.js';
|
|
3
2
|
import { Structure } from '../types.js';
|
|
4
3
|
import 'zod';
|
|
5
4
|
import '../../../shared/codes.js';
|
|
6
5
|
|
|
7
|
-
declare function createStructure(options: Options
|
|
6
|
+
declare function createStructure(options: Options): Promise<Structure>;
|
|
8
7
|
|
|
9
8
|
export { createStructure };
|
|
@@ -3,12 +3,12 @@ import { createDotHusky } from "./dotHusky.js";
|
|
|
3
3
|
import { createDotVSCode } from "./dotVSCode.js";
|
|
4
4
|
import { createRootFiles } from "./rootFiles.js";
|
|
5
5
|
import { createSrc } from "./src.js";
|
|
6
|
-
async function createStructure(options
|
|
6
|
+
async function createStructure(options) {
|
|
7
7
|
return {
|
|
8
8
|
".github": await createDotGitHub(options),
|
|
9
9
|
".husky": createDotHusky(),
|
|
10
10
|
".vscode": await createDotVSCode(options),
|
|
11
|
-
...mode !== "migrate" && { src: await createSrc(options) },
|
|
11
|
+
...options.mode !== "migrate" && { src: await createSrc(options) },
|
|
12
12
|
...await createRootFiles(options)
|
|
13
13
|
};
|
|
14
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/steps/writing/creation/index.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../../../src/steps/writing/creation/index.ts"],"sourcesContent":["import { Options } from \"../../../shared/types.js\";\nimport { Structure } from \"../types.js\";\nimport { createDotGitHub } from \"./dotGitHub/index.js\";\nimport { createDotHusky } from \"./dotHusky.js\";\nimport { createDotVSCode } from \"./dotVSCode.js\";\nimport { createRootFiles } from \"./rootFiles.js\";\nimport { createSrc } from \"./src.js\";\n\nexport async function createStructure(options: Options): Promise<Structure> {\n\treturn {\n\t\t\".github\": await createDotGitHub(options),\n\t\t\".husky\": createDotHusky(),\n\t\t\".vscode\": await createDotVSCode(options),\n\t\t...(options.mode !== \"migrate\" && { src: await createSrc(options) }),\n\t\t...(await createRootFiles(options)),\n\t};\n}\n"],"mappings":"AAEA,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAC/B,SAAS,uBAAuB;AAChC,SAAS,uBAAuB;AAChC,SAAS,iBAAiB;AAE1B,eAAsB,gBAAgB,SAAsC;AAC3E,SAAO;AAAA,IACN,WAAW,MAAM,gBAAgB,OAAO;AAAA,IACxC,UAAU,eAAe;AAAA,IACzB,WAAW,MAAM,gBAAgB,OAAO;AAAA,IACxC,GAAI,QAAQ,SAAS,aAAa,EAAE,KAAK,MAAM,UAAU,OAAO,EAAE;AAAA,IAClE,GAAI,MAAM,gBAAgB,OAAO;AAAA,EAClC;AACD;","names":[]}
|
|
@@ -44,10 +44,10 @@ async function createRootFiles(options) {
|
|
|
44
44
|
}
|
|
45
45
|
})
|
|
46
46
|
},
|
|
47
|
-
".nvmrc": `18.
|
|
47
|
+
".nvmrc": `18.18.0
|
|
48
48
|
`,
|
|
49
49
|
".prettierignore": formatIgnoreFile([
|
|
50
|
-
...options.
|
|
50
|
+
...options.excludeAllContributors ? [] : [".all-contributorsrc"],
|
|
51
51
|
...options.excludeTests ? [] : ["coverage/"],
|
|
52
52
|
"lib/",
|
|
53
53
|
"pnpm-lock.yaml"
|
|
@@ -79,7 +79,7 @@ async function createRootFiles(options) {
|
|
|
79
79
|
releaseName: "v${version}"
|
|
80
80
|
},
|
|
81
81
|
npm: {
|
|
82
|
-
publishArgs: ["--provenance"]
|
|
82
|
+
publishArgs: [`--access ${options.access}`, "--provenance"]
|
|
83
83
|
},
|
|
84
84
|
plugins: {
|
|
85
85
|
"@release-it/conventional-changelog": {
|
|
@@ -162,6 +162,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
162
162
|
esModuleInterop: true,
|
|
163
163
|
module: "NodeNext",
|
|
164
164
|
moduleResolution: "NodeNext",
|
|
165
|
+
noEmit: true,
|
|
165
166
|
outDir: "lib",
|
|
166
167
|
resolveJsonModule: true,
|
|
167
168
|
skipLibCheck: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/steps/writing/creation/rootFiles.ts"],"sourcesContent":["import { Options } from \"../../../shared/types.js\";\nimport { createESLintRC } from \"./createESLintRC.js\";\nimport { formatIgnoreFile } from \"./formatters/formatIgnoreFile.js\";\nimport { formatJson } from \"./formatters/formatJson.js\";\nimport { formatTypeScript } from \"./formatters/formatTypeScript.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\".eslintignore\": formatIgnoreFile(\n\t\t\t[\n\t\t\t\t\"!.*\",\n\t\t\t\t...(options.excludeTests ? [] : [\"coverage\"]),\n\t\t\t\t\"lib\",\n\t\t\t\t\"node_modules\",\n\t\t\t\t\"pnpm-lock.yaml\",\n\t\t\t].filter(Boolean),\n\t\t),\n\t\t\".eslintrc.cjs\": await createESLintRC(options),\n\t\t\".gitignore\": formatIgnoreFile([\n\t\t\t...(options.excludeTests ? [] : [\"coverage/\"]),\n\t\t\t\"lib/\",\n\t\t\t\"node_modules/\",\n\t\t]),\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...(!options.excludeLintPackageJson && {\n\t\t\t\".npmpackagejsonlintrc.json\": await formatJson({\n\t\t\t\textends: \"npm-package-json-lint-config-default\",\n\t\t\t\trules: {\n\t\t\t\t\t\"require-description\": \"error\",\n\t\t\t\t\t\"require-license\": \"error\",\n\t\t\t\t},\n\t\t\t}),\n\t\t}),\n\t\t\".nvmrc\": `18.
|
|
1
|
+
{"version":3,"sources":["../../../../src/steps/writing/creation/rootFiles.ts"],"sourcesContent":["import { Options } from \"../../../shared/types.js\";\nimport { createESLintRC } from \"./createESLintRC.js\";\nimport { formatIgnoreFile } from \"./formatters/formatIgnoreFile.js\";\nimport { formatJson } from \"./formatters/formatJson.js\";\nimport { formatTypeScript } from \"./formatters/formatTypeScript.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\".eslintignore\": formatIgnoreFile(\n\t\t\t[\n\t\t\t\t\"!.*\",\n\t\t\t\t...(options.excludeTests ? [] : [\"coverage\"]),\n\t\t\t\t\"lib\",\n\t\t\t\t\"node_modules\",\n\t\t\t\t\"pnpm-lock.yaml\",\n\t\t\t].filter(Boolean),\n\t\t),\n\t\t\".eslintrc.cjs\": await createESLintRC(options),\n\t\t\".gitignore\": formatIgnoreFile([\n\t\t\t...(options.excludeTests ? [] : [\"coverage/\"]),\n\t\t\t\"lib/\",\n\t\t\t\"node_modules/\",\n\t\t]),\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...(!options.excludeLintPackageJson && {\n\t\t\t\".npmpackagejsonlintrc.json\": await formatJson({\n\t\t\t\textends: \"npm-package-json-lint-config-default\",\n\t\t\t\trules: {\n\t\t\t\t\t\"require-description\": \"error\",\n\t\t\t\t\t\"require-license\": \"error\",\n\t\t\t\t},\n\t\t\t}),\n\t\t}),\n\t\t\".nvmrc\": `18.18.0\\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\": 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: \".*rc\",\n\t\t\t\t\toptions: { parser: \"json\" },\n\t\t\t\t},\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\twords: [\n\t\t\t\t\t\"Codecov\",\n\t\t\t\t\t\"codespace\",\n\t\t\t\t\t\"commitlint\",\n\t\t\t\t\t\"contributorsrc\",\n\t\t\t\t\t\"conventionalcommits\",\n\t\t\t\t\t...(options.excludeLintKnip ? [] : [\"knip\"]),\n\t\t\t\t\t\"lcov\",\n\t\t\t\t\t\"markdownlintignore\",\n\t\t\t\t\t\"npmpackagejsonlintrc\",\n\t\t\t\t\t\"outro\",\n\t\t\t\t\t\"packagejson\",\n\t\t\t\t\t\"tsup\",\n\t\t\t\t\t\"quickstart\",\n\t\t\t\t\t\"wontfix\",\n\t\t\t\t].sort(),\n\t\t\t}),\n\t\t}),\n\t\t...(!options.excludeLintKnip && {\n\t\t\t\"knip.jsonc\": 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.eslint.json\": await formatJson({\n\t\t\textends: \"./tsconfig.json\",\n\t\t\tinclude: [\".\"],\n\t\t}),\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\":\n\t\t\tawait formatTypeScript(`import { defineConfig } from \"tsup\";\n\n\t\texport default defineConfig({\n\t\t\tbundle: false,\n\t\t\tclean: true,\n\t\t\tdts: true,\n\t\t\tentry: [\"src/**/*.ts\"${options.excludeTests ? \"\" : `, \"!src/**/*.test.*\"`}],\n\t\t\tformat: \"esm\",\n\t\t\toutDir: \"lib\",\n\t\t\tsourcemap: true,\n\t\t});\n\t\t`),\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/setup\"],\n\t},\n});\n`,\n\t\t}),\n\t};\n}\n"],"mappings":"AACA,SAAS,sBAAsB;AAC/B,SAAS,wBAAwB;AACjC,SAAS,kBAAkB;AAC3B,SAAS,wBAAwB;AACjC,SAAS,8BAA8B;AACvC,SAAS,wBAAwB;AAEjC,eAAsB,gBAAgB,SAAkB;AACvD,SAAO;AAAA,IACN,uBAAuB,MAAM,uBAAuB,OAAO;AAAA,IAC3D,iBAAiB;AAAA,MAChB;AAAA,QACC;AAAA,QACA,GAAI,QAAQ,eAAe,CAAC,IAAI,CAAC,UAAU;AAAA,QAC3C;AAAA,QACA;AAAA,QACA;AAAA,MACD,EAAE,OAAO,OAAO;A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AAiB,OAAO;AAAA,IAC9C,wBAAwB,MAAM,WAAW;AAAA,MACxC,SAAS;AAAA,MACT,SAAS,CAAC,GAAG;AAAA,IACd,CAAC;AAAA,IACD,iBAAiB,MAAM,WAAW;AAAA,MACjC,iBAAiB;AAAA,QAChB,aAAa;AAAA,QACb,gBAAgB;AAAA,QAChB,iBAAiB;AAAA,QACjB,QAAQ;AAAA,QACR,kBAAkB;AAAA,QAClB,QAAQ;AAAA,QACR,QAAQ;AAAA,QACR,mBAAmB;AAAA,QACnB,cAAc;AAAA,QACd,WAAW;AAAA,QACX,QAAQ;AAAA,QACR,QAAQ;AAAA,MACT;AAAA,MACA,SAAS,CAAC,KAAK;AAAA,IAChB,CAAC;AAAA,IACD,kBACC,MAAM,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAMA,QAAQ,eAAe,KAAK,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA,GAKzE;AAAA,IACD,GAAI,CAAC,QAAQ,gBAAgB;AAAA,MAC5B,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAgBrB;AAAA,EACD;AACD;","names":[]}
|
|
@@ -5,7 +5,7 @@ async function writeAllContributorsRC(options) {
|
|
|
5
5
|
".all-contributorsrc"
|
|
6
6
|
);
|
|
7
7
|
return await formatJson({
|
|
8
|
-
badgeTemplate: '<img alt="All Contributors: <%= contributors.length %>" src="https://img.shields.io/badge/all_contributors-<%= contributors.length %>-21bb42.svg" />',
|
|
8
|
+
badgeTemplate: '<img alt="All Contributors: <%= contributors.length %> \u{1F46A}" src="https://img.shields.io/badge/all_contributors-<%= contributors.length %>-21bb42.svg" />',
|
|
9
9
|
commit: false,
|
|
10
10
|
commitConvention: "angular",
|
|
11
11
|
contributors: existing?.contributors ?? [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/steps/writing/creation/writeAllContributorsRC.ts"],"sourcesContent":["import { readFileSafeAsJson } from \"../../../shared/readFileSafeAsJson.js\";\nimport { AllContributorsData, Options } from \"../../../shared/types.js\";\nimport { formatJson } from \"./formatters/formatJson.js\";\n\nexport async function writeAllContributorsRC(options: Options) {\n\tconst existing = (await readFileSafeAsJson(\n\t\t\".all-contributorsrc\",\n\t)) as AllContributorsData | null;\n\n\treturn await formatJson({\n\t\tbadgeTemplate:\n\t\t\t'<img alt=\"All Contributors: <%= contributors.length
|
|
1
|
+
{"version":3,"sources":["../../../../src/steps/writing/creation/writeAllContributorsRC.ts"],"sourcesContent":["import { readFileSafeAsJson } from \"../../../shared/readFileSafeAsJson.js\";\nimport { AllContributorsData, Options } from \"../../../shared/types.js\";\nimport { formatJson } from \"./formatters/formatJson.js\";\n\nexport async function writeAllContributorsRC(options: Options) {\n\tconst existing = (await readFileSafeAsJson(\n\t\t\".all-contributorsrc\",\n\t)) as AllContributorsData | null;\n\n\treturn await formatJson({\n\t\tbadgeTemplate:\n\t\t\t'<img alt=\"All Contributors: <%= contributors.length %> 👪\" src=\"https://img.shields.io/badge/all_contributors-<%= contributors.length %>-21bb42.svg\" />',\n\t\tcommit: false,\n\t\tcommitConvention: \"angular\",\n\t\tcontributors: existing?.contributors ?? [],\n\t\tcontributorsPerLine: 7,\n\t\tcontributorsSortAlphabetically: true,\n\t\tfiles: [\"README.md\"],\n\t\timageSize: 100,\n\t\tprojectName: options.repository,\n\t\tprojectOwner: options.owner,\n\t\trepoHost: \"https://github.com\",\n\t\trepoType: \"github\",\n\t});\n}\n"],"mappings":"AAAA,SAAS,0BAA0B;AAEnC,SAAS,kBAAkB;AAE3B,eAAsB,uBAAuB,SAAkB;AAC9D,QAAM,WAAY,MAAM;AAAA,IACvB;AAAA,EACD;AAEA,SAAO,MAAM,WAAW;AAAA,IACvB,eACC;AAAA,IACD,QAAQ;AAAA,IACR,kBAAkB;AAAA,IAClB,cAAc,UAAU,gBAAgB,CAAC;AAAA,IACzC,qBAAqB;AAAA,IACrB,gCAAgC;AAAA,IAChC,OAAO,CAAC,WAAW;AAAA,IACnB,WAAW;AAAA,IACX,aAAa,QAAQ;AAAA,IACrB,cAAc,QAAQ;AAAA,IACtB,UAAU;AAAA,IACV,UAAU;AAAA,EACX,CAAC;AACF;","names":[]}
|
|
@@ -6,12 +6,12 @@ const devDependenciesToRemove = [
|
|
|
6
6
|
"@babel/preset-react",
|
|
7
7
|
"@babel/preset-typescript",
|
|
8
8
|
"@swc/jest",
|
|
9
|
+
"@vitest/coverage-istanbul",
|
|
9
10
|
"ava",
|
|
10
11
|
"babel-jest",
|
|
11
12
|
"commitlint",
|
|
12
13
|
"cson-parser",
|
|
13
14
|
"esbuild",
|
|
14
|
-
"eslint-config-prettier",
|
|
15
15
|
"eslint-plugin-jest",
|
|
16
16
|
"eslint-plugin-prettier",
|
|
17
17
|
"eslint-plugin-simple-import-sort",
|
|
@@ -31,8 +31,9 @@ async function writePackageJson(options) {
|
|
|
31
31
|
version: "0.0.0",
|
|
32
32
|
// To start, copy over all existing package fields (e.g. "dependencies")
|
|
33
33
|
...existingPackageJson,
|
|
34
|
-
author: { email: options.email, name: options.author },
|
|
34
|
+
author: { email: options.email.npm, name: options.author },
|
|
35
35
|
description: options.description,
|
|
36
|
+
keywords: options.keywords?.length ? options.keywords.flatMap((keyword) => keyword.split(/ /)) : void 0,
|
|
36
37
|
// We copy all existing dev dependencies except those we know are not used anymore
|
|
37
38
|
devDependencies: copyDevDependencies(existingPackageJson),
|
|
38
39
|
// Remove fields we know we don't want, such as old or redundant configs
|
|
@@ -62,7 +63,6 @@ async function writePackageJson(options) {
|
|
|
62
63
|
scripts: {
|
|
63
64
|
build: "tsup",
|
|
64
65
|
format: 'prettier "**/*" --ignore-unknown',
|
|
65
|
-
"format:write": "pnpm format --write",
|
|
66
66
|
lint: "eslint . .*js --max-warnings 0 --report-unused-disable-directives",
|
|
67
67
|
...!options.excludeLintKnip && {
|
|
68
68
|
"lint:knip": "knip"
|