Skip to content

Conversation

@Coderrob
Copy link
Owner

This pull request replaces the previous Pino-based logger with a new, custom OutputChannelLogger that 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-unused pino dependency. Additionally, the documentation and test runner are updated to reflect these changes.

Logger Replacement and Improvements:

  • Added a new OutputChannelLogger implementation providing structured logging, metadata support, optional console output, and group operations (src/logging/output-channel.logger.ts).
  • Replaced all usage of PinoLogger with OutputChannelLogger in the extension activation and logger exports (src/extension.ts, src/logging/index.ts). [1] [2] [3]
  • Removed the pino dependency from package.json since it is no longer used.

Testing Enhancements:

  • Added a comprehensive test suite for OutputChannelLogger covering log levels, metadata, console output, group operations, and error handling (src/logging/output-channel.logger.test.ts).
  • Updated the test runner to include tests for the new logger (scripts/run-tests.js).

Documentation and Usability:

  • Updated the README.md to clarify the extension's behavior when generating barrel files.

… 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.
Copilot AI review requested due to automatic review settings January 23, 2026 01:28
Copy link
Contributor

Copilot AI left a 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 OutputChannelLogger class with structured logging, metadata support, optional console output, and group operations
  • Replaced all usage of PinoLogger with OutputChannelLogger throughout the extension
  • Removed the pino dependency 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.

@Coderrob Coderrob merged commit 7749797 into main Jan 23, 2026
12 checks passed
@Coderrob Coderrob deleted the moar-coverage branch January 23, 2026 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants