feat(@clack/prompts): custom spinner indicator support#247
feat(@clack/prompts): custom spinner indicator support#24743081j merged 12 commits intobombshell-dev:mainfrom
Conversation
🦋 Changeset detectedLatest commit: f4461cf The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
could you catch up from main? there will be big conflicts since i split the modules into individual files 😬 i'd also rework this slightly to just have a top level |
|
@43081j for sure! Caught up and flattened custom into the regular options! |
|
looks good to me, but can you add some tests? we need to test the two individually:
you can assert the delay worked by using vitest's fake timers (we already use them in spinner tests) |
|
@43081j implemented comments and added tests for spinner & delay, I think I'm doing something wrong but I can't figure out where the issue is-- vitest is reporting these errors after I implement any arbitrary describe/test block: (node:39957) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 end listeners added to [ReadableWorkerStdio]. Use emitter.setMaxListeners() to increase limit
(node:39957) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unhandledRejection listeners added to [process]. Use emitter.setMaxListeners() to increase limit
(node:39957) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [ReadableWorkerStdio]. Use emitter.setMaxListeners() to increase limit
(node:39957) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 keypress listeners added to [ReadableWorkerStdio]. Use emitter.setMaxListeners() to increase limit |
|
that will be because you need to |
|
if you catch up from main, you'll get conflicts in your snapshots i think. just make sure locally you |
|
Ah nice, vitest was updated! Caught up & added frame for loop and |
|
seems odd the snapshots didn't update 🤔 ANSI codes get serialised now into human-readable strings, so it definitely should've updated them |
|
@example/basic • @example/changesets commit: |
|
ah it looks like you still need to catch up from |
my bad, I think I was behind on main updates, woops- did another catch up and indeed new snapshots with ANSI codes replaced |
Signed-off-by: Alexander Mangel <cygnusfear@gmail.com>
Signed-off-by: Alexander Mangel <cygnusfear@gmail.com>
Signed-off-by: Alexander Mangel <cygnusfear@gmail.com>
Signed-off-by: Alexander Mangel <cygnusfear@gmail.com>
Signed-off-by: Alexander Mangel <cygnusfear@gmail.com>
Signed-off-by: Alexander Mangel <cygnusfear@gmail.com>
Signed-off-by: Alexander Mangel <cygnusfear@gmail.com>
Signed-off-by: Alexander Mangel <cygnusfear@gmail.com>
Signed-off-by: Alexander Mangel <cygnusfear@gmail.com>
|
@43081j |
43081j
left a comment
There was a problem hiding this comment.
looks good!
we just need a changeset now and seems good to merge after that (you can run npx changeset)
Signed-off-by: Alexander Mangel <cygnusfear@gmail.com>
|
@43081j |
|
will release it as part of the next 1.0 pre-release (nate may backport it if needed though) |
Custom Spinner Support
Great work on clack! I was eager to have a custom spinner option so I figured I could contribute back to the project. Happy to adjust the implementation if not conform requirements.
Supports a 'custom' indicator on the spinner for settings custom frames and speed: