Conversation
…used - Added `noUncheckedIndexedAccess` option to `tsconfig.json` for stricter type checking. - Modified `getFeatureDefinitions` method to now return synchronous`FeatureDefinition[]`. - Enhanced error handling in `_getFeaturesRemote` method (no longer returns undefined, bug). - Updated tests to reflect changes in feature handling and context warnings.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors feature flag evaluation to only warn about missing context fields when a feature is actually used, rather than during bulk feature retrieval. The changes include adding stricter TypeScript checking, updating API method signatures, and enhancing error handling.
- Modified feature definition retrieval to be synchronous and changed warning behavior to trigger on feature access
- Added stricter TypeScript type checking with
noUncheckedIndexedAccessoption - Enhanced error handling in remote feature fetching methods
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/openfeature-node-provider/src/index.ts | Updated to use synchronous getFeatureDefinitions() method |
| packages/openfeature-node-provider/package.json | Version bump and dependency update to node-sdk 1.10.0 |
| packages/node-sdk/tsconfig.json | Added noUncheckedIndexedAccess for stricter type checking |
| packages/node-sdk/test/client.test.ts | Updated tests to reflect new warning behavior and removed obsolete test cases |
| packages/node-sdk/src/types.ts | Changed API response types to be more specific and use Record instead of array |
| packages/node-sdk/src/rate-limiter.ts | Added null check for rate limiter timestamp handling |
| packages/node-sdk/src/client.ts | Major refactor of feature evaluation logic and warning system |
| packages/node-sdk/package.json | Version bump to 1.10.0 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
pavkam
approved these changes
Aug 14, 2025
Contributor
pavkam
left a comment
There was a problem hiding this comment.
Left a few comments, but approving as it looks good in general.
pavkam
approved these changes
Aug 14, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
noUncheckedIndexedAccessoption totsconfig.jsonfor stricter type checking.getFeatureDefinitionsmethod to now return synchronousFeatureDefinition[]._getFeaturesRemotemethod (now returns a disabled feature rather than undefined when feature is missing).