-
Notifications
You must be signed in to change notification settings - Fork 0
(chore): swapped out Pino logger for output channel logger implementation #8
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
… Barrel Roll extension test: add test for ignoring undefined entries in BarrelContentBuilder test: implement test for recursive directory handling in BarrelFileGenerator test: add test for merging duplicate exports in ExportParser fix: update coverage badge to reflect accurate coverage percentage
- Added new images for barrel roll functionality: barrel-roll-icon.png, barrel-roll-logo.png, barrel-roll-repository-logo.png, barrel-roll-small-logo.png, and barrel-roll.png. - Updated test file patterns in run-tests.js to point to the new distribution directory structure. - Refactored barrel file generation options to use IBarrelGenerationOptions interface. - Simplified FileSystemService tests by removing jest.restoreAllMocks() in afterEach. - Updated export parser to use IParsedExport interface instead of ParsedExport. - Created new extension test suite to validate extension activation and command execution. - Refactored logging functionality to improve error handling and output. - Consolidated barrel-related types into a single barrel.ts file for better organization. - Removed deprecated barrel entry and export types to streamline the codebase. - Updated TypeScript configuration to reflect changes in output directory from out to dist. - Adjusted webpack configuration to output bundled files to the dist directory.
… and release workflows
…e tests and configurations
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 pull request replaces the Pino-based logger with a custom OutputChannelLogger implementation that integrates directly with VS Code's OutputChannel API. The change eliminates the external pino dependency, simplifies the logging infrastructure, and adds comprehensive test coverage for the new logger.
Changes:
- Implemented a new
OutputChannelLoggerclass with structured logging, metadata support, optional console output, and group operations - Replaced all usage of
PinoLoggerwithOutputChannelLoggerthroughout the extension - Removed the
pinodependency from package.json and webpack configuration - Added comprehensive unit tests for the new logger and updated the test runner
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/logging/output-channel.logger.ts | New logger implementation with VS Code OutputChannel integration |
| src/logging/output-channel.logger.test.ts | Comprehensive test suite for the new logger |
| src/logging/index.ts | Updated exports to expose the new logger and its types |
| src/extension.ts | Updated to use OutputChannelLogger instead of PinoLogger |
| src/test/testTypes.ts | Updated test types with backward-compatible type aliases |
| src/logging/pino.logger.ts | Removed old Pino-based logger implementation |
| src/logging/pino.logger.test.ts | Removed old logger tests |
| package.json | Removed pino dependency |
| webpack.config.cjs | Removed webpack import and IgnorePlugin configuration for pino |
| scripts/run-tests.js | Added logging tests to test runner patterns |
| README.md | Minor formatting improvement |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This pull request replaces the previous Pino-based logger with a new, custom
OutputChannelLoggerthat integrates directly with Visual Studio Code's OutputChannel API. It also introduces comprehensive unit tests for the new logger, updates logger usage throughout the extension, and removes the now-unusedpinodependency. Additionally, the documentation and test runner are updated to reflect these changes.Logger Replacement and Improvements:
OutputChannelLoggerimplementation providing structured logging, metadata support, optional console output, and group operations (src/logging/output-channel.logger.ts).PinoLoggerwithOutputChannelLoggerin the extension activation and logger exports (src/extension.ts,src/logging/index.ts). [1] [2] [3]pinodependency frompackage.jsonsince it is no longer used.Testing Enhancements:
OutputChannelLoggercovering log levels, metadata, console output, group operations, and error handling (src/logging/output-channel.logger.test.ts).scripts/run-tests.js).Documentation and Usability:
README.mdto clarify the extension's behavior when generating barrel files.