raineorshine / npm-check-updates

Find newer versions of package dependencies than what your package.json allows
Other
9.46k stars 330 forks source link

VIM Keyboard Shortcuts for Navigating Update List #1460

Closed stdavis closed 1 month ago

stdavis commented 1 month ago

Steps to Reproduce

.ncurc:

n/a

Dependencies:

n/a

Steps:

Run npx npm-check-updates --color --install always --interactive --format group,repo && npm audit fix on any project that has updates.

Current Behavior

The keys j & k do not scroll through the options.

Expected Behavior

j scrolls down and k scrolls up.

This used to work. I don't know at what point it stopped working. I know that this is probably not a big deal but these keys are much easier to use than the arrow keys for those of use who are used to VIM keyboard shortcuts. I'd be willing to help with a PR for this if someone would be kind enough to point me in the right direction on the implementation.

Thanks for the awesome tool!

raineorshine commented 1 month ago

Thanks, I support this.

The change would have to happen in https://github.com/raineorshine/prompts/tree/ncu. It's the fork of prompts that npm-check-updates uses.

It looks like k and j are mapped to up and down, but apparently isSelect is false. Maybe broke when heading support was added to multiselect mode. Luckily only 14 commits were added so it shouldn't be hard to track down.

https://github.com/raineorshine/prompts/blob/ncu/lib/util/action.js

raineorshine commented 1 month ago

Fixed and published in v17.1.4.