chore(deps): update actions/checkout action to v5.0.1#2
Merged
renovate[bot] merged 1 commit intomainfrom Jan 1, 2026
Merged
Conversation
9149c78 to
973068f
Compare
973068f to
90c723e
Compare
boneskull
added a commit
that referenced
this pull request
Feb 4, 2026
- Rename `helpShown` to `earlyExit` for clarity (issue #4) The flag is now accurately named since it's set for help, version, and completion output, not just help display. - Extract shared test helper `withCapturedStderr()` (issues #2, #3) Reduces code duplication in tests that capture stderr and exitCode. - Handle HelpError in nested command delegation (issue #1) `__parseWithParentGlobals()` now catches HelpError so nested builders can render their own help instead of bubbling up to the parent.
boneskull
added a commit
that referenced
this pull request
Feb 4, 2026
* fix: catch HelpError and display help instead of throwing When a HelpError is thrown (e.g., unknown command, no command specified), `parse()` and `parseAsync()` now catch it and handle gracefully: - Error message is printed to stderr - Help text is displayed to stderr - `process.exitCode` is set to 1 (no `process.exit()` call) - Returns result with `helpShown: true` flag This prevents HelpError from bubbling up to global exception handlers while still providing useful feedback to the user. Closes #31 * refactor: remove all process.exit() calls Replace `process.exit()` with `process.exitCode` throughout `parseCore()`: - `--help` now sets `process.exitCode = 0` and returns `{ helpShown: true }` - `--version` now sets `process.exitCode = 0` and returns `{ helpShown: true }` - `--completion-script` now sets appropriate exit code and returns - `--get-bargs-completions` now sets exit code and returns - `showNestedCommandHelp()` now returns a result instead of calling exit This allows the process to terminate naturally, enabling proper cleanup handlers and making the code more testable and composable. * fix: address review comments - Rename `helpShown` to `earlyExit` for clarity (issue #4) The flag is now accurately named since it's set for help, version, and completion output, not just help display. - Extract shared test helper `withCapturedStderr()` (issues #2, #3) Reduces code duplication in tests that capture stderr and exitCode. - Handle HelpError in nested command delegation (issue #1) `__parseWithParentGlobals()` now catches HelpError so nested builders can render their own help instead of bubbling up to the parent. * fix: use process.exit() for early exit scenarios Restore standard CLI behavior where --help, --version, completion flags, and error conditions (unknown/missing commands) terminate the process. Changes: - `exitProcess()` calls `process.exit()` for help/version/completions - `handleHelpError()` calls `process.exit(1)` after displaying help - Remove `earlyExit` flag from return types (no longer needed) - Update tests to mock `process.exit` instead of checking return values - Document process termination behavior in README.md This is what users expect from a CLI - these flags print output and exit. * refactor: extract shared test helper for mocking process.exit Address review feedback: - Extract `MockExitError` and `withMockedExit` to `test/helpers/mock-exit.ts` - Use `Promise.resolve().then(fn)` to handle any thenable, not just Promise - Consolidate duplicate JSDoc blocks for `handleHelpError` - Update README example to use sentinel error and `finally` block
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v5.0.0→v5.0.1Release Notes
actions/checkout (actions/checkout)
v5.0.1Compare Source
What's Changed
Full Changelog: actions/checkout@v5...v5.0.1
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.