feat(nodejs): add breadcrumbs API (add, get, clear) aligned with JS catcher#47
Merged
feat(nodejs): add breadcrumbs API (add, get, clear) aligned with JS catcher#47
Conversation
neSpecc
approved these changes
Feb 4, 2026
There was a problem hiding this comment.
Pull request overview
Adds a manual breadcrumbs feature to the Node.js catcher, aligning the public API (add, get, clear) and configuration shape with @hawk.so/javascript.
Changes:
- Introduces a
BreadcrumbManagersingleton to store and manage breadcrumb buffers. - Adds
breadcrumbsconfiguration toHawkNodeJSInitialSettingsand attaches breadcrumbs to outgoing event payloads. - Updates README and example usage; bumps package version.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
types/index.ts |
Extends init settings with breadcrumbs config typing; re-exports breadcrumbs options type. |
src/modules/breadcrumbs.ts |
New breadcrumbs module (types + singleton manager + add/get/clear). |
src/index.ts |
Initializes breadcrumbs, exposes HawkCatcher.breadcrumbs API, and includes breadcrumbs in payload. |
package.json |
Version bump to 3.2.1. |
example/example.js |
Updates require path to built CJS entry. |
README.md |
Documents breadcrumbs configuration and API usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e11sy
reviewed
Feb 7, 2026
e11sy
approved these changes
Feb 7, 2026
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.
Summary
Adds a breadcrumbs API to the Node.js catcher so users can record a trail of events before an error, same idea as in
@hawk.so/javascript. Only manual breadcrumbs are supported (no automatic fetch/navigation/click tracking).