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

Interactive mode reprints everything on keydown #1361

Open
3 tasks done
qqharry21 opened this issue Jan 9, 2024 · 9 comments
Open
3 tasks done

Interactive mode reprints everything on keydown #1361

qqharry21 opened this issue Jan 9, 2024 · 9 comments

Comments

@qqharry21
Copy link

  • I have searched for similar issues
  • I am using the latest version of npm-check-updates
  • I am using node >= 14.14

Current Behavior

When I running ncu in interactive mode, and use keyboard up/down to (un)select the package I wanted to update, here comes the strange issue in the screenshot below.

image

Every time I triggered the keyboard, the output will reprint again. You can see the above and below section are the same content, but only change the arrow of current select.
This makes me unable to use the interactive mode normally.

Expected Behavior

I expect the interactive mode can select package normally, and it won't reprint every package when I trigger the up/down keyboard

@raineorshine
Copy link
Owner

raineorshine commented Jan 9, 2024

Hi, thanks for reporting.

This may be a dependency bug, or it may be specific to your terminal environment. I haven't seen it before. If you can provide the following information we can at least narrow down the cause a bit.

  • What OS are you on?
  • What terminal are you using?
  • Does the same issue occur when you run npx ncu-test-prompts --raineorshine?
  • Does the same issue occur when you run npx ncu-test-prompts --terkelg?

@raineorshine raineorshine changed the title Interactive mode error Interactive mode reprints everything on keydown Jan 9, 2024
@qqharry21
Copy link
Author

Ah, I'm forget to provide these information to you.

  1. What OS are you on? - MacOS
  2. What terminal are you using? - iTerm2
  3. Does the same issue occur when you run npx ncu-test-prompts --raineorshine? - No
  4. Does the same issue occur when you run npx ncu-test-prompts --terkelg? - No

I just run for the 3. and 4. commands, it all work fine~
And here is the settings json of my terminal - iTerm2, hope it helps
iterm2-setting.json

Thanks for your notice~~

@raineorshine
Copy link
Owner

Thanks. That's very strange. I'm on OSX iTerm2 as well and I don't experience the issue.

Since the ncu-test-prompts commands work fine for you, there must be something different about the specific prompt launched in ncu. I'll take a look at your terminal settings when I have some time, though it will be hard for me to do much if I cannot reproduce it on my machine.

@jenewland1999
Copy link

@raineorshine I'm experiencing the exact same thing, same OS same Terminal, same results for question 3 and 4. I'm almost certain this wasn't happening a few weeks ago. 🤔

@jenewland1999
Copy link

If you need any help debugging please do let me know. Keen to see this fixed as I ❤️ this package.

@jenewland1999
Copy link

In Terminal.app, only the question part is being duplicated (excuse the light mode - I don't usually use this terminal)

image

@raineorshine
Copy link
Owner

raineorshine commented Jan 11, 2024

Thanks. It would be great to get some help. It's unlikely I can do much without being able to reproduce it.

If this is indeed a regression, you could try to find the last version that worked. Should be fairly quick with bisecting. Identifying an exact version number or commit where the bug was introduced would be super helpful.

FYI npm-check-updates uses prompts for interactive mode, with some small changes through a fork.

@jenewland1999
Copy link

Thanks. It would be great to get some help. It's unlikely I can do much without being able to reproduce it.

If this is indeed a regression, you could try to find the last version that worked. Should be fairly quick with bisecting. Identifying an exact version number or commit where the bug was introduced would be super helpful.

FYI npm-check-updates uses prompts for interactive mode, with some small changes through a fork.

So weirdly enough, I'm not having the issue anymore. Which on the one hand makes me real happy because I can use the package again, but on the other is bugging me because I have no clue why 😅

@raineorshine
Copy link
Owner

I hate when that happens 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants