-
Notifications
You must be signed in to change notification settings - Fork 4
feat!: Update dependencies and encapsulate client construction. #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
472194a to
6761fed
Compare
| variations: [ | ||
| {os: ubuntu-latest, node: latest}, | ||
| {os: ubuntu-latest, node: 14}, | ||
| {os: ubuntu-latest, node: 16}, |
There was a problem hiding this comment.
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.
6761fed to
5e8d180
Compare
| ], | ||
| "license": "Apache-2.0", | ||
| "peerDependencies": { | ||
| "@openfeature/js-sdk": "^1.0.0", |
There was a problem hiding this comment.
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' })); |
There was a problem hiding this comment.
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, { |
There was a problem hiding this comment.
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.
Updates to latest OpenFeature SDK.
Updates to latest LD SDK. Addresses #34
Adds support for OpenFeature events.
Adds support for provider shutdown. Addresses #15.