Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🛠 Tooling: Adopt options defaults to match create's interactive CLI #1780

Closed
3 tasks done
JoshuaKGoldberg opened this issue Dec 19, 2024 · 0 comments · Fixed by #1781
Closed
3 tasks done

🛠 Tooling: Adopt options defaults to match create's interactive CLI #1780

JoshuaKGoldberg opened this issue Dec 19, 2024 · 0 comments · Fixed by #1781
Assignees
Labels
area: tooling Managing the repository's maintenance status: accepting prs Please, send a pull request to resolve this!

Comments

@JoshuaKGoldberg
Copy link
Owner

Bug Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Overview

Right now, create-typescript-app options defaults are assumed to be run in the same working directory as the newly created repository. That works fine for CTA itself because it sets changes the process directory to the repository's upon creation:

if (directory !== ".") {
process.chdir(directory);
}

In the create world, though, things are more abstracted. The cwd is not guaranteed to be the same. So the plumbing around options defaults in CTA will have to be able to take in a directory.

Additional Info

Splitting this out of #1755. That issue is for using create's interactive CLI parsing and whatnot. This one is for setting up internals to be able to be parsed with create's interactive CLI.

💖

@JoshuaKGoldberg JoshuaKGoldberg added area: tooling Managing the repository's maintenance status: accepting prs Please, send a pull request to resolve this! labels Dec 19, 2024
@JoshuaKGoldberg JoshuaKGoldberg self-assigned this Dec 19, 2024
JoshuaKGoldberg added a commit that referenced this issue Dec 24, 2024
## PR Checklist

- [x] Addresses an existing open issue: fixes #1780
- [x] That issue was marked as [`status: accepting
prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22)
- [x] Steps in
[CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md)
were taken

## Overview

Applies three main areas of change:

* Factors in a `directory` string for option defaults so they can work
outside of the cwd
* Adds a fallback of `gh config get user -h github.com` for
`options.owner`, finally removing the need to manually re-type your own
owner always 🥳
* Adds `.describe("...")` to their Zod schemas so they can be nicely
described in prompts (and, eventually, auto-generated docs)
* Brings in the new `suggestions` Indirect Creations to generate the
nice _"be sure to..."_ notice upon completion

Also removes the `--offline` from `finalizeDependencies`.

💖
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: tooling Managing the repository's maintenance status: accepting prs Please, send a pull request to resolve this!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant