(chore): swapped out Pino logger for output channel logger implementation#8
Merged
(chore): swapped out Pino logger for output channel logger implementation#8
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
Contributor
There was a problem hiding this comment.
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 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 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.