Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 96 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,97 @@ All notable changes to this extension will be documented in this file.

This Changelog uses the [Keep a Changelog](http://keepachangelog.com/) structure.

## [Unreleased]

### Added

- Added introduce new icon artwork and differentiate the extension from the original ([#40](https://github.com/yCodeTech/auto-comment-blocks/pull/40)) by @yCodeTech

This pull request introduces a new and improved icon artwork with an update to the marketplace banner colour, and updates the extension description. These changes tries to prevent further confusion between the original and forked extensions, as demonstrated in #36 and https://github.com/kevb34ns/auto-comment-blocks/issues/47, by establishing differentiating factors in the marketplace.

**Visual changes:**

- Replaced the old flat icon with an improved 3D icon artwork to differentiate the extension from the original (and it's other forked extensions), ensuring it's distinctive but also familiar.
- Changed the `galleryBanner.color` in `package.json` to use the dark blue `#01092d` from the new icon for improved appearance in the marketplace.

**Other changes:**

- Updated the `description` field in `package.json` to clarify that block comment completion is now available for all auto-supported languages, not just officially supported ones.
- Added `.env` to `.vscodeignore` to ensure environment files are excluded from VS Code extension packaging during testing.
- Added `icon.psd` to `.gitignore` to prevent committing the Photoshop file of the icon.

**Documentation changes:**

- Added the new icon into the `README.md` title so the new logo/icon is visible on the docs too which creates a better distinction in the repo.
- Updated the fork info to specify who publishes/maintains the extension, so that it's explicit that this extension is owned by me.

<!-- end -->

- Added logging levels ([#42](https://github.com/yCodeTech/auto-comment-blocks/pull/42)) by @yCodeTech

This pull request introduces a configurable logging level to the extension, allowing users to control the verbosity of log output. It also improves logging practices by redacting sensitive or irrelevant information from logs, restructures some logging logic for clarity and safety, and enhances the handling of document events and JSON parsing. The most important changes are:

**Logging Level Configuration and Handling:**

- Added a new `auto-comment-blocks.logLevel` setting to `package.json`, allowing users to set the logging level (`debug`, `info`, `error`, `off`) for the extension.
- Refactored the `Logger` class in `src/logger.ts` to support log levels, including methods to set the log level, check if a message should be logged, and always emit "important" messages regardless of log level (ie. the extension name and version).
- Updated extension activation logic in `src/extension.ts` to initialize and update the logger's log level based on user configuration, and to log extension metadata on activation.

**Configuration and Settings Integration:**

- Extended the `Settings` interface and related types to include the new `logLevel` property, ensuring the log level is accessible throughout the extension.

**Logging Data Redaction:**

- Enhanced the `ExtensionData` class to redact irrelevant or sensitive information (like `packageJSON`) from logs, ensuring only necessary details are logged.

**Event Handling Improvements:**

- Improved the logic for handling document open events to avoid unnecessary reconfiguration for virtual documents and clarified logging messages.

**Utility and Error Handling Enhancements:**

- Refactored JSON file reading and parsing in `src/utils.ts` to separate parsing logic and improve error handling, making it easier to maintain and debug.

<!-- end -->

- Added redact username in logging paths ([#45](https://github.com/yCodeTech/auto-comment-blocks/pull/45)) by @yCodeTech

This pull request introduces a new warning log level and improves logging safety by redacting OS usernames in paths from log output. It also refines the handling of extension discovery paths and updates log level descriptions for clarity.

**Logging improvements:**

- Added a new `warn` log level, including support in the logger, log level comparisons, and the `logLevels` utils constant.
- Implemented automatic redaction of the current OS username from all log messages and data to prevent accidental leaking of sensitive information. If the username cannot be determined, a warning is logged once per session while avoiding infinite recursion, and further redaction attempts are skipped.

**Configuration and API updates:**

- Updated log level descriptions in `package.json` to reflect the new `warn` level and clarify which messages are included at each level.
- The `getAllExtensionDiscoveryPaths` method now returns a new `Map` to prevent external mutation of internal state.

**Other changes:**

- Minor code formatting and comments for clarity in configuration and extension data classes.

<!-- end -->

### Changed

- Refactored logging environment variables ([#43](https://github.com/yCodeTech/auto-comment-blocks/pull/43)) by @yCodeTech

This pull request updates the way environment and extension path information is logged in the `Configuration` class, streamlining the debug output and focusing on relevant environment variables. The most important changes are:

**Environment and Extension Path Logging:**

- Removed the logging of the extension discovery paths from the `logDebugInfo` method as these are also logged in `extension.ts`, so they're technically redundant in the method.
- Added logging of the `App Root` and filtered environment variables (only those starting with `VSCODE_`) under `Env Vars` in the environment details, making the debug output more focused and relevant in `logDebugInfo` method.

**Removal of dumping system environment variables into the logs**

- Removed logging of the dumped system environment variables as they could potentially have some sensitive information like environment passwords, auth keys, etc. Majority of it wasn't relevant to debugging anyway.

<!-- end -->

## [1.1.17](https://github.com/yCodeTech/auto-comment-blocks/releases/tag/v1.1.17) - 2026-07-25

### Fixed
Expand Down Expand Up @@ -57,7 +148,7 @@ This Changelog uses the [Keep a Changelog](http://keepachangelog.com/) structure
- Updated the extension activation in `extension.ts` to pass the new constructor parameter, enabling user notification for the main extension instance only.
- Updated `Configuration` logic to handle cases where the Windows extensions paths are not resolved, preventing errors by falling back to empty arrays.

<!-- end -->
<!-- end -->

## [1.1.15](https://github.com/yCodeTech/auto-comment-blocks/releases/tag/v1.1.15) - 2026-04-19

Expand All @@ -68,7 +159,7 @@ This Changelog uses the [Keep a Changelog](http://keepachangelog.com/) structure
VScode updated their types to include the LineComment typings and released 1.110 of @types/vscode package. So our temporary custom `LineComment` type and `LineCommentConfig` interface is now redundant.
- Updated @types/vscode package to 1.110.
- Removed the temporary `LineComment` type and `LineCommentConfig` interface, and removed the references in configuration file.
<!-- end -->
<!-- end -->

### Changed

Expand All @@ -80,15 +171,15 @@ This Changelog uses the [Keep a Changelog](http://keepachangelog.com/) structure
- Consolidated multiple configuration change handlers into a single handler that checks for a list of settings requiring extension reload. If any are changed, a single reload prompt is shown using the new `showReloadMessage` helper function, reducing code duplication.

- Improved performance and event handling to prevent memory leaks by properly disposing of old comment configurations.
<!-- end -->
<!-- end -->

- Refactored configuration class ([#30](https://github.com/yCodeTech/auto-comment-blocks/pull/30)) by @yCodeTech
- Extracted the logic for determining the appropriate Blade or HTML comment style into a new private method `getBladeOrHtmlComments`, simplifying the public API and improving clarity. The `setBladeComments` method now only sets the configuration and no longer returns values based on an `onStart` flag (the flag was removed in favour using the new private method directly).

- Replaced repetitive code for adding custom single-line comment languages with a new private method `addCustomSingleLineLanguages`, reducing duplication and improving maintainability.

- Replaced `var` with `let` for variable declarations in several places to align with modern best practices.
<!-- end -->
<!-- end -->

## [1.1.14](https://github.com/yCodeTech/auto-comment-blocks/releases/tag/v1.1.14) - 2026-02-23

Expand Down Expand Up @@ -316,7 +407,7 @@ For a full changelog, view the [release PR](https://github.com/yCodeTech/auto-co

- Added support for `/* */`.

- Added an event to reconfigure the comment blocks evertime a document is opened OR the document language has been changed.
- Added an event to reconfigure the comment blocks everytime a document is opened OR the document language has been changed, so that other extensions (that are activated after this one) don't override the language configurations which could disable some of the custom comment blocks (e.g `/*! */`).

- Added a config file to define the default multi-line config comments and autoClosingPairs; and a config file to define language IDs the need to be skipped when auto finding the languages to support (because these languages are known not to have any config properties we're interested in.)

Expand Down