Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v6
with:
node-version: 'lts/*'
cache: 'npm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-license-year.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0

Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,13 @@ The project overall architecture is illustrated in the following diagram:
debug: ErrorLogger()
}).client();

// Wait until the SDK is ready or timed out. If timeout occurs, treatment evaluations will default to 'control'.
// A timeout should not occur if Edge Config is properly configured and synchronized.
await new Promise(res => {
client.on(client.Event.SDK_READY, res);
client.on(client.Event.SDK_READY_TIMED_OUT, res);
});
// Wait until the SDK is ready or times out
try {
await client.whenReady();
} catch (e) {
// SDK timed out. Treatment evaluations will fall back to 'control'.
// This should not happen if Edge Config is properly configured and synchronized.
}

const treatment = await client.getTreatment('SOME_FEATURE_FLAG');

Expand Down
Loading