Skip to content

Conversation

@webJose
Copy link
Contributor

@webJose webJose commented Sep 7, 2025

No description provided.

@webJose webJose requested a review from Copilot September 7, 2025 20:10
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 PR ensures the cleanup function returned by init() properly resets all library state to its default uninitialized values, enabling proper cleanup and multiple initialization cycles.

  • Adds reset functions for routing options, logger, and trace options
  • Updates the cleanup function to call all reset functions
  • Changes the default logger from console to offLogger for proper uninitialized state
  • Adds comprehensive tests to verify complete rollback functionality

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/lib/index.ts Updates cleanup function to call new reset functions and imports them
src/lib/index.test.ts Adds comprehensive tests for initialization and cleanup behavior
src/lib/core/trace.test.ts Adds tests for the new resetTraceOptions function
src/lib/core/trace.svelte.ts Implements resetTraceOptions function with default values
src/lib/core/options.ts Implements resetRoutingOptions function with default values
src/lib/core/options.test.ts Adds tests for the new resetRoutingOptions function
src/lib/core/Logger.ts Changes default logger to offLogger and implements resetLogger function
src/lib/core/Logger.test.ts Updates tests for new default logger and adds resetLogger tests

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@webJose webJose merged commit 13425bd into main Sep 7, 2025
1 check passed
@webJose webJose deleted the JP/fixes branch September 7, 2025 20:13
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