Tags: lirantal/npq
Tags
fix(marshall): format download count with thousands separator (#369) (#… …372) * fix(marshall): format download count with thousands separator (#369) * Update __tests__/marshalls.downloads.test.js Co-authored-by: qodo-merge-for-open-source[bot] <189517486+qodo-merge-for-open-source[bot]@users.noreply.github.com> --------- Co-authored-by: qodo-merge-for-open-source[bot] <189517486+qodo-merge-for-open-source[bot]@users.noreply.github.com>
feat: improve CLI countdown UX with single-line display (#366) * fix: prevent character display during countdown and handle Ctrl+C Fixes keyboard input interference during autoContinue countdown by: - Setting stdin to raw mode during countdown to capture keypresses - Ignoring all keystrokes except Ctrl+C during countdown - Properly handling Ctrl+C to abort countdown with USER_ABORT error - Restoring normal stdin behavior after countdown completion - Providing fallback for non-TTY environments (tests) This resolves the issue where typing during countdown would cause garbled display like '11311187' instead of proper countdown numbers. Changes: - lib/helpers/cliPrompt.js: Add stdin raw mode handling and keypress filtering - __tests__/cliPrompt.test.js: Add test for Ctrl+C during autoContinue The fix ensures clean countdown display while still allowing graceful abortion via Ctrl+C, improving the user experience during package security audit workflows. * feat: improve CLI countdown UX with single-line display - Implement single-line countdown format: 'Auto-continue with install in... X (press 'y' to proceed)' - Add 'y' key functionality to proceed immediately during countdown - Update test expectations for new display format - Improve UX by combining countdown and instruction into one line - Add comprehensive feature documentation Resolves #364 and improves overall CLI interaction experience * fix: use consistent console.log call in non-TTY environment - Change console.log() to console.log('') in non-TTY countdown path - Ensures test expectations match actual behavior - Fixes CI test failure in 'should call console.log at the end'
fix: handle Ctrl+C gracefully during interactive prompts (#365) * fix: handle Ctrl+C gracefully during interactive prompts Fixes #364 - Handle ABORT_ERR gracefully in cliPrompt.js when user presses Ctrl+C - Ensure exit codes are always numeric in CLI error handlers - Add proper error handling for user-initiated prompt abortion - Add comprehensive tests for Ctrl+C behavior - Prevent TypeError by validating error code types before passing to process.exit() The issue was caused by readline throwing an error with code 'ABORT_ERR' (string) when Ctrl+C is pressed, but our error handlers were passing this string directly to process.exit() which expects a numeric exit code. Changes: - lib/helpers/cliPrompt.js: Transform ABORT_ERR into USER_ABORT error with numeric exitCode - bin/npq.js & bin/npq-hero.js: Add type checking for error codes - lib/cli.js: Ensure exit function always receives numeric exit codes - __tests__/cliPrompt.test.js: Add tests for Ctrl+C handling
fix: base marshall resolving package version uses strict checks (#363) * fix: base marshall resolving package version uses strict checks * Update lib/marshalls/baseMarshall.js Co-authored-by: qodo-merge-for-open-source[bot] <189517486+qodo-merge-for-open-source[bot]@users.noreply.github.com> --------- Co-authored-by: qodo-merge-for-open-source[bot] <189517486+qodo-merge-for-open-source[bot]@users.noreply.github.com>
PreviousNext