You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+31-3Lines changed: 31 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -134,6 +134,34 @@ This Changelog uses the [Keep a Changelog](http://keepachangelog.com/) structure
134
134
135
135
<!-- end -->
136
136
137
+
- Added ability to auto-update the language definitions on settings change ([#53](https://github.com/yCodeTech/auto-comment-blocks/pull/53)) by @yCodeTech
138
+
139
+
This pull request introduces several improvements to how language comment block definitions are managed and updated in the extension. The most significant changes are the ability to auto update language definitions on settings change without requiring an extension host reload, the caching of configuration files for efficiency, and performance improvements. Below are the most important changes:
140
+
141
+
**Auto-Update Language Definitions:**
142
+
143
+
- Added a new `updateLanguageDefinitions` method to `Configuration`, allowing language comment block definitions to be updated at runtime without requiring an extension host reload.
144
+
145
+
- The extension now listens for changes to relevant configuration settings in the `activate` function and automatically updates language definitions and reconfigures the comment blocks as needed, removing the pop-up message and the requirement for an extension reload.
146
+
147
+
**Performance Improvements:**
148
+
149
+
-**Accidental cached data mutation prevention and unnecessary disk read improvements:**
150
+
151
+
- The `setLanguageConfiguration` method now deep-clones language configurations before modification to prevent accidental mutation of cached data.
152
+
153
+
- The default multi-line language configuration (`default-multi-line-config.json`) and the languages to skip (`skip-languages.jsonc`) files are now read once during initialisation and cached for later use, improving efficiency and reducing redundant disk reads on every loop iteration.
154
+
155
+
-**Writing of Language Definition Files and Logging Enhancements:**
156
+
157
+
- The extension no longer writes the current language definitions to JSON files in `production`, they are only written in `development` and `testing` modes for easier debugging and quick reference during development, and preventing unnecessary file writes in production.
158
+
159
+
- Refactored the debug logging in the `logDebugInfo` method to use the existing cached language definitions instead of reading from files, improving efficiency.
160
+
161
+
These changes collectively improve the maintainability, performance, and experience of the extension.
162
+
163
+
<!-- end -->
164
+
137
165
### Changed
138
166
139
167
- Refactored logging environment variables ([#43](https://github.com/yCodeTech/auto-comment-blocks/pull/43)) by @yCodeTech
@@ -255,7 +283,7 @@ This Changelog uses the [Keep a Changelog](http://keepachangelog.com/) structure
255
283
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.
256
284
- Updated @types/vscode package to 1.110.
257
285
- Removed the temporary `LineComment` type and `LineCommentConfig` interface, and removed the references in configuration file.
258
-
<!-- end -->
286
+
<!-- end -->
259
287
260
288
### Changed
261
289
@@ -267,15 +295,15 @@ This Changelog uses the [Keep a Changelog](http://keepachangelog.com/) structure
267
295
- 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.
268
296
269
297
- Improved performance and event handling to prevent memory leaks by properly disposing of old comment configurations.
270
-
<!-- end -->
298
+
<!-- end -->
271
299
272
300
- Refactored configuration class ([#30](https://github.com/yCodeTech/auto-comment-blocks/pull/30)) by @yCodeTech
273
301
- 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).
274
302
275
303
- Replaced repetitive code for adding custom single-line comment languages with a new private method `addCustomSingleLineLanguages`, reducing duplication and improving maintainability.
276
304
277
305
- Replaced `var` with `let` for variable declarations in several places to align with modern best practices.
0 commit comments