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
feat: no yeoman #1321
feat: no yeoman #1321
Conversation
Very glad to see this work. I am making a choice between oclif and commander today and seeing these warnings had me worried about whether oclif was actively maintained. I certainly would not want users of my CLI to be greeted with this. Thanks for the PR!
|
Can't wait for this to merge. Such an eye sore in the terminal to see all those warnings. |
Thanks @moltar - hoping to get this out tomorrow or early next week. Just waiting on a coworker to review and test. |
const {login, name} = await got('https://api.github.com/user', {headers}).json<{login: string; name: string}>() | ||
return {login, name} | ||
} catch {} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find where yeoman was using this env, seems it did a while ago but now it does an unauthenticated request, and relies on the user having an email setup in git:
Either way works so it should be fine, the precedence seems for getting the username looks like:
- GH API (if token)
- git username (if available)
- pjson.author in template
I'll check on QA 👍🏼
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. I'll QA mainly on windows to ensure the generator works there.
QA notes: ✅ can generate a CLI/command/hook successfully on windows, all paths are correct and can run command/hooks/tests ✅ all defaults with
so the homepage/bug fields are wrong in the pjson:
|
qa update: ✅ get username from git:
NOTE
|
oclif generate
as flags so that users can programmatically answer prompts (similar tonpm init --name my-pkg
--yes
flag onoclif generate
that will automatically accept defaults for all prompts (similar tonpm init --yes
).gitignore
content generated using yarn 2+ is missing recommended lines by yarn #1152)--commands-dir
flag tooclif generate command
to allow users to select an alternative destination for the generated command (defaults tosrc/commands
)@W-15044742@
@W-15161957@