Skip to content

Conversation

@kinyoklion
Copy link
Member

Updates to latest OpenFeature SDK.
Updates to latest LD SDK. Addresses #34

Adds support for OpenFeature events.
Adds support for provider shutdown. Addresses #15.

@kinyoklion kinyoklion force-pushed the rlamb/change-construction-method branch 5 times, most recently from 472194a to 6761fed Compare October 30, 2023 19:34
variations: [
{os: ubuntu-latest, node: latest},
{os: ubuntu-latest, node: 14},
{os: ubuntu-latest, node: 16},
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenFeature SDK requires node 16.

@kinyoklion kinyoklion force-pushed the rlamb/change-construction-method branch from 6761fed to 5e8d180 Compare October 30, 2023 19:37
],
"license": "Apache-2.0",
"peerDependencies": {
"@openfeature/js-sdk": "^1.0.0",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The OpenFeature SDK was renamed to make it clear that their is a client and server version.

constructor(sdkKey: string, options: LDOptions = {}) {
if (options.logger) {
this.logger = options.logger;
this.logger = new SafeLogger(options.logger, basicLogger({ level: 'info' }));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a fix, it should have had this already.

this.logger = basicLogger({ level: 'info' });
}
try {
this.client = init(sdkKey, {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few cases where the constructor fails. I am capturing it and letting the OF SDK handle it. That seems most in the spirit of the functionality. Maybe a little less convenient though.

@kinyoklion kinyoklion marked this pull request as ready for review October 30, 2023 19:45
@kinyoklion kinyoklion requested a review from a team October 30, 2023 19:45
@kinyoklion kinyoklion merged commit 53cb736 into main Oct 30, 2023
@kinyoklion kinyoklion deleted the rlamb/change-construction-method branch October 30, 2023 20:20
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