Skip to content
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: prevent fetching toggles when they are up to date #202

Closed
wants to merge 43 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
7d231b0
to remove: change main file
jeremiewtd Apr 30, 2024
2fdf1e0
save last update key after fetch
jeremiewtd Apr 30, 2024
4f42346
refactor to handle 304 status
jeremiewtd May 2, 2024
ce45d89
unit test last update flag
jeremiewtd May 2, 2024
bab5000
handling isUpToDate
jeremiewtd May 2, 2024
a181bd5
update test
jeremiewtd May 2, 2024
c9a1677
fix existing test not working
Florent-Wanteeed May 3, 2024
3683bed
Store lastRefreshTimestamp to prevent async
Florent-Wanteeed May 3, 2024
195c438
fix toggleStorageTTL unit
Florent-Wanteeed May 3, 2024
ebcea49
refactor: rename option
jeremiewtd May 3, 2024
2f46c6b
unit test togglesStorage initial fetch
jeremiewtd May 3, 2024
ca8ebb9
refactor: emit ready method
jeremiewtd May 3, 2024
9463475
unit test togglesStorage ready
jeremiewtd May 3, 2024
9f6a10c
unit test ready not sent with bootstrap option
jeremiewtd May 3, 2024
cee9f51
unit test fetch when expired
jeremiewtd May 3, 2024
95f126c
documentation
jeremiewtd May 3, 2024
5ace0d9
improve readme
jeremiewtd May 6, 2024
c2f34e2
restore package.json
jeremiewtd May 6, 2024
cf12da6
revert public method
jeremiewtd May 6, 2024
63d22bf
restore package
jeremiewtd May 6, 2024
8c921af
readme
jeremiewtd May 6, 2024
c225d21
fix: linting
jeremiewtd May 6, 2024
54d5ab5
Merge remote-tracking branch 'origin/main' into feature/prevent-fetch…
jeremiewtd May 7, 2024
ad853c2
fix: lint
jeremiewtd May 7, 2024
44aa7f1
Merge branch 'main' into feature/prevent-fetch-on-load
jeremiewtd May 10, 2024
2d264a6
refactor: update timestamp key
jeremiewtd May 10, 2024
1556900
test: failing test that cover the bug
jeremiewtd May 10, 2024
bff8282
fix: can be up to date even with no flags
jeremiewtd May 10, 2024
b595afc
refactor: create initialFetchToggles to be used on start only
jeremiewtd May 10, 2024
0fc23d1
doc: update readme
jeremiewtd May 10, 2024
5bb8c20
fix: lint
jeremiewtd May 16, 2024
5266140
experimental and hash
Florent-Wanteeed Jun 10, 2024
7712d92
retour PR
Florent-Wanteeed Jun 12, 2024
4e7a656
Merge branch 'main' into feature/prevent-fetch
Florent-Wanteeed Jun 12, 2024
7684319
rollback previous test optim
Florent-Wanteeed Jun 12, 2024
9ecd585
Object Hash Value
Florent-Wanteeed Jun 26, 2024
8aec66c
Merge branch 'main' into feature/prevent-fetch
Florent-Wanteeed Jun 26, 2024
3c20789
system time goes back into the past
Florent-Wanteeed Jul 2, 2024
c0078f8
refacto
Florent-Wanteeed Jul 2, 2024
9e07183
Met a jour le flag fetchedFromServer quand on est a jour
Florent-Wanteeed Jul 2, 2024
04cd36e
retour
Florent-Wanteeed Jul 9, 2024
2fae8e0
retour PR
Florent-Wanteeed Jul 10, 2024
0a5d88c
Merge pull request #2 from wanteeed/feature/prevent-fetch
Florent-Wanteeed Jul 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ The Unleash SDK takes the following options:
| impressionDataAll | no| `false` | Allows you to trigger "impression" events for **all** `getToggle` and `getVariant` invocations. This is particularly useful for "disabled" feature toggles that are not visible to frontend SDKs. |
| environment | no | `default` | Sets the `environment` option of the [Unleash context](https://docs.getunleash.io/reference/unleash-context). This does **not** affect the SDK's [Unleash environment](https://docs.getunleash.io/reference/environments). |
| usePOSTrequests | no | `false` | Configures the client to use POST requests instead of GET when requesting enabled features. This is helpful when sensitive information (like user email, when used as a user ID) is passed in the context to avoid leaking it in the URL. NOTE: Post requests are not supported by the frontend api built into Unleash. |

| experimental | no | `{}` | Enabling optional experimentation. `togglesStorageTTL` : How long (Time To Live), in seconds, the toggles in storage are considered valid and should not be fetched on start. If set to 0 will disable expiration checking and will be considered always expired. |

### Listen for updates via the EventEmitter

Expand Down
Loading
Loading