-
-
Notifications
You must be signed in to change notification settings - Fork 139
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
fix(create-waku): fix cli and swap to clack + pico #1290
base: main
Are you sure you want to change the base?
Conversation
prompts => @clack/prompts kolorist => picocolors these libraries are copying the pattern set by create-vite fixes dai-shi#1289
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
draft to fix e2e test setup |
@dai-shi would you be ok with testing the cli with execa & vitest like is done with create-vite https://github.com/vitejs/vite/blob/main/packages/create-vite/__tests__/cli.spec.ts I am having issues handling the stdin and stdout with clack and vite's test seems like a clean way to solve for this part. Note: It does not test the interactive mode, but maybe we're ok with just an args based test too now that rob added the args support? |
I'm not very familiar but sounds ok. Any drawbacks?
I think we should eventually test the interactive mode, but for now better than nothing. |
the drawback with unit testing that I thought initially was that it would just not test interactive mode. to test interactive mode though, we should mimic the @clack/prompts tests. They mock writable and readable to run the tests through vitest. https://github.com/bombshell-dev/clack/blob/main/packages/core/test/prompts/prompt.test.ts So I think two tests would be good
Do you think both are needed for this PR or would a follow up be on for one of them? |
I'll leave it to you. Our requirement is not break the current behavior. (btw, I'm planning another patch release, so let me know if you go with separate PRs.) |
I'll plan for just this one PR and both tests mentioned above added. I want to be as careful as I can to not cause regression with this. It will need to be tomorrow though. I'm out for trivia tonight. ✌️ |
planning to wait for when we drop node 18 to mark this ready |
prompts => @clack/prompts
kolorist => picocolors
these libraries are copying the pattern set by create-vite
fixes #1289