-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat: offline-mode #136
feat: offline-mode #136
Conversation
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.
I've added one minor comment but this looks good in general.
tests/sdk/flagsmith.test.ts
Outdated
const environmentFlags:Flags = await flagsmith.getEnvironmentFlags(); | ||
const identityFlags:Flags = await flagsmith.getIdentityFlags('identity', {}); |
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.
Is there a reason we don't just assign these values in the calls made a few lines above?
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.
Oops, I really don't know why. Fixed
@novakzaballa we may also need to consider this in our implementation here too. |
As per the condition at the beginning of this block, I would say that that's not the case in NodeJS. flagsmith-nodejs-client/sdk/index.ts Lines 142 to 177 in b1fc193
|
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [flagsmith-nodejs](http://flagsmith.com/) ([source](https://togithub.com/Flagsmith/flagsmith-nodejs-client)) | [`^2.5.0` -> `^3.0.0`](https://renovatebot.com/diffs/npm/flagsmith-nodejs/2.5.2/3.2.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/flagsmith-nodejs/3.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/flagsmith-nodejs/3.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/flagsmith-nodejs/2.5.2/3.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/flagsmith-nodejs/2.5.2/3.2.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>Flagsmith/flagsmith-nodejs-client (flagsmith-nodejs)</summary> ### [`v3.2.0`](https://togithub.com/Flagsmith/flagsmith-nodejs-client/releases/tag/v3.2.0): Version 3.2.0 [Compare Source](https://togithub.com/Flagsmith/flagsmith-nodejs-client/compare/v3.1.1...v3.2.0) #### What's Changed - feat: offline-mode by [@​novakzaballa](https://togithub.com/novakzaballa) in [https://github.com/Flagsmith/flagsmith-nodejs-client/pull/136](https://togithub.com/Flagsmith/flagsmith-nodejs-client/pull/136) **Full Changelog**: Flagsmith/flagsmith-nodejs-client@v3.1.1...v3.2.0 ### [`v3.1.1`](https://togithub.com/Flagsmith/flagsmith-nodejs-client/releases/tag/v3.1.1): Version 3.1.1 [Compare Source](https://togithub.com/Flagsmith/flagsmith-nodejs-client/compare/v3.1.0...v3.1.1) #### What's Changed - fix: Default requestTimeout by [@​novakzaballa](https://togithub.com/novakzaballa) in [https://github.com/Flagsmith/flagsmith-nodejs-client/pull/133](https://togithub.com/Flagsmith/flagsmith-nodejs-client/pull/133) **Full Changelog**: Flagsmith/flagsmith-nodejs-client@v3.1.0...v3.1.1 ### [`v3.1.0`](https://togithub.com/Flagsmith/flagsmith-nodejs-client/releases/tag/v3.1.0): Version 3.1.0 [Compare Source](https://togithub.com/Flagsmith/flagsmith-nodejs-client/compare/v3.0.1...v3.1.0) #### What's Changed - Add 10 secs by default to requestTimeoutSeconds by [@​novakzaballa](https://togithub.com/novakzaballa) in [https://github.com/Flagsmith/flagsmith-nodejs-client/pull/128](https://togithub.com/Flagsmith/flagsmith-nodejs-client/pull/128) - Bump version to 3.1.0 by [@​novakzaballa](https://togithub.com/novakzaballa) in [https://github.com/Flagsmith/flagsmith-nodejs-client/pull/129](https://togithub.com/Flagsmith/flagsmith-nodejs-client/pull/129) - Bump word-wrap from 1.2.3 to 1.2.4 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/Flagsmith/flagsmith-nodejs-client/pull/127](https://togithub.com/Flagsmith/flagsmith-nodejs-client/pull/127) - Bump tough-cookie from 4.0.0 to 4.1.3 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/Flagsmith/flagsmith-nodejs-client/pull/125](https://togithub.com/Flagsmith/flagsmith-nodejs-client/pull/125) - Lazily calculate the hash by [@​eldar-gamisoniya](https://togithub.com/eldar-gamisoniya) in [https://github.com/Flagsmith/flagsmith-nodejs-client/pull/130](https://togithub.com/Flagsmith/flagsmith-nodejs-client/pull/130) #### New Contributors - [@​novakzaballa](https://togithub.com/novakzaballa) made their first contribution in [https://github.com/Flagsmith/flagsmith-nodejs-client/pull/128](https://togithub.com/Flagsmith/flagsmith-nodejs-client/pull/128) - [@​eldar-gamisoniya](https://togithub.com/eldar-gamisoniya) made their first contribution in [https://github.com/Flagsmith/flagsmith-nodejs-client/pull/130](https://togithub.com/Flagsmith/flagsmith-nodejs-client/pull/130) **Full Changelog**: Flagsmith/flagsmith-nodejs-client@v3.0.1...v3.1.0 ### [`v3.0.1`](https://togithub.com/Flagsmith/flagsmith-nodejs-client/releases/tag/v3.0.1): Version 3.0.1 [Compare Source](https://togithub.com/Flagsmith/flagsmith-nodejs-client/compare/v3.0.0...v3.0.1) #### What's Changed - Fix deploy action by [@​kyle-ssg](https://togithub.com/kyle-ssg) in [https://github.com/Flagsmith/flagsmith-nodejs-client/pull/121](https://togithub.com/Flagsmith/flagsmith-nodejs-client/pull/121) - Bump semver from 7.3.7 to 7.5.2 by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/Flagsmith/flagsmith-nodejs-client/pull/122](https://togithub.com/Flagsmith/flagsmith-nodejs-client/pull/122) **Full Changelog**: Flagsmith/flagsmith-nodejs-client@v3.0.0...v3.0.1 ### [`v3.0.0`](https://togithub.com/Flagsmith/flagsmith-nodejs-client/releases/tag/v3.0.0): Version 3.0.0 [Compare Source](https://togithub.com/Flagsmith/flagsmith-nodejs-client/compare/v2.5.2...v3.0.0) #### What's Changed - **BREAKING CHANGE**: Ensure percentage split evaluations are consistent by [@​matthewelwell](https://togithub.com/matthewelwell) in [https://github.com/Flagsmith/flagsmith-nodejs-client/pull/119](https://togithub.com/Flagsmith/flagsmith-nodejs-client/pull/119) WARNING: We modified the local evaluation behaviour. You may see different flags returned to identities attributed to your percentage split-based segments after upgrading to this version. **Full Changelog**: Flagsmith/flagsmith-nodejs-client@v2.5.2...v3.0.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/open-feature/playground). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMzEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjgxLjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Implement offline mode for NodeJs SDK
Further documentation in the issue ticket Flagsmith/flagsmith#2024