-
Notifications
You must be signed in to change notification settings - Fork 20
refactor(scanner): implement error event #571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 1c32df3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the scanner to implement proper error event handling through the Logger class. The key improvement is that errors during tarball scanning are now emitted as events instead of being silently ignored, allowing consumers to track and assert on errors that occur during dependency walking.
- Added typed event map to Logger class for better type safety
- Implemented error event emission in scanDirOrArchiveEx function
- Updated tests to verify error events are properly emitted
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| workspaces/scanner/src/class/logger.class.ts | Added error event to ScannerLoggerEvents and defined LoggerEventsMap type for type-safe event handling |
| workspaces/scanner/src/depWalker.ts | Changed error handling in scanDirOrArchiveEx to emit error events instead of silently ignoring them; added logger parameter |
| workspaces/scanner/test/depWalker.spec.ts | Added error tracking to tests, verified error events are emitted correctly, and refactored to use shared test options constant |
| workspaces/scanner/test/fixtures/depWalker/slimio.config.json | Changed version to trigger specific test error conditions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
related to #504 |
a5b8170 to
7609a81
Compare
7609a81 to
1c32df3
Compare
No description provided.