[PR #6] chore(deps)(deps): bump the oxog-packages group with 3 updates #7

Open
opened 2026-02-27 19:20:04 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/ersinkoc/TUI/pull/6

State: open
Merged: No


Bumps the oxog-packages group with 3 updates: @oxog/emitter, @oxog/pigment and @oxog/plugin.

Updates @oxog/emitter from 1.0.0 to 1.1.0

Changelog

Sourced from @​oxog/emitter's changelog.

[1.1.0] - 2026-01-25

Added

  • emitParallel() method - Run all async handlers concurrently instead of sequentially

    • 10 handlers × 100ms = ~100ms (vs 1000ms with emitAsync)
    • Results maintain registration order regardless of completion order
  • Node.js EventEmitter aliases for better compatibility:

    • addListener() - alias for on()
    • removeListener() - alias for off()
    • removeAllListeners() - alias for offAll()
  • Global priority system for prependListener - Prepended handlers now run before ALL other handlers, including wildcards and patterns registered earlier

Changed

  • O(1) pattern matching - Pattern handlers (user:*) now use direct prefix lookup instead of iterating all patterns

    • Before: O(P) where P = number of patterns
    • After: O(1) constant time lookup
  • Zero-allocation pattern matching - matchesPattern() no longer creates intermediate strings via slice()

    • Uses charCodeAt() for character comparison
    • Reduces GC pressure in high-frequency emit scenarios
  • Handler execution order - Handlers now execute in registration order (by priority), not by type (regular → wildcard → pattern)

Performance

Operation Before After
Pattern matching O(P) per emit O(1) per emit
String allocations 1-2 per pattern check 0
Prepend priority Same-type only Global
Commits

Updates @oxog/pigment from 1.0.1 to 1.0.2

Changelog

Sourced from @​oxog/pigment's changelog.

[1.0.2] - 2026-01-25

Fixed

  • Nested Styling Bug: Fixed critical issue where nested color styles would break outer style after inner style ends. Now pigment.red('Error: ' + pigment.blue('details') + ' here') correctly restores red color after blue text.
  • visible Property: Fixed visible method to correctly return empty string when colors are not supported (was returning text in both cases).
  • Environment Plugin Override: Fixed environmentPlugin overwriting colorSupport level set via createPigment({ level: 3 }) options.
  • Browser Color Detection: Changed default browser color support from level 3 (TrueColor) to level 1 (basic colors) for safer compatibility with mobile webviews and older browsers.
  • Empty String Optimization: Empty strings no longer generate unnecessary ANSI codes (pigment.red('') now returns '' instead of \x1b[31m\x1b[39m).

Added

  • resetColorSupportCache(): New utility function to reset cached color support detection, useful for testing when environment variables change.
  • Improved Nesting Algorithm: Inner style reset codes are now replaced with outer style open codes for proper color restoration.

Changed

  • Nesting Plugin Simplified: Removed unused event handler, plugin now only sets the nesting.enabled flag for compatibility.
  • Test Coverage: Increased test count to 692 tests with 100% code coverage.
Commits

Updates @oxog/plugin from 1.0.1 to 1.0.3

Changelog

Sourced from @​oxog/plugin's changelog.

[1.0.3] - 2026-01-25

Fixed

  • Dynamic Plugin Dependency Validation

    • Plugins added after init() now properly validate dependencies before initialization
    • Missing dependencies throw PluginError immediately when calling use() on ready kernel
    • Circular dependencies involving dynamically added plugins are now detected
    • Dependent plugins wait for their dependencies to complete initialization
    • If a dependency fails to initialize, dependent plugins are marked as failed with plugin:error event
  • Zombie Plugin Resource Leak Prevention

    • unregister() and unregisterAsync() now properly handle plugins in Initializing state
    • When unregistering an initializing plugin, the system waits for init to complete then calls onDestroy
    • onDestroy is now called even if onInit failed, ensuring resource cleanup
    • Prevents memory leaks from orphaned resources (DB connections, event listeners, etc.)
  • EventBus.once() Subscription Cancellation

    • off() now correctly removes once() subscriptions using the original handler reference
    • Previously, calling off(event, handler) after once(event, handler) would silently fail
    • Internal wrapper mapping tracks original handlers for proper cleanup
  • Plugin Registration During Initialization

    • use() now throws PluginError when called while kernel is in Initializing state
    • Previously, plugins added during initialization would be silently ignored (never initialized)
    • Clear error message guides users to register plugins before init() or wait until ready
  • Internal Events Type-Safety

    • Removed unsafe unknown type cast when emitting internal kernel events
    • EventBus now uses combined type CombinedEvents<TEvents> for type-safe internal events
    • Users can subscribe to internal events (plugin:install, kernel:ready, etc.) with full type inference
    • Internal event names are protected: user-defined events with same names use internal event types
    • Prevents runtime type mismatches when subscribing to internal events

Added

  • DependencyResolver.validateSinglePlugin()

    • New method to validate a single plugin's dependencies
    • Used internally for dynamic plugin validation
    • Checks for missing dependencies and circular references
  • Deep Context Merge

    • deepUpdateContext() method for recursive nested object merging
    • Prevents data loss when updating nested configuration objects
    • updateContext() remains unchanged (shallow merge) for backward compatibility
    • Arrays are replaced, not merged (consistent with common deep merge behavior)

Technical Details

  • 245 tests with 100% code coverage

... (truncated)

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  • @dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  • @dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  • @dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency
  • @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions
**Original Pull Request:** https://github.com/ersinkoc/TUI/pull/6 **State:** open **Merged:** No --- Bumps the oxog-packages group with 3 updates: [@oxog/emitter](https://github.com/ersinkoc/emitter), [@oxog/pigment](https://github.com/ersinkoc/pigment) and [@oxog/plugin](https://github.com/ersinkoc/plugin). Updates `@oxog/emitter` from 1.0.0 to 1.1.0 <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/ersinkoc/Emitter/blob/main/CHANGELOG.md"><code>@​oxog/emitter</code>'s changelog</a>.</em></p> <blockquote> <h2>[1.1.0] - 2026-01-25</h2> <h3>Added</h3> <ul> <li> <p><strong><code>emitParallel()</code> method</strong> - Run all async handlers concurrently instead of sequentially</p> <ul> <li>10 handlers × 100ms = ~100ms (vs 1000ms with <code>emitAsync</code>)</li> <li>Results maintain registration order regardless of completion order</li> </ul> </li> <li> <p><strong>Node.js EventEmitter aliases</strong> for better compatibility:</p> <ul> <li><code>addListener()</code> - alias for <code>on()</code></li> <li><code>removeListener()</code> - alias for <code>off()</code></li> <li><code>removeAllListeners()</code> - alias for <code>offAll()</code></li> </ul> </li> <li> <p><strong>Global priority system for <code>prependListener</code></strong> - Prepended handlers now run before ALL other handlers, including wildcards and patterns registered earlier</p> </li> </ul> <h3>Changed</h3> <ul> <li> <p><strong>O(1) pattern matching</strong> - Pattern handlers (<code>user:*</code>) now use direct prefix lookup instead of iterating all patterns</p> <ul> <li>Before: O(P) where P = number of patterns</li> <li>After: O(1) constant time lookup</li> </ul> </li> <li> <p><strong>Zero-allocation pattern matching</strong> - <code>matchesPattern()</code> no longer creates intermediate strings via <code>slice()</code></p> <ul> <li>Uses <code>charCodeAt()</code> for character comparison</li> <li>Reduces GC pressure in high-frequency emit scenarios</li> </ul> </li> <li> <p><strong>Handler execution order</strong> - Handlers now execute in registration order (by priority), not by type (regular → wildcard → pattern)</p> </li> </ul> <h3>Performance</h3> <table> <thead> <tr> <th>Operation</th> <th>Before</th> <th>After</th> </tr> </thead> <tbody> <tr> <td>Pattern matching</td> <td>O(P) per emit</td> <td>O(1) per emit</td> </tr> <tr> <td>String allocations</td> <td>1-2 per pattern check</td> <td>0</td> </tr> <tr> <td>Prepend priority</td> <td>Same-type only</td> <td>Global</td> </tr> </tbody> </table> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/ersinkoc/emitter/commits">compare view</a></li> </ul> </details> <br /> Updates `@oxog/pigment` from 1.0.1 to 1.0.2 <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/ersinkoc/Pigment/blob/main/CHANGELOG.md"><code>@​oxog/pigment</code>'s changelog</a>.</em></p> <blockquote> <h2>[1.0.2] - 2026-01-25</h2> <h3>Fixed</h3> <ul> <li><strong>Nested Styling Bug</strong>: Fixed critical issue where nested color styles would break outer style after inner style ends. Now <code>pigment.red('Error: ' + pigment.blue('details') + ' here')</code> correctly restores red color after blue text.</li> <li><strong><code>visible</code> Property</strong>: Fixed <code>visible</code> method to correctly return empty string when colors are not supported (was returning text in both cases).</li> <li><strong>Environment Plugin Override</strong>: Fixed <code>environmentPlugin</code> overwriting <code>colorSupport</code> level set via <code>createPigment({ level: 3 })</code> options.</li> <li><strong>Browser Color Detection</strong>: Changed default browser color support from level 3 (TrueColor) to level 1 (basic colors) for safer compatibility with mobile webviews and older browsers.</li> <li><strong>Empty String Optimization</strong>: Empty strings no longer generate unnecessary ANSI codes (<code>pigment.red('')</code> now returns <code>''</code> instead of <code>\x1b[31m\x1b[39m</code>).</li> </ul> <h3>Added</h3> <ul> <li><strong><code>resetColorSupportCache()</code></strong>: New utility function to reset cached color support detection, useful for testing when environment variables change.</li> <li><strong>Improved Nesting Algorithm</strong>: Inner style reset codes are now replaced with outer style open codes for proper color restoration.</li> </ul> <h3>Changed</h3> <ul> <li><strong>Nesting Plugin Simplified</strong>: Removed unused event handler, plugin now only sets the <code>nesting.enabled</code> flag for compatibility.</li> <li><strong>Test Coverage</strong>: Increased test count to 692 tests with 100% code coverage.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/ersinkoc/pigment/commits">compare view</a></li> </ul> </details> <br /> Updates `@oxog/plugin` from 1.0.1 to 1.0.3 <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/ersinkoc/Plugin/blob/main/CHANGELOG.md"><code>@​oxog/plugin</code>'s changelog</a>.</em></p> <blockquote> <h2>[1.0.3] - 2026-01-25</h2> <h3>Fixed</h3> <ul> <li> <p><strong>Dynamic Plugin Dependency Validation</strong></p> <ul> <li>Plugins added after <code>init()</code> now properly validate dependencies before initialization</li> <li>Missing dependencies throw <code>PluginError</code> immediately when calling <code>use()</code> on ready kernel</li> <li>Circular dependencies involving dynamically added plugins are now detected</li> <li>Dependent plugins wait for their dependencies to complete initialization</li> <li>If a dependency fails to initialize, dependent plugins are marked as failed with <code>plugin:error</code> event</li> </ul> </li> <li> <p><strong>Zombie Plugin Resource Leak Prevention</strong></p> <ul> <li><code>unregister()</code> and <code>unregisterAsync()</code> now properly handle plugins in <code>Initializing</code> state</li> <li>When unregistering an initializing plugin, the system waits for init to complete then calls <code>onDestroy</code></li> <li><code>onDestroy</code> is now called even if <code>onInit</code> failed, ensuring resource cleanup</li> <li>Prevents memory leaks from orphaned resources (DB connections, event listeners, etc.)</li> </ul> </li> <li> <p><strong>EventBus.once() Subscription Cancellation</strong></p> <ul> <li><code>off()</code> now correctly removes <code>once()</code> subscriptions using the original handler reference</li> <li>Previously, calling <code>off(event, handler)</code> after <code>once(event, handler)</code> would silently fail</li> <li>Internal wrapper mapping tracks original handlers for proper cleanup</li> </ul> </li> <li> <p><strong>Plugin Registration During Initialization</strong></p> <ul> <li><code>use()</code> now throws <code>PluginError</code> when called while kernel is in <code>Initializing</code> state</li> <li>Previously, plugins added during initialization would be silently ignored (never initialized)</li> <li>Clear error message guides users to register plugins before <code>init()</code> or wait until ready</li> </ul> </li> <li> <p><strong>Internal Events Type-Safety</strong></p> <ul> <li>Removed unsafe <code>unknown</code> type cast when emitting internal kernel events</li> <li>EventBus now uses combined type <code>CombinedEvents&lt;TEvents&gt;</code> for type-safe internal events</li> <li>Users can subscribe to internal events (<code>plugin:install</code>, <code>kernel:ready</code>, etc.) with full type inference</li> <li>Internal event names are protected: user-defined events with same names use internal event types</li> <li>Prevents runtime type mismatches when subscribing to internal events</li> </ul> </li> </ul> <h3>Added</h3> <ul> <li> <p><strong>DependencyResolver.validateSinglePlugin()</strong></p> <ul> <li>New method to validate a single plugin's dependencies</li> <li>Used internally for dynamic plugin validation</li> <li>Checks for missing dependencies and circular references</li> </ul> </li> <li> <p><strong>Deep Context Merge</strong></p> <ul> <li><code>deepUpdateContext()</code> method for recursive nested object merging</li> <li>Prevents data loss when updating nested configuration objects</li> <li><code>updateContext()</code> remains unchanged (shallow merge) for backward compatibility</li> <li>Arrays are replaced, not merged (consistent with common deep merge behavior)</li> </ul> </li> </ul> <h3>Technical Details</h3> <ul> <li>245 tests with 100% code coverage</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li>See full diff in <a href="https://github.com/ersinkoc/plugin/commits">compare view</a></li> </ul> </details> <br /> Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/TUI#7
No description provided.