fix: handle _snapshot.killSignal value on kill() - #1287
Merged
Conversation
antongolub
commented
Jul 27, 2025
Collaborator
- Tests pass
- Appropriate changes to README are included in PR
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the kill() method to properly handle the killSignal value from the snapshot configuration. Previously, the method was not using the signal configured in the process options when no explicit signal was provided.
- Updates the
kill()method signature to make the signal parameter optional - Implements fallback logic to use
_snapshot.killSignalwhen no signal is provided - Adds comprehensive test coverage for the new behavior
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/core.ts | Updated kill() method to use snapshot killSignal as fallback |
| build/core.cjs | Compiled output reflecting the TypeScript changes |
| test/core.test.js | Added test for killSignal fallback behavior and improved existing test name |
| .size-limit.json | Updated size limits to accommodate the minor code changes |
Comments suppressed due to low confidence (1)
test/core.test.js:1031
- The variable name 'p' shadows the process variable declared on line 1026. Consider using a more descriptive name like 'error' or 'err' to avoid confusion.
} catch (p) {
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.