Skip to content

feat(node-sdk): Improve feature overrides#437

Merged
roncohen merged 7 commits intomainfrom
improve-feature-overrides
Jun 25, 2025
Merged

feat(node-sdk): Improve feature overrides#437
roncohen merged 7 commits intomainfrom
improve-feature-overrides

Conversation

@roncohen
Copy link
Contributor

  • include a testing section
  • rewrote many tests for Client because it was difficult to work with because of mocking and many asserts.

@roncohen roncohen requested a review from pavkam June 25, 2025 12:46
@roncohen roncohen requested a review from Copilot June 25, 2025 12:46
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 enhances the Node SDK’s feature override functionality by allowing direct object-based overrides, adding a clearFeatureOverrides method, refactoring tests for better clarity with flattenJSON, and documenting testing patterns.

  • Extend featureOverrides setter to accept plain objects and introduce clearFeatureOverrides.
  • Refactor client tests to use flattenJSON and streamlined event filtering.
  • Add a “Testing” section in the README with usage examples.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
packages/node-sdk/src/client.ts Added object-based overrides support, clearFeatureOverrides, and adjusted mapping
packages/node-sdk/test/client.test.ts Imported flattenJSON and simplified HTTP event assertions
packages/node-sdk/example/app.test.ts Updated example tests to use object override syntax
packages/node-sdk/README.md Added “Testing” section with feature override examples
Comments suppressed due to low confidence (1)

packages/node-sdk/README.md:430

  • The example uses bucket.setFeatureOverride but the setter is named featureOverrides. It should read bucket.featureOverrides = { ... }.
    bucket.setFeatureOverride = {

roncohen and others added 3 commits June 25, 2025 14:50
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…t-javascript-sdk into improve-feature-overrides
@roncohen roncohen enabled auto-merge June 25, 2025 13:29
@roncohen roncohen added this pull request to the merge queue Jun 25, 2025
Merged via the queue into main with commit affbb5f Jun 25, 2025
6 checks passed
@roncohen roncohen deleted the improve-feature-overrides branch June 25, 2025 13:39
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.

3 participants