Skip to content

Conversation

@petruki
Copy link
Member

@petruki petruki commented Jan 8, 2026

This pull request introduces several improvements and updates to the Switcher Client Deno SDK, focusing on Deno version upgrades, documentation clarity, and a significant API enhancement to support persisted switcher instances and simplified method signatures. The changes modernize the SDK, improve usability, and update references and documentation to reflect the new naming and usage patterns.

SDK Improvements and API Enhancements:

  • Added support for persisted switcher instances by introducing a static _switchers map in the Client class and updating getSwitcher to return a cached instance for a given key, improving performance and usability. (src/client.ts [1] [2]
  • Refactored the Switcher API to allow method calls without always passing the key, supporting both persisted and non-persisted usage. Overloaded isItOnBool and isItOnDetail methods to accept either a key or a forceAsync parameter, simplifying both synchronous and asynchronous usage. (src/switcher.ts [1] [2]

Testing and Example Updates:

  • Updated all playground and test examples to use the new persisted switcher pattern, ensuring consistency with the new API and improving clarity for users. (tests/playground/index.ts [1] [2] [3] [4] [5] [6]
  • Added missing assertion methods to test dependencies for more robust testing. (tests/deps.ts tests/deps.tsL13-R15)

Build and Environment Updates:

  • Upgraded Deno version from 2.6.3 to 2.6.4 in the dev container Dockerfile and all CI workflows to ensure compatibility and leverage the latest fixes and features. (.devcontainer/Dockerfile [1]; .github/workflows/master.yml [2] [3]; .github/workflows/sonar.yml [4]

@petruki petruki added this to the v2.4.1 milestone Jan 8, 2026
@petruki petruki self-assigned this Jan 8, 2026
@petruki petruki added the enhancement New feature or request label Jan 8, 2026
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 8, 2026

@petruki petruki merged commit a6e0b67 into master Jan 8, 2026
7 checks passed
@petruki petruki deleted the staging branch January 8, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants